diff --git a/app/client/src/api/TemplatesApi.ts b/app/client/src/api/TemplatesApi.ts index b8b5b9aaed..415fd47882 100644 --- a/app/client/src/api/TemplatesApi.ts +++ b/app/client/src/api/TemplatesApi.ts @@ -94,12 +94,12 @@ class TemplatesAPI extends Api { static async importTemplateToApplication( templateId: string, applicationId: string, - organizationId: string, + workspaceId: string, body?: string[], ): Promise> { return Api.post( TemplatesAPI.baseUrl + - `/app-templates/${templateId}/merge/${applicationId}/${organizationId}`, + `/app-templates/${templateId}/merge/${applicationId}/${workspaceId}`, body, ); } diff --git a/app/client/src/pages/Editor/gitSync/ReconnectDatasourceModal.tsx b/app/client/src/pages/Editor/gitSync/ReconnectDatasourceModal.tsx index 64508daae4..6e18f524da 100644 --- a/app/client/src/pages/Editor/gitSync/ReconnectDatasourceModal.tsx +++ b/app/client/src/pages/Editor/gitSync/ReconnectDatasourceModal.tsx @@ -244,10 +244,10 @@ function SuccessMessages() { function ReconnectDatasourceModal() { const dispatch = useDispatch(); const isModalOpen = useSelector(getIsReconnectingDatasourcesModalOpen); - const workspaceId = useSelector(getWorkspaceIdForImport); + const importWorkspaceId = useSelector(getWorkspaceIdForImport); const pageIdForImport = useSelector(getPageIdForImport); const environmentsFetched = useSelector((state: AppState) => - areEnvironmentsFetched(state, workspaceId), + areEnvironmentsFetched(state, importWorkspaceId), ); const unconfiguredDatasources = useSelector(getUnconfiguredDatasources); const unconfiguredDatasourceIds = unconfiguredDatasources.map( @@ -297,7 +297,7 @@ function ReconnectDatasourceModal() { const [isTesting, setIsTesting] = useState(false); const queryDS = datasources.find((ds) => ds.id === queryDatasourceId); const dsName = queryDS?.name; - const orgId = queryDS?.workspaceId; + const datasourceWorkspaceId = queryDS?.workspaceId; const checkIfDatasourceIsConfigured = (ds: Datasource | null) => { if (!ds || pluginsArray.length === 0) return false; @@ -351,7 +351,7 @@ function ReconnectDatasourceModal() { environmentName: currentEnvDetails.name, pageId: queryPageId, oAuthPassOrFailVerdict: status, - workspaceId: orgId, + workspaceId: datasourceWorkspaceId, datasourceName: dsName, pluginName: plugins[datasource?.pluginId || ""]?.name, ideType, @@ -404,14 +404,14 @@ function ReconnectDatasourceModal() { // todo uncomment this to fetch datasource config useEffect(() => { - if (isModalOpen && workspaceId && environmentsFetched) { + if (isModalOpen && importWorkspaceId && environmentsFetched) { dispatch( initDatasourceConnectionDuringImportRequest({ - workspaceId: workspaceId as string, + workspaceId: importWorkspaceId as string, }), ); } - }, [workspaceId, isModalOpen, environmentsFetched]); + }, [importWorkspaceId, isModalOpen, environmentsFetched]); useEffect(() => { if (isModalOpen) { diff --git a/app/client/src/sagas/BuildingBlockSagas/BuildingBlockAdditionSagas.ts b/app/client/src/sagas/BuildingBlockSagas/BuildingBlockAdditionSagas.ts index 70c959c764..0a27c2cc64 100644 --- a/app/client/src/sagas/BuildingBlockSagas/BuildingBlockAdditionSagas.ts +++ b/app/client/src/sagas/BuildingBlockSagas/BuildingBlockAdditionSagas.ts @@ -183,7 +183,7 @@ export function* loadBuildingBlocksIntoApplication( try { const dragDetails: DragDetails = yield select(getDragDetails); const applicationId: string = yield select(getCurrentApplicationId); - const workspaceId: string = yield select(getCurrentWorkspaceId); + const loadWorkspaceId: string = yield select(getCurrentWorkspaceId); const existingCopiedWidgets: unknown = yield call(getCopiedWidgets); const buildingBlockDragStartTimestamp: number = yield select( getBuildingBlockDragStartTimestamp, @@ -272,7 +272,7 @@ export function* loadBuildingBlocksIntoApplication( AnalyticsUtil.logEvent("DROP_BUILDING_BLOCK_COMPLETED", { applicationId, - workspaceId, + workspaceId: loadWorkspaceId, source: "explorer", eventData: { buildingBlockName: dragDetails.newWidget.displayName, diff --git a/app/server/appsmith-git/src/main/java/com/appsmith/git/files/FileUtilsCEImpl.java b/app/server/appsmith-git/src/main/java/com/appsmith/git/files/FileUtilsCEImpl.java index 8b92efa2fb..bea3d0ebe6 100644 --- a/app/server/appsmith-git/src/main/java/com/appsmith/git/files/FileUtilsCEImpl.java +++ b/app/server/appsmith-git/src/main/java/com/appsmith/git/files/FileUtilsCEImpl.java @@ -224,7 +224,7 @@ public class FileUtilsCEImpl implements FileInterface { ApplicationGitReference applicationGitReference = (ApplicationGitReference) artifactGitReference; // Repo path will be: - // baseRepo : root/orgId/defaultAppId/repoName/{applicationData} + // baseRepo : root/workspaceId/defaultAppId/repoName/{applicationData} // Checkout to mentioned branch if not already checked-out Stopwatch processStopwatch = new Stopwatch("FS application save"); return gitExecutor @@ -245,7 +245,7 @@ public class FileUtilsCEImpl implements FileInterface { throws GitAPIException, IOException { // Repo path will be: - // baseRepo : root/orgId/defaultAppId/repoName/{applicationData} + // baseRepo : root/workspaceId/defaultAppId/repoName/{applicationData} // Checkout to mentioned branch if not already checked-out return gitExecutor .resetToLastCommit(baseRepoSuffix, branchName) diff --git a/app/server/appsmith-git/src/main/java/com/appsmith/git/handler/ce/FSGitHandlerCEImpl.java b/app/server/appsmith-git/src/main/java/com/appsmith/git/handler/ce/FSGitHandlerCEImpl.java index 9a87e3323f..f1992f970c 100644 --- a/app/server/appsmith-git/src/main/java/com/appsmith/git/handler/ce/FSGitHandlerCEImpl.java +++ b/app/server/appsmith-git/src/main/java/com/appsmith/git/handler/ce/FSGitHandlerCEImpl.java @@ -279,9 +279,9 @@ public class FSGitHandlerCEImpl implements FSGitHandler { }); } - /** Clone the repo to the file path : container-volume/orgId/defaultAppId/repo/ + /** Clone the repo to the file path : container-volume/workspaceId/defaultAppId/repo/ * - * @param repoSuffix combination of orgId, defaultId and repoName + * @param repoSuffix combination of workspaceId, defaultId and repoName * @param remoteUrl ssh url of the git repo(we support cloning via ssh url only with deploy key) * @param privateKey generated by us and specific to the defaultApplication * @param publicKey generated by us and specific to the defaultApplication diff --git a/app/server/appsmith-git/src/main/java/com/appsmith/git/helpers/StopwatchHelpers.java b/app/server/appsmith-git/src/main/java/com/appsmith/git/helpers/StopwatchHelpers.java index 6401442042..426054268b 100644 --- a/app/server/appsmith-git/src/main/java/com/appsmith/git/helpers/StopwatchHelpers.java +++ b/app/server/appsmith-git/src/main/java/com/appsmith/git/helpers/StopwatchHelpers.java @@ -6,7 +6,7 @@ import java.nio.file.Path; public class StopwatchHelpers { public static Stopwatch startStopwatch(Path path, String flowName) { - // path => ..../{orgId}/{appId}/{repoName} + // path => ..../{workspaceId}/{appId}/{repoName} String modifiedFlowName = String.format( "JGIT %s, appId %s", flowName, path.getParent().getFileName().toString()); return new Stopwatch(modifiedFlowName); diff --git a/app/server/appsmith-git/src/main/java/com/appsmith/git/service/ce/GitExecutorCEImpl.java b/app/server/appsmith-git/src/main/java/com/appsmith/git/service/ce/GitExecutorCEImpl.java index bf0f3ab349..228a9eb8cb 100644 --- a/app/server/appsmith-git/src/main/java/com/appsmith/git/service/ce/GitExecutorCEImpl.java +++ b/app/server/appsmith-git/src/main/java/com/appsmith/git/service/ce/GitExecutorCEImpl.java @@ -271,9 +271,9 @@ public class GitExecutorCEImpl implements GitExecutor { }); } - /** Clone the repo to the file path : container-volume/orgId/defaultAppId/repo/ + /** Clone the repo to the file path : container-volume/workspaceId/defaultAppId/repo/ * - * @param repoSuffix combination of orgId, defaultId and repoName + * @param repoSuffix combination of workspaceId, defaultId and repoName * @param remoteUrl ssh url of the git repo(we support cloning via ssh url only with deploy key) * @param privateKey generated by us and specific to the defaultApplication * @param publicKey generated by us and specific to the defaultApplication diff --git a/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/git/GitExecutor.java b/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/git/GitExecutor.java index 7342541e3e..e9337c11b8 100644 --- a/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/git/GitExecutor.java +++ b/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/git/GitExecutor.java @@ -36,7 +36,7 @@ public interface GitExecutor { /** * Method to get the commit history - * @param suffix suffixedPath used to generate the base repo path this includes orgId, defaultAppId, repoName + * @param suffix suffixedPath used to generate the base repo path this includes workspaceId, defaultAppId, repoName * @return list of git commits */ Mono> getCommitHistory(Path suffix); @@ -60,9 +60,9 @@ public interface GitExecutor { Mono pushApplication( Path branchSuffix, String remoteUrl, String publicKey, String privateKey, String branchName); - /** Clone the repo to the file path : container-volume/orgId/defaultAppId/repo/applicationData + /** Clone the repo to the file path : container-volume/workspaceId/defaultAppId/repo/applicationData * - * @param repoSuffix combination of orgId, defaultId and repoName + * @param repoSuffix combination of workspaceId, defaultId and repoName * @param remoteUrl ssh url of the git repo(we support cloning via ssh url only with deploy key) * @param privateKey generated by us and specific to the defaultApplication * @param publicKey generated by us and specific to the defaultApplication @@ -73,7 +73,7 @@ public interface GitExecutor { /** * Create a new branch in the local repo and checkout to that branch * - * @param repoSuffix suffixedPath used to generate the base repo path this includes orgId, defaultAppId, repoName + * @param repoSuffix suffixedPath used to generate the base repo path this includes workspaceId, defaultAppId, repoName * @param branchName branch which needs to be created * @return created branch name */ @@ -82,7 +82,7 @@ public interface GitExecutor { /** * Delete a branch in the local repo * - * @param repoSuffix suffixedPath used to generate the base repo path this includes orgId, defaultAppId, repoName + * @param repoSuffix suffixedPath used to generate the base repo path this includes workspaceId, defaultAppId, repoName * @param branchName branch which needs to be deleted * @return deleted branch name */ @@ -91,7 +91,7 @@ public interface GitExecutor { /** * Git checkout to specific branch * - * @param repoSuffix suffixedPath used to generate the base repo path this includes orgId, defaultAppId, repoName + * @param repoSuffix suffixedPath used to generate the base repo path this includes workspaceId, defaultAppId, repoName * @param branchName name of the branch which needs to be checked out * @return if the operation is successful */ @@ -99,7 +99,7 @@ public interface GitExecutor { /** * Pull changes from remote branch and merge the changes - * @param repoSuffix suffixedPath used to generate the base repo path this includes orgId, defaultAppId, repoName + * @param repoSuffix suffixedPath used to generate the base repo path this includes workspaceId, defaultAppId, repoName * @param remoteUrl ssh url of the git repo(we support cloning via ssh url only with deploy key) * @param branchName remoteBranchName from which commits will be fetched and merged to the current branch * @param privateKey generated by us and specific to the defaultApplication @@ -111,7 +111,7 @@ public interface GitExecutor { throws IOException; /** - * @param repoSuffix suffixedPath used to generate the base repo path this includes orgId, defaultAppId, repoName + * @param repoSuffix suffixedPath used to generate the base repo path this includes workspaceId, defaultAppId, repoName * @return List of branches for the application */ // Mono> listBranches( @@ -131,7 +131,7 @@ public interface GitExecutor { Mono getStatus(Path repoPath, String branchName); /** - * @param repoSuffix suffixedPath used to generate the base repo path this includes orgId, defaultAppId, repoName + * @param repoSuffix suffixedPath used to generate the base repo path this includes workspaceId, defaultAppId, repoName * @param sourceBranch name of the branch whose commits will be referred amd merged to destinationBranch * @param destinationBranch Merge operation is performed on this branch * @return Merge status @@ -139,7 +139,7 @@ public interface GitExecutor { Mono mergeBranch(Path repoSuffix, String sourceBranch, String destinationBranch); /** - * @param repoSuffix suffixedPath used to generate the base repo path this includes orgId, defaultAppId, repoName + * @param repoSuffix suffixedPath used to generate the base repo path this includes workspaceId, defaultAppId, repoName * @param publicKey public ssh key * @param privateKey private ssh key * @param isRepoPath does the repoSuffix contains the complete repoPath or only the suffix @@ -158,7 +158,7 @@ public interface GitExecutor { /** * - * @param repoSuffix suffixedPath used to generate the base repo path this includes orgId, defaultAppId, repoName + * @param repoSuffix suffixedPath used to generate the base repo path this includes workspaceId, defaultAppId, repoName * @param sourceBranch name of the branch whose commits will be referred amd merged to destinationBranch * @param destinationBranch Merge operation is performed on this branch * @return Whether the two branches can be merged or not with list of files where the conflicts are present @@ -168,7 +168,7 @@ public interface GitExecutor { /** * This method will reset the repo to last commit for the specific branch * - * @param repoSuffix suffixedPath used to generate the base repo path this includes orgId, defaultAppId, repoName + * @param repoSuffix suffixedPath used to generate the base repo path this includes workspaceId, defaultAppId, repoName * @param branchName branch for which the repo should hard reset * @return success status * @throws GitAPIException @@ -178,7 +178,7 @@ public interface GitExecutor { /** * - * @param repoSuffix suffixedPath used to generate the base repo path this includes orgId, defaultAppId, repoName + * @param repoSuffix suffixedPath used to generate the base repo path this includes workspaceId, defaultAppId, repoName * @param branchName Name of the remote branch * @return created branch name */ diff --git a/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/git/handler/FSGitHandler.java b/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/git/handler/FSGitHandler.java index 8ff45d21cb..8ebe59f4c6 100644 --- a/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/git/handler/FSGitHandler.java +++ b/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/git/handler/FSGitHandler.java @@ -39,7 +39,7 @@ public interface FSGitHandler { /** * Method to get the commit history - * @param suffix suffixedPath used to generate the base repo path this includes orgId, defaultAppId, repoName + * @param suffix suffixedPath used to generate the base repo path this includes workspaceId, defaultAppId, repoName * @return list of git commits */ Mono> getCommitHistory(Path suffix); @@ -63,9 +63,9 @@ public interface FSGitHandler { Mono pushApplication( Path branchSuffix, String remoteUrl, String publicKey, String privateKey, String branchName); - /** Clone the repo to the file path : container-volume/orgId/defaultAppId/repo/applicationData + /** Clone the repo to the file path : container-volume/workspaceId/defaultAppId/repo/applicationData * - * @param repoSuffix combination of orgId, defaultId and repoName + * @param repoSuffix combination of workspaceId, defaultId and repoName * @param remoteUrl ssh url of the git repo(we support cloning via ssh url only with deploy key) * @param privateKey generated by us and specific to the defaultApplication * @param publicKey generated by us and specific to the defaultApplication @@ -76,7 +76,7 @@ public interface FSGitHandler { /** * Create a new branch in the local repo and checkout to that branch * - * @param repoSuffix suffixedPath used to generate the base repo path this includes orgId, defaultAppId, repoName + * @param repoSuffix suffixedPath used to generate the base repo path this includes workspaceId, defaultAppId, repoName * @param branchName branch which needs to be created * @return created branch name */ @@ -87,7 +87,7 @@ public interface FSGitHandler { /** * Delete a branch in the local repo * - * @param repoSuffix suffixedPath used to generate the base repo path this includes orgId, defaultAppId, repoName + * @param repoSuffix suffixedPath used to generate the base repo path this includes workspaceId, defaultAppId, repoName * @param branchName branch which needs to be deleted * @return deleted branch name */ @@ -96,7 +96,7 @@ public interface FSGitHandler { /** * Git checkout to specific branch * - * @param repoSuffix suffixedPath used to generate the base repo path this includes orgId, defaultAppId, repoName + * @param repoSuffix suffixedPath used to generate the base repo path this includes workspaceId, defaultAppId, repoName * @param branchName name of the branch which needs to be checked out * @return if the operation is successful */ @@ -104,7 +104,7 @@ public interface FSGitHandler { /** * Pull changes from remote branch and merge the changes - * @param repoSuffix suffixedPath used to generate the base repo path this includes orgId, defaultAppId, repoName + * @param repoSuffix suffixedPath used to generate the base repo path this includes workspaceId, defaultAppId, repoName * @param remoteUrl ssh url of the git repo(we support cloning via ssh url only with deploy key) * @param branchName remoteBranchName from which commits will be fetched and merged to the current branch * @param privateKey generated by us and specific to the defaultApplication @@ -116,7 +116,7 @@ public interface FSGitHandler { throws IOException; /** - * @param repoSuffix suffixedPath used to generate the base repo path this includes orgId, defaultAppId, repoName + * @param repoSuffix suffixedPath used to generate the base repo path this includes workspaceId, defaultAppId, repoName * @return List of branches for the application */ // Mono> listBranches( @@ -138,7 +138,7 @@ public interface FSGitHandler { /** * This method merges source branch into destination branch for a git repository which is present on the partial * path provided. This assumes that the branch on which the merge will happen is already checked out - * @param repoSuffix suffixedPath used to generate the base repo path this includes orgId, defaultAppId, repoName + * @param repoSuffix suffixedPath used to generate the base repo path this includes workspaceId, defaultAppId, repoName * @param sourceBranch name of the branch whose commits will be referred amd merged to destinationBranch * @param destinationBranch Merge operation is performed on this branch * @return Merge status @@ -146,7 +146,7 @@ public interface FSGitHandler { Mono mergeBranch(Path repoSuffix, String sourceBranch, String destinationBranch); /** - * @param repoSuffix suffixedPath used to generate the base repo path this includes orgId, defaultAppId, repoName + * @param repoSuffix suffixedPath used to generate the base repo path this includes workspaceId, defaultAppId, repoName * @param publicKey public ssh key * @param privateKey private ssh key * @param isRepoPath does the repoSuffix contains the complete repoPath or only the suffix @@ -165,7 +165,7 @@ public interface FSGitHandler { /** * - * @param repoSuffix suffixedPath used to generate the base repo path this includes orgId, defaultAppId, repoName + * @param repoSuffix suffixedPath used to generate the base repo path this includes workspaceId, defaultAppId, repoName * @param sourceBranch name of the branch whose commits will be referred amd merged to destinationBranch * @param destinationBranch Merge operation is performed on this branch * @return Whether the two branches can be merged or not with list of files where the conflicts are present @@ -175,7 +175,7 @@ public interface FSGitHandler { /** * This method will reset the repo to last commit for the specific branch * - * @param repoSuffix suffixedPath used to generate the base repo path this includes orgId, defaultAppId, repoName + * @param repoSuffix suffixedPath used to generate the base repo path this includes workspaceId, defaultAppId, repoName * @param branchName branch for which the repo should hard reset * @return success status * @throws GitAPIException @@ -185,7 +185,7 @@ public interface FSGitHandler { /** * - * @param repoSuffix suffixedPath used to generate the base repo path this includes orgId, defaultAppId, repoName + * @param repoSuffix suffixedPath used to generate the base repo path this includes workspaceId, defaultAppId, repoName * @param branchName Name of the remote branch * @return created branch name */ diff --git a/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/models/Datasource.java b/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/models/Datasource.java index ebd1057071..bec7148285 100644 --- a/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/models/Datasource.java +++ b/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/models/Datasource.java @@ -42,11 +42,6 @@ public class Datasource extends GitSyncedDomain { @JsonView(Views.Public.class) String pluginName; - // Organizations migrated to workspaces, kept the field as deprecated to support the old migration - @Deprecated - @JsonView(Views.Public.class) - String organizationId; - @JsonView({Views.Public.class, FromRequest.class}) String workspaceId; diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/acl/AclConstants.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/acl/AclConstants.java deleted file mode 100644 index 19fa8d37e9..0000000000 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/acl/AclConstants.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.appsmith.server.acl; - -import java.util.Set; - -public interface AclConstants { - Set PERMISSIONS_CRUD_ORG = Set.of("create:organizations"); - - String GROUP_ORG_ADMIN = "org-admin"; - - String DEFAULT_ORG_ID = "default-org"; - - Set PERMISSIONS_GROUP_ORG_ADMIN = Set.of( - "create:organizations", "read:organizations", "create:groups", "read:groups", "create:users", "read:users"); -} diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/acl/AppsmithRole.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/acl/AppsmithRole.java index b08ddb9964..2f71537d7d 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/acl/AppsmithRole.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/acl/AppsmithRole.java @@ -28,7 +28,7 @@ import static com.appsmith.server.constants.FieldName.WORKSPACE_VIEWER_DESCRIPTI @Getter public enum AppsmithRole { - ORGANIZATION_ADMIN( + WORKSPACE_ADMIN( ADMINISTRATOR, WORKSPACE_ADMINISTRATOR_DESCRIPTION, Set.of( @@ -40,7 +40,7 @@ public enum AppsmithRole { WORKSPACE_DELETE_DATASOURCES, WORKSPACE_DELETE_APPLICATIONS, DELETE_WORKSPACES)), - ORGANIZATION_DEVELOPER( + WORKSPACE_DEVELOPER( DEVELOPER, WORKSPACE_DEVELOPER_DESCRIPTION, Set.of( @@ -54,7 +54,7 @@ public enum AppsmithRole { WORKSPACE_CREATE_DATASOURCE, WORKSPACE_DELETE_DATASOURCES, WORKSPACE_DELETE_APPLICATIONS)), - ORGANIZATION_VIEWER( + WORKSPACE_VIEWER( VIEWER, WORKSPACE_VIEWER_DESCRIPTION, Set.of( diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/applications/base/ApplicationServiceCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/applications/base/ApplicationServiceCEImpl.java index f3207054e2..8555b3aecb 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/applications/base/ApplicationServiceCEImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/applications/base/ApplicationServiceCEImpl.java @@ -325,7 +325,7 @@ public class ApplicationServiceCEImpl extends BaseService> mergeTemplateWithApplication( @PathVariable String templateId, @PathVariable String branchedApplicationId, - @PathVariable String organizationId, + @PathVariable String workspaceId, @RequestBody(required = false) List pagesToImport) { return applicationTemplateService - .mergeTemplateWithApplication(templateId, branchedApplicationId, organizationId, pagesToImport) + .mergeTemplateWithApplication(templateId, branchedApplicationId, workspaceId, pagesToImport) .map(importedApp -> new ResponseDTO<>(HttpStatus.OK.value(), importedApp, null)); } diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/git/common/CommonGitServiceCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/git/common/CommonGitServiceCEImpl.java index b1bfadbd6e..ec4488b881 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/git/common/CommonGitServiceCEImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/git/common/CommonGitServiceCEImpl.java @@ -2096,7 +2096,7 @@ public class CommonGitServiceCEImpl implements CommonGitServiceCE { analyticsProps.put(FieldName.IS_MERGEABLE, isMergeable); } analyticsProps.putAll(Map.of( - FieldName.ORGANIZATION_ID, + "organizationId", defaultIfNull(artifact.getWorkspaceId(), ""), "orgId", defaultIfNull(artifact.getWorkspaceId(), ""), diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/git/utils/GitAnalyticsUtils.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/git/utils/GitAnalyticsUtils.java index 171f201dba..715ab0e37a 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/git/utils/GitAnalyticsUtils.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/git/utils/GitAnalyticsUtils.java @@ -111,7 +111,7 @@ public class GitAnalyticsUtils { analyticsProps.put(FieldName.IS_MERGEABLE, isMergeable); } analyticsProps.putAll(Map.of( - FieldName.ORGANIZATION_ID, + "organizationId", defaultIfNull(artifact.getWorkspaceId(), ""), "orgId", defaultIfNull(artifact.getWorkspaceId(), ""), diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/helpers/ce/CommonGitFileUtilsCE.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/helpers/ce/CommonGitFileUtilsCE.java index 260a0a8c5b..a4b7d9a986 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/helpers/ce/CommonGitFileUtilsCE.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/helpers/ce/CommonGitFileUtilsCE.java @@ -198,7 +198,7 @@ public class CommonGitFileUtilsCE { final Map data = Map.of( artifactConstant, repoPath.getParent().getFileName().toString(), - FieldName.ORGANIZATION_ID, + "organizationId", repoPath.getParent().getParent().getFileName().toString(), FieldName.FLOW_NAME, stopwatch.getFlow(), @@ -676,7 +676,7 @@ public class CommonGitFileUtilsCE { final Map data = Map.of( constantsMap.get(FieldName.ID), baseArtifactId, - FieldName.ORGANIZATION_ID, + "organizationId", workspaceId, FieldName.FLOW_NAME, stopwatch.getFlow(), diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/newactions/base/NewActionServiceCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/newactions/base/NewActionServiceCEImpl.java index 49af43d5ab..c6e729a293 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/newactions/base/NewActionServiceCEImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/newactions/base/NewActionServiceCEImpl.java @@ -334,15 +334,6 @@ public class NewActionServiceCEImpl extends BaseService datasourceMono = Mono.just(action.getDatasource()); if (action.getPluginType() != PluginType.JS) { if (action.getDatasource().getId() == null) { - - // This is a nested datasource. If the action is in bad state (aka without workspace id, add the - // same) - if (action.getDatasource().getWorkspaceId() == null - && action.getDatasource().getOrganizationId() != null) { - action.getDatasource() - .setWorkspaceId(action.getDatasource().getOrganizationId()); - } - datasourceMono = Mono.just(action.getDatasource()).flatMap(datasourceService::validateDatasource); } else { // TODO: check if datasource should be fetched with edit during action create or update. diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/ApplicationTemplateServiceCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/ApplicationTemplateServiceCEImpl.java index 3f22f26fe0..8a0625382c 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/ApplicationTemplateServiceCEImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/ApplicationTemplateServiceCEImpl.java @@ -224,7 +224,7 @@ public class ApplicationTemplateServiceCEImpl implements ApplicationTemplateServ */ @Override public Mono mergeTemplateWithApplication( - String templateId, String branchedApplicationId, String organizationId, List pagesToImport) { + String templateId, String branchedApplicationId, String workspaceId, List pagesToImport) { Mono importedApplicationMono = getApplicationJsonFromTemplate(templateId) .flatMap(applicationJson -> { String templateName = ""; @@ -235,7 +235,7 @@ public class ApplicationTemplateServiceCEImpl implements ApplicationTemplateServ return importService .mergeArtifactExchangeJsonWithImportableArtifact( - organizationId, branchedApplicationId, null, applicationJson, pagesToImport) + workspaceId, branchedApplicationId, null, applicationJson, pagesToImport) .map(importableArtifact -> (Application) importableArtifact) .zipWith(Mono.just(templateName)); }) diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/WorkspaceServiceCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/WorkspaceServiceCEImpl.java index 10f0822459..7758ee3f0c 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/WorkspaceServiceCEImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/WorkspaceServiceCEImpl.java @@ -283,7 +283,7 @@ public class WorkspaceServiceCEImpl extends BaseService workspacePermissions = AppsmithRole.ORGANIZATION_ADMIN.getPermissions().stream() + Set workspacePermissions = AppsmithRole.WORKSPACE_ADMIN.getPermissions().stream() .filter(aclPermission -> aclPermission.getEntity().equals(Workspace.class)) .map(aclPermission -> new Permission(workspace.getId(), aclPermission)) .collect(Collectors.toSet()); @@ -313,7 +313,7 @@ public class WorkspaceServiceCEImpl extends BaseService aclPermission.getEntity().equals(Workspace.class)) .map(aclPermission -> new Permission(workspace.getId(), aclPermission)) .collect(Collectors.toSet()); @@ -326,7 +326,7 @@ public class WorkspaceServiceCEImpl extends BaseService aclPermission.getEntity().equals(Workspace.class)) .map(aclPermission -> new Permission(workspace.getId(), aclPermission)) .collect(Collectors.toSet()); @@ -375,12 +375,6 @@ public class WorkspaceServiceCEImpl extends BaseService create(Workspace workspace) { return sessionUserService.getCurrentUser().flatMap(user -> create(workspace, user, Boolean.FALSE)); diff --git a/app/server/appsmith-server/src/main/resources/CRUD-DB-Table-Template-Application.json b/app/server/appsmith-server/src/main/resources/CRUD-DB-Table-Template-Application.json index fd69403ede..54a1133b67 100644 --- a/app/server/appsmith-server/src/main/resources/CRUD-DB-Table-Template-Application.json +++ b/app/server/appsmith-server/src/main/resources/CRUD-DB-Table-Template-Application.json @@ -3879,7 +3879,7 @@ " { ...get_exported_app.data, decryptedFields: undefined, datasourceList: get_exported_app.data.datasourceList, \"datasourceConfigurationStructureList\": get_exported_app.data.datasourceList.map((source) => { return {datasourceId: source.name, structure: appsmith.store[source.pluginId] == undefined ? {}: appsmith.store[source.pluginId].data} } ) } " ], "datasource": { - "organizationId": "6171a062b7de236aa183ee0e", + "workspaceId": "6171a062b7de236aa183ee0e", "invalids": [], "deleted": false, "pluginId": "restapi-plugin", @@ -3926,7 +3926,7 @@ " { ...get_exported_app.data, decryptedFields: undefined, datasourceList: get_exported_app.data.datasourceList, \"datasourceConfigurationStructureList\": get_exported_app.data.datasourceList.map((source) => { return {datasourceId: source.name, structure: appsmith.store[source.pluginId] == undefined ? {}: appsmith.store[source.pluginId].data} } ) } " ], "datasource": { - "organizationId": "6171a062b7de236aa183ee0e", + "workspaceId": "6171a062b7de236aa183ee0e", "invalids": [], "deleted": false, "pluginId": "restapi-plugin", @@ -4143,7 +4143,7 @@ "async () => {\n get_exported_app.run(() => {\n const arr = JSON.parse(datasource_arr.text);\n arr.map(row => {\n get_datasource_structure.run((res, params) => {\n storeValue(params.name, res);\n }, undefined, row);\n });\n });\n}" ], "datasource": { - "organizationId": "6171a062b7de236aa183ee0e", + "workspaceId": "6171a062b7de236aa183ee0e", "deleted": false, "pluginId": "js-plugin", "name": "UNUSED_DATASOURCE", @@ -4183,7 +4183,7 @@ "async () => {\n get_exported_app.run(() => {\n const arr = JSON.parse(datasource_arr.text);\n arr.map(row => {\n get_datasource_structure.run((res, params) => {\n storeValue(params.name, res);\n }, undefined, row);\n });\n });\n}" ], "datasource": { - "organizationId": "6171a062b7de236aa183ee0e", + "workspaceId": "6171a062b7de236aa183ee0e", "deleted": false, "pluginId": "js-plugin", "name": "UNUSED_DATASOURCE", @@ -4236,7 +4236,7 @@ "tableName_input.text" ], "datasource": { - "organizationId": "6171a062b7de236aa183ee0e", + "workspaceId": "6171a062b7de236aa183ee0e", "invalids": [], "deleted": false, "pluginId": "restapi-plugin", @@ -4290,7 +4290,7 @@ "tableName_input.text" ], "datasource": { - "organizationId": "6171a062b7de236aa183ee0e", + "workspaceId": "6171a062b7de236aa183ee0e", "invalids": [], "deleted": false, "pluginId": "restapi-plugin", @@ -4343,7 +4343,7 @@ "search_keys_input.text" ], "datasource": { - "organizationId": "6171a062b7de236aa183ee0e", + "workspaceId": "6171a062b7de236aa183ee0e", "invalids": [], "deleted": false, "pluginId": "restapi-plugin", @@ -4395,7 +4395,7 @@ "search_keys_input.text" ], "datasource": { - "organizationId": "6171a062b7de236aa183ee0e", + "workspaceId": "6171a062b7de236aa183ee0e", "invalids": [], "deleted": false, "pluginId": "restapi-plugin", @@ -4448,7 +4448,7 @@ "gsheet_ds_input.text.split(\"datasources/\")[1].split(\"/\" || \"?\")[0]" ], "datasource": { - "organizationId": "6171a062b7de236aa183ee0e", + "workspaceId": "6171a062b7de236aa183ee0e", "invalids": [], "deleted": false, "pluginId": "restapi-plugin", @@ -4500,7 +4500,7 @@ "gsheet_ds_input.text.split(\"datasources/\")[1].split(\"/\" || \"?\")[0]" ], "datasource": { - "organizationId": "6171a062b7de236aa183ee0e", + "workspaceId": "6171a062b7de236aa183ee0e", "invalids": [], "deleted": false, "pluginId": "restapi-plugin", diff --git a/app/server/appsmith-server/src/main/resources/examples-organization.json b/app/server/appsmith-server/src/main/resources/examples-organization.json deleted file mode 100644 index 3dfc8dcae9..0000000000 --- a/app/server/appsmith-server/src/main/resources/examples-organization.json +++ /dev/null @@ -1,13482 +0,0 @@ -{ - "name": "Example Apps", - "organizationSettings": [], - "slug": "example-apps", - "userRoles": [], - "deleted": false, - "policies": [], - "_class": "com.appsmith.server.domains.Organization", - "$datasources": [ - { - "name": "FreshDesk API", - "$pluginPackageName": "restapi-plugin", - "datasourceConfiguration": { - "sshProxyEnabled": false, - "url": "https://appsmithhelp.freshdesk.com" - }, - "invalids": [], - "deleted": false, - "policies": [], - "_class": "com.appsmith.server.domains.Datasource" - }, - { - "name": "Mock Database", - "$pluginPackageName": "postgres-plugin", - "datasourceConfiguration": { - "connection": { - "mode": "READ_WRITE" - }, - "endpoints": [ - { - "host": "fake-api.cvuydmurdlas.us-east-1.rds.amazonaws.com", - "port": 5432 - } - ], - "authentication": { - "username": "fakeapi", - "password": "LimitedAccess123#", - "databaseName": "fakeapi" - }, - "sshProxyEnabled": false - }, - "invalids": [], - "deleted": false, - "policies": [], - "_class": "com.appsmith.server.domains.Datasource" - } - ], - "$applications": [ - { - "name": "Charts Tutorial", - "isPublic": true, - "$pages": [ - { - "name": "1. Display Chart Data", - "$isDefault": true, - "$actions": [ - { - "name": "getSignupCount", - "datasource": { - "$isEmbedded": false, - "name": "Mock Database", - "$pluginPackageName": "postgres-plugin", - "datasourceConfiguration": { - "connection": { - "mode": "READ_WRITE" - }, - "endpoints": [ - { - "host": "fake-api.cvuydmurdlas.us-east-1.rds.amazonaws.com", - "port": 5432 - } - ], - "authentication": { - "username": "fakeapi", - "password": "LimitedAccess123#", - "databaseName": "fakeapi" - }, - "sshProxyEnabled": false - }, - "invalids": [], - "deleted": false, - "policies": [] - }, - "actionConfiguration": { - "timeoutInMillisecond": 10000, - "paginationType": "NONE", - "body": "SELECT count(id), TO_CHAR(\"createdAt\" :: DATE, 'dd/mm/yyyy') as sign_up_date FROM users GROUP BY sign_up_date ORDER BY sign_up_date limit 31;\n" - }, - "pluginType": "DB", - "executeOnLoad": true, - "dynamicBindingPathList": [], - "isValid": true, - "invalids": [], - "jsonPathKeys": [], - "deleted": false, - "policies": [], - "_class": "com.appsmith.server.domains.Action" - } - ], - "layouts": [ - { - "viewMode": false, - "dsl": { - "widgetName": "MainContainer", - "backgroundColor": "none", - "rightColumn": 1224, - "snapColumns": 16, - "detachFromLayout": true, - "widgetId": "0", - "topRow": 0, - "bottomRow": 1280, - "containerStyle": "none", - "snapRows": 33, - "parentRowSpace": 1, - "type": "CANVAS_WIDGET", - "canExtend": true, - "dynamicBindings": {}, - "version": 5, - "minHeight": 1292, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Text1", - "rightColumn": 11, - "textAlign": "CENTER", - "widgetId": "ka0sqegqwh", - "topRow": 0, - "bottomRow": 1, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "text": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 5, - "text": "

{{appsmith.mode !== \"EDIT\" ? \"Edit this application to begin\" : \"Display Chart Data\"}}

", - "textStyle": "LABEL" - }, - { - "widgetName": "Text2", - "rightColumn": 12, - "textAlign": "CENTER", - "widgetId": "dpbv1ua5ng", - "topRow": 1, - "bottomRow": 2, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 4, - "text": "This page demonstrates how to display data in a chart", - "textStyle": "BODY" - }, - { - "widgetName": "Chart1", - "rightColumn": 8, - "allowScroll": false, - "widgetId": "n536wy81vu", - "topRow": 3, - "bottomRow": 14, - "parentRowSpace": 40, - "isVisible": true, - "type": "CHART_WIDGET", - "dynamicBindings": { - "chartData": true - }, - "parentId": "0", - "isLoading": false, - "chartData": "[{\"seriesName\":\"Users\",\"data\":\"{{getSignupCount.data.map((dateCount) => { \\nreturn {\\n x: moment(dateCount.sign_up_date).format(\\\"Do\\\"),\\n y: dateCount.count + \\\"\\\"\\n}\\n})}}\"}]", - "yAxisName": "Date", - "parentColumnSpace": 74, - "chartName": "User Sign up Trend", - "leftColumn": 0, - "xAxisName": "Users", - "chartType": "LINE_CHART" - }, - { - "widgetName": "Text3", - "rightColumn": 16, - "textAlign": "LEFT", - "widgetId": "htqwsl576a", - "topRow": 3, - "bottomRow": 9, - "parentRowSpace": 40, - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true, - "isVisible": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 9, - "text": "

šŸ’” The chart displays data returned by the getSignupCount Query. The data is bound to the chart property using
{{ \"{{ getSignupCount.data }}\" }}

\nšŸŒŖļø The chart maps over the data returned by getSignupCount and transforms it to an Array of (x,y).

\n🧱 APIs, Queries and Widgets are all objects of the application exposed via Javascript inside {{\"{{}}\"}}

\n

", - "textStyle": "BODY", - "shouldScroll": true, - "dynamicProperties": { - "isVisible": true - } - }, - { - "widgetName": "Text4", - "rightColumn": 16, - "textAlign": "LEFT", - "widgetId": "zjvwf67adp", - "topRow": 10, - "bottomRow": 11, - "parentRowSpace": 40, - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 9, - "text": "-------------------------------------------------------------------", - "textStyle": "LABEL", - "dynamicProperties": { - "isVisible": true - } - }, - { - "widgetName": "Text5", - "rightColumn": 16, - "textAlign": "LEFT", - "widgetId": "rbhxchhlgc", - "topRow": 11, - "bottomRow": 13, - "parentRowSpace": 40, - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 9, - "text": "

šŸ” Inspect the chart properties & the getSignupCount Query.

šŸ“ˆ Update the chart type to a column chart

", - "textStyle": "BODY", - "dynamicProperties": { - "isVisible": true - } - } - ] - }, - "publishedDsl": { - "widgetName": "MainContainer", - "backgroundColor": "none", - "rightColumn": 1224, - "snapColumns": 16, - "detachFromLayout": true, - "widgetId": "0", - "topRow": 0, - "bottomRow": 1280, - "containerStyle": "none", - "snapRows": 33, - "parentRowSpace": 1, - "type": "CANVAS_WIDGET", - "canExtend": true, - "dynamicBindings": {}, - "version": 5, - "minHeight": 1292, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Text1", - "rightColumn": 11, - "textAlign": "CENTER", - "widgetId": "ka0sqegqwh", - "topRow": 0, - "bottomRow": 1, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "text": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 5, - "text": "

{{appsmith.mode !== \"EDIT\" ? \"Edit this application to begin\" : \"Display Chart Data\"}}

", - "textStyle": "LABEL" - }, - { - "widgetName": "Text2", - "rightColumn": 12, - "textAlign": "CENTER", - "widgetId": "dpbv1ua5ng", - "topRow": 1, - "bottomRow": 2, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 4, - "text": "This page demonstrates how to display data in a chart", - "textStyle": "BODY" - }, - { - "widgetName": "Chart1", - "rightColumn": 8, - "allowScroll": false, - "widgetId": "n536wy81vu", - "topRow": 3, - "bottomRow": 14, - "parentRowSpace": 40, - "isVisible": true, - "type": "CHART_WIDGET", - "dynamicBindings": { - "chartData": true - }, - "parentId": "0", - "isLoading": false, - "chartData": "[{\"seriesName\":\"Users\",\"data\":\"{{getSignupCount.data.map((dateCount) => { \\nreturn {\\n x: moment(dateCount.sign_up_date).format(\\\"Do\\\"),\\n y: dateCount.count + \\\"\\\"\\n}\\n})}}\"}]", - "yAxisName": "Date", - "parentColumnSpace": 74, - "chartName": "User Sign up Trend", - "leftColumn": 0, - "xAxisName": "Users", - "chartType": "LINE_CHART" - }, - { - "widgetName": "Text3", - "rightColumn": 16, - "textAlign": "LEFT", - "widgetId": "htqwsl576a", - "topRow": 3, - "bottomRow": 9, - "parentRowSpace": 40, - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true, - "isVisible": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 9, - "text": "

šŸ’” The chart displays data returned by the getSignupCount Query. The data is bound to the chart property using
{{ \"{{ getSignupCount.data }}\" }}

\nšŸŒŖļø The chart maps over the data returned by getSignupCount and transforms it to an Array of (x,y).

\n🧱 APIs, Queries and Widgets are all objects of the application exposed via Javascript inside {{\"{{}}\"}}

\n

", - "textStyle": "BODY", - "shouldScroll": true, - "dynamicProperties": { - "isVisible": true - } - }, - { - "widgetName": "Text4", - "rightColumn": 16, - "textAlign": "LEFT", - "widgetId": "zjvwf67adp", - "topRow": 10, - "bottomRow": 11, - "parentRowSpace": 40, - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 9, - "text": "-------------------------------------------------------------------", - "textStyle": "LABEL", - "dynamicProperties": { - "isVisible": true - } - }, - { - "widgetName": "Text5", - "rightColumn": 16, - "textAlign": "LEFT", - "widgetId": "rbhxchhlgc", - "topRow": 11, - "bottomRow": 13, - "parentRowSpace": 40, - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 9, - "text": "

šŸ” Inspect the chart properties & the getSignupCount Query.

šŸ“ˆ Update the chart type to a column chart

", - "textStyle": "BODY", - "dynamicProperties": { - "isVisible": true - } - } - ] - }, - "layoutOnLoadActions": [ - [ - { - "name": "getSignupCount", - "pluginType": "DB", - "jsonPathKeys": [], - "timeoutInMillisecond": 10000 - } - ] - ], - "publishedLayoutOnLoadActions": [ - [ - { - "name": "getSignupCount", - "pluginType": "DB", - "jsonPathKeys": [], - "timeoutInMillisecond": 10000 - } - ] - ], - "widgetNames": [ - "Text5", - "Text4", - "Text3", - "Text2", - "Text1", - "MainContainer", - "Chart1" - ], - "deleted": false, - "policies": [] - } - ], - "deleted": false, - "policies": [], - "_class": "com.appsmith.server.domains.Page" - }, - { - "name": "2. Filter Chart Data", - "$isDefault": false, - "$actions": [ - { - "name": "getFilteredSignupCount", - "datasource": { - "$isEmbedded": false, - "name": "Mock Database", - "$pluginPackageName": "postgres-plugin", - "datasourceConfiguration": { - "connection": { - "mode": "READ_WRITE" - }, - "endpoints": [ - { - "host": "fake-api.cvuydmurdlas.us-east-1.rds.amazonaws.com", - "port": 5432 - } - ], - "authentication": { - "username": "fakeapi", - "password": "LimitedAccess123#", - "databaseName": "fakeapi" - }, - "sshProxyEnabled": false - }, - "invalids": [], - "deleted": false, - "policies": [] - }, - "actionConfiguration": { - "timeoutInMillisecond": 10000, - "paginationType": "NONE", - "body": "SELECT count(id), TO_CHAR(\"createdAt\" :: DATE, 'dd/mm/yyyy') as sign_up_date FROM users where \"createdAt\" >= '{{startDatePicker.selectedDate}}' and \"createdAt\" <= '{{endDatePicker.selectedDate}}' GROUP BY sign_up_date ORDER BY sign_up_date;\n" - }, - "pluginType": "DB", - "executeOnLoad": true, - "dynamicBindingPathList": [ - { - "key": "body" - } - ], - "isValid": true, - "invalids": [], - "jsonPathKeys": [ - "startDatePicker.selectedDate", - "endDatePicker.selectedDate" - ], - "deleted": false, - "policies": [], - "_class": "com.appsmith.server.domains.Action" - } - ], - "layouts": [ - { - "viewMode": false, - "dsl": { - "widgetName": "MainContainer", - "backgroundColor": "none", - "rightColumn": 1224, - "snapColumns": 16, - "detachFromLayout": true, - "widgetId": "0", - "topRow": 0, - "bottomRow": 1280, - "containerStyle": "none", - "snapRows": 33, - "parentRowSpace": 1, - "type": "CANVAS_WIDGET", - "canExtend": true, - "dynamicBindings": {}, - "version": 5, - "minHeight": 1292, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Chart1", - "rightColumn": 8, - "allowScroll": false, - "widgetId": "ul3c5oquih", - "topRow": 4, - "bottomRow": 14, - "parentRowSpace": 40, - "isVisible": true, - "type": "CHART_WIDGET", - "dynamicBindings": { - "chartData": true - }, - "parentId": "0", - "isLoading": false, - "chartData": "[{\"seriesName\":\"Users\",\"data\":\"{{getFilteredSignupCount.data.map((dateCount) => { \\nreturn {\\n x: moment(dateCount.sign_up_date, \\\"DD/MM/YYYY\\\").format(\\\"Do- MMM\\\"),\\n y: dateCount.count + \\\"\\\"\\n}\\n})}}\"}]", - "yAxisName": "Users", - "parentColumnSpace": 74, - "chartName": "User Sign up Trend", - "leftColumn": 0, - "xAxisName": "Date", - "chartType": "AREA_CHART" - }, - { - "widgetName": "Text1", - "rightColumn": 12, - "textAlign": "CENTER", - "widgetId": "esiyii2azf", - "topRow": 0, - "bottomRow": 1, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "text": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 4, - "text": "

{{appsmith.mode !== \"EDIT\" ? \"Edit this application to begin\" : \"Filter Chart Data\"}}

", - "textStyle": "LABEL" - }, - { - "widgetName": "startDatePicker", - "defaultDate": "{{moment().subtract(2, \"months\").format(\"YYYY-MM-DD\")}}", - "rightColumn": 4, - "dateFormat": "YYYY-MM-DD", - "widgetId": "3tsl49w1s0", - "dynamicProperties": { - "defaultDate": true - }, - "topRow": 3, - "bottomRow": 4, - "parentRowSpace": 40, - "isVisible": true, - "datePickerType": "DATE_PICKER", - "label": "", - "type": "DATE_PICKER_WIDGET", - "dynamicBindings": { - "defaultDate": true, - "isValid": true, - "value": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 2, - "dynamicTriggers": { - "onDateSelected": true - }, - "isDisabled": false, - "onDateSelected": "{{getFilteredSignupCount.run()}}" - }, - { - "widgetName": "endDatePicker", - "defaultDate": "{{moment().format(\"YYYY-MM-DD\")}}", - "rightColumn": 8, - "dateFormat": "YYYY-MM-DD", - "widgetId": "cocrv71gh5", - "dynamicProperties": { - "defaultDate": true - }, - "topRow": 3, - "bottomRow": 4, - "parentRowSpace": 40, - "isVisible": true, - "datePickerType": "DATE_PICKER", - "label": "", - "type": "DATE_PICKER_WIDGET", - "dynamicBindings": { - "defaultDate": true, - "isValid": true, - "value": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 6, - "dynamicTriggers": { - "onDateSelected": true - }, - "isDisabled": false, - "onDateSelected": "{{getFilteredSignupCount.run()}}" - }, - { - "widgetName": "Text2", - "rightColumn": 2, - "textAlign": "RIGHT", - "widgetId": "r31px5tpl6", - "topRow": 3, - "bottomRow": 4, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 0, - "text": "Start Date", - "textStyle": "LABEL" - }, - { - "widgetName": "Text3", - "rightColumn": 6, - "textAlign": "RIGHT", - "widgetId": "21rsr77a84", - "topRow": 3, - "bottomRow": 4, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 5, - "text": "End Date", - "textStyle": "LABEL" - }, - { - "widgetName": "Text4", - "rightColumn": 16, - "textAlign": "LEFT", - "widgetId": "digi7gghdg", - "topRow": 3, - "bottomRow": 8, - "parentRowSpace": 40, - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 9, - "text": "

šŸ’” The chart displays data returned by the getFilteredSignupCount Query.

\nšŸ“… The getFilteredSignupCount Query reads the values of the startDatePicker and endDatePicker to filter the query. The Date Pickers execute the query onDateSelected\n

", - "textStyle": "BODY", - "shouldScroll": true, - "dynamicProperties": { - "isVisible": true - } - }, - { - "widgetName": "Text7", - "rightColumn": 13, - "textAlign": "CENTER", - "widgetId": "aiguj74viz", - "topRow": 1, - "bottomRow": 2, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 3, - "text": "This page demonstrates how to filter and change the data displayed in a chart", - "textStyle": "BODY", - "shouldScroll": false - }, - { - "widgetName": "Text8", - "rightColumn": 16, - "textAlign": "LEFT", - "widgetId": "kyw545g7n4", - "topRow": 8, - "bottomRow": 9, - "parentRowSpace": 40, - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 9, - "text": "---------------------------------------------------------------------", - "textStyle": "LABEL", - "dynamicProperties": { - "isVisible": true - } - }, - { - "widgetName": "Text9", - "rightColumn": 16, - "textAlign": "LEFT", - "widgetId": "4i40lfqldh", - "topRow": 9, - "bottomRow": 14, - "parentRowSpace": 40, - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true, - "isVisible": true - }, - "shouldScroll": true, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 9, - "text": "

šŸ” Inspect the getFilteredSignupCount Query.

\nšŸ“… Update the startDatePicker to begin 6 months ago by default\n

šŸ“ˆ Update the x-axis to display the date range selected
\nEx. {{\"{{startDatePicker.selectedDate}} - {{endDatePicker.selectedDate}}\"}}

", - "textStyle": "BODY", - "dynamicProperties": { - "isVisible": true - } - } - ] - }, - "publishedDsl": { - "widgetName": "MainContainer", - "backgroundColor": "none", - "rightColumn": 1224, - "snapColumns": 16, - "detachFromLayout": true, - "widgetId": "0", - "topRow": 0, - "bottomRow": 1280, - "containerStyle": "none", - "snapRows": 33, - "parentRowSpace": 1, - "type": "CANVAS_WIDGET", - "canExtend": true, - "dynamicBindings": {}, - "version": 5, - "minHeight": 1292, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Chart1", - "rightColumn": 8, - "allowScroll": false, - "widgetId": "ul3c5oquih", - "topRow": 4, - "bottomRow": 14, - "parentRowSpace": 40, - "isVisible": true, - "type": "CHART_WIDGET", - "dynamicBindings": { - "chartData": true - }, - "parentId": "0", - "isLoading": false, - "chartData": "[{\"seriesName\":\"Users\",\"data\":\"{{getFilteredSignupCount.data.map((dateCount) => { \\nreturn {\\n x: moment(dateCount.sign_up_date, \\\"DD/MM/YYYY\\\").format(\\\"Do- MMM\\\"),\\n y: dateCount.count + \\\"\\\"\\n}\\n})}}\"}]", - "yAxisName": "Users", - "parentColumnSpace": 74, - "chartName": "User Sign up Trend", - "leftColumn": 0, - "xAxisName": "Date", - "chartType": "AREA_CHART" - }, - { - "widgetName": "Text1", - "rightColumn": 12, - "textAlign": "CENTER", - "widgetId": "esiyii2azf", - "topRow": 0, - "bottomRow": 1, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "text": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 4, - "text": "

{{appsmith.mode !== \"EDIT\" ? \"Edit this application to begin\" : \"Filter Chart Data\"}}

", - "textStyle": "LABEL" - }, - { - "widgetName": "startDatePicker", - "defaultDate": "{{moment().subtract(2, \"months\").format(\"YYYY-MM-DD\")}}", - "rightColumn": 4, - "dateFormat": "YYYY-MM-DD", - "widgetId": "3tsl49w1s0", - "dynamicProperties": { - "defaultDate": true - }, - "topRow": 3, - "bottomRow": 4, - "parentRowSpace": 40, - "isVisible": true, - "datePickerType": "DATE_PICKER", - "label": "", - "type": "DATE_PICKER_WIDGET", - "dynamicBindings": { - "defaultDate": true, - "isValid": true, - "value": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 2, - "dynamicTriggers": { - "onDateSelected": true - }, - "isDisabled": false, - "onDateSelected": "{{getFilteredSignupCount.run()}}" - }, - { - "widgetName": "endDatePicker", - "defaultDate": "{{moment().format(\"YYYY-MM-DD\")}}", - "rightColumn": 8, - "dateFormat": "YYYY-MM-DD", - "widgetId": "cocrv71gh5", - "dynamicProperties": { - "defaultDate": true - }, - "topRow": 3, - "bottomRow": 4, - "parentRowSpace": 40, - "isVisible": true, - "datePickerType": "DATE_PICKER", - "label": "", - "type": "DATE_PICKER_WIDGET", - "dynamicBindings": { - "defaultDate": true, - "isValid": true, - "value": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 6, - "dynamicTriggers": { - "onDateSelected": true - }, - "isDisabled": false, - "onDateSelected": "{{getFilteredSignupCount.run()}}" - }, - { - "widgetName": "Text2", - "rightColumn": 2, - "textAlign": "RIGHT", - "widgetId": "r31px5tpl6", - "topRow": 3, - "bottomRow": 4, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 0, - "text": "Start Date", - "textStyle": "LABEL" - }, - { - "widgetName": "Text3", - "rightColumn": 6, - "textAlign": "RIGHT", - "widgetId": "21rsr77a84", - "topRow": 3, - "bottomRow": 4, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 5, - "text": "End Date", - "textStyle": "LABEL" - }, - { - "widgetName": "Text4", - "rightColumn": 16, - "textAlign": "LEFT", - "widgetId": "digi7gghdg", - "topRow": 3, - "bottomRow": 8, - "parentRowSpace": 40, - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 9, - "text": "

šŸ’” The chart displays data returned by the getFilteredSignupCount Query.

\nšŸ“… The getFilteredSignupCount Query reads the values of the startDatePicker and endDatePicker to filter the query. The Date Pickers execute the query onDateSelected\n

", - "textStyle": "BODY", - "shouldScroll": true, - "dynamicProperties": { - "isVisible": true - } - }, - { - "widgetName": "Text7", - "rightColumn": 13, - "textAlign": "CENTER", - "widgetId": "aiguj74viz", - "topRow": 1, - "bottomRow": 2, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 3, - "text": "This page demonstrates how to filter and change the data displayed in a chart", - "textStyle": "BODY", - "shouldScroll": false - }, - { - "widgetName": "Text8", - "rightColumn": 16, - "textAlign": "LEFT", - "widgetId": "kyw545g7n4", - "topRow": 8, - "bottomRow": 9, - "parentRowSpace": 40, - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 9, - "text": "---------------------------------------------------------------------", - "textStyle": "LABEL", - "dynamicProperties": { - "isVisible": true - } - }, - { - "widgetName": "Text9", - "rightColumn": 16, - "textAlign": "LEFT", - "widgetId": "4i40lfqldh", - "topRow": 9, - "bottomRow": 14, - "parentRowSpace": 40, - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true, - "isVisible": true - }, - "shouldScroll": true, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 9, - "text": "

šŸ” Inspect the getFilteredSignupCount Query.

\nšŸ“… Update the startDatePicker to begin 6 months ago by default\n

šŸ“ˆ Update the x-axis to display the date range selected
\nEx. {{\"{{startDatePicker.selectedDate}} - {{endDatePicker.selectedDate}}\"}}

", - "textStyle": "BODY", - "dynamicProperties": { - "isVisible": true - } - } - ] - }, - "layoutOnLoadActions": [ - [ - { - "name": "getFilteredSignupCount", - "pluginType": "DB", - "jsonPathKeys": [ - "startDatePicker.selectedDate", - "endDatePicker.selectedDate" - ], - "timeoutInMillisecond": 10000 - } - ] - ], - "publishedLayoutOnLoadActions": [ - [ - { - "name": "getFilteredSignupCount", - "pluginType": "DB", - "jsonPathKeys": [ - "startDatePicker.selectedDate", - "endDatePicker.selectedDate" - ], - "timeoutInMillisecond": 10000 - } - ] - ], - "widgetNames": [ - "endDatePicker", - "Text9", - "Text8", - "Text7", - "startDatePicker", - "Text4", - "Text3", - "Text2", - "Text1", - "MainContainer", - "Chart1" - ], - "deleted": false, - "policies": [] - } - ], - "deleted": false, - "policies": [], - "_class": "com.appsmith.server.domains.Page" - } - ], - "deleted": false, - "policies": [], - "_class": "com.appsmith.server.domains.Application" - }, - { - "name": "Customer Support Dashboard", - "isPublic": true, - "$pages": [ - { - "name": "Users Page", - "$isDefault": false, - "$actions": [ - { - "name": "Api1", - "datasource": { - "$isEmbedded": true, - "name": "https://api.razorpay.com", - "$pluginPackageName": "restapi-plugin", - "datasourceConfiguration": { - "url": "https://api.razorpay.com" - }, - "invalids": [], - "deleted": false, - "policies": [] - }, - "actionConfiguration": { - "timeoutInMillisecond": 10000, - "paginationType": "NONE", - "path": "/v1/payments/pay_29QQoUBi66xm2f/refund", - "headers": [ - { - "key": "Authorization", - "value": "Basic cnpwX3Rlc3RfSVNsVXdaWmJXUzQ1Tlo6UFJFaTZSdzBEYVdlZEtnU3VOcU5LY3B5" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "queryParameters": [ - { - "key": "", - "value": "" - }, - { - "key": "", - "value": "" - } - ], - "body": "{ \"amount\": 2000}", - "httpMethod": "POST" - }, - "pluginType": "API", - "dynamicBindingPathList": [], - "isValid": true, - "invalids": [], - "jsonPathKeys": [], - "deleted": false, - "policies": [], - "_class": "com.appsmith.server.domains.Action" - }, - { - "name": "getOrderProducts", - "datasource": { - "$isEmbedded": false, - "name": "Mock Database", - "$pluginPackageName": "postgres-plugin", - "datasourceConfiguration": { - "connection": { - "mode": "READ_WRITE" - }, - "endpoints": [ - { - "host": "fake-api.cvuydmurdlas.us-east-1.rds.amazonaws.com", - "port": 5432 - } - ], - "authentication": { - "username": "fakeapi", - "password": "LimitedAccess123#", - "databaseName": "fakeapi" - }, - "sshProxyEnabled": false - }, - "invalids": [], - "deleted": false, - "policies": [] - }, - "actionConfiguration": { - "timeoutInMillisecond": 10000, - "paginationType": "NONE", - "body": "SELECT products.* FROM products inner join \"orderProductMap\" on products.\"productId\" = \"orderProductMap\".\"productId\" where \"orderProductMap\".\"orderId\" = {{ordersTable.selectedRow.id}} ORDER BY id LIMIT 10;\n" - }, - "pluginType": "DB", - "dynamicBindingPathList": [ - { - "key": "body" - } - ], - "isValid": true, - "invalids": [], - "jsonPathKeys": ["ordersTable.selectedRow.id"], - "deleted": false, - "policies": [], - "_class": "com.appsmith.server.domains.Action" - }, - { - "name": "getOrders", - "datasource": { - "$isEmbedded": false, - "name": "Mock Database", - "$pluginPackageName": "postgres-plugin", - "datasourceConfiguration": { - "connection": { - "mode": "READ_WRITE" - }, - "endpoints": [ - { - "host": "fake-api.cvuydmurdlas.us-east-1.rds.amazonaws.com", - "port": 5432 - } - ], - "authentication": { - "username": "fakeapi", - "password": "LimitedAccess123#", - "databaseName": "fakeapi" - }, - "sshProxyEnabled": false - }, - "invalids": [], - "deleted": false, - "policies": [] - }, - "actionConfiguration": { - "timeoutInMillisecond": 10000, - "paginationType": "NONE", - "body": "SELECT * FROM orders where \"userId\"={{usersTable.selectedRow.id}} ORDER BY status LIMIT 10;\n" - }, - "pluginType": "DB", - "dynamicBindingPathList": [ - { - "key": "body" - } - ], - "isValid": true, - "invalids": [], - "jsonPathKeys": ["usersTable.selectedRow.id"], - "deleted": false, - "policies": [], - "_class": "com.appsmith.server.domains.Action" - }, - { - "name": "getUsers", - "datasource": { - "$isEmbedded": false, - "name": "Mock Database", - "$pluginPackageName": "postgres-plugin", - "datasourceConfiguration": { - "connection": { - "mode": "READ_WRITE" - }, - "endpoints": [ - { - "host": "fake-api.cvuydmurdlas.us-east-1.rds.amazonaws.com", - "port": 5432 - } - ], - "authentication": { - "username": "fakeapi", - "password": "LimitedAccess123#", - "databaseName": "fakeapi" - }, - "sshProxyEnabled": false - }, - "invalids": [], - "deleted": false, - "policies": [] - }, - "actionConfiguration": { - "timeoutInMillisecond": 10000, - "paginationType": "NONE", - "body": "SELECT * FROM users where email ilike '%{{usersTable.searchText}}%' ORDER BY id LIMIT 10 offset {{(usersTable.pageNo - 1) * 10}}" - }, - "pluginType": "DB", - "executeOnLoad": true, - "dynamicBindingPathList": [ - { - "key": "body" - } - ], - "isValid": true, - "invalids": [], - "jsonPathKeys": [ - "usersTable.searchText", - "(usersTable.pageNo - 1) * 10" - ], - "deleted": false, - "policies": [], - "_class": "com.appsmith.server.domains.Action" - }, - { - "name": "markOrderRefund", - "datasource": { - "$isEmbedded": false, - "name": "Mock Database", - "$pluginPackageName": "postgres-plugin", - "datasourceConfiguration": { - "connection": { - "mode": "READ_WRITE" - }, - "endpoints": [ - { - "host": "fake-api.cvuydmurdlas.us-east-1.rds.amazonaws.com", - "port": 5432 - } - ], - "authentication": { - "username": "fakeapi", - "password": "LimitedAccess123#", - "databaseName": "fakeapi" - }, - "sshProxyEnabled": false - }, - "invalids": [], - "deleted": false, - "policies": [] - }, - "actionConfiguration": { - "timeoutInMillisecond": 10000, - "paginationType": "NONE", - "body": "UPDATE orders\n SET status = 'REFUNDED'\n WHERE id = {{ordersTable.selectedRow.id}};\n" - }, - "pluginType": "DB", - "dynamicBindingPathList": [ - { - "key": "body" - } - ], - "isValid": true, - "invalids": [], - "jsonPathKeys": ["ordersTable.selectedRow.id"], - "deleted": false, - "policies": [], - "_class": "com.appsmith.server.domains.Action" - }, - { - "name": "refundAPI", - "datasource": { - "$isEmbedded": true, - "name": "https://api.razorpay.com", - "$pluginPackageName": "restapi-plugin", - "datasourceConfiguration": { - "url": "https://api.razorpay.com" - }, - "invalids": [], - "deleted": false, - "policies": [] - }, - "actionConfiguration": { - "timeoutInMillisecond": 10000, - "paginationType": "NONE", - "path": "/v1/payments/{{ordersTable.selectedRow.paymentId}}/refund", - "headers": [ - { - "key": "Authorization", - "value": "Basic cnpwX3Rlc3RfSVNsVXdaWmJXUzQ1Tlo6UFJFaTZSdzBEYVdlZEtnU3VOcU5LY3B5" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "queryParameters": [ - { - "key": "", - "value": "" - }, - { - "key": "", - "value": "" - } - ], - "body": "{ \n\t\"amount\": \"{{ordersTable.selectedRow.orderAmount * 100}}\"\n}", - "httpMethod": "POST" - }, - "pluginType": "API", - "dynamicBindingPathList": [ - { - "key": "body" - }, - { - "key": "path" - } - ], - "isValid": true, - "invalids": [], - "jsonPathKeys": [ - "ordersTable.selectedRow.orderAmount * 100", - "ordersTable.selectedRow.paymentId" - ], - "deleted": false, - "policies": [], - "_class": "com.appsmith.server.domains.Action" - }, - { - "name": "updateUser", - "datasource": { - "$isEmbedded": false, - "name": "Mock Database", - "$pluginPackageName": "postgres-plugin", - "datasourceConfiguration": { - "connection": { - "mode": "READ_WRITE" - }, - "endpoints": [ - { - "host": "fake-api.cvuydmurdlas.us-east-1.rds.amazonaws.com", - "port": 5432 - } - ], - "authentication": { - "username": "fakeapi", - "password": "LimitedAccess123#", - "databaseName": "fakeapi" - }, - "sshProxyEnabled": false - }, - "invalids": [], - "deleted": false, - "policies": [] - }, - "actionConfiguration": { - "timeoutInMillisecond": 10000, - "paginationType": "NONE", - "body": "UPDATE users SET name = '{{nameInput.text}}', address = '{{addressInput.text}}', email = '{{emailInput.text}}', \"phoneNo\" = '{{phoneInput.text}}' WHERE id = {{usersTable.selectedRow.id}}" - }, - "pluginType": "DB", - "dynamicBindingPathList": [ - { - "key": "body" - } - ], - "isValid": true, - "invalids": [], - "jsonPathKeys": [ - "phoneInput.text", - "addressInput.text", - "nameInput.text", - "usersTable.selectedRow.id", - "emailInput.text" - ], - "deleted": false, - "policies": [], - "_class": "com.appsmith.server.domains.Action" - } - ], - "layouts": [ - { - "viewMode": false, - "dsl": { - "widgetName": "MainContainer", - "backgroundColor": "none", - "rightColumn": 1224, - "snapColumns": 16, - "detachFromLayout": true, - "widgetId": "0", - "topRow": 0, - "bottomRow": 1360, - "containerStyle": "none", - "snapRows": 33, - "parentRowSpace": 1, - "type": "CANVAS_WIDGET", - "canExtend": true, - "dynamicBindings": {}, - "version": 5, - "minHeight": 1292, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Text1", - "rightColumn": 4, - "textAlign": "LEFT", - "widgetId": "5302vrcr7x", - "topRow": 0, - "bottomRow": 1, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 0, - "text": "Users", - "textStyle": "HEADING" - }, - { - "hiddenColumns": [ - "createdAt", - "updatedAt", - "avatar", - "dob", - "gender", - "role", - "status", - "address" - ], - "widgetName": "usersTable", - "rightColumn": 9, - "widgetId": "z0l09s5jaz", - "topRow": 1, - "bottomRow": 17, - "parentRowSpace": 40, - "onPageChange": "{{getUsers.run()}}", - "tableData": "{{getUsers.data}}", - "isVisible": true, - "label": "Data", - "searchKey": "", - "type": "TABLE_WIDGET", - "dynamicBindings": { - "tableData": true, - "selectedRow": true, - "filteredTableData": true, - "defaultSearchText": true - }, - "parentId": "0", - "serverSidePaginationEnabled": true, - "isLoading": false, - "onSearchTextChanged": "{{getUsers.run()}}", - "parentColumnSpace": 74, - "leftColumn": 0, - "dynamicTriggers": { - "onSearchTextChanged": true, - "onRowSelected": true, - "onPageChange": true - }, - "onRowSelected": "{{getOrders.run()}}", - "columnActions": [], - "columnSizeMap": { - "address": 204, - "name": 268, - "id": 74, - "email": 311 - }, - "defaultSearchText": "{{appsmith.URL.queryParams.email}}" - }, - { - "widgetName": "Modal1", - "rightColumn": 0, - "detachFromLayout": true, - "widgetId": "qcv5mxmdse", - "topRow": 0, - "bottomRow": 0, - "parentRowSpace": 1, - "isVisible": false, - "canOutsideClickClose": true, - "type": "MODAL_WIDGET", - "canEscapeKeyClose": true, - "dynamicBindings": {}, - "parentId": "0", - "shouldScrollContents": true, - "blueprint": { - "view": [ - { - "position": { - "top": 0, - "left": 0 - }, - "type": "CANVAS_WIDGET", - "props": { - "shouldScrollContents": false, - "blueprint": { - "view": [ - { - "size": { - "rows": 1, - "cols": 2 - }, - "position": { - "top": 0, - "left": 14 - }, - "type": "ICON_WIDGET", - "props": { - "color": "#040627", - "iconName": "cross", - "iconSize": 24 - } - }, - { - "size": { - "rows": 1, - "cols": 10 - }, - "position": { - "top": 0, - "left": 0 - }, - "type": "TEXT_WIDGET", - "props": { - "text": "Modal Title", - "textStyle": "HEADING" - } - }, - { - "size": { - "rows": 1, - "cols": 3 - }, - "position": { - "top": 4, - "left": 10 - }, - "type": "BUTTON_WIDGET", - "props": { - "buttonStyle": "SECONDARY_BUTTON", - "text": "Cancel" - } - }, - { - "size": { - "rows": 1, - "cols": 3 - }, - "position": { - "top": 4, - "left": 13 - }, - "type": "BUTTON_WIDGET", - "props": { - "buttonStyle": "PRIMARY_BUTTON", - "text": "Confirm" - } - } - ], - "operations": [ - { - "type": "MODIFY_PROPS" - } - ] - }, - "detachFromLayout": true, - "children": [], - "isVisible": true, - "isDisabled": false, - "canExtend": true - } - } - ] - }, - "isLoading": false, - "parentColumnSpace": 1, - "size": "MODAL_LARGE", - "leftColumn": 0, - "children": [ - { - "widgetName": "Canvas1", - "rightColumn": 0, - "detachFromLayout": true, - "widgetId": "9pgyrkail5", - "topRow": 0, - "bottomRow": 640, - "parentRowSpace": 1, - "isVisible": true, - "canExtend": true, - "type": "CANVAS_WIDGET", - "parentId": "qcv5mxmdse", - "shouldScrollContents": false, - "blueprint": { - "view": [ - { - "size": { - "rows": 1, - "cols": 2 - }, - "position": { - "top": 0, - "left": 14 - }, - "type": "ICON_WIDGET", - "props": { - "color": "#040627", - "iconName": "cross", - "iconSize": 24 - } - }, - { - "size": { - "rows": 1, - "cols": 10 - }, - "position": { - "top": 0, - "left": 0 - }, - "type": "TEXT_WIDGET", - "props": { - "text": "Modal Title", - "textStyle": "HEADING" - } - }, - { - "size": { - "rows": 1, - "cols": 3 - }, - "position": { - "top": 4, - "left": 10 - }, - "type": "BUTTON_WIDGET", - "props": { - "buttonStyle": "SECONDARY_BUTTON", - "text": "Cancel" - } - }, - { - "size": { - "rows": 1, - "cols": 3 - }, - "position": { - "top": 4, - "left": 13 - }, - "type": "BUTTON_WIDGET", - "props": { - "buttonStyle": "PRIMARY_BUTTON", - "text": "Confirm" - } - } - ], - "operations": [ - { - "type": "MODIFY_PROPS" - } - ] - }, - "minHeight": 0, - "isLoading": false, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Icon1", - "rightColumn": 16, - "onClick": "{{closeModal('Modal1')}}", - "color": "#040627", - "iconName": "cross", - "widgetId": "3g9bl2sr58", - "topRow": 0, - "bottomRow": 1, - "isVisible": true, - "type": "ICON_WIDGET", - "parentId": "9pgyrkail5", - "isLoading": false, - "leftColumn": 14, - "iconSize": 24 - }, - { - "widgetName": "Text2", - "rightColumn": 14, - "textAlign": "LEFT", - "widgetId": "lddwvwekdx", - "topRow": 0, - "bottomRow": 1, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true - }, - "parentId": "9pgyrkail5", - "isLoading": false, - "leftColumn": 0, - "text": "

šŸ–‹ļø Edit {{usersTable.selectedRow.name}}'s Profile

", - "textStyle": "LABEL" - }, - { - "widgetName": "Button1", - "rightColumn": 12, - "isDefaultClickDisabled": true, - "widgetId": "0asi0ps632", - "buttonStyle": "SECONDARY_BUTTON", - "topRow": 13, - "bottomRow": 14, - "isVisible": true, - "type": "BUTTON_WIDGET", - "parentId": "9pgyrkail5", - "isLoading": false, - "leftColumn": 9, - "text": "Cancel", - "isDisabled": false - }, - { - "widgetName": "Button2", - "rightColumn": 16, - "onClick": "{{updateUser.run(() => getUsers.run(() => closeModal('Modal1')), () => showAlert('error'))}}", - "isDefaultClickDisabled": true, - "widgetId": "9aoww0u181", - "dynamicProperties": { - "onClick": true - }, - "buttonStyle": "PRIMARY_BUTTON", - "topRow": 13, - "bottomRow": 14, - "isVisible": true, - "type": "BUTTON_WIDGET", - "dynamicBindings": {}, - "parentId": "9pgyrkail5", - "isLoading": false, - "leftColumn": 12, - "dynamicTriggers": { - "onClick": true - }, - "text": "Save", - "isDisabled": false - }, - { - "widgetName": "Text10", - "rightColumn": 4, - "textAlign": "RIGHT", - "widgetId": "zxqqitzf07", - "topRow": 2, - "bottomRow": 3, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "9pgyrkail5", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 0, - "text": "Name", - "textStyle": "LABEL" - }, - { - "widgetName": "Text11", - "rightColumn": 4, - "textAlign": "RIGHT", - "widgetId": "52whn6clnv", - "topRow": 3, - "bottomRow": 4, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "9pgyrkail5", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 0, - "text": "Email", - "textStyle": "LABEL" - }, - { - "widgetName": "Text12", - "rightColumn": 4, - "textAlign": "RIGHT", - "widgetId": "qhmfxrxrp8", - "topRow": 5, - "bottomRow": 6, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "9pgyrkail5", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 0, - "text": "Address", - "textStyle": "LABEL" - }, - { - "widgetName": "addressInput", - "rightColumn": 13, - "widgetId": "5w60gql1bf", - "topRow": 5, - "bottomRow": 8, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "INPUT_WIDGET", - "dynamicBindings": { - "isValid": true, - "defaultText": true, - "value": true - }, - "parentId": "9pgyrkail5", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 4, - "inputType": "TEXT", - "defaultText": "{{usersTable.selectedRow.address}}" - }, - { - "widgetName": "emailInput", - "rightColumn": 13, - "widgetId": "l97o8yvlrc", - "topRow": 3, - "bottomRow": 4, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "INPUT_WIDGET", - "dynamicBindings": { - "isValid": true, - "defaultText": true, - "value": true - }, - "parentId": "9pgyrkail5", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 4, - "inputType": "TEXT", - "defaultText": "{{usersTable.selectedRow.email}}" - }, - { - "widgetName": "nameInput", - "rightColumn": 13, - "widgetId": "dorbm7hw83", - "topRow": 2, - "bottomRow": 3, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "INPUT_WIDGET", - "dynamicBindings": { - "isValid": true, - "defaultText": true, - "value": true - }, - "parentId": "9pgyrkail5", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 4, - "inputType": "TEXT", - "defaultText": "{{usersTable.selectedRow.name}}" - }, - { - "widgetName": "Text20", - "rightColumn": 4, - "textAlign": "RIGHT", - "widgetId": "gds83r70jn", - "topRow": 4, - "bottomRow": 5, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "9pgyrkail5", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 0, - "text": "Phone No", - "textStyle": "LABEL" - }, - { - "widgetName": "phoneInput", - "rightColumn": 13, - "widgetId": "lcmqk3xayr", - "topRow": 4, - "bottomRow": 5, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "INPUT_WIDGET", - "dynamicBindings": { - "isValid": true, - "defaultText": true, - "value": true - }, - "parentId": "9pgyrkail5", - "isLoading": false, - "regex": "^[0-9]{1,10}$", - "parentColumnSpace": 30.75, - "leftColumn": 4, - "inputType": "TEXT", - "defaultText": "{{usersTable.selectedRow.phoneNo || \"\"}}" - } - ], - "isDisabled": false - } - ] - }, - { - "backgroundColor": "#FFFFFF", - "widgetName": "Container1", - "rightColumn": 16, - "widgetId": "5wiefwlh3m", - "containerStyle": "card", - "topRow": 1, - "bottomRow": 9, - "parentRowSpace": 40, - "isVisible": true, - "type": "CONTAINER_WIDGET", - "parentId": "0", - "blueprint": { - "view": [ - { - "position": { - "top": 0, - "left": 0 - }, - "type": "CANVAS_WIDGET", - "props": { - "detachFromLayout": true, - "children": [ - "8c8ixb84rt", - "vxs1336eti", - "n1tn6qwmfu", - "75njm0wxgx", - "2wymlwykex", - "4x7s4ffqyc", - "m8jxuiwony", - "3mqfe3k3qf", - "lhds2qaxeg", - "p4p3or0jcd", - "uh5tweohvx" - ], - "containerStyle": "none", - "canExtend": false - } - } - ] - }, - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 9, - "children": [ - { - "widgetName": "Canvas2", - "rightColumn": 592, - "detachFromLayout": true, - "widgetId": "c2nnq6o54h", - "containerStyle": "none", - "topRow": 0, - "bottomRow": 400, - "parentRowSpace": 1, - "isVisible": true, - "canExtend": false, - "type": "CANVAS_WIDGET", - "parentId": "5wiefwlh3m", - "minHeight": 400, - "isLoading": false, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Button3", - "rightColumn": 16, - "onClick": "{{showModal('Modal1')}}", - "isDefaultClickDisabled": true, - "widgetId": "8c8ixb84rt", - "dynamicProperties": { - "isVisible": true - }, - "buttonStyle": "PRIMARY_BUTTON", - "topRow": 0, - "bottomRow": 1, - "parentRowSpace": 40, - "isVisible": "{{usersTable.selectedRow.id !== undefined}}", - "type": "BUTTON_WIDGET", - "dynamicBindings": { - "isVisible": true - }, - "parentId": "c2nnq6o54h", - "isLoading": false, - "parentColumnSpace": 20.625, - "leftColumn": 13, - "dynamicTriggers": { - "onClick": true - }, - "text": "Edit", - "isDisabled": false - }, - { - "image": "{{usersTable.selectedRow.avatar}}", - "widgetName": "Image1", - "rightColumn": 7, - "widgetId": "vxs1336eti", - "topRow": 0, - "bottomRow": 3, - "parentRowSpace": 40, - "isVisible": true, - "type": "IMAGE_WIDGET", - "dynamicBindings": { - "image": true - }, - "parentId": "c2nnq6o54h", - "isLoading": false, - "parentColumnSpace": 20.625, - "imageShape": "RECTANGLE", - "leftColumn": 0, - "defaultImage": "https://res.cloudinary.com/drako999/image/upload/v1589196259/default.png" - }, - { - "widgetName": "Text3", - "rightColumn": 13, - "textAlign": "LEFT", - "widgetId": "n1tn6qwmfu", - "topRow": 0, - "bottomRow": 1, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true - }, - "parentId": "c2nnq6o54h", - "isLoading": false, - "parentColumnSpace": 20.625, - "leftColumn": 7, - "text": "{{usersTable.selectedRow.name}}", - "textStyle": "LABEL" - }, - { - "widgetName": "Text4", - "rightColumn": 15, - "textAlign": "LEFT", - "widgetId": "75njm0wxgx", - "topRow": 1, - "bottomRow": 2, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true - }, - "parentId": "c2nnq6o54h", - "isLoading": false, - "parentColumnSpace": 20.625, - "leftColumn": 7, - "text": "{{usersTable.selectedRow.email}}", - "textStyle": "LABEL" - }, - { - "widgetName": "Text5", - "rightColumn": 15, - "textAlign": "LEFT", - "widgetId": "2wymlwykex", - "topRow": 2, - "bottomRow": 3, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true - }, - "parentId": "c2nnq6o54h", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 7, - "text": "{{usersTable.selectedRow.address}}", - "textStyle": "LABEL" - }, - { - "widgetName": "Text6", - "rightColumn": 11, - "textAlign": "LEFT", - "widgetId": "4x7s4ffqyc", - "dynamicProperties": { - "isVisible": true - }, - "topRow": 3, - "bottomRow": 4, - "parentRowSpace": 40, - "isVisible": "{{usersTable.selectedRow.id !== undefined}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "isVisible": true, - "value": true - }, - "parentId": "c2nnq6o54h", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 7, - "text": "

{{ (usersTable.selectedRow.gender === \"Male\" ? \"ā™‚ļø\" : \"ā™€ļø\") + usersTable.selectedRow.gender}}

", - "textStyle": "LABEL" - }, - { - "widgetName": "Text8", - "rightColumn": 7, - "textAlign": "CENTER", - "widgetId": "3mqfe3k3qf", - "dynamicProperties": { - "isVisible": true - }, - "topRow": 3, - "bottomRow": 4, - "parentRowSpace": 40, - "isVisible": "{{usersTable.selectedRow.id === undefined}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "isVisible": true, - "value": true - }, - "parentId": "c2nnq6o54h", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 0, - "text": "

šŸ‘ˆšŸæ Select a user

", - "textStyle": "LABEL" - }, - { - "widgetName": "Text21", - "rightColumn": 15, - "textAlign": "LEFT", - "widgetId": "uvw0ma9kfr", - "topRow": 4, - "bottomRow": 5, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true - }, - "parentId": "c2nnq6o54h", - "isLoading": false, - "parentColumnSpace": 29.875, - "leftColumn": 7, - "text": "{{usersTable.selectedRow.phoneNo || \"\"}}", - "textStyle": "LABEL" - } - ] - } - ] - }, - { - "hiddenColumns": ["userId", "orderDate"], - "widgetName": "ordersTable", - "rightColumn": 8, - "columnOrder": [ - "id", - "deliveryAddress", - "orderAmount", - "status" - ], - "widgetId": "xr3qu1jpj8", - "topRow": 19, - "bottomRow": 32, - "parentRowSpace": 40, - "tableData": "{{getOrders.data}}", - "isVisible": true, - "label": "Data", - "searchKey": "", - "type": "TABLE_WIDGET", - "dynamicBindings": { - "tableData": true, - "selectedRow": true, - "filteredTableData": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 0, - "dynamicTriggers": { - "onRowSelected": true - }, - "onRowSelected": "{{getOrderProducts.run()}}", - "columnSizeMap": { - "userId": 111 - } - }, - { - "widgetName": "Text13", - "rightColumn": 4, - "textAlign": "LEFT", - "widgetId": "euwmlckp34", - "topRow": 18, - "bottomRow": 19, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "text": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 0, - "text": "{{usersTable.selectedRow ? usersTable.selectedRow.name + \"'s Orders\" : \"ā˜šŸ½ Select a user\"}}", - "textStyle": "HEADING" - }, - { - "backgroundColor": "#FFFFFF", - "widgetName": "Container2", - "rightColumn": 16, - "widgetId": "xlb8hua7ie", - "containerStyle": "card", - "topRow": 19, - "bottomRow": 32, - "parentRowSpace": 40, - "isVisible": true, - "type": "CONTAINER_WIDGET", - "parentId": "0", - "blueprint": { - "view": [ - { - "position": { - "top": 0, - "left": 0 - }, - "type": "CANVAS_WIDGET", - "props": { - "detachFromLayout": true, - "children": ["v8531ch9d8", "0cz98i5vmt"], - "containerStyle": "none", - "canExtend": false - } - } - ] - }, - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 8, - "children": [ - { - "widgetName": "Canvas3", - "rightColumn": 592, - "detachFromLayout": true, - "widgetId": "gutl68s87o", - "containerStyle": "none", - "topRow": 0, - "bottomRow": 400, - "parentRowSpace": 1, - "isVisible": true, - "canExtend": false, - "type": "CANVAS_WIDGET", - "parentId": "xlb8hua7ie", - "minHeight": 400, - "isLoading": false, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Text15", - "rightColumn": 7, - "textAlign": "LEFT", - "widgetId": "0cz98i5vmt", - "topRow": 0, - "bottomRow": 1, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true - }, - "parentId": "gutl68s87o", - "isLoading": false, - "parentColumnSpace": 29.875, - "leftColumn": 0, - "text": "{{\"Order# \" + ordersTable.selectedRow.id}}", - "textStyle": "HEADING" - }, - { - "widgetName": "Text16", - "rightColumn": 11, - "textAlign": "LEFT", - "widgetId": "ec7hwwpigw", - "topRow": 1, - "bottomRow": 2, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true - }, - "parentId": "gutl68s87o", - "isLoading": false, - "parentColumnSpace": 29.875, - "leftColumn": 0, - "text": "{{ordersTable.selectedRow.deliveryAddress}}", - "textStyle": "LABEL" - }, - { - "widgetName": "Text17", - "rightColumn": 8, - "textAlign": "LEFT", - "widgetId": "jgv0uu3x5g", - "topRow": 2, - "bottomRow": 3, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true - }, - "parentId": "gutl68s87o", - "isLoading": false, - "parentColumnSpace": 29.875, - "leftColumn": 4, - "text": "{{ordersTable.selectedRow.status}}", - "textStyle": "LABEL" - }, - { - "widgetName": "Button6", - "rightColumn": 16, - "onClick": "{{showModal('Modal2')}}", - "isDefaultClickDisabled": true, - "widgetId": "am2dpsi2q3", - "dynamicProperties": { - "isDisabled": true - }, - "buttonStyle": "DANGER_BUTTON", - "topRow": 0, - "bottomRow": 1, - "parentRowSpace": 40, - "isVisible": true, - "type": "BUTTON_WIDGET", - "dynamicBindings": { - "isDisabled": true - }, - "parentId": "gutl68s87o", - "isLoading": false, - "parentColumnSpace": 29.875, - "leftColumn": 12, - "dynamicTriggers": { - "onClick": true - }, - "text": "Refund", - "isDisabled": "{{ordersTable.selectedRow.id === undefined || ordersTable.selectedRow.status === \"REFUNDED\" || appsmith.user.email !== \"nikhil@appsmith.com\"}}" - }, - { - "hiddenColumns": [ - "mrp", - "imageUrl", - "description", - "isListed", - "availabilityDate", - "channel" - ], - "widgetName": "Table1", - "rightColumn": 16, - "columnOrder": [ - "productId", - "productName", - "listingPrice", - "category", - "mrp", - "imageUrl", - "description", - "isListed", - "availabilityDate", - "channel" - ], - "widgetId": "db1kphrwnt", - "topRow": 5, - "bottomRow": 12, - "parentRowSpace": 40, - "tableData": "{{getOrderProducts.data}}", - "isVisible": true, - "label": "Data", - "searchKey": "", - "type": "TABLE_WIDGET", - "dynamicBindings": { - "tableData": true, - "selectedRow": true, - "filteredTableData": true - }, - "parentId": "gutl68s87o", - "isLoading": false, - "parentColumnSpace": 29.875, - "leftColumn": 0 - }, - { - "widgetName": "Text18", - "rightColumn": 4, - "textAlign": "LEFT", - "widgetId": "0dxro3kpwp", - "topRow": 4, - "bottomRow": 5, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "gutl68s87o", - "isLoading": false, - "parentColumnSpace": 29.875, - "leftColumn": 0, - "text": "Products", - "textStyle": "HEADING" - }, - { - "widgetName": "Text19", - "rightColumn": 4, - "textAlign": "LEFT", - "widgetId": "ek4t9o9djx", - "topRow": 2, - "bottomRow": 3, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true - }, - "parentId": "gutl68s87o", - "isLoading": false, - "parentColumnSpace": 34.5, - "leftColumn": 0, - "text": "{{\"₹\" + ordersTable.selectedRow.orderAmount}}", - "textStyle": "LABEL" - }, - { - "isVisible": true, - "text": "{{appsmith.user.email !== \"nikhil@appsmith.com\" ? \"Only Admins can initiate refunds\" : \"\"}}", - "textStyle": "HEADING", - "textAlign": "CENTER", - "widgetName": "Text24", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 34.5, - "parentRowSpace": 40, - "leftColumn": 2, - "rightColumn": 15, - "topRow": 3, - "bottomRow": 4, - "parentId": "gutl68s87o", - "widgetId": "1macn19a8h", - "dynamicBindings": { - "text": true, - "value": true - } - } - ] - } - ] - }, - { - "isVisible": false, - "size": "MODAL_SMALL", - "canEscapeKeyClose": true, - "detachFromLayout": true, - "canOutsideClickClose": true, - "shouldScrollContents": true, - "widgetName": "Modal2", - "children": [ - { - "isVisible": true, - "widgetName": "Canvas4", - "detachFromLayout": true, - "canExtend": true, - "isDisabled": false, - "shouldScrollContents": false, - "children": [ - { - "isVisible": true, - "widgetName": "Icon2", - "iconName": "cross", - "iconSize": 24, - "color": "#040627", - "type": "ICON_WIDGET", - "isLoading": false, - "leftColumn": 14, - "rightColumn": 16, - "topRow": 0, - "bottomRow": 1, - "parentId": "bek8vtf45d", - "widgetId": "h2bzyryz3k", - "onClick": "{{closeModal('Modal2')}}" - }, - { - "isVisible": true, - "text": "Refund Order #{{ordersTable.selectedRow.id}}", - "textStyle": "HEADING", - "textAlign": "LEFT", - "widgetName": "Text22", - "type": "TEXT_WIDGET", - "isLoading": false, - "leftColumn": 0, - "rightColumn": 10, - "topRow": 0, - "bottomRow": 1, - "parentId": "bek8vtf45d", - "widgetId": "3c2d1zfzu7", - "dynamicBindings": { - "value": true, - "text": true - } - }, - { - "isVisible": true, - "text": "Cancel", - "buttonStyle": "SECONDARY_BUTTON", - "widgetName": "Button7", - "isDisabled": false, - "isDefaultClickDisabled": true, - "type": "BUTTON_WIDGET", - "isLoading": false, - "leftColumn": 10, - "rightColumn": 13, - "topRow": 4, - "bottomRow": 5, - "parentId": "bek8vtf45d", - "widgetId": "w8hwwktvmg", - "dynamicTriggers": { - "onClick": true - }, - "onClick": "{{closeModal('Modal2')}}" - }, - { - "isVisible": true, - "text": "Confirm", - "buttonStyle": "PRIMARY_BUTTON", - "widgetName": "Button8", - "isDisabled": false, - "isDefaultClickDisabled": true, - "type": "BUTTON_WIDGET", - "isLoading": false, - "leftColumn": 13, - "rightColumn": 16, - "topRow": 4, - "bottomRow": 5, - "parentId": "bek8vtf45d", - "widgetId": "54fh5v9z6f", - "onClick": "{{refundAPI.run(() => markOrderRefund.run(() => getOrders.run(() => closeModal('Modal2'))), () => {})}}", - "dynamicProperties": { - "onClick": true - }, - "dynamicTriggers": { - "onClick": true - } - }, - { - "isVisible": true, - "text": "Are you sure you want to refund this order?", - "textStyle": "LABEL", - "textAlign": "LEFT", - "widgetName": "Text23", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 26, - "parentRowSpace": 40, - "leftColumn": 1, - "rightColumn": 13, - "topRow": 2, - "bottomRow": 3, - "parentId": "bek8vtf45d", - "widgetId": "z2k233aijz", - "dynamicBindings": { - "value": true - } - } - ], - "blueprint": { - "view": [ - { - "type": "ICON_WIDGET", - "position": { - "left": 14, - "top": 0 - }, - "size": { - "rows": 1, - "cols": 2 - }, - "props": { - "iconName": "cross", - "iconSize": 24, - "color": "#040627" - } - }, - { - "type": "TEXT_WIDGET", - "position": { - "left": 0, - "top": 0 - }, - "size": { - "rows": 1, - "cols": 10 - }, - "props": { - "text": "Modal Title", - "textStyle": "HEADING" - } - }, - { - "type": "BUTTON_WIDGET", - "position": { - "left": 10, - "top": 4 - }, - "size": { - "rows": 1, - "cols": 3 - }, - "props": { - "text": "Cancel", - "buttonStyle": "SECONDARY_BUTTON" - } - }, - { - "type": "BUTTON_WIDGET", - "position": { - "left": 13, - "top": 4 - }, - "size": { - "rows": 1, - "cols": 3 - }, - "props": { - "text": "Confirm", - "buttonStyle": "PRIMARY_BUTTON" - } - } - ], - "operations": [ - { - "type": "MODIFY_PROPS" - } - ] - }, - "minHeight": 0, - "type": "CANVAS_WIDGET", - "isLoading": false, - "parentColumnSpace": 1, - "parentRowSpace": 1, - "leftColumn": 0, - "rightColumn": 0, - "topRow": 0, - "bottomRow": 280, - "parentId": "apytb4wr2y", - "widgetId": "bek8vtf45d" - } - ], - "blueprint": { - "view": [ - { - "type": "CANVAS_WIDGET", - "position": { - "left": 0, - "top": 0 - }, - "props": { - "detachFromLayout": true, - "canExtend": true, - "isVisible": true, - "isDisabled": false, - "shouldScrollContents": false, - "children": [], - "blueprint": { - "view": [ - { - "type": "ICON_WIDGET", - "position": { - "left": 14, - "top": 0 - }, - "size": { - "rows": 1, - "cols": 2 - }, - "props": { - "iconName": "cross", - "iconSize": 24, - "color": "#040627" - } - }, - { - "type": "TEXT_WIDGET", - "position": { - "left": 0, - "top": 0 - }, - "size": { - "rows": 1, - "cols": 10 - }, - "props": { - "text": "Modal Title", - "textStyle": "HEADING" - } - }, - { - "type": "BUTTON_WIDGET", - "position": { - "left": 10, - "top": 4 - }, - "size": { - "rows": 1, - "cols": 3 - }, - "props": { - "text": "Cancel", - "buttonStyle": "SECONDARY_BUTTON" - } - }, - { - "type": "BUTTON_WIDGET", - "position": { - "left": 13, - "top": 4 - }, - "size": { - "rows": 1, - "cols": 3 - }, - "props": { - "text": "Confirm", - "buttonStyle": "PRIMARY_BUTTON" - } - } - ], - "operations": [ - { - "type": "MODIFY_PROPS" - } - ] - } - } - } - ] - }, - "type": "MODAL_WIDGET", - "isLoading": false, - "parentColumnSpace": 1, - "parentRowSpace": 1, - "leftColumn": 0, - "rightColumn": 0, - "topRow": 0, - "bottomRow": 0, - "parentId": "0", - "widgetId": "apytb4wr2y" - }, - { - "isVisible": true, - "widgetName": "Chart1", - "chartType": "PIE_CHART", - "chartName": "Orders", - "allowScroll": false, - "chartData": "[{\"seriesName\":\"Order Status\",\"data\":\"[\\n {\\n \\\"x\\\": \\\"ORDER_PLACED\\\",\\n \\\"y\\\": {{getOrders.data.filter((order) => { return order.status === \\\"ORDER_PLACED\\\" }).length}}\\n },\\n {\\n \\\"x\\\": \\\"OUT_FOR_DELIVERY\\\",\\n \\\"y\\\": {{getOrders.data.filter((order) => { return order.status === \\\"OUT_FOR_DELIVERY\\\" }).length}}\\n },\\n {\\n \\\"x\\\": \\\"PAYMENT_PENDING\\\",\\n \\\"y\\\": {{getOrders.data.filter((order) => { return order.status === \\\"PAYMENT_PENDING\\\" }).length}}\\n },\\n {\\n \\\"x\\\": \\\"REFUNDED\\\",\\n \\\"y\\\": {{getOrders.data.filter((order) => { return order.status === \\\"REFUNDED\\\" }).length}}\\n }\\n \\n]\"}]", - "xAxisName": "Last Week", - "yAxisName": "Total Order Revenue $", - "type": "CHART_WIDGET", - "isLoading": false, - "parentColumnSpace": 74, - "parentRowSpace": 40, - "leftColumn": 9, - "rightColumn": 16, - "topRow": 9, - "bottomRow": 17, - "parentId": "0", - "widgetId": "jr461ymixc", - "dynamicBindings": { - "chartData": true - } - } - ] - }, - "publishedDsl": { - "widgetName": "MainContainer", - "backgroundColor": "none", - "rightColumn": 1224, - "snapColumns": 16, - "detachFromLayout": true, - "widgetId": "0", - "topRow": 0, - "bottomRow": 1360, - "containerStyle": "none", - "snapRows": 33, - "parentRowSpace": 1, - "type": "CANVAS_WIDGET", - "canExtend": true, - "dynamicBindings": {}, - "version": 5, - "minHeight": 1292, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Text1", - "rightColumn": 4, - "textAlign": "LEFT", - "widgetId": "5302vrcr7x", - "topRow": 0, - "bottomRow": 1, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 0, - "text": "Users", - "textStyle": "HEADING" - }, - { - "hiddenColumns": [ - "createdAt", - "updatedAt", - "avatar", - "dob", - "gender", - "role", - "status", - "address" - ], - "widgetName": "usersTable", - "rightColumn": 9, - "widgetId": "z0l09s5jaz", - "topRow": 1, - "bottomRow": 17, - "parentRowSpace": 40, - "onPageChange": "{{getUsers.run()}}", - "tableData": "{{getUsers.data}}", - "isVisible": true, - "label": "Data", - "searchKey": "", - "type": "TABLE_WIDGET", - "dynamicBindings": { - "tableData": true, - "selectedRow": true, - "filteredTableData": true, - "defaultSearchText": true - }, - "parentId": "0", - "serverSidePaginationEnabled": true, - "isLoading": false, - "onSearchTextChanged": "{{getUsers.run()}}", - "parentColumnSpace": 74, - "leftColumn": 0, - "dynamicTriggers": { - "onSearchTextChanged": true, - "onRowSelected": true, - "onPageChange": true - }, - "onRowSelected": "{{getOrders.run()}}", - "columnActions": [], - "columnSizeMap": { - "address": 204, - "name": 268, - "id": 74, - "email": 311 - }, - "defaultSearchText": "{{appsmith.URL.queryParams.email}}" - }, - { - "widgetName": "Modal1", - "rightColumn": 0, - "detachFromLayout": true, - "widgetId": "qcv5mxmdse", - "topRow": 0, - "bottomRow": 0, - "parentRowSpace": 1, - "isVisible": false, - "canOutsideClickClose": true, - "type": "MODAL_WIDGET", - "canEscapeKeyClose": true, - "dynamicBindings": {}, - "parentId": "0", - "shouldScrollContents": true, - "blueprint": { - "view": [ - { - "position": { - "top": 0, - "left": 0 - }, - "type": "CANVAS_WIDGET", - "props": { - "shouldScrollContents": false, - "blueprint": { - "view": [ - { - "size": { - "rows": 1, - "cols": 2 - }, - "position": { - "top": 0, - "left": 14 - }, - "type": "ICON_WIDGET", - "props": { - "color": "#040627", - "iconName": "cross", - "iconSize": 24 - } - }, - { - "size": { - "rows": 1, - "cols": 10 - }, - "position": { - "top": 0, - "left": 0 - }, - "type": "TEXT_WIDGET", - "props": { - "text": "Modal Title", - "textStyle": "HEADING" - } - }, - { - "size": { - "rows": 1, - "cols": 3 - }, - "position": { - "top": 4, - "left": 10 - }, - "type": "BUTTON_WIDGET", - "props": { - "buttonStyle": "SECONDARY_BUTTON", - "text": "Cancel" - } - }, - { - "size": { - "rows": 1, - "cols": 3 - }, - "position": { - "top": 4, - "left": 13 - }, - "type": "BUTTON_WIDGET", - "props": { - "buttonStyle": "PRIMARY_BUTTON", - "text": "Confirm" - } - } - ], - "operations": [ - { - "type": "MODIFY_PROPS" - } - ] - }, - "detachFromLayout": true, - "children": [], - "isVisible": true, - "isDisabled": false, - "canExtend": true - } - } - ] - }, - "isLoading": false, - "parentColumnSpace": 1, - "size": "MODAL_LARGE", - "leftColumn": 0, - "children": [ - { - "widgetName": "Canvas1", - "rightColumn": 0, - "detachFromLayout": true, - "widgetId": "9pgyrkail5", - "topRow": 0, - "bottomRow": 640, - "parentRowSpace": 1, - "isVisible": true, - "canExtend": true, - "type": "CANVAS_WIDGET", - "parentId": "qcv5mxmdse", - "shouldScrollContents": false, - "blueprint": { - "view": [ - { - "size": { - "rows": 1, - "cols": 2 - }, - "position": { - "top": 0, - "left": 14 - }, - "type": "ICON_WIDGET", - "props": { - "color": "#040627", - "iconName": "cross", - "iconSize": 24 - } - }, - { - "size": { - "rows": 1, - "cols": 10 - }, - "position": { - "top": 0, - "left": 0 - }, - "type": "TEXT_WIDGET", - "props": { - "text": "Modal Title", - "textStyle": "HEADING" - } - }, - { - "size": { - "rows": 1, - "cols": 3 - }, - "position": { - "top": 4, - "left": 10 - }, - "type": "BUTTON_WIDGET", - "props": { - "buttonStyle": "SECONDARY_BUTTON", - "text": "Cancel" - } - }, - { - "size": { - "rows": 1, - "cols": 3 - }, - "position": { - "top": 4, - "left": 13 - }, - "type": "BUTTON_WIDGET", - "props": { - "buttonStyle": "PRIMARY_BUTTON", - "text": "Confirm" - } - } - ], - "operations": [ - { - "type": "MODIFY_PROPS" - } - ] - }, - "minHeight": 0, - "isLoading": false, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Icon1", - "rightColumn": 16, - "onClick": "{{closeModal('Modal1')}}", - "color": "#040627", - "iconName": "cross", - "widgetId": "3g9bl2sr58", - "topRow": 0, - "bottomRow": 1, - "isVisible": true, - "type": "ICON_WIDGET", - "parentId": "9pgyrkail5", - "isLoading": false, - "leftColumn": 14, - "iconSize": 24 - }, - { - "widgetName": "Text2", - "rightColumn": 14, - "textAlign": "LEFT", - "widgetId": "lddwvwekdx", - "topRow": 0, - "bottomRow": 1, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true - }, - "parentId": "9pgyrkail5", - "isLoading": false, - "leftColumn": 0, - "text": "

šŸ–‹ļø Edit {{usersTable.selectedRow.name}}'s Profile

", - "textStyle": "LABEL" - }, - { - "widgetName": "Button1", - "rightColumn": 12, - "isDefaultClickDisabled": true, - "widgetId": "0asi0ps632", - "buttonStyle": "SECONDARY_BUTTON", - "topRow": 13, - "bottomRow": 14, - "isVisible": true, - "type": "BUTTON_WIDGET", - "parentId": "9pgyrkail5", - "isLoading": false, - "leftColumn": 9, - "text": "Cancel", - "isDisabled": false - }, - { - "widgetName": "Button2", - "rightColumn": 16, - "onClick": "{{updateUser.run(() => getUsers.run(() => closeModal('Modal1')), () => showAlert('error'))}}", - "isDefaultClickDisabled": true, - "widgetId": "9aoww0u181", - "dynamicProperties": { - "onClick": true - }, - "buttonStyle": "PRIMARY_BUTTON", - "topRow": 13, - "bottomRow": 14, - "isVisible": true, - "type": "BUTTON_WIDGET", - "dynamicBindings": {}, - "parentId": "9pgyrkail5", - "isLoading": false, - "leftColumn": 12, - "dynamicTriggers": { - "onClick": true - }, - "text": "Save", - "isDisabled": false - }, - { - "widgetName": "Text10", - "rightColumn": 4, - "textAlign": "RIGHT", - "widgetId": "zxqqitzf07", - "topRow": 2, - "bottomRow": 3, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "9pgyrkail5", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 0, - "text": "Name", - "textStyle": "LABEL" - }, - { - "widgetName": "Text11", - "rightColumn": 4, - "textAlign": "RIGHT", - "widgetId": "52whn6clnv", - "topRow": 3, - "bottomRow": 4, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "9pgyrkail5", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 0, - "text": "Email", - "textStyle": "LABEL" - }, - { - "widgetName": "Text12", - "rightColumn": 4, - "textAlign": "RIGHT", - "widgetId": "qhmfxrxrp8", - "topRow": 5, - "bottomRow": 6, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "9pgyrkail5", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 0, - "text": "Address", - "textStyle": "LABEL" - }, - { - "widgetName": "addressInput", - "rightColumn": 13, - "widgetId": "5w60gql1bf", - "topRow": 5, - "bottomRow": 8, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "INPUT_WIDGET", - "dynamicBindings": { - "isValid": true, - "defaultText": true, - "value": true - }, - "parentId": "9pgyrkail5", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 4, - "inputType": "TEXT", - "defaultText": "{{usersTable.selectedRow.address}}" - }, - { - "widgetName": "emailInput", - "rightColumn": 13, - "widgetId": "l97o8yvlrc", - "topRow": 3, - "bottomRow": 4, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "INPUT_WIDGET", - "dynamicBindings": { - "isValid": true, - "defaultText": true, - "value": true - }, - "parentId": "9pgyrkail5", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 4, - "inputType": "TEXT", - "defaultText": "{{usersTable.selectedRow.email}}" - }, - { - "widgetName": "nameInput", - "rightColumn": 13, - "widgetId": "dorbm7hw83", - "topRow": 2, - "bottomRow": 3, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "INPUT_WIDGET", - "dynamicBindings": { - "isValid": true, - "defaultText": true, - "value": true - }, - "parentId": "9pgyrkail5", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 4, - "inputType": "TEXT", - "defaultText": "{{usersTable.selectedRow.name}}" - }, - { - "widgetName": "Text20", - "rightColumn": 4, - "textAlign": "RIGHT", - "widgetId": "gds83r70jn", - "topRow": 4, - "bottomRow": 5, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "9pgyrkail5", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 0, - "text": "Phone No", - "textStyle": "LABEL" - }, - { - "widgetName": "phoneInput", - "rightColumn": 13, - "widgetId": "lcmqk3xayr", - "topRow": 4, - "bottomRow": 5, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "INPUT_WIDGET", - "dynamicBindings": { - "isValid": true, - "defaultText": true, - "value": true - }, - "parentId": "9pgyrkail5", - "isLoading": false, - "regex": "^[0-9]{1,10}$", - "parentColumnSpace": 30.75, - "leftColumn": 4, - "inputType": "TEXT", - "defaultText": "{{usersTable.selectedRow.phoneNo || \"\"}}" - } - ], - "isDisabled": false - } - ] - }, - { - "backgroundColor": "#FFFFFF", - "widgetName": "Container1", - "rightColumn": 16, - "widgetId": "5wiefwlh3m", - "containerStyle": "card", - "topRow": 1, - "bottomRow": 9, - "parentRowSpace": 40, - "isVisible": true, - "type": "CONTAINER_WIDGET", - "parentId": "0", - "blueprint": { - "view": [ - { - "position": { - "top": 0, - "left": 0 - }, - "type": "CANVAS_WIDGET", - "props": { - "detachFromLayout": true, - "children": [ - "8c8ixb84rt", - "vxs1336eti", - "n1tn6qwmfu", - "75njm0wxgx", - "2wymlwykex", - "4x7s4ffqyc", - "m8jxuiwony", - "3mqfe3k3qf", - "lhds2qaxeg", - "p4p3or0jcd", - "uh5tweohvx" - ], - "containerStyle": "none", - "canExtend": false - } - } - ] - }, - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 9, - "children": [ - { - "widgetName": "Canvas2", - "rightColumn": 592, - "detachFromLayout": true, - "widgetId": "c2nnq6o54h", - "containerStyle": "none", - "topRow": 0, - "bottomRow": 400, - "parentRowSpace": 1, - "isVisible": true, - "canExtend": false, - "type": "CANVAS_WIDGET", - "parentId": "5wiefwlh3m", - "minHeight": 400, - "isLoading": false, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Button3", - "rightColumn": 16, - "onClick": "{{showModal('Modal1')}}", - "isDefaultClickDisabled": true, - "widgetId": "8c8ixb84rt", - "dynamicProperties": { - "isVisible": true - }, - "buttonStyle": "PRIMARY_BUTTON", - "topRow": 0, - "bottomRow": 1, - "parentRowSpace": 40, - "isVisible": "{{usersTable.selectedRow.id !== undefined}}", - "type": "BUTTON_WIDGET", - "dynamicBindings": { - "isVisible": true - }, - "parentId": "c2nnq6o54h", - "isLoading": false, - "parentColumnSpace": 20.625, - "leftColumn": 13, - "dynamicTriggers": { - "onClick": true - }, - "text": "Edit", - "isDisabled": false - }, - { - "image": "{{usersTable.selectedRow.avatar}}", - "widgetName": "Image1", - "rightColumn": 7, - "widgetId": "vxs1336eti", - "topRow": 0, - "bottomRow": 3, - "parentRowSpace": 40, - "isVisible": true, - "type": "IMAGE_WIDGET", - "dynamicBindings": { - "image": true - }, - "parentId": "c2nnq6o54h", - "isLoading": false, - "parentColumnSpace": 20.625, - "imageShape": "RECTANGLE", - "leftColumn": 0, - "defaultImage": "https://res.cloudinary.com/drako999/image/upload/v1589196259/default.png" - }, - { - "widgetName": "Text3", - "rightColumn": 13, - "textAlign": "LEFT", - "widgetId": "n1tn6qwmfu", - "topRow": 0, - "bottomRow": 1, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true - }, - "parentId": "c2nnq6o54h", - "isLoading": false, - "parentColumnSpace": 20.625, - "leftColumn": 7, - "text": "{{usersTable.selectedRow.name}}", - "textStyle": "LABEL" - }, - { - "widgetName": "Text4", - "rightColumn": 15, - "textAlign": "LEFT", - "widgetId": "75njm0wxgx", - "topRow": 1, - "bottomRow": 2, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true - }, - "parentId": "c2nnq6o54h", - "isLoading": false, - "parentColumnSpace": 20.625, - "leftColumn": 7, - "text": "{{usersTable.selectedRow.email}}", - "textStyle": "LABEL" - }, - { - "widgetName": "Text5", - "rightColumn": 15, - "textAlign": "LEFT", - "widgetId": "2wymlwykex", - "topRow": 2, - "bottomRow": 3, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true - }, - "parentId": "c2nnq6o54h", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 7, - "text": "{{usersTable.selectedRow.address}}", - "textStyle": "LABEL" - }, - { - "widgetName": "Text6", - "rightColumn": 11, - "textAlign": "LEFT", - "widgetId": "4x7s4ffqyc", - "dynamicProperties": { - "isVisible": true - }, - "topRow": 3, - "bottomRow": 4, - "parentRowSpace": 40, - "isVisible": "{{usersTable.selectedRow.id !== undefined}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "isVisible": true, - "value": true - }, - "parentId": "c2nnq6o54h", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 7, - "text": "

{{ (usersTable.selectedRow.gender === \"Male\" ? \"ā™‚ļø\" : \"ā™€ļø\") + usersTable.selectedRow.gender}}

", - "textStyle": "LABEL" - }, - { - "widgetName": "Text8", - "rightColumn": 7, - "textAlign": "CENTER", - "widgetId": "3mqfe3k3qf", - "dynamicProperties": { - "isVisible": true - }, - "topRow": 3, - "bottomRow": 4, - "parentRowSpace": 40, - "isVisible": "{{usersTable.selectedRow.id === undefined}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "isVisible": true, - "value": true - }, - "parentId": "c2nnq6o54h", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 0, - "text": "

šŸ‘ˆšŸæ Select a user

", - "textStyle": "LABEL" - }, - { - "widgetName": "Text21", - "rightColumn": 15, - "textAlign": "LEFT", - "widgetId": "uvw0ma9kfr", - "topRow": 4, - "bottomRow": 5, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true - }, - "parentId": "c2nnq6o54h", - "isLoading": false, - "parentColumnSpace": 29.875, - "leftColumn": 7, - "text": "{{usersTable.selectedRow.phoneNo || \"\"}}", - "textStyle": "LABEL" - } - ] - } - ] - }, - { - "hiddenColumns": ["userId", "orderDate"], - "widgetName": "ordersTable", - "rightColumn": 8, - "columnOrder": [ - "id", - "deliveryAddress", - "orderAmount", - "status" - ], - "widgetId": "xr3qu1jpj8", - "topRow": 19, - "bottomRow": 32, - "parentRowSpace": 40, - "tableData": "{{getOrders.data}}", - "isVisible": true, - "label": "Data", - "searchKey": "", - "type": "TABLE_WIDGET", - "dynamicBindings": { - "tableData": true, - "selectedRow": true, - "filteredTableData": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 0, - "dynamicTriggers": { - "onRowSelected": true - }, - "onRowSelected": "{{getOrderProducts.run()}}", - "columnSizeMap": { - "userId": 111 - } - }, - { - "widgetName": "Text13", - "rightColumn": 4, - "textAlign": "LEFT", - "widgetId": "euwmlckp34", - "topRow": 18, - "bottomRow": 19, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "text": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 0, - "text": "{{usersTable.selectedRow ? usersTable.selectedRow.name + \"'s Orders\" : \"ā˜šŸ½ Select a user\"}}", - "textStyle": "HEADING" - }, - { - "backgroundColor": "#FFFFFF", - "widgetName": "Container2", - "rightColumn": 16, - "widgetId": "xlb8hua7ie", - "containerStyle": "card", - "topRow": 19, - "bottomRow": 32, - "parentRowSpace": 40, - "isVisible": true, - "type": "CONTAINER_WIDGET", - "parentId": "0", - "blueprint": { - "view": [ - { - "position": { - "top": 0, - "left": 0 - }, - "type": "CANVAS_WIDGET", - "props": { - "detachFromLayout": true, - "children": ["v8531ch9d8", "0cz98i5vmt"], - "containerStyle": "none", - "canExtend": false - } - } - ] - }, - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 8, - "children": [ - { - "widgetName": "Canvas3", - "rightColumn": 592, - "detachFromLayout": true, - "widgetId": "gutl68s87o", - "containerStyle": "none", - "topRow": 0, - "bottomRow": 400, - "parentRowSpace": 1, - "isVisible": true, - "canExtend": false, - "type": "CANVAS_WIDGET", - "parentId": "xlb8hua7ie", - "minHeight": 400, - "isLoading": false, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Text15", - "rightColumn": 7, - "textAlign": "LEFT", - "widgetId": "0cz98i5vmt", - "topRow": 0, - "bottomRow": 1, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true - }, - "parentId": "gutl68s87o", - "isLoading": false, - "parentColumnSpace": 29.875, - "leftColumn": 0, - "text": "{{\"Order# \" + ordersTable.selectedRow.id}}", - "textStyle": "HEADING" - }, - { - "widgetName": "Text16", - "rightColumn": 11, - "textAlign": "LEFT", - "widgetId": "ec7hwwpigw", - "topRow": 1, - "bottomRow": 2, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true - }, - "parentId": "gutl68s87o", - "isLoading": false, - "parentColumnSpace": 29.875, - "leftColumn": 0, - "text": "{{ordersTable.selectedRow.deliveryAddress}}", - "textStyle": "LABEL" - }, - { - "widgetName": "Text17", - "rightColumn": 8, - "textAlign": "LEFT", - "widgetId": "jgv0uu3x5g", - "topRow": 2, - "bottomRow": 3, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true - }, - "parentId": "gutl68s87o", - "isLoading": false, - "parentColumnSpace": 29.875, - "leftColumn": 4, - "text": "{{ordersTable.selectedRow.status}}", - "textStyle": "LABEL" - }, - { - "widgetName": "Button6", - "rightColumn": 16, - "onClick": "{{showModal('Modal2')}}", - "isDefaultClickDisabled": true, - "widgetId": "am2dpsi2q3", - "dynamicProperties": { - "isDisabled": true - }, - "buttonStyle": "DANGER_BUTTON", - "topRow": 0, - "bottomRow": 1, - "parentRowSpace": 40, - "isVisible": true, - "type": "BUTTON_WIDGET", - "dynamicBindings": { - "isDisabled": true - }, - "parentId": "gutl68s87o", - "isLoading": false, - "parentColumnSpace": 29.875, - "leftColumn": 12, - "dynamicTriggers": { - "onClick": true - }, - "text": "Refund", - "isDisabled": "{{ordersTable.selectedRow.id === undefined || ordersTable.selectedRow.status === \"REFUNDED\" || appsmith.user.email !== \"nikhil@appsmith.com\"}}" - }, - { - "hiddenColumns": [ - "mrp", - "imageUrl", - "description", - "isListed", - "availabilityDate", - "channel" - ], - "widgetName": "Table1", - "rightColumn": 16, - "columnOrder": [ - "productId", - "productName", - "listingPrice", - "category", - "mrp", - "imageUrl", - "description", - "isListed", - "availabilityDate", - "channel" - ], - "widgetId": "db1kphrwnt", - "topRow": 5, - "bottomRow": 12, - "parentRowSpace": 40, - "tableData": "{{getOrderProducts.data}}", - "isVisible": true, - "label": "Data", - "searchKey": "", - "type": "TABLE_WIDGET", - "dynamicBindings": { - "tableData": true, - "selectedRow": true, - "filteredTableData": true - }, - "parentId": "gutl68s87o", - "isLoading": false, - "parentColumnSpace": 29.875, - "leftColumn": 0 - }, - { - "widgetName": "Text18", - "rightColumn": 4, - "textAlign": "LEFT", - "widgetId": "0dxro3kpwp", - "topRow": 4, - "bottomRow": 5, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "gutl68s87o", - "isLoading": false, - "parentColumnSpace": 29.875, - "leftColumn": 0, - "text": "Products", - "textStyle": "HEADING" - }, - { - "widgetName": "Text19", - "rightColumn": 4, - "textAlign": "LEFT", - "widgetId": "ek4t9o9djx", - "topRow": 2, - "bottomRow": 3, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true - }, - "parentId": "gutl68s87o", - "isLoading": false, - "parentColumnSpace": 34.5, - "leftColumn": 0, - "text": "{{\"₹\" + ordersTable.selectedRow.orderAmount}}", - "textStyle": "LABEL" - }, - { - "isVisible": true, - "text": "{{appsmith.user.email !== \"nikhil@appsmith.com\" ? \"Only Admins can initiate refunds\" : \"\"}}", - "textStyle": "HEADING", - "textAlign": "CENTER", - "widgetName": "Text24", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 34.5, - "parentRowSpace": 40, - "leftColumn": 2, - "rightColumn": 15, - "topRow": 3, - "bottomRow": 4, - "parentId": "gutl68s87o", - "widgetId": "1macn19a8h", - "dynamicBindings": { - "text": true, - "value": true - } - } - ] - } - ] - }, - { - "isVisible": false, - "size": "MODAL_SMALL", - "canEscapeKeyClose": true, - "detachFromLayout": true, - "canOutsideClickClose": true, - "shouldScrollContents": true, - "widgetName": "Modal2", - "children": [ - { - "isVisible": true, - "widgetName": "Canvas4", - "detachFromLayout": true, - "canExtend": true, - "isDisabled": false, - "shouldScrollContents": false, - "children": [ - { - "isVisible": true, - "widgetName": "Icon2", - "iconName": "cross", - "iconSize": 24, - "color": "#040627", - "type": "ICON_WIDGET", - "isLoading": false, - "leftColumn": 14, - "rightColumn": 16, - "topRow": 0, - "bottomRow": 1, - "parentId": "bek8vtf45d", - "widgetId": "h2bzyryz3k", - "onClick": "{{closeModal('Modal2')}}" - }, - { - "isVisible": true, - "text": "Refund Order #{{ordersTable.selectedRow.id}}", - "textStyle": "HEADING", - "textAlign": "LEFT", - "widgetName": "Text22", - "type": "TEXT_WIDGET", - "isLoading": false, - "leftColumn": 0, - "rightColumn": 10, - "topRow": 0, - "bottomRow": 1, - "parentId": "bek8vtf45d", - "widgetId": "3c2d1zfzu7", - "dynamicBindings": { - "value": true, - "text": true - } - }, - { - "isVisible": true, - "text": "Cancel", - "buttonStyle": "SECONDARY_BUTTON", - "widgetName": "Button7", - "isDisabled": false, - "isDefaultClickDisabled": true, - "type": "BUTTON_WIDGET", - "isLoading": false, - "leftColumn": 10, - "rightColumn": 13, - "topRow": 4, - "bottomRow": 5, - "parentId": "bek8vtf45d", - "widgetId": "w8hwwktvmg", - "dynamicTriggers": { - "onClick": true - }, - "onClick": "{{closeModal('Modal2')}}" - }, - { - "isVisible": true, - "text": "Confirm", - "buttonStyle": "PRIMARY_BUTTON", - "widgetName": "Button8", - "isDisabled": false, - "isDefaultClickDisabled": true, - "type": "BUTTON_WIDGET", - "isLoading": false, - "leftColumn": 13, - "rightColumn": 16, - "topRow": 4, - "bottomRow": 5, - "parentId": "bek8vtf45d", - "widgetId": "54fh5v9z6f", - "onClick": "{{refundAPI.run(() => markOrderRefund.run(() => getOrders.run(() => closeModal('Modal2'))), () => {})}}", - "dynamicProperties": { - "onClick": true - }, - "dynamicTriggers": { - "onClick": true - } - }, - { - "isVisible": true, - "text": "Are you sure you want to refund this order?", - "textStyle": "LABEL", - "textAlign": "LEFT", - "widgetName": "Text23", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 26, - "parentRowSpace": 40, - "leftColumn": 1, - "rightColumn": 13, - "topRow": 2, - "bottomRow": 3, - "parentId": "bek8vtf45d", - "widgetId": "z2k233aijz", - "dynamicBindings": { - "value": true - } - } - ], - "blueprint": { - "view": [ - { - "type": "ICON_WIDGET", - "position": { - "left": 14, - "top": 0 - }, - "size": { - "rows": 1, - "cols": 2 - }, - "props": { - "iconName": "cross", - "iconSize": 24, - "color": "#040627" - } - }, - { - "type": "TEXT_WIDGET", - "position": { - "left": 0, - "top": 0 - }, - "size": { - "rows": 1, - "cols": 10 - }, - "props": { - "text": "Modal Title", - "textStyle": "HEADING" - } - }, - { - "type": "BUTTON_WIDGET", - "position": { - "left": 10, - "top": 4 - }, - "size": { - "rows": 1, - "cols": 3 - }, - "props": { - "text": "Cancel", - "buttonStyle": "SECONDARY_BUTTON" - } - }, - { - "type": "BUTTON_WIDGET", - "position": { - "left": 13, - "top": 4 - }, - "size": { - "rows": 1, - "cols": 3 - }, - "props": { - "text": "Confirm", - "buttonStyle": "PRIMARY_BUTTON" - } - } - ], - "operations": [ - { - "type": "MODIFY_PROPS" - } - ] - }, - "minHeight": 0, - "type": "CANVAS_WIDGET", - "isLoading": false, - "parentColumnSpace": 1, - "parentRowSpace": 1, - "leftColumn": 0, - "rightColumn": 0, - "topRow": 0, - "bottomRow": 280, - "parentId": "apytb4wr2y", - "widgetId": "bek8vtf45d" - } - ], - "blueprint": { - "view": [ - { - "type": "CANVAS_WIDGET", - "position": { - "left": 0, - "top": 0 - }, - "props": { - "detachFromLayout": true, - "canExtend": true, - "isVisible": true, - "isDisabled": false, - "shouldScrollContents": false, - "children": [], - "blueprint": { - "view": [ - { - "type": "ICON_WIDGET", - "position": { - "left": 14, - "top": 0 - }, - "size": { - "rows": 1, - "cols": 2 - }, - "props": { - "iconName": "cross", - "iconSize": 24, - "color": "#040627" - } - }, - { - "type": "TEXT_WIDGET", - "position": { - "left": 0, - "top": 0 - }, - "size": { - "rows": 1, - "cols": 10 - }, - "props": { - "text": "Modal Title", - "textStyle": "HEADING" - } - }, - { - "type": "BUTTON_WIDGET", - "position": { - "left": 10, - "top": 4 - }, - "size": { - "rows": 1, - "cols": 3 - }, - "props": { - "text": "Cancel", - "buttonStyle": "SECONDARY_BUTTON" - } - }, - { - "type": "BUTTON_WIDGET", - "position": { - "left": 13, - "top": 4 - }, - "size": { - "rows": 1, - "cols": 3 - }, - "props": { - "text": "Confirm", - "buttonStyle": "PRIMARY_BUTTON" - } - } - ], - "operations": [ - { - "type": "MODIFY_PROPS" - } - ] - } - } - } - ] - }, - "type": "MODAL_WIDGET", - "isLoading": false, - "parentColumnSpace": 1, - "parentRowSpace": 1, - "leftColumn": 0, - "rightColumn": 0, - "topRow": 0, - "bottomRow": 0, - "parentId": "0", - "widgetId": "apytb4wr2y" - }, - { - "isVisible": true, - "widgetName": "Chart1", - "chartType": "PIE_CHART", - "chartName": "Orders", - "allowScroll": false, - "chartData": "[{\"seriesName\":\"Order Status\",\"data\":\"[\\n {\\n \\\"x\\\": \\\"ORDER_PLACED\\\",\\n \\\"y\\\": {{getOrders.data.filter((order) => { return order.status === \\\"ORDER_PLACED\\\" }).length}}\\n },\\n {\\n \\\"x\\\": \\\"OUT_FOR_DELIVERY\\\",\\n \\\"y\\\": {{getOrders.data.filter((order) => { return order.status === \\\"OUT_FOR_DELIVERY\\\" }).length}}\\n },\\n {\\n \\\"x\\\": \\\"PAYMENT_PENDING\\\",\\n \\\"y\\\": {{getOrders.data.filter((order) => { return order.status === \\\"PAYMENT_PENDING\\\" }).length}}\\n },\\n {\\n \\\"x\\\": \\\"REFUNDED\\\",\\n \\\"y\\\": {{getOrders.data.filter((order) => { return order.status === \\\"REFUNDED\\\" }).length}}\\n }\\n \\n]\"}]", - "xAxisName": "Last Week", - "yAxisName": "Total Order Revenue $", - "type": "CHART_WIDGET", - "isLoading": false, - "parentColumnSpace": 74, - "parentRowSpace": 40, - "leftColumn": 9, - "rightColumn": 16, - "topRow": 9, - "bottomRow": 17, - "parentId": "0", - "widgetId": "jr461ymixc", - "dynamicBindings": { - "chartData": true - } - } - ] - }, - "layoutOnLoadActions": [ - [ - { - "name": "getUsers", - "pluginType": "DB", - "jsonPathKeys": [ - "usersTable.searchText", - "(usersTable.pageNo - 1) * 10" - ], - "timeoutInMillisecond": 10000 - } - ] - ], - "publishedLayoutOnLoadActions": [ - [ - { - "name": "getUsers", - "pluginType": "DB", - "jsonPathKeys": [ - "usersTable.searchText", - "(usersTable.pageNo - 1) * 10" - ], - "timeoutInMillisecond": 10000 - } - ] - ], - "widgetNames": [ - "Button1", - "Text8", - "Text6", - "Text5", - "Text4", - "Text3", - "Text2", - "Container1", - "Icon2", - "Text1", - "Icon1", - "Container2", - "Chart1", - "usersTable", - "Text23", - "Text24", - "Text21", - "Text22", - "Text20", - "Table1", - "Image1", - "ordersTable", - "Text18", - "Text19", - "phoneInput", - "Text16", - "nameInput", - "Text17", - "emailInput", - "MainContainer", - "Text15", - "Text12", - "Canvas4", - "Text13", - "Text10", - "Text11", - "Modal1", - "Canvas1", - "Modal2", - "Canvas2", - "Canvas3", - "Button3", - "Button2", - "Button8", - "addressInput", - "Button7", - "Button6" - ], - "deleted": false, - "policies": [] - } - ], - "deleted": false, - "policies": [], - "_class": "com.appsmith.server.domains.Page" - }, - { - "name": "Support Tickets", - "$isDefault": true, - "$actions": [ - { - "name": "getTickets", - "datasource": { - "$isEmbedded": true, - "name": "https://appsmithhelp.freshdesk.com", - "$pluginPackageName": "restapi-plugin", - "datasourceConfiguration": { - "url": "https://appsmithhelp.freshdesk.com" - }, - "invalids": [], - "deleted": false, - "policies": [] - }, - "actionConfiguration": { - "timeoutInMillisecond": 10000, - "paginationType": "NONE", - "path": "/api/v2/tickets", - "headers": [ - { - "key": "Authorization", - "value": "Basic dG51cjdrUlk4MjRCM3l5eElaeTp0ZXN0" - }, - { - "key": "", - "value": "" - } - ], - "queryParameters": [ - { - "key": "include", - "value": "requester,description" - }, - { - "key": "", - "value": "" - } - ], - "httpMethod": "GET" - }, - "pluginType": "API", - "dynamicBindingPathList": [], - "isValid": true, - "invalids": [], - "jsonPathKeys": [], - "deleted": false, - "policies": [], - "_class": "com.appsmith.server.domains.Action" - } - ], - "layouts": [ - { - "viewMode": false, - "dsl": { - "widgetName": "MainContainer", - "backgroundColor": "none", - "rightColumn": 1224, - "snapColumns": 16, - "detachFromLayout": true, - "widgetId": "0", - "topRow": 0, - "bottomRow": 1280, - "containerStyle": "none", - "snapRows": 33, - "parentRowSpace": 1, - "type": "CANVAS_WIDGET", - "canExtend": true, - "dynamicBindings": {}, - "version": 5, - "minHeight": 1292, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "isVisible": true, - "shouldScrollContents": false, - "widgetName": "Tabs1", - "tabs": "[{\"label\":\"Blank\",\"id\":\"tab1\"},{\"label\":\"Email\",\"id\":\"tab2\"}]", - "shouldShowTabs": false, - "defaultTab": "{{ticketsTable.selectedRow.id === undefined ? \"Blank\" : \"Email\"}}", - "blueprint": { - "view": [ - { - "type": "CANVAS_WIDGET", - "position": { - "top": 0, - "left": 0 - }, - "size": { - "rows": 6, - "cols": 16 - }, - "props": { - "containerStyle": "none", - "canExtend": false, - "detachFromLayout": true, - "children": ["6af2mwjii8"], - "tabId": "tab1" - } - }, - { - "type": "CANVAS_WIDGET", - "position": { - "top": 0, - "left": 0 - }, - "size": { - "rows": 6, - "cols": 16 - }, - "props": { - "containerStyle": "none", - "canExtend": false, - "detachFromLayout": true, - "children": ["bv27fj7bs5", "6af2mwjii8"], - "tabId": "tab2" - } - } - ] - }, - "type": "TABS_WIDGET", - "isLoading": false, - "parentColumnSpace": 74, - "parentRowSpace": 40, - "leftColumn": 8, - "rightColumn": 16, - "topRow": 0, - "bottomRow": 20, - "parentId": "0", - "widgetId": "28qy9d4q6j", - "children": [ - { - "isVisible": true, - "widgetName": "Canvas2", - "containerStyle": "none", - "canExtend": false, - "detachFromLayout": true, - "children": [ - { - "isVisible": true, - "text": "

šŸ‘ˆ Select a Support Ticket

", - "textStyle": "LABEL", - "textAlign": "LEFT", - "widgetName": "Text2", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 34.5, - "parentRowSpace": 40, - "leftColumn": 3, - "rightColumn": 14, - "topRow": 8, - "bottomRow": 9, - "parentId": "ugkkycsm7d", - "widgetId": "66o8bjkz30", - "dynamicBindings": { - "value": true - } - } - ], - "tabId": "tab1", - "minHeight": 280, - "type": "CANVAS_WIDGET", - "isLoading": false, - "parentColumnSpace": 1, - "parentRowSpace": 1, - "leftColumn": 0, - "rightColumn": 592, - "topRow": 0, - "bottomRow": 280, - "parentId": "28qy9d4q6j", - "widgetId": "ugkkycsm7d" - }, - { - "isVisible": true, - "widgetName": "Canvas3", - "containerStyle": "none", - "canExtend": false, - "detachFromLayout": true, - "children": [ - { - "widgetName": "Text1", - "rightColumn": 16, - "textAlign": "LEFT", - "widgetId": "bv27fj7bs5", - "topRow": 2, - "bottomRow": 19, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true - }, - "shouldScroll": true, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 0, - "text": "{{ticketsTable.selectedRow.description}}", - "textStyle": "LABEL" - }, - { - "widgetName": "Button1", - "rightColumn": 16, - "onClick": "{{navigateTo('Users Page', { email: ticketsTable.selectedRow.email })}}", - "isDefaultClickDisabled": true, - "widgetId": "6af2mwjii8", - "dynamicProperties": { - "onClick": true - }, - "buttonStyle": "PRIMARY_BUTTON", - "topRow": 0, - "bottomRow": 1, - "parentRowSpace": 40, - "isVisible": true, - "type": "BUTTON_WIDGET", - "dynamicBindings": {}, - "parentId": "6rczwfuxqd", - "isLoading": false, - "parentColumnSpace": 34.5, - "leftColumn": 13, - "dynamicTriggers": { - "onClick": true - }, - "text": "View User", - "isDisabled": false - }, - { - "isVisible": true, - "text": "

Support Email

", - "textStyle": "LABEL", - "textAlign": "LEFT", - "widgetName": "Text3", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 34.5, - "parentRowSpace": 40, - "leftColumn": 0, - "rightColumn": 7, - "topRow": 0, - "bottomRow": 1, - "parentId": "bx74wpc2rn", - "widgetId": "t23uk8t09q", - "dynamicBindings": { - "value": true - } - } - ], - "tabId": "tab2", - "minHeight": 280, - "type": "CANVAS_WIDGET", - "isLoading": false, - "parentColumnSpace": 1, - "parentRowSpace": 1, - "leftColumn": 0, - "rightColumn": 592, - "topRow": 0, - "bottomRow": 280, - "parentId": "28qy9d4q6j", - "widgetId": "bx74wpc2rn" - } - ], - "dynamicBindings": { - "selectedTab": true, - "defaultTab": true - } - }, - { - "isVisible": true, - "backgroundColor": "#FFFFFF", - "widgetName": "Container1", - "containerStyle": "card", - "children": [ - { - "isVisible": true, - "widgetName": "Canvas4", - "containerStyle": "none", - "canExtend": false, - "detachFromLayout": true, - "children": [ - { - "hiddenColumns": ["description", "actions"], - "widgetName": "ticketsTable", - "rightColumn": 16, - "widgetId": "472a29heor", - "topRow": 1, - "bottomRow": 19, - "parentRowSpace": 40, - "tableData": "{{getTickets.data.map((ticket) => {\n\treturn {\n\t\tid: ticket.id,\n\t\temail: ticket.requester.email,\n\t\tsubject: ticket.subject,\n\t\tdescription: ticket.description\n\t}\n})}}", - "isVisible": true, - "label": "Data", - "searchKey": "", - "type": "TABLE_WIDGET", - "dynamicBindings": { - "tableData": true, - "selectedRow": true, - "filteredTableData": true - }, - "parentId": "0", - "serverSidePaginationEnabled": true, - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 0, - "columnActions": [], - "columnSizeMap": { - "subject": 217, - "id": 115, - "email": 217 - } - }, - { - "isVisible": true, - "text": "

Freskdesk Tickets

", - "textStyle": "LABEL", - "textAlign": "LEFT", - "widgetName": "Text4", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 74, - "parentRowSpace": 40, - "leftColumn": 0, - "rightColumn": 10, - "topRow": 0, - "bottomRow": 1, - "parentId": "0", - "widgetId": "dqzd7flg31", - "dynamicBindings": { - "value": true - } - } - ], - "minHeight": 400, - "type": "CANVAS_WIDGET", - "isLoading": false, - "parentColumnSpace": 1, - "parentRowSpace": 1, - "leftColumn": 0, - "rightColumn": 592, - "topRow": 0, - "bottomRow": 400, - "parentId": "dkhget3ru7", - "widgetId": "pammdjlrth" - } - ], - "blueprint": { - "view": [ - { - "type": "CANVAS_WIDGET", - "position": { - "top": 0, - "left": 0 - }, - "props": { - "containerStyle": "none", - "canExtend": false, - "detachFromLayout": true, - "children": ["472a29heor", "dqzd7flg31"] - } - } - ] - }, - "type": "CONTAINER_WIDGET", - "isLoading": false, - "parentColumnSpace": 74, - "parentRowSpace": 40, - "leftColumn": 0, - "rightColumn": 8, - "topRow": 0, - "bottomRow": 20, - "parentId": "0", - "widgetId": "dkhget3ru7" - } - ] - }, - "publishedDsl": { - "widgetName": "MainContainer", - "backgroundColor": "none", - "rightColumn": 1224, - "snapColumns": 16, - "detachFromLayout": true, - "widgetId": "0", - "topRow": 0, - "bottomRow": 1280, - "containerStyle": "none", - "snapRows": 33, - "parentRowSpace": 1, - "type": "CANVAS_WIDGET", - "canExtend": true, - "dynamicBindings": {}, - "version": 5, - "minHeight": 1292, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "isVisible": true, - "shouldScrollContents": false, - "widgetName": "Tabs1", - "tabs": "[{\"label\":\"Blank\",\"id\":\"tab1\"},{\"label\":\"Email\",\"id\":\"tab2\"}]", - "shouldShowTabs": false, - "defaultTab": "{{ticketsTable.selectedRow.id === undefined ? \"Blank\" : \"Email\"}}", - "blueprint": { - "view": [ - { - "type": "CANVAS_WIDGET", - "position": { - "top": 0, - "left": 0 - }, - "size": { - "rows": 6, - "cols": 16 - }, - "props": { - "containerStyle": "none", - "canExtend": false, - "detachFromLayout": true, - "children": ["6af2mwjii8"], - "tabId": "tab1" - } - }, - { - "type": "CANVAS_WIDGET", - "position": { - "top": 0, - "left": 0 - }, - "size": { - "rows": 6, - "cols": 16 - }, - "props": { - "containerStyle": "none", - "canExtend": false, - "detachFromLayout": true, - "children": ["bv27fj7bs5", "6af2mwjii8"], - "tabId": "tab2" - } - } - ] - }, - "type": "TABS_WIDGET", - "isLoading": false, - "parentColumnSpace": 74, - "parentRowSpace": 40, - "leftColumn": 8, - "rightColumn": 16, - "topRow": 0, - "bottomRow": 20, - "parentId": "0", - "widgetId": "28qy9d4q6j", - "children": [ - { - "isVisible": true, - "widgetName": "Canvas2", - "containerStyle": "none", - "canExtend": false, - "detachFromLayout": true, - "children": [ - { - "isVisible": true, - "text": "

šŸ‘ˆ Select a Support Ticket

", - "textStyle": "LABEL", - "textAlign": "LEFT", - "widgetName": "Text2", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 34.5, - "parentRowSpace": 40, - "leftColumn": 3, - "rightColumn": 14, - "topRow": 8, - "bottomRow": 9, - "parentId": "ugkkycsm7d", - "widgetId": "66o8bjkz30", - "dynamicBindings": { - "value": true - } - } - ], - "tabId": "tab1", - "minHeight": 280, - "type": "CANVAS_WIDGET", - "isLoading": false, - "parentColumnSpace": 1, - "parentRowSpace": 1, - "leftColumn": 0, - "rightColumn": 592, - "topRow": 0, - "bottomRow": 280, - "parentId": "28qy9d4q6j", - "widgetId": "ugkkycsm7d" - }, - { - "isVisible": true, - "widgetName": "Canvas3", - "containerStyle": "none", - "canExtend": false, - "detachFromLayout": true, - "children": [ - { - "widgetName": "Text1", - "rightColumn": 16, - "textAlign": "LEFT", - "widgetId": "bv27fj7bs5", - "topRow": 2, - "bottomRow": 19, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true - }, - "shouldScroll": true, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 0, - "text": "{{ticketsTable.selectedRow.description}}", - "textStyle": "LABEL" - }, - { - "widgetName": "Button1", - "rightColumn": 16, - "onClick": "{{navigateTo('Users Page', { email: ticketsTable.selectedRow.email })}}", - "isDefaultClickDisabled": true, - "widgetId": "6af2mwjii8", - "dynamicProperties": { - "onClick": true - }, - "buttonStyle": "PRIMARY_BUTTON", - "topRow": 0, - "bottomRow": 1, - "parentRowSpace": 40, - "isVisible": true, - "type": "BUTTON_WIDGET", - "dynamicBindings": {}, - "parentId": "6rczwfuxqd", - "isLoading": false, - "parentColumnSpace": 34.5, - "leftColumn": 13, - "dynamicTriggers": { - "onClick": true - }, - "text": "View User", - "isDisabled": false - }, - { - "isVisible": true, - "text": "

Support Email

", - "textStyle": "LABEL", - "textAlign": "LEFT", - "widgetName": "Text3", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 34.5, - "parentRowSpace": 40, - "leftColumn": 0, - "rightColumn": 7, - "topRow": 0, - "bottomRow": 1, - "parentId": "bx74wpc2rn", - "widgetId": "t23uk8t09q", - "dynamicBindings": { - "value": true - } - } - ], - "tabId": "tab2", - "minHeight": 280, - "type": "CANVAS_WIDGET", - "isLoading": false, - "parentColumnSpace": 1, - "parentRowSpace": 1, - "leftColumn": 0, - "rightColumn": 592, - "topRow": 0, - "bottomRow": 280, - "parentId": "28qy9d4q6j", - "widgetId": "bx74wpc2rn" - } - ], - "dynamicBindings": { - "selectedTab": true, - "defaultTab": true - } - }, - { - "isVisible": true, - "backgroundColor": "#FFFFFF", - "widgetName": "Container1", - "containerStyle": "card", - "children": [ - { - "isVisible": true, - "widgetName": "Canvas4", - "containerStyle": "none", - "canExtend": false, - "detachFromLayout": true, - "children": [ - { - "hiddenColumns": ["description", "actions"], - "widgetName": "ticketsTable", - "rightColumn": 16, - "widgetId": "472a29heor", - "topRow": 1, - "bottomRow": 19, - "parentRowSpace": 40, - "tableData": "{{getTickets.data.map((ticket) => {\n\treturn {\n\t\tid: ticket.id,\n\t\temail: ticket.requester.email,\n\t\tsubject: ticket.subject,\n\t\tdescription: ticket.description\n\t}\n})}}", - "isVisible": true, - "label": "Data", - "searchKey": "", - "type": "TABLE_WIDGET", - "dynamicBindings": { - "tableData": true, - "selectedRow": true, - "filteredTableData": true - }, - "parentId": "0", - "serverSidePaginationEnabled": true, - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 0, - "columnActions": [], - "columnSizeMap": { - "subject": 217, - "id": 115, - "email": 217 - } - }, - { - "isVisible": true, - "text": "

Freskdesk Tickets

", - "textStyle": "LABEL", - "textAlign": "LEFT", - "widgetName": "Text4", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 74, - "parentRowSpace": 40, - "leftColumn": 0, - "rightColumn": 10, - "topRow": 0, - "bottomRow": 1, - "parentId": "0", - "widgetId": "dqzd7flg31", - "dynamicBindings": { - "value": true - } - } - ], - "minHeight": 400, - "type": "CANVAS_WIDGET", - "isLoading": false, - "parentColumnSpace": 1, - "parentRowSpace": 1, - "leftColumn": 0, - "rightColumn": 592, - "topRow": 0, - "bottomRow": 400, - "parentId": "dkhget3ru7", - "widgetId": "pammdjlrth" - } - ], - "blueprint": { - "view": [ - { - "type": "CANVAS_WIDGET", - "position": { - "top": 0, - "left": 0 - }, - "props": { - "containerStyle": "none", - "canExtend": false, - "detachFromLayout": true, - "children": ["472a29heor", "dqzd7flg31"] - } - } - ] - }, - "type": "CONTAINER_WIDGET", - "isLoading": false, - "parentColumnSpace": 74, - "parentRowSpace": 40, - "leftColumn": 0, - "rightColumn": 8, - "topRow": 0, - "bottomRow": 20, - "parentId": "0", - "widgetId": "dkhget3ru7" - } - ] - }, - "layoutOnLoadActions": [ - [ - { - "name": "getTickets", - "pluginType": "API", - "jsonPathKeys": [], - "timeoutInMillisecond": 10000 - } - ] - ], - "publishedLayoutOnLoadActions": [ - [ - { - "name": "getTickets", - "pluginType": "API", - "jsonPathKeys": [], - "timeoutInMillisecond": 10000 - } - ] - ], - "widgetNames": [ - "Canvas4", - "Button1", - "Canvas2", - "ticketsTable", - "Canvas3", - "Text4", - "Text3", - "Text2", - "Container1", - "Text1", - "Tabs1", - "MainContainer" - ], - "deleted": false, - "policies": [] - } - ], - "deleted": false, - "policies": [], - "_class": "com.appsmith.server.domains.Page" - } - ], - "deleted": false, - "policies": [], - "_class": "com.appsmith.server.domains.Application" - }, - { - "name": "Form Tutorial", - "isPublic": true, - "$pages": [ - { - "name": "1. Simple Form Submit", - "$isDefault": true, - "$actions": [ - { - "name": "createUser", - "datasource": { - "$isEmbedded": false, - "name": "Mock Database", - "$pluginPackageName": "postgres-plugin", - "datasourceConfiguration": { - "connection": { - "mode": "READ_WRITE" - }, - "endpoints": [ - { - "host": "fake-api.cvuydmurdlas.us-east-1.rds.amazonaws.com", - "port": 5432 - } - ], - "authentication": { - "username": "fakeapi", - "password": "LimitedAccess123#", - "databaseName": "fakeapi" - }, - "sshProxyEnabled": false - }, - "invalids": [], - "deleted": false, - "policies": [] - }, - "actionConfiguration": { - "timeoutInMillisecond": 10000, - "paginationType": "NONE", - "body": "INSERT INTO users\n (name, gender, email, status, dob)\nVALUES\n ('{{nameInput.text}}', '{{genderDropdown.selectedOptionValue}}', '{{emailInput.text}}', '{{statusRadio.selectedOptionValue}}', '{{dobPicker.selectedDate}}');" - }, - "pluginType": "DB", - "dynamicBindingPathList": [ - { - "key": "body" - } - ], - "isValid": true, - "invalids": [], - "jsonPathKeys": [ - "statusRadio.selectedOptionValue", - "genderDropdown.selectedOptionValue", - "dobPicker.selectedDate", - "nameInput.text", - "emailInput.text" - ], - "deleted": false, - "policies": [], - "_class": "com.appsmith.server.domains.Action" - } - ], - "layouts": [ - { - "viewMode": false, - "dsl": { - "widgetName": "MainContainer", - "backgroundColor": "none", - "rightColumn": 1224, - "snapColumns": 16, - "detachFromLayout": true, - "widgetId": "0", - "topRow": 0, - "bottomRow": 1280, - "containerStyle": "none", - "snapRows": 33, - "parentRowSpace": 1, - "type": "CANVAS_WIDGET", - "canExtend": true, - "dynamicBindings": {}, - "version": 5, - "minHeight": 1292, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Form1", - "backgroundColor": "white", - "rightColumn": 7, - "widgetId": "d6jgloegyf", - "topRow": 3, - "bottomRow": 21, - "parentRowSpace": 40, - "isVisible": true, - "type": "FORM_WIDGET", - "parentId": "0", - "blueprint": { - "view": [ - { - "position": { - "top": 0, - "left": 0 - }, - "type": "CANVAS_WIDGET", - "props": { - "blueprint": { - "view": [ - { - "size": { - "rows": 1, - "cols": 12 - }, - "position": { - "top": 0, - "left": 0 - }, - "type": "TEXT_WIDGET", - "props": { - "text": "Form", - "textStyle": "HEADING" - } - }, - { - "size": { - "rows": 1, - "cols": 4 - }, - "position": { - "top": 11, - "left": 12 - }, - "type": "FORM_BUTTON_WIDGET", - "props": { - "resetFormOnClick": true, - "disabledWhenInvalid": true, - "buttonStyle": "PRIMARY_BUTTON", - "text": "Submit" - } - }, - { - "size": { - "rows": 1, - "cols": 4 - }, - "position": { - "top": 11, - "left": 8 - }, - "type": "FORM_BUTTON_WIDGET", - "props": { - "resetFormOnClick": true, - "disabledWhenInvalid": false, - "buttonStyle": "SECONDARY_BUTTON", - "text": "Reset" - } - } - ] - }, - "detachFromLayout": true, - "children": [], - "containerStyle": "none", - "canExtend": false - } - } - ] - }, - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 1, - "children": [ - { - "widgetName": "Canvas1", - "rightColumn": 518, - "detachFromLayout": true, - "widgetId": "x8vgckp3l4", - "containerStyle": "none", - "topRow": 0, - "bottomRow": 520, - "parentRowSpace": 1, - "isVisible": true, - "canExtend": false, - "type": "CANVAS_WIDGET", - "parentId": "d6jgloegyf", - "blueprint": { - "view": [ - { - "size": { - "rows": 1, - "cols": 12 - }, - "position": { - "top": 0, - "left": 0 - }, - "type": "TEXT_WIDGET", - "props": { - "text": "Form", - "textStyle": "HEADING" - } - }, - { - "size": { - "rows": 1, - "cols": 4 - }, - "position": { - "top": 11, - "left": 12 - }, - "type": "FORM_BUTTON_WIDGET", - "props": { - "resetFormOnClick": true, - "disabledWhenInvalid": true, - "buttonStyle": "PRIMARY_BUTTON", - "text": "Submit" - } - }, - { - "size": { - "rows": 1, - "cols": 4 - }, - "position": { - "top": 11, - "left": 8 - }, - "type": "FORM_BUTTON_WIDGET", - "props": { - "resetFormOnClick": true, - "disabledWhenInvalid": false, - "buttonStyle": "SECONDARY_BUTTON", - "text": "Reset" - } - } - ] - }, - "minHeight": 520, - "isLoading": false, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Text1", - "rightColumn": 12, - "textAlign": "LEFT", - "widgetId": "1jodo5u68l", - "topRow": 0, - "bottomRow": 1, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "x8vgckp3l4", - "isLoading": false, - "leftColumn": 0, - "text": "šŸ‘¤ User Form", - "textStyle": "HEADING" - }, - { - "resetFormOnClick": true, - "widgetName": "submitButton", - "rightColumn": 16, - "onClick": "{{createUser.run(() => (), () => {})}}", - "isDefaultClickDisabled": true, - "widgetId": "plp3uead51", - "buttonStyle": "PRIMARY_BUTTON", - "topRow": 15, - "bottomRow": 16, - "isVisible": true, - "type": "FORM_BUTTON_WIDGET", - "parentId": "x8vgckp3l4", - "isLoading": false, - "disabledWhenInvalid": true, - "leftColumn": 12, - "dynamicTriggers": { - "onClick": true - }, - "text": "Submit" - }, - { - "resetFormOnClick": true, - "widgetName": "FormButton2", - "rightColumn": 12, - "isDefaultClickDisabled": true, - "widgetId": "bnecis4z7c", - "buttonStyle": "SECONDARY_BUTTON", - "topRow": 15, - "bottomRow": 16, - "isVisible": true, - "type": "FORM_BUTTON_WIDGET", - "parentId": "x8vgckp3l4", - "isLoading": false, - "disabledWhenInvalid": false, - "leftColumn": 8, - "text": "Reset" - }, - { - "widgetName": "nameInput", - "rightColumn": 15, - "widgetId": "mdhr691bli", - "topRow": 2, - "bottomRow": 3, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "INPUT_WIDGET", - "parentId": "x8vgckp3l4", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "inputType": "TEXT" - }, - { - "widgetName": "Text2", - "rightColumn": 5, - "textAlign": "LEFT", - "widgetId": "aas854mqz9", - "topRow": 1, - "bottomRow": 2, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "x8vgckp3l4", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "text": "Name", - "textStyle": "LABEL" - }, - { - "widgetName": "Text3", - "rightColumn": 5, - "textAlign": "LEFT", - "widgetId": "bftcscfabf", - "topRow": 5, - "bottomRow": 6, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "x8vgckp3l4", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "text": "Email", - "textStyle": "LABEL" - }, - { - "widgetName": "emailInput", - "rightColumn": 15, - "widgetId": "471lkifudv", - "topRow": 6, - "bottomRow": 7, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "INPUT_WIDGET", - "dynamicBindings": { - "isValid": true, - "value": true - }, - "parentId": "x8vgckp3l4", - "isLoading": false, - "regex": "^([a-zA-Z0-9_\\-\\.]+)@([a-zA-Z0-9_\\-\\.]+)\\.([a-zA-Z]{2,5})$", - "parentColumnSpace": 25.25, - "leftColumn": 1, - "inputType": "TEXT" - }, - { - "widgetName": "genderDropdown", - "rightColumn": 15, - "widgetId": "6je3zqg8ig", - "topRow": 8, - "bottomRow": 9, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "DROP_DOWN_WIDGET", - "dynamicBindings": { - "selectedOptionArr": true, - "isValid": true, - "selectedIndexArr": true, - "selectedOption": true, - "value": true, - "selectedIndex": true - }, - "parentId": "x8vgckp3l4", - "isLoading": false, - "defaultOptionValue": "MALE", - "selectionType": "SINGLE_SELECT", - "parentColumnSpace": 25.25, - "leftColumn": 1, - "options": "[\n {\n \"label\": \"Male\",\n \"value\": \"MALE\"\n },\n {\n \"label\": \"Female\",\n \"value\": \"FEMALE\"\n }\n]" - }, - { - "widgetName": "Text4", - "rightColumn": 5, - "textAlign": "LEFT", - "widgetId": "gb5skka46v", - "topRow": 7, - "bottomRow": 8, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "x8vgckp3l4", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "text": "Gender", - "textStyle": "LABEL" - }, - { - "widgetName": "Text5", - "rightColumn": 5, - "textAlign": "LEFT", - "widgetId": "e12l99p935", - "topRow": 9, - "bottomRow": 10, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "x8vgckp3l4", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "text": "Status", - "textStyle": "LABEL" - }, - { - "widgetName": "statusRadio", - "rightColumn": 15, - "widgetId": "g5fbk7ctmy", - "topRow": 10, - "bottomRow": 12, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "RADIO_GROUP_WIDGET", - "dynamicBindings": { - "isValid": true, - "selectedOption": true, - "value": true - }, - "parentId": "x8vgckp3l4", - "isLoading": false, - "defaultOptionValue": "Single", - "parentColumnSpace": 25.25, - "leftColumn": 1, - "options": [ - { - "id": "1", - "label": "Married", - "value": "Married" - }, - { - "id": "2", - "label": "Single", - "value": "Single" - } - ] - }, - { - "widgetName": "Text6", - "rightColumn": 5, - "textAlign": "LEFT", - "widgetId": "ya2vfipsj5", - "topRow": 12, - "bottomRow": 13, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "x8vgckp3l4", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "text": "Date of Birth", - "textStyle": "LABEL" - }, - { - "widgetName": "dobPicker", - "defaultDate": "11/08/2020 20:57", - "rightColumn": 15, - "dateFormat": "DD/MM/YYYY HH:mm", - "widgetId": "4n4tkytxvn", - "topRow": 13, - "bottomRow": 14, - "parentRowSpace": 40, - "isVisible": true, - "datePickerType": "DATE_PICKER", - "label": "", - "type": "DATE_PICKER_WIDGET", - "parentId": "x8vgckp3l4", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "isDisabled": false - }, - { - "widgetName": "Text9", - "rightColumn": 6, - "textAlign": "LEFT", - "widgetId": "xcifbddadn", - "topRow": 3, - "bottomRow": 4, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "x8vgckp3l4", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "text": "Phone Number", - "textStyle": "LABEL" - }, - { - "widgetName": "phoneInput", - "rightColumn": 15, - "widgetId": "8t9ztl5mdf", - "topRow": 4, - "bottomRow": 5, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "INPUT_WIDGET", - "dynamicBindings": { - "isValid": true, - "value": true - }, - "parentId": "x8vgckp3l4", - "isLoading": false, - "regex": "", - "parentColumnSpace": 25.25, - "leftColumn": 1, - "inputType": "TEXT" - }, - { - "widgetName": "Text14", - "rightColumn": 16, - "textAlign": "CENTER", - "widgetId": "dirlhhqbj7", - "topRow": 16, - "bottomRow": 17, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "x8vgckp3l4", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 0, - "text": "

Update the submit button to show a success message!

", - "textStyle": "BODY" - } - ] - } - ] - }, - { - "widgetName": "Text7", - "rightColumn": 15, - "textAlign": "LEFT", - "widgetId": "am329sctya", - "topRow": 15, - "bottomRow": 17, - "parentRowSpace": 40, - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "shouldScroll": false, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 8, - "text": "

šŸ”„ Enable the reset form property to reset the form on success

", - "textStyle": "BODY", - "dynamicProperties": { - "isVisible": true - } - }, - { - "widgetName": "Text10", - "rightColumn": 15, - "textAlign": "LEFT", - "widgetId": "nygy0euyhh", - "topRow": 3, - "bottomRow": 7, - "parentRowSpace": 40, - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true, - "isVisible": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 8, - "text": "

šŸ’” The form data is submitted to the mock database via the createUser Query. The submitButton executes the createUser Query onClick.
\nThe query takes inputs from the form using
{{ \"{{ widgetName.property }}\" }}

", - "textStyle": "BODY", - "shouldScroll": true, - "dynamicProperties": { - "isVisible": true - } - }, - { - "widgetName": "Text11", - "rightColumn": 12, - "textAlign": "CENTER", - "widgetId": "rd5jjx61jm", - "topRow": 0, - "bottomRow": 1, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "text": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 4, - "text": "

{{appsmith.mode !== \"EDIT\" ? \"Edit this application to begin\" : \"Simple Form Submit\"}}

", - "textStyle": "LABEL" - }, - { - "widgetName": "Text12", - "rightColumn": 12, - "textAlign": "CENTER", - "widgetId": "pfvz5vt5eg", - "topRow": 1, - "bottomRow": 2, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 4, - "text": "This page demonstrates a simple form submission with data validation", - "textStyle": "BODY" - }, - { - "widgetName": "Text8", - "rightColumn": 15, - "textAlign": "LEFT", - "widgetId": "r0xi0nyrq5", - "topRow": 11, - "bottomRow": 13, - "parentRowSpace": 40, - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "shouldScroll": true, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 8, - "text": "

šŸ·ļø Mark the nameInput as a required field to disable the submit button if the name is empty

\n", - "textStyle": "BODY", - "dynamicProperties": { - "isVisible": true - } - }, - { - "widgetName": "Text13", - "rightColumn": 15, - "textAlign": "LEFT", - "widgetId": "8a1wds22qy", - "topRow": 13, - "bottomRow": 15, - "parentRowSpace": 40, - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 8, - "text": "

ā˜Žļø Add a phone number validation to the regex property field
\nEx: ^\\d{10}$

", - "textStyle": "BODY", - "dynamicProperties": { - "isVisible": true - } - }, - { - "widgetName": "Text15", - "rightColumn": 15, - "textAlign": "LEFT", - "widgetId": "nnt0vyrdnp", - "topRow": 10, - "bottomRow": 11, - "parentRowSpace": 40, - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 8, - "text": "---------------------------------------------------------------------", - "textStyle": "LABEL", - "dynamicProperties": { - "isVisible": true - } - } - ] - }, - "publishedDsl": { - "widgetName": "MainContainer", - "backgroundColor": "none", - "rightColumn": 1224, - "snapColumns": 16, - "detachFromLayout": true, - "widgetId": "0", - "topRow": 0, - "bottomRow": 1280, - "containerStyle": "none", - "snapRows": 33, - "parentRowSpace": 1, - "type": "CANVAS_WIDGET", - "canExtend": true, - "dynamicBindings": {}, - "version": 5, - "minHeight": 1292, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Form1", - "backgroundColor": "white", - "rightColumn": 7, - "widgetId": "d6jgloegyf", - "topRow": 3, - "bottomRow": 21, - "parentRowSpace": 40, - "isVisible": true, - "type": "FORM_WIDGET", - "parentId": "0", - "blueprint": { - "view": [ - { - "position": { - "top": 0, - "left": 0 - }, - "type": "CANVAS_WIDGET", - "props": { - "blueprint": { - "view": [ - { - "size": { - "rows": 1, - "cols": 12 - }, - "position": { - "top": 0, - "left": 0 - }, - "type": "TEXT_WIDGET", - "props": { - "text": "Form", - "textStyle": "HEADING" - } - }, - { - "size": { - "rows": 1, - "cols": 4 - }, - "position": { - "top": 11, - "left": 12 - }, - "type": "FORM_BUTTON_WIDGET", - "props": { - "resetFormOnClick": true, - "disabledWhenInvalid": true, - "buttonStyle": "PRIMARY_BUTTON", - "text": "Submit" - } - }, - { - "size": { - "rows": 1, - "cols": 4 - }, - "position": { - "top": 11, - "left": 8 - }, - "type": "FORM_BUTTON_WIDGET", - "props": { - "resetFormOnClick": true, - "disabledWhenInvalid": false, - "buttonStyle": "SECONDARY_BUTTON", - "text": "Reset" - } - } - ] - }, - "detachFromLayout": true, - "children": [], - "containerStyle": "none", - "canExtend": false - } - } - ] - }, - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 1, - "children": [ - { - "widgetName": "Canvas1", - "rightColumn": 518, - "detachFromLayout": true, - "widgetId": "x8vgckp3l4", - "containerStyle": "none", - "topRow": 0, - "bottomRow": 520, - "parentRowSpace": 1, - "isVisible": true, - "canExtend": false, - "type": "CANVAS_WIDGET", - "parentId": "d6jgloegyf", - "blueprint": { - "view": [ - { - "size": { - "rows": 1, - "cols": 12 - }, - "position": { - "top": 0, - "left": 0 - }, - "type": "TEXT_WIDGET", - "props": { - "text": "Form", - "textStyle": "HEADING" - } - }, - { - "size": { - "rows": 1, - "cols": 4 - }, - "position": { - "top": 11, - "left": 12 - }, - "type": "FORM_BUTTON_WIDGET", - "props": { - "resetFormOnClick": true, - "disabledWhenInvalid": true, - "buttonStyle": "PRIMARY_BUTTON", - "text": "Submit" - } - }, - { - "size": { - "rows": 1, - "cols": 4 - }, - "position": { - "top": 11, - "left": 8 - }, - "type": "FORM_BUTTON_WIDGET", - "props": { - "resetFormOnClick": true, - "disabledWhenInvalid": false, - "buttonStyle": "SECONDARY_BUTTON", - "text": "Reset" - } - } - ] - }, - "minHeight": 520, - "isLoading": false, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Text1", - "rightColumn": 12, - "textAlign": "LEFT", - "widgetId": "1jodo5u68l", - "topRow": 0, - "bottomRow": 1, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "x8vgckp3l4", - "isLoading": false, - "leftColumn": 0, - "text": "šŸ‘¤ User Form", - "textStyle": "HEADING" - }, - { - "resetFormOnClick": true, - "widgetName": "submitButton", - "rightColumn": 16, - "onClick": "{{createUser.run(() => (), () => {})}}", - "isDefaultClickDisabled": true, - "widgetId": "plp3uead51", - "buttonStyle": "PRIMARY_BUTTON", - "topRow": 15, - "bottomRow": 16, - "isVisible": true, - "type": "FORM_BUTTON_WIDGET", - "parentId": "x8vgckp3l4", - "isLoading": false, - "disabledWhenInvalid": true, - "leftColumn": 12, - "dynamicTriggers": { - "onClick": true - }, - "text": "Submit" - }, - { - "resetFormOnClick": true, - "widgetName": "FormButton2", - "rightColumn": 12, - "isDefaultClickDisabled": true, - "widgetId": "bnecis4z7c", - "buttonStyle": "SECONDARY_BUTTON", - "topRow": 15, - "bottomRow": 16, - "isVisible": true, - "type": "FORM_BUTTON_WIDGET", - "parentId": "x8vgckp3l4", - "isLoading": false, - "disabledWhenInvalid": false, - "leftColumn": 8, - "text": "Reset" - }, - { - "widgetName": "nameInput", - "rightColumn": 15, - "widgetId": "mdhr691bli", - "topRow": 2, - "bottomRow": 3, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "INPUT_WIDGET", - "parentId": "x8vgckp3l4", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "inputType": "TEXT" - }, - { - "widgetName": "Text2", - "rightColumn": 5, - "textAlign": "LEFT", - "widgetId": "aas854mqz9", - "topRow": 1, - "bottomRow": 2, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "x8vgckp3l4", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "text": "Name", - "textStyle": "LABEL" - }, - { - "widgetName": "Text3", - "rightColumn": 5, - "textAlign": "LEFT", - "widgetId": "bftcscfabf", - "topRow": 5, - "bottomRow": 6, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "x8vgckp3l4", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "text": "Email", - "textStyle": "LABEL" - }, - { - "widgetName": "emailInput", - "rightColumn": 15, - "widgetId": "471lkifudv", - "topRow": 6, - "bottomRow": 7, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "INPUT_WIDGET", - "dynamicBindings": { - "isValid": true, - "value": true - }, - "parentId": "x8vgckp3l4", - "isLoading": false, - "regex": "^([a-zA-Z0-9_\\-\\.]+)@([a-zA-Z0-9_\\-\\.]+)\\.([a-zA-Z]{2,5})$", - "parentColumnSpace": 25.25, - "leftColumn": 1, - "inputType": "TEXT" - }, - { - "widgetName": "genderDropdown", - "rightColumn": 15, - "widgetId": "6je3zqg8ig", - "topRow": 8, - "bottomRow": 9, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "DROP_DOWN_WIDGET", - "dynamicBindings": { - "selectedOptionArr": true, - "isValid": true, - "selectedIndexArr": true, - "selectedOption": true, - "value": true, - "selectedIndex": true - }, - "parentId": "x8vgckp3l4", - "isLoading": false, - "defaultOptionValue": "MALE", - "selectionType": "SINGLE_SELECT", - "parentColumnSpace": 25.25, - "leftColumn": 1, - "options": "[\n {\n \"label\": \"Male\",\n \"value\": \"MALE\"\n },\n {\n \"label\": \"Female\",\n \"value\": \"FEMALE\"\n }\n]" - }, - { - "widgetName": "Text4", - "rightColumn": 5, - "textAlign": "LEFT", - "widgetId": "gb5skka46v", - "topRow": 7, - "bottomRow": 8, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "x8vgckp3l4", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "text": "Gender", - "textStyle": "LABEL" - }, - { - "widgetName": "Text5", - "rightColumn": 5, - "textAlign": "LEFT", - "widgetId": "e12l99p935", - "topRow": 9, - "bottomRow": 10, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "x8vgckp3l4", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "text": "Status", - "textStyle": "LABEL" - }, - { - "widgetName": "statusRadio", - "rightColumn": 15, - "widgetId": "g5fbk7ctmy", - "topRow": 10, - "bottomRow": 12, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "RADIO_GROUP_WIDGET", - "dynamicBindings": { - "isValid": true, - "selectedOption": true, - "value": true - }, - "parentId": "x8vgckp3l4", - "isLoading": false, - "defaultOptionValue": "Single", - "parentColumnSpace": 25.25, - "leftColumn": 1, - "options": [ - { - "id": "1", - "label": "Married", - "value": "Married" - }, - { - "id": "2", - "label": "Single", - "value": "Single" - } - ] - }, - { - "widgetName": "Text6", - "rightColumn": 5, - "textAlign": "LEFT", - "widgetId": "ya2vfipsj5", - "topRow": 12, - "bottomRow": 13, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "x8vgckp3l4", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "text": "Date of Birth", - "textStyle": "LABEL" - }, - { - "widgetName": "dobPicker", - "defaultDate": "11/08/2020 20:57", - "rightColumn": 15, - "dateFormat": "DD/MM/YYYY HH:mm", - "widgetId": "4n4tkytxvn", - "topRow": 13, - "bottomRow": 14, - "parentRowSpace": 40, - "isVisible": true, - "datePickerType": "DATE_PICKER", - "label": "", - "type": "DATE_PICKER_WIDGET", - "parentId": "x8vgckp3l4", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "isDisabled": false - }, - { - "widgetName": "Text9", - "rightColumn": 6, - "textAlign": "LEFT", - "widgetId": "xcifbddadn", - "topRow": 3, - "bottomRow": 4, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "x8vgckp3l4", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "text": "Phone Number", - "textStyle": "LABEL" - }, - { - "widgetName": "phoneInput", - "rightColumn": 15, - "widgetId": "8t9ztl5mdf", - "topRow": 4, - "bottomRow": 5, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "INPUT_WIDGET", - "dynamicBindings": { - "isValid": true, - "value": true - }, - "parentId": "x8vgckp3l4", - "isLoading": false, - "regex": "", - "parentColumnSpace": 25.25, - "leftColumn": 1, - "inputType": "TEXT" - }, - { - "widgetName": "Text14", - "rightColumn": 16, - "textAlign": "CENTER", - "widgetId": "dirlhhqbj7", - "topRow": 16, - "bottomRow": 17, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "x8vgckp3l4", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 0, - "text": "

Update the submit button to show a success message!

", - "textStyle": "BODY" - } - ] - } - ] - }, - { - "widgetName": "Text7", - "rightColumn": 15, - "textAlign": "LEFT", - "widgetId": "am329sctya", - "topRow": 15, - "bottomRow": 17, - "parentRowSpace": 40, - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "shouldScroll": false, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 8, - "text": "

šŸ”„ Enable the reset form property to reset the form on success

", - "textStyle": "BODY", - "dynamicProperties": { - "isVisible": true - } - }, - { - "widgetName": "Text10", - "rightColumn": 15, - "textAlign": "LEFT", - "widgetId": "nygy0euyhh", - "topRow": 3, - "bottomRow": 7, - "parentRowSpace": 40, - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true, - "isVisible": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 8, - "text": "

šŸ’” The form data is submitted to the mock database via the createUser Query. The submitButton executes the createUser Query onClick.
\nThe query takes inputs from the form using
{{ \"{{ widgetName.property }}\" }}

", - "textStyle": "BODY", - "shouldScroll": true, - "dynamicProperties": { - "isVisible": true - } - }, - { - "widgetName": "Text11", - "rightColumn": 12, - "textAlign": "CENTER", - "widgetId": "rd5jjx61jm", - "topRow": 0, - "bottomRow": 1, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "text": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 4, - "text": "

{{appsmith.mode !== \"EDIT\" ? \"Edit this application to begin\" : \"Simple Form Submit\"}}

", - "textStyle": "LABEL" - }, - { - "widgetName": "Text12", - "rightColumn": 12, - "textAlign": "CENTER", - "widgetId": "pfvz5vt5eg", - "topRow": 1, - "bottomRow": 2, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 4, - "text": "This page demonstrates a simple form submission with data validation", - "textStyle": "BODY" - }, - { - "widgetName": "Text8", - "rightColumn": 15, - "textAlign": "LEFT", - "widgetId": "r0xi0nyrq5", - "topRow": 11, - "bottomRow": 13, - "parentRowSpace": 40, - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "shouldScroll": true, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 8, - "text": "

šŸ·ļø Mark the nameInput as a required field to disable the submit button if the name is empty

\n", - "textStyle": "BODY", - "dynamicProperties": { - "isVisible": true - } - }, - { - "widgetName": "Text13", - "rightColumn": 15, - "textAlign": "LEFT", - "widgetId": "8a1wds22qy", - "topRow": 13, - "bottomRow": 15, - "parentRowSpace": 40, - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 8, - "text": "

ā˜Žļø Add a phone number validation to the regex property field
\nEx: ^\\d{10}$

", - "textStyle": "BODY", - "dynamicProperties": { - "isVisible": true - } - }, - { - "widgetName": "Text15", - "rightColumn": 15, - "textAlign": "LEFT", - "widgetId": "nnt0vyrdnp", - "topRow": 10, - "bottomRow": 11, - "parentRowSpace": 40, - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 8, - "text": "---------------------------------------------------------------------", - "textStyle": "LABEL", - "dynamicProperties": { - "isVisible": true - } - } - ] - }, - "layoutOnLoadActions": [], - "publishedLayoutOnLoadActions": [], - "widgetNames": [ - "Form1", - "Text9", - "Text8", - "Text7", - "Text6", - "Text5", - "Text4", - "statusRadio", - "Text3", - "Text2", - "Text1", - "genderDropdown", - "dobPicker", - "submitButton", - "FormButton2", - "phoneInput", - "nameInput", - "emailInput", - "Text14", - "MainContainer", - "Text15", - "Text12", - "Text13", - "Text10", - "Text11", - "Canvas1" - ], - "deleted": false, - "policies": [] - } - ], - "deleted": false, - "policies": [], - "_class": "com.appsmith.server.domains.Page" - }, - { - "name": "2. Confirm Form Submit", - "$isDefault": false, - "$actions": [ - { - "name": "createCampaign", - "datasource": { - "$isEmbedded": false, - "name": "Mock Database", - "$pluginPackageName": "postgres-plugin", - "datasourceConfiguration": { - "connection": { - "mode": "READ_WRITE" - }, - "endpoints": [ - { - "host": "fake-api.cvuydmurdlas.us-east-1.rds.amazonaws.com", - "port": 5432 - } - ], - "authentication": { - "username": "fakeapi", - "password": "LimitedAccess123#", - "databaseName": "fakeapi" - }, - "sshProxyEnabled": false - }, - "invalids": [], - "deleted": false, - "policies": [] - }, - "actionConfiguration": { - "timeoutInMillisecond": 10000, - "paginationType": "NONE", - "body": "INSERT INTO campaigns\n (\"campaignName\", \"campaignIdea\", \"scheduleDate\", \"campaignPlatforms\", status)\nVALUES\n ('{{nameInput.text}}', '{{ideaInput.text}}', '{{scheduleDatePicker.selectedDate}}', '{{socialSelect.selectedOptionValueArr}}', 'CREATED');\n" - }, - "pluginType": "DB", - "dynamicBindingPathList": [ - { - "key": "body" - } - ], - "isValid": true, - "invalids": [], - "jsonPathKeys": [ - "scheduleDatePicker.selectedDate", - "ideaInput.text", - "socialSelect.selectedOptionValueArr", - "nameInput.text" - ], - "deleted": false, - "policies": [], - "_class": "com.appsmith.server.domains.Action" - } - ], - "layouts": [ - { - "viewMode": false, - "dsl": { - "widgetName": "MainContainer", - "backgroundColor": "none", - "rightColumn": 1224, - "snapColumns": 16, - "detachFromLayout": true, - "widgetId": "0", - "topRow": 0, - "bottomRow": 1280, - "containerStyle": "none", - "snapRows": 33, - "parentRowSpace": 1, - "type": "CANVAS_WIDGET", - "canExtend": true, - "dynamicBindings": {}, - "version": 5, - "minHeight": 1292, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Form1", - "backgroundColor": "white", - "rightColumn": 7, - "widgetId": "r32mmh4z9v", - "topRow": 3, - "bottomRow": 18, - "parentRowSpace": 40, - "isVisible": true, - "type": "FORM_WIDGET", - "parentId": "0", - "blueprint": { - "view": [ - { - "position": { - "top": 0, - "left": 0 - }, - "type": "CANVAS_WIDGET", - "props": { - "blueprint": { - "view": [ - { - "size": { - "rows": 1, - "cols": 12 - }, - "position": { - "top": 0, - "left": 0 - }, - "type": "TEXT_WIDGET", - "props": { - "text": "Form", - "textStyle": "HEADING" - } - }, - { - "size": { - "rows": 1, - "cols": 4 - }, - "position": { - "top": 11, - "left": 12 - }, - "type": "FORM_BUTTON_WIDGET", - "props": { - "resetFormOnClick": true, - "disabledWhenInvalid": true, - "buttonStyle": "PRIMARY_BUTTON", - "text": "Submit" - } - }, - { - "size": { - "rows": 1, - "cols": 4 - }, - "position": { - "top": 11, - "left": 8 - }, - "type": "FORM_BUTTON_WIDGET", - "props": { - "resetFormOnClick": true, - "disabledWhenInvalid": false, - "buttonStyle": "SECONDARY_BUTTON", - "text": "Reset" - } - } - ] - }, - "detachFromLayout": true, - "children": [], - "containerStyle": "none", - "canExtend": false - } - } - ] - }, - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 1, - "children": [ - { - "widgetName": "Canvas1", - "rightColumn": 518, - "detachFromLayout": true, - "widgetId": "pqa1d7o4vt", - "containerStyle": "none", - "topRow": 0, - "bottomRow": 520, - "parentRowSpace": 1, - "isVisible": true, - "canExtend": false, - "type": "CANVAS_WIDGET", - "parentId": "r32mmh4z9v", - "blueprint": { - "view": [ - { - "size": { - "rows": 1, - "cols": 12 - }, - "position": { - "top": 0, - "left": 0 - }, - "type": "TEXT_WIDGET", - "props": { - "text": "Form", - "textStyle": "HEADING" - } - }, - { - "size": { - "rows": 1, - "cols": 4 - }, - "position": { - "top": 11, - "left": 12 - }, - "type": "FORM_BUTTON_WIDGET", - "props": { - "resetFormOnClick": true, - "disabledWhenInvalid": true, - "buttonStyle": "PRIMARY_BUTTON", - "text": "Submit" - } - }, - { - "size": { - "rows": 1, - "cols": 4 - }, - "position": { - "top": 11, - "left": 8 - }, - "type": "FORM_BUTTON_WIDGET", - "props": { - "resetFormOnClick": true, - "disabledWhenInvalid": false, - "buttonStyle": "SECONDARY_BUTTON", - "text": "Reset" - } - } - ] - }, - "minHeight": 520, - "isLoading": false, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Text1", - "rightColumn": 12, - "textAlign": "LEFT", - "widgetId": "9a5etz3rhh", - "topRow": 0, - "bottomRow": 1, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "pqa1d7o4vt", - "isLoading": false, - "leftColumn": 0, - "text": "šŸ Create Campaign", - "textStyle": "HEADING" - }, - { - "resetFormOnClick": false, - "widgetName": "createButton", - "rightColumn": 16, - "onClick": "{{showModal('confirmModal')}}", - "isDefaultClickDisabled": true, - "widgetId": "jmyi3irm3h", - "buttonStyle": "PRIMARY_BUTTON", - "topRow": 13, - "bottomRow": 14, - "isVisible": true, - "type": "FORM_BUTTON_WIDGET", - "dynamicBindings": {}, - "parentId": "pqa1d7o4vt", - "isLoading": false, - "disabledWhenInvalid": true, - "leftColumn": 11, - "dynamicTriggers": { - "onClick": true - }, - "text": "Create" - }, - { - "resetFormOnClick": true, - "widgetName": "FormButton2", - "rightColumn": 11, - "isDefaultClickDisabled": true, - "widgetId": "xessbkdnlr", - "buttonStyle": "SECONDARY_BUTTON", - "topRow": 13, - "bottomRow": 14, - "isVisible": true, - "type": "FORM_BUTTON_WIDGET", - "parentId": "pqa1d7o4vt", - "isLoading": false, - "disabledWhenInvalid": false, - "leftColumn": 7, - "text": "Reset" - }, - { - "isRequired": false, - "widgetName": "nameInput", - "rightColumn": 14, - "widgetId": "yz30dwq3fm", - "topRow": 3, - "bottomRow": 4, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "INPUT_WIDGET", - "dynamicBindings": { - "isValid": true, - "value": true - }, - "parentId": "pqa1d7o4vt", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "inputType": "TEXT" - }, - { - "widgetName": "Text2", - "rightColumn": 6, - "textAlign": "LEFT", - "widgetId": "kg51rup1va", - "topRow": 2, - "bottomRow": 3, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "pqa1d7o4vt", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "text": "Campaign Name", - "textStyle": "LABEL" - }, - { - "widgetName": "Text3", - "rightColumn": 6, - "textAlign": "LEFT", - "widgetId": "0nzx3s4u7s", - "topRow": 4, - "bottomRow": 5, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "pqa1d7o4vt", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "text": "Scheduled Date", - "textStyle": "LABEL" - }, - { - "widgetName": "scheduleDatePicker", - "defaultDate": "11/08/2020 20:57", - "rightColumn": 10, - "dateFormat": "DD/MM/YYYY HH:mm", - "widgetId": "i64ipc23zm", - "topRow": 5, - "bottomRow": 6, - "parentRowSpace": 40, - "isVisible": true, - "datePickerType": "DATE_PICKER", - "label": "", - "type": "DATE_PICKER_WIDGET", - "parentId": "pqa1d7o4vt", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "isDisabled": false - }, - { - "widgetName": "Text4", - "rightColumn": 6, - "textAlign": "LEFT", - "widgetId": "ioedtykcph", - "topRow": 6, - "bottomRow": 7, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "pqa1d7o4vt", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "text": "Campaign Idea", - "textStyle": "LABEL" - }, - { - "widgetName": "ideaInput", - "rightColumn": 14, - "widgetId": "35eplf0gtb", - "topRow": 7, - "bottomRow": 10, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "INPUT_WIDGET", - "parentId": "pqa1d7o4vt", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "inputType": "TEXT" - }, - { - "widgetName": "Text5", - "rightColumn": 6, - "textAlign": "LEFT", - "widgetId": "fkria8uyix", - "topRow": 10, - "bottomRow": 11, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "pqa1d7o4vt", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "text": "Social Platforms", - "textStyle": "LABEL" - }, - { - "widgetName": "socialSelect", - "rightColumn": 14, - "widgetId": "z25krk0v3a", - "topRow": 11, - "bottomRow": 12, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "DROP_DOWN_WIDGET", - "dynamicBindings": { - "selectedOptionArr": true, - "isValid": true, - "selectedIndexArr": true, - "selectedOption": true, - "value": true, - "selectedIndex": true - }, - "parentId": "pqa1d7o4vt", - "isLoading": false, - "defaultOptionValue": "FB", - "selectionType": "MULTI_SELECT", - "parentColumnSpace": 25.25, - "leftColumn": 1, - "options": "[\n {\n \"label\": \"FB\",\n \"value\": \"FB\"\n },\n {\n \"label\": \"Twitter\",\n \"value\": \"Twitter\"\n },\n {\n \"label\": \"Instagra\",\n \"value\": \"Instagra\"\n }\n]" - } - ] - } - ] - }, - { - "widgetName": "confirmModal", - "rightColumn": 0, - "detachFromLayout": true, - "widgetId": "p6433683et", - "topRow": 0, - "bottomRow": 0, - "parentRowSpace": 1, - "isVisible": false, - "canOutsideClickClose": true, - "type": "MODAL_WIDGET", - "canEscapeKeyClose": true, - "parentId": "0", - "shouldScrollContents": true, - "blueprint": { - "view": [ - { - "position": { - "top": 0, - "left": 0 - }, - "type": "CANVAS_WIDGET", - "props": { - "shouldScrollContents": false, - "blueprint": { - "view": [ - { - "size": { - "rows": 1, - "cols": 2 - }, - "position": { - "top": 0, - "left": 14 - }, - "type": "ICON_WIDGET", - "props": { - "color": "#040627", - "iconName": "cross", - "iconSize": 24 - } - }, - { - "size": { - "rows": 1, - "cols": 10 - }, - "position": { - "top": 0, - "left": 0 - }, - "type": "TEXT_WIDGET", - "props": { - "text": "Modal Title", - "textStyle": "HEADING" - } - }, - { - "size": { - "rows": 1, - "cols": 3 - }, - "position": { - "top": 4, - "left": 10 - }, - "type": "BUTTON_WIDGET", - "props": { - "buttonStyle": "SECONDARY_BUTTON", - "text": "Cancel" - } - }, - { - "size": { - "rows": 1, - "cols": 3 - }, - "position": { - "top": 4, - "left": 13 - }, - "type": "BUTTON_WIDGET", - "props": { - "buttonStyle": "PRIMARY_BUTTON", - "text": "Confirm" - } - } - ], - "operations": [ - { - "type": "MODIFY_PROPS" - } - ] - }, - "detachFromLayout": true, - "children": [], - "isVisible": true, - "isDisabled": false, - "canExtend": true - } - } - ] - }, - "isLoading": false, - "parentColumnSpace": 1, - "size": "MODAL_SMALL", - "leftColumn": 0, - "children": [ - { - "widgetName": "Canvas2", - "rightColumn": 0, - "detachFromLayout": true, - "widgetId": "uj1kd0nk9j", - "topRow": 0, - "bottomRow": 280, - "parentRowSpace": 1, - "isVisible": true, - "canExtend": true, - "type": "CANVAS_WIDGET", - "parentId": "p6433683et", - "shouldScrollContents": false, - "blueprint": { - "view": [ - { - "size": { - "rows": 1, - "cols": 2 - }, - "position": { - "top": 0, - "left": 14 - }, - "type": "ICON_WIDGET", - "props": { - "color": "#040627", - "iconName": "cross", - "iconSize": 24 - } - }, - { - "size": { - "rows": 1, - "cols": 10 - }, - "position": { - "top": 0, - "left": 0 - }, - "type": "TEXT_WIDGET", - "props": { - "text": "Modal Title", - "textStyle": "HEADING" - } - }, - { - "size": { - "rows": 1, - "cols": 3 - }, - "position": { - "top": 4, - "left": 10 - }, - "type": "BUTTON_WIDGET", - "props": { - "buttonStyle": "SECONDARY_BUTTON", - "text": "Cancel" - } - }, - { - "size": { - "rows": 1, - "cols": 3 - }, - "position": { - "top": 4, - "left": 13 - }, - "type": "BUTTON_WIDGET", - "props": { - "buttonStyle": "PRIMARY_BUTTON", - "text": "Confirm" - } - } - ], - "operations": [ - { - "type": "MODIFY_PROPS" - } - ] - }, - "minHeight": 0, - "isLoading": false, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Icon1", - "rightColumn": 16, - "onClick": "{{closeModal('confirmModal')}}", - "color": "#040627", - "iconName": "cross", - "widgetId": "2wrstdve0e", - "topRow": 0, - "bottomRow": 1, - "isVisible": true, - "type": "ICON_WIDGET", - "parentId": "uj1kd0nk9j", - "isLoading": false, - "leftColumn": 14, - "iconSize": 24 - }, - { - "widgetName": "Text6", - "rightColumn": 14, - "textAlign": "LEFT", - "widgetId": "lagfhwigea", - "topRow": 0, - "bottomRow": 1, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true - }, - "parentId": "uj1kd0nk9j", - "isLoading": false, - "leftColumn": 0, - "text": "Create {{nameInput.text || \"Campaign\"}}", - "textStyle": "HEADING" - }, - { - "widgetName": "Button1", - "rightColumn": 12, - "isDefaultClickDisabled": true, - "widgetId": "ibrcaegmxe", - "buttonStyle": "SECONDARY_BUTTON", - "topRow": 4, - "bottomRow": 5, - "isVisible": true, - "type": "BUTTON_WIDGET", - "parentId": "uj1kd0nk9j", - "isLoading": false, - "leftColumn": 9, - "text": "Cancel", - "isDisabled": false - }, - { - "widgetName": "confirmButton", - "rightColumn": 16, - "onClick": "{{createCampaign.run(() => (), () => {})}}", - "isDefaultClickDisabled": true, - "widgetId": "yipy4c10gz", - "buttonStyle": "PRIMARY_BUTTON", - "topRow": 4, - "bottomRow": 5, - "isVisible": true, - "type": "BUTTON_WIDGET", - "parentId": "uj1kd0nk9j", - "isLoading": false, - "leftColumn": 12, - "dynamicTriggers": { - "onClick": true - }, - "text": "Confirm", - "isDisabled": false - }, - { - "widgetName": "Text7", - "rightColumn": 14, - "textAlign": "LEFT", - "widgetId": "ahoelaxsvr", - "topRow": 2, - "bottomRow": 3, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "uj1kd0nk9j", - "isLoading": false, - "parentColumnSpace": 26, - "leftColumn": 1, - "text": "A campaign cannot be edited once created. Are you sure you want to proceed?", - "textStyle": "LABEL" - } - ], - "isDisabled": false - } - ] - }, - { - "widgetName": "Text8", - "rightColumn": 15, - "textAlign": "LEFT", - "widgetId": "rcbzqvhbi7", - "topRow": 4, - "bottomRow": 6, - "parentRowSpace": 40, - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "shouldScroll": true, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 8, - "text": "

šŸ’” The createButton is configured to open a Modal onClick.\n
\nThe Modal requests for confirmation and the confirmButton is configred to execute the createCampaign Query.

", - "textStyle": "BODY", - "dynamicProperties": { - "isVisible": true - } - }, - { - "widgetName": "Text10", - "rightColumn": 12, - "textAlign": "CENTER", - "widgetId": "hx6f6moaql", - "topRow": 0, - "bottomRow": 1, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "text": true - }, - "shouldScroll": false, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 4, - "text": "

{{appsmith.mode !== \"EDIT\" ? \"Edit this application to begin\" : \"Confirm Form Submit\"}}

", - "textStyle": "LABEL" - }, - { - "widgetName": "Text11", - "rightColumn": 13, - "textAlign": "CENTER", - "widgetId": "uy1cu7aoak", - "topRow": 1, - "bottomRow": 2, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 3, - "text": "This page demonstrates how to confirm form submissions which lead to important or dangerous actions", - "textStyle": "BODY" - }, - { - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "text": "---------------------------------------------------------------------", - "textStyle": "LABEL", - "textAlign": "LEFT", - "widgetName": "Text12", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 74, - "parentRowSpace": 40, - "leftColumn": 8, - "rightColumn": 15, - "topRow": 8, - "bottomRow": 9, - "parentId": "0", - "widgetId": "2rjgd88z1l", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "dynamicProperties": { - "isVisible": true - } - }, - { - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "text": "

\nšŸ” Inspect the createButton properties.

\nšŸŒ‚ Update the confirmButton in the modal to close once the campagin is created

", - "textStyle": "BODY", - "textAlign": "LEFT", - "widgetName": "Text13", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 74, - "parentRowSpace": 40, - "leftColumn": 8, - "rightColumn": 15, - "topRow": 9, - "bottomRow": 12, - "parentId": "0", - "widgetId": "fmnqge8a4x", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "dynamicProperties": { - "isVisible": true - } - } - ] - }, - "publishedDsl": { - "widgetName": "MainContainer", - "backgroundColor": "none", - "rightColumn": 1224, - "snapColumns": 16, - "detachFromLayout": true, - "widgetId": "0", - "topRow": 0, - "bottomRow": 1280, - "containerStyle": "none", - "snapRows": 33, - "parentRowSpace": 1, - "type": "CANVAS_WIDGET", - "canExtend": true, - "dynamicBindings": {}, - "version": 5, - "minHeight": 1292, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Form1", - "backgroundColor": "white", - "rightColumn": 7, - "widgetId": "r32mmh4z9v", - "topRow": 3, - "bottomRow": 18, - "parentRowSpace": 40, - "isVisible": true, - "type": "FORM_WIDGET", - "parentId": "0", - "blueprint": { - "view": [ - { - "position": { - "top": 0, - "left": 0 - }, - "type": "CANVAS_WIDGET", - "props": { - "blueprint": { - "view": [ - { - "size": { - "rows": 1, - "cols": 12 - }, - "position": { - "top": 0, - "left": 0 - }, - "type": "TEXT_WIDGET", - "props": { - "text": "Form", - "textStyle": "HEADING" - } - }, - { - "size": { - "rows": 1, - "cols": 4 - }, - "position": { - "top": 11, - "left": 12 - }, - "type": "FORM_BUTTON_WIDGET", - "props": { - "resetFormOnClick": true, - "disabledWhenInvalid": true, - "buttonStyle": "PRIMARY_BUTTON", - "text": "Submit" - } - }, - { - "size": { - "rows": 1, - "cols": 4 - }, - "position": { - "top": 11, - "left": 8 - }, - "type": "FORM_BUTTON_WIDGET", - "props": { - "resetFormOnClick": true, - "disabledWhenInvalid": false, - "buttonStyle": "SECONDARY_BUTTON", - "text": "Reset" - } - } - ] - }, - "detachFromLayout": true, - "children": [], - "containerStyle": "none", - "canExtend": false - } - } - ] - }, - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 1, - "children": [ - { - "widgetName": "Canvas1", - "rightColumn": 518, - "detachFromLayout": true, - "widgetId": "pqa1d7o4vt", - "containerStyle": "none", - "topRow": 0, - "bottomRow": 520, - "parentRowSpace": 1, - "isVisible": true, - "canExtend": false, - "type": "CANVAS_WIDGET", - "parentId": "r32mmh4z9v", - "blueprint": { - "view": [ - { - "size": { - "rows": 1, - "cols": 12 - }, - "position": { - "top": 0, - "left": 0 - }, - "type": "TEXT_WIDGET", - "props": { - "text": "Form", - "textStyle": "HEADING" - } - }, - { - "size": { - "rows": 1, - "cols": 4 - }, - "position": { - "top": 11, - "left": 12 - }, - "type": "FORM_BUTTON_WIDGET", - "props": { - "resetFormOnClick": true, - "disabledWhenInvalid": true, - "buttonStyle": "PRIMARY_BUTTON", - "text": "Submit" - } - }, - { - "size": { - "rows": 1, - "cols": 4 - }, - "position": { - "top": 11, - "left": 8 - }, - "type": "FORM_BUTTON_WIDGET", - "props": { - "resetFormOnClick": true, - "disabledWhenInvalid": false, - "buttonStyle": "SECONDARY_BUTTON", - "text": "Reset" - } - } - ] - }, - "minHeight": 520, - "isLoading": false, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Text1", - "rightColumn": 12, - "textAlign": "LEFT", - "widgetId": "9a5etz3rhh", - "topRow": 0, - "bottomRow": 1, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "pqa1d7o4vt", - "isLoading": false, - "leftColumn": 0, - "text": "šŸ Create Campaign", - "textStyle": "HEADING" - }, - { - "resetFormOnClick": false, - "widgetName": "createButton", - "rightColumn": 16, - "onClick": "{{showModal('confirmModal')}}", - "isDefaultClickDisabled": true, - "widgetId": "jmyi3irm3h", - "buttonStyle": "PRIMARY_BUTTON", - "topRow": 13, - "bottomRow": 14, - "isVisible": true, - "type": "FORM_BUTTON_WIDGET", - "dynamicBindings": {}, - "parentId": "pqa1d7o4vt", - "isLoading": false, - "disabledWhenInvalid": true, - "leftColumn": 11, - "dynamicTriggers": { - "onClick": true - }, - "text": "Create" - }, - { - "resetFormOnClick": true, - "widgetName": "FormButton2", - "rightColumn": 11, - "isDefaultClickDisabled": true, - "widgetId": "xessbkdnlr", - "buttonStyle": "SECONDARY_BUTTON", - "topRow": 13, - "bottomRow": 14, - "isVisible": true, - "type": "FORM_BUTTON_WIDGET", - "parentId": "pqa1d7o4vt", - "isLoading": false, - "disabledWhenInvalid": false, - "leftColumn": 7, - "text": "Reset" - }, - { - "isRequired": false, - "widgetName": "nameInput", - "rightColumn": 14, - "widgetId": "yz30dwq3fm", - "topRow": 3, - "bottomRow": 4, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "INPUT_WIDGET", - "dynamicBindings": { - "isValid": true, - "value": true - }, - "parentId": "pqa1d7o4vt", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "inputType": "TEXT" - }, - { - "widgetName": "Text2", - "rightColumn": 6, - "textAlign": "LEFT", - "widgetId": "kg51rup1va", - "topRow": 2, - "bottomRow": 3, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "pqa1d7o4vt", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "text": "Campaign Name", - "textStyle": "LABEL" - }, - { - "widgetName": "Text3", - "rightColumn": 6, - "textAlign": "LEFT", - "widgetId": "0nzx3s4u7s", - "topRow": 4, - "bottomRow": 5, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "pqa1d7o4vt", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "text": "Scheduled Date", - "textStyle": "LABEL" - }, - { - "widgetName": "scheduleDatePicker", - "defaultDate": "11/08/2020 20:57", - "rightColumn": 10, - "dateFormat": "DD/MM/YYYY HH:mm", - "widgetId": "i64ipc23zm", - "topRow": 5, - "bottomRow": 6, - "parentRowSpace": 40, - "isVisible": true, - "datePickerType": "DATE_PICKER", - "label": "", - "type": "DATE_PICKER_WIDGET", - "parentId": "pqa1d7o4vt", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "isDisabled": false - }, - { - "widgetName": "Text4", - "rightColumn": 6, - "textAlign": "LEFT", - "widgetId": "ioedtykcph", - "topRow": 6, - "bottomRow": 7, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "pqa1d7o4vt", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "text": "Campaign Idea", - "textStyle": "LABEL" - }, - { - "widgetName": "ideaInput", - "rightColumn": 14, - "widgetId": "35eplf0gtb", - "topRow": 7, - "bottomRow": 10, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "INPUT_WIDGET", - "parentId": "pqa1d7o4vt", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "inputType": "TEXT" - }, - { - "widgetName": "Text5", - "rightColumn": 6, - "textAlign": "LEFT", - "widgetId": "fkria8uyix", - "topRow": 10, - "bottomRow": 11, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "pqa1d7o4vt", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "text": "Social Platforms", - "textStyle": "LABEL" - }, - { - "widgetName": "socialSelect", - "rightColumn": 14, - "widgetId": "z25krk0v3a", - "topRow": 11, - "bottomRow": 12, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "DROP_DOWN_WIDGET", - "dynamicBindings": { - "selectedOptionArr": true, - "isValid": true, - "selectedIndexArr": true, - "selectedOption": true, - "value": true, - "selectedIndex": true - }, - "parentId": "pqa1d7o4vt", - "isLoading": false, - "defaultOptionValue": "FB", - "selectionType": "MULTI_SELECT", - "parentColumnSpace": 25.25, - "leftColumn": 1, - "options": "[\n {\n \"label\": \"FB\",\n \"value\": \"FB\"\n },\n {\n \"label\": \"Twitter\",\n \"value\": \"Twitter\"\n },\n {\n \"label\": \"Instagra\",\n \"value\": \"Instagra\"\n }\n]" - } - ] - } - ] - }, - { - "widgetName": "confirmModal", - "rightColumn": 0, - "detachFromLayout": true, - "widgetId": "p6433683et", - "topRow": 0, - "bottomRow": 0, - "parentRowSpace": 1, - "isVisible": false, - "canOutsideClickClose": true, - "type": "MODAL_WIDGET", - "canEscapeKeyClose": true, - "parentId": "0", - "shouldScrollContents": true, - "blueprint": { - "view": [ - { - "position": { - "top": 0, - "left": 0 - }, - "type": "CANVAS_WIDGET", - "props": { - "shouldScrollContents": false, - "blueprint": { - "view": [ - { - "size": { - "rows": 1, - "cols": 2 - }, - "position": { - "top": 0, - "left": 14 - }, - "type": "ICON_WIDGET", - "props": { - "color": "#040627", - "iconName": "cross", - "iconSize": 24 - } - }, - { - "size": { - "rows": 1, - "cols": 10 - }, - "position": { - "top": 0, - "left": 0 - }, - "type": "TEXT_WIDGET", - "props": { - "text": "Modal Title", - "textStyle": "HEADING" - } - }, - { - "size": { - "rows": 1, - "cols": 3 - }, - "position": { - "top": 4, - "left": 10 - }, - "type": "BUTTON_WIDGET", - "props": { - "buttonStyle": "SECONDARY_BUTTON", - "text": "Cancel" - } - }, - { - "size": { - "rows": 1, - "cols": 3 - }, - "position": { - "top": 4, - "left": 13 - }, - "type": "BUTTON_WIDGET", - "props": { - "buttonStyle": "PRIMARY_BUTTON", - "text": "Confirm" - } - } - ], - "operations": [ - { - "type": "MODIFY_PROPS" - } - ] - }, - "detachFromLayout": true, - "children": [], - "isVisible": true, - "isDisabled": false, - "canExtend": true - } - } - ] - }, - "isLoading": false, - "parentColumnSpace": 1, - "size": "MODAL_SMALL", - "leftColumn": 0, - "children": [ - { - "widgetName": "Canvas2", - "rightColumn": 0, - "detachFromLayout": true, - "widgetId": "uj1kd0nk9j", - "topRow": 0, - "bottomRow": 280, - "parentRowSpace": 1, - "isVisible": true, - "canExtend": true, - "type": "CANVAS_WIDGET", - "parentId": "p6433683et", - "shouldScrollContents": false, - "blueprint": { - "view": [ - { - "size": { - "rows": 1, - "cols": 2 - }, - "position": { - "top": 0, - "left": 14 - }, - "type": "ICON_WIDGET", - "props": { - "color": "#040627", - "iconName": "cross", - "iconSize": 24 - } - }, - { - "size": { - "rows": 1, - "cols": 10 - }, - "position": { - "top": 0, - "left": 0 - }, - "type": "TEXT_WIDGET", - "props": { - "text": "Modal Title", - "textStyle": "HEADING" - } - }, - { - "size": { - "rows": 1, - "cols": 3 - }, - "position": { - "top": 4, - "left": 10 - }, - "type": "BUTTON_WIDGET", - "props": { - "buttonStyle": "SECONDARY_BUTTON", - "text": "Cancel" - } - }, - { - "size": { - "rows": 1, - "cols": 3 - }, - "position": { - "top": 4, - "left": 13 - }, - "type": "BUTTON_WIDGET", - "props": { - "buttonStyle": "PRIMARY_BUTTON", - "text": "Confirm" - } - } - ], - "operations": [ - { - "type": "MODIFY_PROPS" - } - ] - }, - "minHeight": 0, - "isLoading": false, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Icon1", - "rightColumn": 16, - "onClick": "{{closeModal('confirmModal')}}", - "color": "#040627", - "iconName": "cross", - "widgetId": "2wrstdve0e", - "topRow": 0, - "bottomRow": 1, - "isVisible": true, - "type": "ICON_WIDGET", - "parentId": "uj1kd0nk9j", - "isLoading": false, - "leftColumn": 14, - "iconSize": 24 - }, - { - "widgetName": "Text6", - "rightColumn": 14, - "textAlign": "LEFT", - "widgetId": "lagfhwigea", - "topRow": 0, - "bottomRow": 1, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true - }, - "parentId": "uj1kd0nk9j", - "isLoading": false, - "leftColumn": 0, - "text": "Create {{nameInput.text || \"Campaign\"}}", - "textStyle": "HEADING" - }, - { - "widgetName": "Button1", - "rightColumn": 12, - "isDefaultClickDisabled": true, - "widgetId": "ibrcaegmxe", - "buttonStyle": "SECONDARY_BUTTON", - "topRow": 4, - "bottomRow": 5, - "isVisible": true, - "type": "BUTTON_WIDGET", - "parentId": "uj1kd0nk9j", - "isLoading": false, - "leftColumn": 9, - "text": "Cancel", - "isDisabled": false - }, - { - "widgetName": "confirmButton", - "rightColumn": 16, - "onClick": "{{createCampaign.run(() => (), () => {})}}", - "isDefaultClickDisabled": true, - "widgetId": "yipy4c10gz", - "buttonStyle": "PRIMARY_BUTTON", - "topRow": 4, - "bottomRow": 5, - "isVisible": true, - "type": "BUTTON_WIDGET", - "parentId": "uj1kd0nk9j", - "isLoading": false, - "leftColumn": 12, - "dynamicTriggers": { - "onClick": true - }, - "text": "Confirm", - "isDisabled": false - }, - { - "widgetName": "Text7", - "rightColumn": 14, - "textAlign": "LEFT", - "widgetId": "ahoelaxsvr", - "topRow": 2, - "bottomRow": 3, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "uj1kd0nk9j", - "isLoading": false, - "parentColumnSpace": 26, - "leftColumn": 1, - "text": "A campaign cannot be edited once created. Are you sure you want to proceed?", - "textStyle": "LABEL" - } - ], - "isDisabled": false - } - ] - }, - { - "widgetName": "Text8", - "rightColumn": 15, - "textAlign": "LEFT", - "widgetId": "rcbzqvhbi7", - "topRow": 4, - "bottomRow": 6, - "parentRowSpace": 40, - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "shouldScroll": true, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 8, - "text": "

šŸ’” The createButton is configured to open a Modal onClick.\n
\nThe Modal requests for confirmation and the confirmButton is configred to execute the createCampaign Query.

", - "textStyle": "BODY", - "dynamicProperties": { - "isVisible": true - } - }, - { - "widgetName": "Text10", - "rightColumn": 12, - "textAlign": "CENTER", - "widgetId": "hx6f6moaql", - "topRow": 0, - "bottomRow": 1, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "text": true - }, - "shouldScroll": false, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 4, - "text": "

{{appsmith.mode !== \"EDIT\" ? \"Edit this application to begin\" : \"Confirm Form Submit\"}}

", - "textStyle": "LABEL" - }, - { - "widgetName": "Text11", - "rightColumn": 13, - "textAlign": "CENTER", - "widgetId": "uy1cu7aoak", - "topRow": 1, - "bottomRow": 2, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 3, - "text": "This page demonstrates how to confirm form submissions which lead to important or dangerous actions", - "textStyle": "BODY" - }, - { - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "text": "---------------------------------------------------------------------", - "textStyle": "LABEL", - "textAlign": "LEFT", - "widgetName": "Text12", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 74, - "parentRowSpace": 40, - "leftColumn": 8, - "rightColumn": 15, - "topRow": 8, - "bottomRow": 9, - "parentId": "0", - "widgetId": "2rjgd88z1l", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "dynamicProperties": { - "isVisible": true - } - }, - { - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "text": "

\nšŸ” Inspect the createButton properties.

\nšŸŒ‚ Update the confirmButton in the modal to close once the campagin is created

", - "textStyle": "BODY", - "textAlign": "LEFT", - "widgetName": "Text13", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 74, - "parentRowSpace": 40, - "leftColumn": 8, - "rightColumn": 15, - "topRow": 9, - "bottomRow": 12, - "parentId": "0", - "widgetId": "fmnqge8a4x", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "dynamicProperties": { - "isVisible": true - } - } - ] - }, - "layoutOnLoadActions": [], - "publishedLayoutOnLoadActions": [], - "widgetNames": [ - "Form1", - "Button1", - "Text8", - "Text7", - "Text6", - "Text5", - "Text4", - "Text3", - "ideaInput", - "Text2", - "Text1", - "Icon1", - "confirmButton", - "socialSelect", - "confirmModal", - "scheduleDatePicker", - "createButton", - "FormButton2", - "nameInput", - "MainContainer", - "Text12", - "Text13", - "Text10", - "Text11", - "Canvas1", - "Canvas2" - ], - "deleted": false, - "policies": [] - } - ], - "deleted": false, - "policies": [], - "_class": "com.appsmith.server.domains.Page" - }, - { - "name": "3. Pre-Fill Form", - "$isDefault": false, - "$actions": [ - { - "name": "fetchUserByUrlParam", - "datasource": { - "$isEmbedded": false, - "name": "Mock Database", - "$pluginPackageName": "postgres-plugin", - "datasourceConfiguration": { - "connection": { - "mode": "READ_WRITE" - }, - "endpoints": [ - { - "host": "fake-api.cvuydmurdlas.us-east-1.rds.amazonaws.com", - "port": 5432 - } - ], - "authentication": { - "username": "fakeapi", - "password": "LimitedAccess123#", - "databaseName": "fakeapi" - }, - "sshProxyEnabled": false - }, - "invalids": [], - "deleted": false, - "policies": [] - }, - "actionConfiguration": { - "timeoutInMillisecond": 10000, - "paginationType": "NONE", - "body": "SELECT * FROM users where email = '{{appsmith.URL.queryParams.email}}' ORDER BY id LIMIT 1;\n" - }, - "pluginType": "DB", - "executeOnLoad": true, - "dynamicBindingPathList": [ - { - "key": "body" - } - ], - "isValid": true, - "invalids": [], - "jsonPathKeys": ["appsmith.URL.queryParams.email"], - "deleted": false, - "policies": [], - "_class": "com.appsmith.server.domains.Action" - }, - { - "name": "updateUser", - "datasource": { - "$isEmbedded": false, - "name": "Mock Database", - "$pluginPackageName": "postgres-plugin", - "datasourceConfiguration": { - "connection": { - "mode": "READ_WRITE" - }, - "endpoints": [ - { - "host": "fake-api.cvuydmurdlas.us-east-1.rds.amazonaws.com", - "port": 5432 - } - ], - "authentication": { - "username": "fakeapi", - "password": "LimitedAccess123#", - "databaseName": "fakeapi" - }, - "sshProxyEnabled": false - }, - "invalids": [], - "deleted": false, - "policies": [] - }, - "actionConfiguration": { - "timeoutInMillisecond": 10000, - "paginationType": "NONE", - "body": "UPDATE users\n SET name = '{{nameInput.text}}',\n email = '{{emailInput.text}}',\n gender = '{{genderDropdown.selectedOptionValue}}',\n dob = '{{dobPicker.selectedDate}}'\n WHERE id = {{fetchUserByUrlParam.data[0].id}};\n" - }, - "pluginType": "DB", - "dynamicBindingPathList": [ - { - "key": "body" - } - ], - "isValid": true, - "invalids": [], - "jsonPathKeys": [ - "genderDropdown.selectedOptionValue", - "dobPicker.selectedDate", - "nameInput.text", - "emailInput.text", - "fetchUserByUrlParam.data[0].id" - ], - "deleted": false, - "policies": [], - "_class": "com.appsmith.server.domains.Action" - } - ], - "layouts": [ - { - "viewMode": false, - "dsl": { - "widgetName": "MainContainer", - "backgroundColor": "none", - "rightColumn": 1224, - "snapColumns": 16, - "detachFromLayout": true, - "widgetId": "0", - "topRow": 0, - "bottomRow": 1280, - "containerStyle": "none", - "snapRows": 33, - "parentRowSpace": 1, - "type": "CANVAS_WIDGET", - "canExtend": true, - "dynamicBindings": {}, - "version": 5, - "minHeight": 1292, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Form1", - "backgroundColor": "white", - "rightColumn": 7, - "widgetId": "yihxuqc4pa", - "topRow": 3, - "bottomRow": 16, - "parentRowSpace": 40, - "isVisible": true, - "type": "FORM_WIDGET", - "parentId": "0", - "blueprint": { - "view": [ - { - "position": { - "top": 0, - "left": 0 - }, - "type": "CANVAS_WIDGET", - "props": { - "blueprint": { - "view": [ - { - "size": { - "rows": 1, - "cols": 12 - }, - "position": { - "top": 0, - "left": 0 - }, - "type": "TEXT_WIDGET", - "props": { - "text": "Form", - "textStyle": "HEADING" - } - }, - { - "size": { - "rows": 1, - "cols": 4 - }, - "position": { - "top": 11, - "left": 12 - }, - "type": "FORM_BUTTON_WIDGET", - "props": { - "resetFormOnClick": true, - "disabledWhenInvalid": true, - "buttonStyle": "PRIMARY_BUTTON", - "text": "Submit" - } - }, - { - "size": { - "rows": 1, - "cols": 4 - }, - "position": { - "top": 11, - "left": 8 - }, - "type": "FORM_BUTTON_WIDGET", - "props": { - "resetFormOnClick": true, - "disabledWhenInvalid": false, - "buttonStyle": "SECONDARY_BUTTON", - "text": "Reset" - } - } - ] - }, - "detachFromLayout": true, - "children": [], - "containerStyle": "none", - "canExtend": false - } - } - ] - }, - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 1, - "children": [ - { - "widgetName": "Canvas1", - "rightColumn": 518, - "detachFromLayout": true, - "widgetId": "epboelq954", - "containerStyle": "none", - "topRow": 0, - "bottomRow": 520, - "parentRowSpace": 1, - "isVisible": true, - "canExtend": false, - "type": "CANVAS_WIDGET", - "parentId": "yihxuqc4pa", - "blueprint": { - "view": [ - { - "size": { - "rows": 1, - "cols": 12 - }, - "position": { - "top": 0, - "left": 0 - }, - "type": "TEXT_WIDGET", - "props": { - "text": "Form", - "textStyle": "HEADING" - } - }, - { - "size": { - "rows": 1, - "cols": 4 - }, - "position": { - "top": 11, - "left": 12 - }, - "type": "FORM_BUTTON_WIDGET", - "props": { - "resetFormOnClick": true, - "disabledWhenInvalid": true, - "buttonStyle": "PRIMARY_BUTTON", - "text": "Submit" - } - }, - { - "size": { - "rows": 1, - "cols": 4 - }, - "position": { - "top": 11, - "left": 8 - }, - "type": "FORM_BUTTON_WIDGET", - "props": { - "resetFormOnClick": true, - "disabledWhenInvalid": false, - "buttonStyle": "SECONDARY_BUTTON", - "text": "Reset" - } - } - ] - }, - "minHeight": 520, - "isLoading": false, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Text1", - "rightColumn": 12, - "textAlign": "LEFT", - "widgetId": "9o1dx1zkxp", - "topRow": 0, - "bottomRow": 1, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "epboelq954", - "isLoading": false, - "leftColumn": 0, - "text": "šŸ‘¤ Update User", - "textStyle": "HEADING" - }, - { - "resetFormOnClick": true, - "widgetName": "updateButton", - "rightColumn": 16, - "onClick": "{{updateUser.run(() => fetchUserByUrlParam.run(), () => {})}}", - "isDefaultClickDisabled": true, - "widgetId": "mio7jzmj49", - "buttonStyle": "PRIMARY_BUTTON", - "topRow": 11, - "bottomRow": 12, - "isVisible": true, - "type": "FORM_BUTTON_WIDGET", - "dynamicBindings": {}, - "parentId": "epboelq954", - "isLoading": false, - "disabledWhenInvalid": true, - "leftColumn": 10, - "dynamicTriggers": { - "onClick": true - }, - "text": "Update User" - }, - { - "resetFormOnClick": true, - "widgetName": "FormButton2", - "rightColumn": 10, - "isDefaultClickDisabled": true, - "widgetId": "8mwfe4o99s", - "buttonStyle": "SECONDARY_BUTTON", - "topRow": 11, - "bottomRow": 12, - "isVisible": true, - "type": "FORM_BUTTON_WIDGET", - "parentId": "epboelq954", - "isLoading": false, - "disabledWhenInvalid": false, - "leftColumn": 6, - "text": "Reset" - }, - { - "widgetName": "nameInput", - "rightColumn": 14, - "widgetId": "75v9zd6qfq", - "topRow": 3, - "bottomRow": 4, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "INPUT_WIDGET", - "dynamicBindings": { - "isValid": true, - "defaultText": true, - "value": true - }, - "parentId": "epboelq954", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "inputType": "TEXT", - "defaultText": "{{fetchUserByUrlParam.data[0].name}}" - }, - { - "widgetName": "Text2", - "rightColumn": 5, - "textAlign": "LEFT", - "widgetId": "8xxyi61bnt", - "topRow": 2, - "bottomRow": 3, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "epboelq954", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "text": "Name", - "textStyle": "LABEL" - }, - { - "widgetName": "Text3", - "rightColumn": 5, - "textAlign": "LEFT", - "widgetId": "vrkg24ziqv", - "topRow": 4, - "bottomRow": 5, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "epboelq954", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "text": "Email", - "textStyle": "LABEL" - }, - { - "widgetName": "emailInput", - "rightColumn": 14, - "widgetId": "cte0iuvg43", - "topRow": 5, - "bottomRow": 6, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "INPUT_WIDGET", - "dynamicBindings": { - "isValid": true, - "defaultText": true, - "value": true - }, - "parentId": "epboelq954", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "inputType": "TEXT", - "defaultText": "{{fetchUserByUrlParam.data[0].email}}" - }, - { - "widgetName": "gender", - "rightColumn": 5, - "textAlign": "LEFT", - "widgetId": "3jsdwjjq4j", - "topRow": 6, - "bottomRow": 7, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "epboelq954", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "text": "Gender", - "textStyle": "LABEL" - }, - { - "widgetName": "genderDropdown", - "rightColumn": 14, - "widgetId": "wdt4750qtk", - "topRow": 7, - "bottomRow": 8, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "DROP_DOWN_WIDGET", - "dynamicBindings": { - "selectedOptionArr": true, - "isValid": true, - "selectedIndexArr": true, - "selectedOption": true, - "value": true, - "selectedIndex": true, - "defaultOptionValue": true - }, - "parentId": "epboelq954", - "isLoading": false, - "defaultOptionValue": "{{fetchUserByUrlParam.data[0].gender}}", - "selectionType": "SINGLE_SELECT", - "parentColumnSpace": 25.25, - "leftColumn": 1, - "options": "[\n {\n \"label\": \"Male\",\n \"value\": \"Male\"\n },\n {\n \"label\": \"Female\",\n \"value\": \"Female\"\n }\n]" - }, - { - "widgetName": "dobPicker", - "defaultDate": "{{fetchUserByUrlParam.data ? fetchUserByUrlParam.data[0].dob : null}}", - "rightColumn": 14, - "dateFormat": "YYYY-MM-DD", - "widgetId": "ob7ukijkj6", - "dynamicProperties": { - "defaultDate": true - }, - "topRow": 9, - "bottomRow": 10, - "parentRowSpace": 40, - "isVisible": true, - "datePickerType": "DATE_PICKER", - "label": "", - "type": "DATE_PICKER_WIDGET", - "dynamicBindings": { - "defaultDate": true, - "isValid": true, - "value": true - }, - "parentId": "epboelq954", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "isDisabled": false - }, - { - "widgetName": "Text6", - "rightColumn": 6, - "textAlign": "LEFT", - "widgetId": "qa9rt17hgi", - "topRow": 8, - "bottomRow": 9, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "epboelq954", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "text": "Date of Birth", - "textStyle": "LABEL" - } - ] - } - ] - }, - { - "widgetName": "Text7", - "rightColumn": 12, - "textAlign": "CENTER", - "widgetId": "82um6ujlvj", - "topRow": 0, - "bottomRow": 1, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "text": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 4, - "text": "

{{appsmith.mode !== \"EDIT\" ? \"Edit this application to begin\" : \"Pre-Fill Form Fields\"}}

", - "textStyle": "LABEL" - }, - { - "widgetName": "Text9", - "rightColumn": 13, - "textAlign": "CENTER", - "widgetId": "weebfy1s7o", - "topRow": 1, - "bottomRow": 2, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 3, - "text": "This page demonstrates how forms can be pre-filled with data passed from another page through a url param", - "textStyle": "BODY" - }, - { - "widgetName": "Text11", - "rightColumn": 15, - "textAlign": "LEFT", - "widgetId": "ns7umsaj20", - "topRow": 10, - "bottomRow": 14, - "parentRowSpace": 40, - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 8, - "text": "

šŸ” Inspect the table properties & the input widgets & the fetchUserByUrlParam Query.

\nšŸ”„ Refresh the page with an email query param in the URL
Trigger the navigate action from a button and pass a query param to the function. (Inspect refreshButton)

", - "textStyle": "BODY", - "dynamicProperties": { - "isVisible": true - } - }, - { - "widgetName": "refreshButton", - "rightColumn": 15, - "onClick": "{{navigateTo(appsmith.URL.fullPath + '?email=james@freshdesk.com' )}}", - "isDefaultClickDisabled": true, - "widgetId": "bs657p5ziv", - "dynamicProperties": { - "onClick": true, - "isVisible": true - }, - "buttonStyle": "PRIMARY_BUTTON", - "topRow": 14, - "bottomRow": 15, - "parentRowSpace": 40, - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "type": "BUTTON_WIDGET", - "dynamicBindings": { - "isVisible": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 13, - "dynamicTriggers": { - "onClick": true - }, - "text": "Refresh Page", - "isDisabled": false - }, - { - "widgetName": "Text15", - "rightColumn": 15, - "textAlign": "LEFT", - "widgetId": "663vfouck2", - "topRow": 3, - "bottomRow": 7, - "parentRowSpace": 40, - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 8, - "text": "

šŸ’” On Page Load, the fetchUserByUrlParam Query is run. The query reads the email query param in the URL to fetch the relevant user.
\nThe default property of the form input widgets are bound to the response of the fetchUserByUrlParam Query

", - "textStyle": "BODY", - "dynamicProperties": { - "isVisible": true - } - }, - { - "widgetName": "Text16", - "rightColumn": 15, - "textAlign": "LEFT", - "widgetId": "ejpusse9wy", - "topRow": 9, - "bottomRow": 10, - "parentRowSpace": 40, - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 8, - "text": "---------------------------------------------------------------------", - "textStyle": "LABEL", - "dynamicProperties": { - "isVisible": true - } - } - ] - }, - "publishedDsl": { - "widgetName": "MainContainer", - "backgroundColor": "none", - "rightColumn": 1224, - "snapColumns": 16, - "detachFromLayout": true, - "widgetId": "0", - "topRow": 0, - "bottomRow": 1280, - "containerStyle": "none", - "snapRows": 33, - "parentRowSpace": 1, - "type": "CANVAS_WIDGET", - "canExtend": true, - "dynamicBindings": {}, - "version": 5, - "minHeight": 1292, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Form1", - "backgroundColor": "white", - "rightColumn": 7, - "widgetId": "yihxuqc4pa", - "topRow": 3, - "bottomRow": 16, - "parentRowSpace": 40, - "isVisible": true, - "type": "FORM_WIDGET", - "parentId": "0", - "blueprint": { - "view": [ - { - "position": { - "top": 0, - "left": 0 - }, - "type": "CANVAS_WIDGET", - "props": { - "blueprint": { - "view": [ - { - "size": { - "rows": 1, - "cols": 12 - }, - "position": { - "top": 0, - "left": 0 - }, - "type": "TEXT_WIDGET", - "props": { - "text": "Form", - "textStyle": "HEADING" - } - }, - { - "size": { - "rows": 1, - "cols": 4 - }, - "position": { - "top": 11, - "left": 12 - }, - "type": "FORM_BUTTON_WIDGET", - "props": { - "resetFormOnClick": true, - "disabledWhenInvalid": true, - "buttonStyle": "PRIMARY_BUTTON", - "text": "Submit" - } - }, - { - "size": { - "rows": 1, - "cols": 4 - }, - "position": { - "top": 11, - "left": 8 - }, - "type": "FORM_BUTTON_WIDGET", - "props": { - "resetFormOnClick": true, - "disabledWhenInvalid": false, - "buttonStyle": "SECONDARY_BUTTON", - "text": "Reset" - } - } - ] - }, - "detachFromLayout": true, - "children": [], - "containerStyle": "none", - "canExtend": false - } - } - ] - }, - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 1, - "children": [ - { - "widgetName": "Canvas1", - "rightColumn": 518, - "detachFromLayout": true, - "widgetId": "epboelq954", - "containerStyle": "none", - "topRow": 0, - "bottomRow": 520, - "parentRowSpace": 1, - "isVisible": true, - "canExtend": false, - "type": "CANVAS_WIDGET", - "parentId": "yihxuqc4pa", - "blueprint": { - "view": [ - { - "size": { - "rows": 1, - "cols": 12 - }, - "position": { - "top": 0, - "left": 0 - }, - "type": "TEXT_WIDGET", - "props": { - "text": "Form", - "textStyle": "HEADING" - } - }, - { - "size": { - "rows": 1, - "cols": 4 - }, - "position": { - "top": 11, - "left": 12 - }, - "type": "FORM_BUTTON_WIDGET", - "props": { - "resetFormOnClick": true, - "disabledWhenInvalid": true, - "buttonStyle": "PRIMARY_BUTTON", - "text": "Submit" - } - }, - { - "size": { - "rows": 1, - "cols": 4 - }, - "position": { - "top": 11, - "left": 8 - }, - "type": "FORM_BUTTON_WIDGET", - "props": { - "resetFormOnClick": true, - "disabledWhenInvalid": false, - "buttonStyle": "SECONDARY_BUTTON", - "text": "Reset" - } - } - ] - }, - "minHeight": 520, - "isLoading": false, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Text1", - "rightColumn": 12, - "textAlign": "LEFT", - "widgetId": "9o1dx1zkxp", - "topRow": 0, - "bottomRow": 1, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "epboelq954", - "isLoading": false, - "leftColumn": 0, - "text": "šŸ‘¤ Update User", - "textStyle": "HEADING" - }, - { - "resetFormOnClick": true, - "widgetName": "updateButton", - "rightColumn": 16, - "onClick": "{{updateUser.run(() => fetchUserByUrlParam.run(), () => {})}}", - "isDefaultClickDisabled": true, - "widgetId": "mio7jzmj49", - "buttonStyle": "PRIMARY_BUTTON", - "topRow": 11, - "bottomRow": 12, - "isVisible": true, - "type": "FORM_BUTTON_WIDGET", - "dynamicBindings": {}, - "parentId": "epboelq954", - "isLoading": false, - "disabledWhenInvalid": true, - "leftColumn": 10, - "dynamicTriggers": { - "onClick": true - }, - "text": "Update User" - }, - { - "resetFormOnClick": true, - "widgetName": "FormButton2", - "rightColumn": 10, - "isDefaultClickDisabled": true, - "widgetId": "8mwfe4o99s", - "buttonStyle": "SECONDARY_BUTTON", - "topRow": 11, - "bottomRow": 12, - "isVisible": true, - "type": "FORM_BUTTON_WIDGET", - "parentId": "epboelq954", - "isLoading": false, - "disabledWhenInvalid": false, - "leftColumn": 6, - "text": "Reset" - }, - { - "widgetName": "nameInput", - "rightColumn": 14, - "widgetId": "75v9zd6qfq", - "topRow": 3, - "bottomRow": 4, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "INPUT_WIDGET", - "dynamicBindings": { - "isValid": true, - "defaultText": true, - "value": true - }, - "parentId": "epboelq954", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "inputType": "TEXT", - "defaultText": "{{fetchUserByUrlParam.data[0].name}}" - }, - { - "widgetName": "Text2", - "rightColumn": 5, - "textAlign": "LEFT", - "widgetId": "8xxyi61bnt", - "topRow": 2, - "bottomRow": 3, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "epboelq954", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "text": "Name", - "textStyle": "LABEL" - }, - { - "widgetName": "Text3", - "rightColumn": 5, - "textAlign": "LEFT", - "widgetId": "vrkg24ziqv", - "topRow": 4, - "bottomRow": 5, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "epboelq954", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "text": "Email", - "textStyle": "LABEL" - }, - { - "widgetName": "emailInput", - "rightColumn": 14, - "widgetId": "cte0iuvg43", - "topRow": 5, - "bottomRow": 6, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "INPUT_WIDGET", - "dynamicBindings": { - "isValid": true, - "defaultText": true, - "value": true - }, - "parentId": "epboelq954", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "inputType": "TEXT", - "defaultText": "{{fetchUserByUrlParam.data[0].email}}" - }, - { - "widgetName": "gender", - "rightColumn": 5, - "textAlign": "LEFT", - "widgetId": "3jsdwjjq4j", - "topRow": 6, - "bottomRow": 7, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "epboelq954", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "text": "Gender", - "textStyle": "LABEL" - }, - { - "widgetName": "genderDropdown", - "rightColumn": 14, - "widgetId": "wdt4750qtk", - "topRow": 7, - "bottomRow": 8, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "DROP_DOWN_WIDGET", - "dynamicBindings": { - "selectedOptionArr": true, - "isValid": true, - "selectedIndexArr": true, - "selectedOption": true, - "value": true, - "selectedIndex": true, - "defaultOptionValue": true - }, - "parentId": "epboelq954", - "isLoading": false, - "defaultOptionValue": "{{fetchUserByUrlParam.data[0].gender}}", - "selectionType": "SINGLE_SELECT", - "parentColumnSpace": 25.25, - "leftColumn": 1, - "options": "[\n {\n \"label\": \"Male\",\n \"value\": \"Male\"\n },\n {\n \"label\": \"Female\",\n \"value\": \"Female\"\n }\n]" - }, - { - "widgetName": "dobPicker", - "defaultDate": "{{fetchUserByUrlParam.data ? fetchUserByUrlParam.data[0].dob : null}}", - "rightColumn": 14, - "dateFormat": "YYYY-MM-DD", - "widgetId": "ob7ukijkj6", - "dynamicProperties": { - "defaultDate": true - }, - "topRow": 9, - "bottomRow": 10, - "parentRowSpace": 40, - "isVisible": true, - "datePickerType": "DATE_PICKER", - "label": "", - "type": "DATE_PICKER_WIDGET", - "dynamicBindings": { - "defaultDate": true, - "isValid": true, - "value": true - }, - "parentId": "epboelq954", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "isDisabled": false - }, - { - "widgetName": "Text6", - "rightColumn": 6, - "textAlign": "LEFT", - "widgetId": "qa9rt17hgi", - "topRow": 8, - "bottomRow": 9, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "epboelq954", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 1, - "text": "Date of Birth", - "textStyle": "LABEL" - } - ] - } - ] - }, - { - "widgetName": "Text7", - "rightColumn": 12, - "textAlign": "CENTER", - "widgetId": "82um6ujlvj", - "topRow": 0, - "bottomRow": 1, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "text": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 4, - "text": "

{{appsmith.mode !== \"EDIT\" ? \"Edit this application to begin\" : \"Pre-Fill Form Fields\"}}

", - "textStyle": "LABEL" - }, - { - "widgetName": "Text9", - "rightColumn": 13, - "textAlign": "CENTER", - "widgetId": "weebfy1s7o", - "topRow": 1, - "bottomRow": 2, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 3, - "text": "This page demonstrates how forms can be pre-filled with data passed from another page through a url param", - "textStyle": "BODY" - }, - { - "widgetName": "Text11", - "rightColumn": 15, - "textAlign": "LEFT", - "widgetId": "ns7umsaj20", - "topRow": 10, - "bottomRow": 14, - "parentRowSpace": 40, - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 8, - "text": "

šŸ” Inspect the table properties & the input widgets & the fetchUserByUrlParam Query.

\nšŸ”„ Refresh the page with an email query param in the URL
Trigger the navigate action from a button and pass a query param to the function. (Inspect refreshButton)

", - "textStyle": "BODY", - "dynamicProperties": { - "isVisible": true - } - }, - { - "widgetName": "refreshButton", - "rightColumn": 15, - "onClick": "{{navigateTo(appsmith.URL.fullPath + '?email=james@freshdesk.com' )}}", - "isDefaultClickDisabled": true, - "widgetId": "bs657p5ziv", - "dynamicProperties": { - "onClick": true, - "isVisible": true - }, - "buttonStyle": "PRIMARY_BUTTON", - "topRow": 14, - "bottomRow": 15, - "parentRowSpace": 40, - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "type": "BUTTON_WIDGET", - "dynamicBindings": { - "isVisible": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 13, - "dynamicTriggers": { - "onClick": true - }, - "text": "Refresh Page", - "isDisabled": false - }, - { - "widgetName": "Text15", - "rightColumn": 15, - "textAlign": "LEFT", - "widgetId": "663vfouck2", - "topRow": 3, - "bottomRow": 7, - "parentRowSpace": 40, - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 8, - "text": "

šŸ’” On Page Load, the fetchUserByUrlParam Query is run. The query reads the email query param in the URL to fetch the relevant user.
\nThe default property of the form input widgets are bound to the response of the fetchUserByUrlParam Query

", - "textStyle": "BODY", - "dynamicProperties": { - "isVisible": true - } - }, - { - "widgetName": "Text16", - "rightColumn": 15, - "textAlign": "LEFT", - "widgetId": "ejpusse9wy", - "topRow": 9, - "bottomRow": 10, - "parentRowSpace": 40, - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 8, - "text": "---------------------------------------------------------------------", - "textStyle": "LABEL", - "dynamicProperties": { - "isVisible": true - } - } - ] - }, - "layoutOnLoadActions": [ - [ - { - "name": "fetchUserByUrlParam", - "pluginType": "DB", - "jsonPathKeys": ["appsmith.URL.queryParams.email"], - "timeoutInMillisecond": 10000 - } - ] - ], - "publishedLayoutOnLoadActions": [ - [ - { - "name": "fetchUserByUrlParam", - "pluginType": "DB", - "jsonPathKeys": ["appsmith.URL.queryParams.email"], - "timeoutInMillisecond": 10000 - } - ] - ], - "widgetNames": [ - "Form1", - "Text9", - "gender", - "Text7", - "Text6", - "FormButton2", - "Text3", - "Text2", - "Text1", - "Text16", - "nameInput", - "emailInput", - "MainContainer", - "Text15", - "Text11", - "Canvas1", - "refreshButton", - "genderDropdown", - "updateButton", - "dobPicker" - ], - "deleted": false, - "policies": [] - } - ], - "deleted": false, - "policies": [], - "_class": "com.appsmith.server.domains.Page" - } - ], - "deleted": false, - "policies": [], - "_class": "com.appsmith.server.domains.Application" - }, - { - "name": "Table Tutorial", - "isPublic": true, - "$pages": [ - { - "name": "1. Displaying Data", - "$isDefault": true, - "$actions": [ - { - "name": "getUsers", - "datasource": { - "$isEmbedded": false, - "name": "Mock Database", - "$pluginPackageName": "postgres-plugin", - "datasourceConfiguration": { - "connection": { - "mode": "READ_WRITE" - }, - "endpoints": [ - { - "host": "fake-api.cvuydmurdlas.us-east-1.rds.amazonaws.com", - "port": 5432 - } - ], - "authentication": { - "username": "fakeapi", - "password": "LimitedAccess123#", - "databaseName": "fakeapi" - }, - "sshProxyEnabled": false - }, - "invalids": [], - "deleted": false, - "policies": [] - }, - "actionConfiguration": { - "timeoutInMillisecond": 10000, - "paginationType": "NONE", - "body": "SELECT * FROM users ORDER BY id LIMIT 5 offset {{(usersTable.pageNo - 1) * 5}};\n" - }, - "pluginType": "DB", - "executeOnLoad": true, - "dynamicBindingPathList": [ - { - "key": "body" - } - ], - "isValid": true, - "invalids": [], - "jsonPathKeys": ["(usersTable.pageNo - 1) * 5"], - "deleted": false, - "policies": [], - "_class": "com.appsmith.server.domains.Action" - }, - { - "name": "getUsersAPI", - "datasource": { - "$isEmbedded": true, - "name": "DEFAULT_REST_DATASOURCE", - "$pluginPackageName": "restapi-plugin", - "datasourceConfiguration": { - "url": "https://mock-api.appsmith.com" - }, - "invalids": [], - "deleted": false, - "policies": [] - }, - "actionConfiguration": { - "timeoutInMillisecond": 10000, - "paginationType": "URL", - "path": "/users", - "headers": [ - { - "key": "", - "value": "" - }, - { - "key": "", - "value": "" - } - ], - "queryParameters": [ - { - "key": "page", - "value": "1" - }, - { - "key": "", - "value": "" - } - ], - "httpMethod": "GET", - "next": "{{getUsersAPI.data.next}}", - "prev": "{{getUsersAPI.data.previous}}" - }, - "pluginType": "API", - "dynamicBindingPathList": [ - { - "key": "prev" - }, - { - "key": "next" - } - ], - "isValid": true, - "invalids": [], - "jsonPathKeys": [ - "getUsersAPI.data.previous", - "getUsersAPI.data.next" - ], - "deleted": false, - "policies": [], - "_class": "com.appsmith.server.domains.Action" - } - ], - "layouts": [ - { - "viewMode": false, - "dsl": { - "widgetName": "MainContainer", - "backgroundColor": "none", - "rightColumn": 1224, - "snapColumns": 16, - "detachFromLayout": true, - "widgetId": "0", - "topRow": 0, - "bottomRow": 1360, - "containerStyle": "none", - "snapRows": 33, - "parentRowSpace": 1, - "type": "CANVAS_WIDGET", - "canExtend": true, - "dynamicBindings": {}, - "version": 5, - "minHeight": 1292, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Text1", - "rightColumn": 12, - "textAlign": "CENTER", - "widgetId": "3nz99ffgvf", - "topRow": 0, - "bottomRow": 1, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "text": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 3, - "text": "

{{appsmith.mode !== \"EDIT\" ? \"Edit this application to begin\" : \"Displaying Data in a Table\"}}

", - "textStyle": "LABEL" - }, - { - "widgetName": "Text2", - "rightColumn": 14, - "textAlign": "CENTER", - "widgetId": "zw1l4lqlxq", - "topRow": 1, - "bottomRow": 2, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "shouldScroll": false, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 1, - "text": "This page demonstrates how Tables can display data from APIs & DB Queries, paginated the data & transform it to suit the widget", - "textStyle": "BODY" - }, - { - "hiddenColumns": [ - "createdAt", - "updatedAt", - "avatar", - "gender" - ], - "widgetName": "usersTable", - "rightColumn": 10, - "widgetId": "sf07g7owd4", - "topRow": 4, - "bottomRow": 14, - "parentRowSpace": 40, - "onPageChange": "{{getUsers.run()}}", - "tableData": "{{getUsers.data}}", - "isVisible": true, - "label": "Data", - "searchKey": "", - "type": "TABLE_WIDGET", - "dynamicBindings": { - "tableData": true, - "selectedRow": true, - "filteredTableData": true - }, - "parentId": "0", - "serverSidePaginationEnabled": true, - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 0, - "dynamicTriggers": { - "onPageChange": true - }, - "columnSizeMap": { - "address": 284, - "gender": 99, - "name": 130, - "id": 70, - "email": 175 - } - }, - { - "widgetName": "Text3", - "rightColumn": 16, - "textAlign": "LEFT", - "widgetId": "wihhcbu9c4", - "topRow": 4, - "bottomRow": 10, - "parentRowSpace": 40, - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "text": true, - "isVisible": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 11, - "text": "

šŸ’” The table fetches data via the getUsers Query. The data is bound to the table property using{{ \"{{ getUsers.data }}\" }}.

\nšŸ“„The getUsers Query takes the pageNo of the table to paginate the request using
{{\"{{ usersTable.pageNo }}\"}} in the query.\n
The table has server side pagination enabled and executes the query on page change.\n

", - "textStyle": "BODY", - "shouldScroll": true, - "dynamicProperties": { - "isVisible": true - } - }, - { - "widgetName": "Text5", - "rightColumn": 4, - "textAlign": "LEFT", - "widgetId": "2ea3qtzuug", - "topRow": 3, - "bottomRow": 4, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 0, - "text": "šŸ‘¤ Users", - "textStyle": "HEADING" - }, - { - "hiddenColumns": [ - "avatar", - "updatedAt", - "gender", - "address" - ], - "widgetName": "usersTableFormatted", - "rightColumn": 10, - "widgetId": "6fxa6ls1xm", - "topRow": 16, - "bottomRow": 32, - "parentRowSpace": 40, - "onPageChange": "{{getUsersAPI.run()}}", - "tableData": "{{getUsersAPI.data.users.map((user) => { \n return {\n\t\t...user,\n\t\tstatus: user.status.toLowerCase(),\n\t\tcreatedAt: moment(user.createdAt).format(\"Do MMM YYYY\")\n\t}\n})}}", - "isVisible": true, - "label": "Data", - "searchKey": "", - "type": "TABLE_WIDGET", - "dynamicBindings": { - "tableData": true, - "selectedRow": true, - "filteredTableData": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 0, - "dynamicTriggers": { - "onPageChange": true - }, - "columnSizeMap": { - "id": 84, - "email": 204 - }, - "serverSidePaginationEnabled": true - }, - { - "widgetName": "Text8", - "rightColumn": 4, - "textAlign": "LEFT", - "widgetId": "y6lqi4r1xl", - "topRow": 15, - "bottomRow": 16, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 0, - "text": "šŸ˜ Formatted Users", - "textStyle": "HEADING" - }, - { - "widgetName": "Text9", - "rightColumn": 16, - "textAlign": "LEFT", - "widgetId": "hd75cgspiv", - "topRow": 16, - "bottomRow": 24, - "parentRowSpace": 40, - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "text": true, - "isVisible": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 11, - "text": "

šŸŒ©ļø Often data returned by an API is not in the format the table requires. To convert the data to the correct format, we use Javascript and transform the data in the table data property.

\nšŸŒŖļø The table maps over the data returned by getUsersAPI, changes the status field to lowercase and formats the date field.

\n🧱 APIs, Queries and Widgets are all objects of the application exposed via Javascript inside {{\"{{}}\"}}\n

", - "textStyle": "BODY", - "shouldScroll": true, - "dynamicProperties": { - "isVisible": true - } - }, - { - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "text": "

šŸ” Inspect the table properties.

šŸ”  Try updating the function in the table property and format the status field to begin with a capital letter!

", - "textStyle": "BODY", - "textAlign": "LEFT", - "widgetName": "Text12", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 74, - "parentRowSpace": 40, - "leftColumn": 11, - "rightColumn": 16, - "topRow": 26, - "bottomRow": 30, - "parentId": "0", - "widgetId": "ow78o27gb5", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "shouldScroll": true, - "dynamicProperties": { - "isVisible": true - } - }, - { - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "text": "-------------------------------------------------", - "textStyle": "LABEL", - "textAlign": "LEFT", - "widgetName": "Text13", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 74, - "parentRowSpace": 40, - "leftColumn": 11, - "rightColumn": 16, - "topRow": 10, - "bottomRow": 11, - "parentId": "0", - "widgetId": "hmh7iay9le", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "dynamicProperties": { - "isVisible": true - } - }, - { - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "text": "

šŸ” Inspect the table properties & the getUsers Query.

🌟 Try navigating through the table's pages.

", - "textStyle": "BODY", - "textAlign": "LEFT", - "widgetName": "Text14", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 74, - "parentRowSpace": 40, - "leftColumn": 11, - "rightColumn": 16, - "topRow": 11, - "bottomRow": 15, - "parentId": "0", - "widgetId": "xff54m33y3", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "shouldScroll": true, - "dynamicProperties": { - "isVisible": true - } - }, - { - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "text": "-------------------------------------------------", - "textStyle": "LABEL", - "textAlign": "LEFT", - "widgetName": "Text15", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 74, - "parentRowSpace": 40, - "leftColumn": 11, - "rightColumn": 16, - "topRow": 25, - "bottomRow": 26, - "parentId": "0", - "widgetId": "mlmkyirm8n", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "dynamicProperties": { - "isVisible": true - } - } - ] - }, - "publishedDsl": { - "widgetName": "MainContainer", - "backgroundColor": "none", - "rightColumn": 1224, - "snapColumns": 16, - "detachFromLayout": true, - "widgetId": "0", - "topRow": 0, - "bottomRow": 1360, - "containerStyle": "none", - "snapRows": 33, - "parentRowSpace": 1, - "type": "CANVAS_WIDGET", - "canExtend": true, - "dynamicBindings": {}, - "version": 5, - "minHeight": 1292, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Text1", - "rightColumn": 12, - "textAlign": "CENTER", - "widgetId": "3nz99ffgvf", - "topRow": 0, - "bottomRow": 1, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "text": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 3, - "text": "

{{appsmith.mode !== \"EDIT\" ? \"Edit this application to begin\" : \"Displaying Data in a Table\"}}

", - "textStyle": "LABEL" - }, - { - "widgetName": "Text2", - "rightColumn": 14, - "textAlign": "CENTER", - "widgetId": "zw1l4lqlxq", - "topRow": 1, - "bottomRow": 2, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "shouldScroll": false, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 1, - "text": "This page demonstrates how Tables can display data from APIs & DB Queries, paginated the data & transform it to suit the widget", - "textStyle": "BODY" - }, - { - "hiddenColumns": [ - "createdAt", - "updatedAt", - "avatar", - "gender" - ], - "widgetName": "usersTable", - "rightColumn": 10, - "widgetId": "sf07g7owd4", - "topRow": 4, - "bottomRow": 14, - "parentRowSpace": 40, - "onPageChange": "{{getUsers.run()}}", - "tableData": "{{getUsers.data}}", - "isVisible": true, - "label": "Data", - "searchKey": "", - "type": "TABLE_WIDGET", - "dynamicBindings": { - "tableData": true, - "selectedRow": true, - "filteredTableData": true - }, - "parentId": "0", - "serverSidePaginationEnabled": true, - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 0, - "dynamicTriggers": { - "onPageChange": true - }, - "columnSizeMap": { - "address": 284, - "gender": 99, - "name": 130, - "id": 70, - "email": 175 - } - }, - { - "widgetName": "Text3", - "rightColumn": 16, - "textAlign": "LEFT", - "widgetId": "wihhcbu9c4", - "topRow": 4, - "bottomRow": 10, - "parentRowSpace": 40, - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "text": true, - "isVisible": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 11, - "text": "

šŸ’” The table fetches data via the getUsers Query. The data is bound to the table property using{{ \"{{ getUsers.data }}\" }}.

\nšŸ“„The getUsers Query takes the pageNo of the table to paginate the request using
{{\"{{ usersTable.pageNo }}\"}} in the query.\n
The table has server side pagination enabled and executes the query on page change.\n

", - "textStyle": "BODY", - "shouldScroll": true, - "dynamicProperties": { - "isVisible": true - } - }, - { - "widgetName": "Text5", - "rightColumn": 4, - "textAlign": "LEFT", - "widgetId": "2ea3qtzuug", - "topRow": 3, - "bottomRow": 4, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 0, - "text": "šŸ‘¤ Users", - "textStyle": "HEADING" - }, - { - "hiddenColumns": [ - "avatar", - "updatedAt", - "gender", - "address" - ], - "widgetName": "usersTableFormatted", - "rightColumn": 10, - "widgetId": "6fxa6ls1xm", - "topRow": 16, - "bottomRow": 32, - "parentRowSpace": 40, - "onPageChange": "{{getUsersAPI.run()}}", - "tableData": "{{getUsersAPI.data.users.map((user) => { \n return {\n\t\t...user,\n\t\tstatus: user.status.toLowerCase(),\n\t\tcreatedAt: moment(user.createdAt).format(\"Do MMM YYYY\")\n\t}\n})}}", - "isVisible": true, - "label": "Data", - "searchKey": "", - "type": "TABLE_WIDGET", - "dynamicBindings": { - "tableData": true, - "selectedRow": true, - "filteredTableData": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 0, - "dynamicTriggers": { - "onPageChange": true - }, - "columnSizeMap": { - "id": 84, - "email": 204 - }, - "serverSidePaginationEnabled": true - }, - { - "widgetName": "Text8", - "rightColumn": 4, - "textAlign": "LEFT", - "widgetId": "y6lqi4r1xl", - "topRow": 15, - "bottomRow": 16, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 0, - "text": "šŸ˜ Formatted Users", - "textStyle": "HEADING" - }, - { - "widgetName": "Text9", - "rightColumn": 16, - "textAlign": "LEFT", - "widgetId": "hd75cgspiv", - "topRow": 16, - "bottomRow": 24, - "parentRowSpace": 40, - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "text": true, - "isVisible": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 11, - "text": "

šŸŒ©ļø Often data returned by an API is not in the format the table requires. To convert the data to the correct format, we use Javascript and transform the data in the table data property.

\nšŸŒŖļø The table maps over the data returned by getUsersAPI, changes the status field to lowercase and formats the date field.

\n🧱 APIs, Queries and Widgets are all objects of the application exposed via Javascript inside {{\"{{}}\"}}\n

", - "textStyle": "BODY", - "shouldScroll": true, - "dynamicProperties": { - "isVisible": true - } - }, - { - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "text": "

šŸ” Inspect the table properties.

šŸ”  Try updating the function in the table property and format the status field to begin with a capital letter!

", - "textStyle": "BODY", - "textAlign": "LEFT", - "widgetName": "Text12", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 74, - "parentRowSpace": 40, - "leftColumn": 11, - "rightColumn": 16, - "topRow": 26, - "bottomRow": 30, - "parentId": "0", - "widgetId": "ow78o27gb5", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "shouldScroll": true, - "dynamicProperties": { - "isVisible": true - } - }, - { - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "text": "-------------------------------------------------", - "textStyle": "LABEL", - "textAlign": "LEFT", - "widgetName": "Text13", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 74, - "parentRowSpace": 40, - "leftColumn": 11, - "rightColumn": 16, - "topRow": 10, - "bottomRow": 11, - "parentId": "0", - "widgetId": "hmh7iay9le", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "dynamicProperties": { - "isVisible": true - } - }, - { - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "text": "

šŸ” Inspect the table properties & the getUsers Query.

🌟 Try navigating through the table's pages.

", - "textStyle": "BODY", - "textAlign": "LEFT", - "widgetName": "Text14", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 74, - "parentRowSpace": 40, - "leftColumn": 11, - "rightColumn": 16, - "topRow": 11, - "bottomRow": 15, - "parentId": "0", - "widgetId": "xff54m33y3", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "shouldScroll": true, - "dynamicProperties": { - "isVisible": true - } - }, - { - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "text": "-------------------------------------------------", - "textStyle": "LABEL", - "textAlign": "LEFT", - "widgetName": "Text15", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 74, - "parentRowSpace": 40, - "leftColumn": 11, - "rightColumn": 16, - "topRow": 25, - "bottomRow": 26, - "parentId": "0", - "widgetId": "mlmkyirm8n", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "dynamicProperties": { - "isVisible": true - } - } - ] - }, - "layoutOnLoadActions": [ - [ - { - "name": "getUsers", - "pluginType": "DB", - "jsonPathKeys": ["(usersTable.pageNo - 1) * 5"], - "timeoutInMillisecond": 10000 - }, - { - "name": "getUsersAPI", - "pluginType": "API", - "jsonPathKeys": [ - "getUsersAPI.data.previous", - "getUsersAPI.data.next" - ], - "timeoutInMillisecond": 10000 - } - ] - ], - "publishedLayoutOnLoadActions": [ - [ - { - "name": "getUsers", - "pluginType": "DB", - "jsonPathKeys": ["(usersTable.pageNo - 1) * 5"], - "timeoutInMillisecond": 10000 - }, - { - "name": "getUsersAPI", - "pluginType": "API", - "jsonPathKeys": [ - "getUsersAPI.data.previous", - "getUsersAPI.data.next" - ], - "timeoutInMillisecond": 10000 - } - ] - ], - "widgetNames": [ - "Text9", - "Text8", - "Text5", - "Text3", - "Text2", - "Text1", - "Text14", - "MainContainer", - "Text15", - "usersTable", - "Text12", - "Text13", - "usersTableFormatted" - ], - "deleted": false, - "policies": [] - } - ], - "deleted": false, - "policies": [], - "_class": "com.appsmith.server.domains.Page" - }, - { - "name": "2. Searching & Filtering", - "$isDefault": false, - "$actions": [ - { - "name": "getSearchedUsers", - "datasource": { - "$isEmbedded": false, - "name": "Mock Database", - "$pluginPackageName": "postgres-plugin", - "datasourceConfiguration": { - "connection": { - "mode": "READ_WRITE" - }, - "endpoints": [ - { - "host": "fake-api.cvuydmurdlas.us-east-1.rds.amazonaws.com", - "port": 5432 - } - ], - "authentication": { - "username": "fakeapi", - "password": "LimitedAccess123#", - "databaseName": "fakeapi" - }, - "sshProxyEnabled": false - }, - "invalids": [], - "deleted": false, - "policies": [] - }, - "actionConfiguration": { - "timeoutInMillisecond": 10000, - "paginationType": "NONE", - "body": "SELECT * FROM users where gender {{filterDropdown.selectedOptionValue === \"ALL\" ? \"IN ('Male','Female')\" : \n\"= '\" + filterDropdown.selectedOptionValue + \"'\"}} AND name ilike '%{{usersTable.searchText || \"\"}}%' ORDER BY id LIMIT 10 offset {{ (usersTable.pageNo - 1) * 10 }};\n" - }, - "pluginType": "DB", - "executeOnLoad": true, - "dynamicBindingPathList": [ - { - "key": "body" - } - ], - "isValid": true, - "invalids": [], - "jsonPathKeys": [ - "usersTable.searchText || \"\"", - "(usersTable.pageNo - 1) * 10", - "filterDropdown.selectedOptionValue === \"ALL\" ? \"IN ('Male','Female')\" : \n\"= '\" + filterDropdown.selectedOptionValue + \"'\"" - ], - "deleted": false, - "policies": [], - "_class": "com.appsmith.server.domains.Action" - } - ], - "layouts": [ - { - "viewMode": false, - "dsl": { - "widgetName": "MainContainer", - "backgroundColor": "none", - "rightColumn": 1224, - "snapColumns": 16, - "detachFromLayout": true, - "widgetId": "0", - "topRow": 0, - "bottomRow": 1280, - "containerStyle": "none", - "snapRows": 33, - "parentRowSpace": 1, - "type": "CANVAS_WIDGET", - "canExtend": true, - "dynamicBindings": {}, - "version": 5, - "minHeight": 1292, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Text1", - "rightColumn": 12, - "textAlign": "CENTER", - "widgetId": "kmgssafdwq", - "topRow": 0, - "bottomRow": 1, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "text": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 4, - "text": "

{{appsmith.mode !== \"EDIT\" ? \"Edit this application to begin\" : \"Searching & Filtering\"}}

", - "textStyle": "LABEL" - }, - { - "widgetName": "Text2", - "rightColumn": 14, - "textAlign": "CENTER", - "widgetId": "lisxd7rkzy", - "topRow": 1, - "bottomRow": 2, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 1, - "text": "This page demonstrates how to perform server side searching and filtering of datra. (Client side is enabled by default)", - "textStyle": "BODY" - }, - { - "hiddenColumns": [ - "createdAt", - "updatedAt", - "status", - "avatar" - ], - "widgetName": "usersTable", - "rightColumn": 10, - "widgetId": "owqebe2drj", - "topRow": 4, - "bottomRow": 20, - "parentRowSpace": 40, - "tableData": "{{getSearchedUsers.data}}", - "isVisible": true, - "label": "Data", - "searchKey": "", - "type": "TABLE_WIDGET", - "dynamicBindings": { - "tableData": true, - "selectedRow": true, - "filteredTableData": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 0, - "columnSizeMap": { - "id": 78, - "address": 213 - }, - "serverSidePaginationEnabled": true, - "dynamicTriggers": { - "onPageChange": true, - "onSearchTextChanged": true - }, - "onPageChange": "{{getSearchedUsers.run()}}", - "onSearchTextChanged": "{{getSearchedUsers.run()}}" - }, - { - "widgetName": "filterDropdown", - "rightColumn": 10, - "widgetId": "9bicbhtluy", - "topRow": 3, - "bottomRow": 4, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "DROP_DOWN_WIDGET", - "dynamicBindings": { - "selectedOptionArr": true, - "isValid": true, - "selectedIndexArr": true, - "selectedOption": true, - "value": true, - "selectedIndex": true - }, - "parentId": "0", - "isLoading": false, - "defaultOptionValue": "ALL", - "selectionType": "SINGLE_SELECT", - "parentColumnSpace": 74, - "leftColumn": 8, - "options": "[\n {\n \"label\": \"All\",\n \"value\": \"ALL\"\n },{\n \"label\": \"Male\",\n \"value\": \"Male\"\n },\n {\n \"label\": \"Female\",\n \"value\": \"Female\"\n }\n]", - "dynamicTriggers": { - "onOptionChange": true - }, - "onOptionChange": "{{getSearchedUsers.run()}}" - }, - { - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "text": "

šŸ’” The usersTable displays data returned by the getSearchedUsers Query.

\nšŸ”» The filterDropdown contains options to filter the users by gender. The dropdown executes the getSearchedUsers Query onOptionSelected.

\nā“The getSearchedUsers Query has a where clause that reads it's values from the filterDropdown and usersTable.searchText

\nāœ… The getSearchedUsers Query uses conditional checks to modify the where clause when the ALL option is selected and no searchText is present\n

", - "textStyle": "BODY", - "textAlign": "LEFT", - "widgetName": "Text3", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 74, - "parentRowSpace": 40, - "leftColumn": 11, - "rightColumn": 16, - "topRow": 4, - "bottomRow": 14, - "parentId": "0", - "widgetId": "tosmuzh0kw", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "shouldScroll": true, - "dynamicProperties": { - "isVisible": true - } - }, - { - "isVisible": true, - "text": "šŸ‘¤ Users", - "textStyle": "HEADING", - "textAlign": "LEFT", - "widgetName": "Text8", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 74, - "parentRowSpace": 40, - "leftColumn": 0, - "rightColumn": 4, - "topRow": 3, - "bottomRow": 4, - "parentId": "0", - "widgetId": "fz0zdf4tii", - "dynamicBindings": { - "value": true - } - }, - { - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "text": "-------------------------------------------------", - "textStyle": "LABEL", - "textAlign": "LEFT", - "widgetName": "Text9", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 74, - "parentRowSpace": 40, - "leftColumn": 11, - "rightColumn": 16, - "topRow": 14, - "bottomRow": 15, - "parentId": "0", - "widgetId": "c9la1jtf17", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "dynamicProperties": { - "isVisible": true - } - }, - { - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "text": "

šŸ” Inspect the filterDropdown properties & the getSearchedUsers Query.

šŸ” Try searching and filtering the table data.

", - "textStyle": "BODY", - "textAlign": "LEFT", - "widgetName": "Text10", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 74, - "parentRowSpace": 40, - "leftColumn": 11, - "rightColumn": 16, - "topRow": 15, - "bottomRow": 18, - "parentId": "0", - "widgetId": "lpfksj1cri", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "dynamicProperties": { - "isVisible": true - } - } - ] - }, - "publishedDsl": { - "widgetName": "MainContainer", - "backgroundColor": "none", - "rightColumn": 1224, - "snapColumns": 16, - "detachFromLayout": true, - "widgetId": "0", - "topRow": 0, - "bottomRow": 1280, - "containerStyle": "none", - "snapRows": 33, - "parentRowSpace": 1, - "type": "CANVAS_WIDGET", - "canExtend": true, - "dynamicBindings": {}, - "version": 5, - "minHeight": 1292, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Text1", - "rightColumn": 12, - "textAlign": "CENTER", - "widgetId": "kmgssafdwq", - "topRow": 0, - "bottomRow": 1, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "text": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 4, - "text": "

{{appsmith.mode !== \"EDIT\" ? \"Edit this application to begin\" : \"Searching & Filtering\"}}

", - "textStyle": "LABEL" - }, - { - "widgetName": "Text2", - "rightColumn": 14, - "textAlign": "CENTER", - "widgetId": "lisxd7rkzy", - "topRow": 1, - "bottomRow": 2, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 1, - "text": "This page demonstrates how to perform server side searching and filtering of datra. (Client side is enabled by default)", - "textStyle": "BODY" - }, - { - "hiddenColumns": [ - "createdAt", - "updatedAt", - "status", - "avatar" - ], - "widgetName": "usersTable", - "rightColumn": 10, - "widgetId": "owqebe2drj", - "topRow": 4, - "bottomRow": 20, - "parentRowSpace": 40, - "tableData": "{{getSearchedUsers.data}}", - "isVisible": true, - "label": "Data", - "searchKey": "", - "type": "TABLE_WIDGET", - "dynamicBindings": { - "tableData": true, - "selectedRow": true, - "filteredTableData": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 0, - "columnSizeMap": { - "id": 78, - "address": 213 - }, - "serverSidePaginationEnabled": true, - "dynamicTriggers": { - "onPageChange": true, - "onSearchTextChanged": true - }, - "onPageChange": "{{getSearchedUsers.run()}}", - "onSearchTextChanged": "{{getSearchedUsers.run()}}" - }, - { - "widgetName": "filterDropdown", - "rightColumn": 10, - "widgetId": "9bicbhtluy", - "topRow": 3, - "bottomRow": 4, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "DROP_DOWN_WIDGET", - "dynamicBindings": { - "selectedOptionArr": true, - "isValid": true, - "selectedIndexArr": true, - "selectedOption": true, - "value": true, - "selectedIndex": true - }, - "parentId": "0", - "isLoading": false, - "defaultOptionValue": "ALL", - "selectionType": "SINGLE_SELECT", - "parentColumnSpace": 74, - "leftColumn": 8, - "options": "[\n {\n \"label\": \"All\",\n \"value\": \"ALL\"\n },{\n \"label\": \"Male\",\n \"value\": \"Male\"\n },\n {\n \"label\": \"Female\",\n \"value\": \"Female\"\n }\n]", - "dynamicTriggers": { - "onOptionChange": true - }, - "onOptionChange": "{{getSearchedUsers.run()}}" - }, - { - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "text": "

šŸ’” The usersTable displays data returned by the getSearchedUsers Query.

\nšŸ”» The filterDropdown contains options to filter the users by gender. The dropdown executes the getSearchedUsers Query onOptionSelected.

\nā“The getSearchedUsers Query has a where clause that reads it's values from the filterDropdown and usersTable.searchText

\nāœ… The getSearchedUsers Query uses conditional checks to modify the where clause when the ALL option is selected and no searchText is present\n

", - "textStyle": "BODY", - "textAlign": "LEFT", - "widgetName": "Text3", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 74, - "parentRowSpace": 40, - "leftColumn": 11, - "rightColumn": 16, - "topRow": 4, - "bottomRow": 14, - "parentId": "0", - "widgetId": "tosmuzh0kw", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "shouldScroll": true, - "dynamicProperties": { - "isVisible": true - } - }, - { - "isVisible": true, - "text": "šŸ‘¤ Users", - "textStyle": "HEADING", - "textAlign": "LEFT", - "widgetName": "Text8", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 74, - "parentRowSpace": 40, - "leftColumn": 0, - "rightColumn": 4, - "topRow": 3, - "bottomRow": 4, - "parentId": "0", - "widgetId": "fz0zdf4tii", - "dynamicBindings": { - "value": true - } - }, - { - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "text": "-------------------------------------------------", - "textStyle": "LABEL", - "textAlign": "LEFT", - "widgetName": "Text9", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 74, - "parentRowSpace": 40, - "leftColumn": 11, - "rightColumn": 16, - "topRow": 14, - "bottomRow": 15, - "parentId": "0", - "widgetId": "c9la1jtf17", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "dynamicProperties": { - "isVisible": true - } - }, - { - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "text": "

šŸ” Inspect the filterDropdown properties & the getSearchedUsers Query.

šŸ” Try searching and filtering the table data.

", - "textStyle": "BODY", - "textAlign": "LEFT", - "widgetName": "Text10", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 74, - "parentRowSpace": 40, - "leftColumn": 11, - "rightColumn": 16, - "topRow": 15, - "bottomRow": 18, - "parentId": "0", - "widgetId": "lpfksj1cri", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "dynamicProperties": { - "isVisible": true - } - } - ] - }, - "layoutOnLoadActions": [ - [ - { - "name": "getSearchedUsers", - "pluginType": "DB", - "jsonPathKeys": [ - "usersTable.searchText || \"\"", - "(usersTable.pageNo - 1) * 10", - "filterDropdown.selectedOptionValue === \"ALL\" ? \"IN ('Male','Female')\" : \n\"= '\" + filterDropdown.selectedOptionValue + \"'\"" - ], - "timeoutInMillisecond": 10000 - } - ] - ], - "publishedLayoutOnLoadActions": [ - [ - { - "name": "getSearchedUsers", - "pluginType": "DB", - "jsonPathKeys": [ - "usersTable.searchText || \"\"", - "(usersTable.pageNo - 1) * 10", - "filterDropdown.selectedOptionValue === \"ALL\" ? \"IN ('Male','Female')\" : \n\"= '\" + filterDropdown.selectedOptionValue + \"'\"" - ], - "timeoutInMillisecond": 10000 - } - ] - ], - "widgetNames": [ - "usersTable", - "filterDropdown", - "Text10", - "Text9", - "Text8", - "Text3", - "Text2", - "Text1", - "MainContainer" - ], - "deleted": false, - "policies": [] - } - ], - "deleted": false, - "policies": [], - "_class": "com.appsmith.server.domains.Page" - }, - { - "name": "3. Drilldown Table Data", - "$isDefault": false, - "$actions": [ - { - "name": "getUsersDrilldown", - "datasource": { - "$isEmbedded": false, - "name": "Mock Database", - "$pluginPackageName": "postgres-plugin", - "datasourceConfiguration": { - "connection": { - "mode": "READ_WRITE" - }, - "endpoints": [ - { - "host": "fake-api.cvuydmurdlas.us-east-1.rds.amazonaws.com", - "port": 5432 - } - ], - "authentication": { - "username": "fakeapi", - "password": "LimitedAccess123#", - "databaseName": "fakeapi" - }, - "sshProxyEnabled": false - }, - "invalids": [], - "deleted": false, - "policies": [] - }, - "actionConfiguration": { - "timeoutInMillisecond": 10000, - "paginationType": "NONE", - "body": "SELECT * FROM users ORDER BY id LIMIT 10 offset {{ (usersTable.pageNo - 1) * 10 }};\n" - }, - "pluginType": "DB", - "executeOnLoad": true, - "dynamicBindingPathList": [ - { - "key": "body" - } - ], - "isValid": true, - "invalids": [], - "jsonPathKeys": ["(usersTable.pageNo - 1) * 10"], - "deleted": false, - "policies": [], - "_class": "com.appsmith.server.domains.Action" - } - ], - "layouts": [ - { - "viewMode": false, - "dsl": { - "widgetName": "MainContainer", - "backgroundColor": "none", - "rightColumn": 1224, - "snapColumns": 16, - "detachFromLayout": true, - "widgetId": "0", - "topRow": 0, - "bottomRow": 1280, - "containerStyle": "none", - "snapRows": 33, - "parentRowSpace": 1, - "type": "CANVAS_WIDGET", - "canExtend": true, - "dynamicBindings": {}, - "version": 5, - "minHeight": 1292, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Text1", - "rightColumn": 12, - "textAlign": "CENTER", - "widgetId": "2jwect0lhg", - "topRow": 0, - "bottomRow": 1, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "text": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 4, - "text": "

{{appsmith.mode !== \"EDIT\" ? \"Edit this application to begin\" : \"Drilldown Table Data\"}}

", - "textStyle": "LABEL" - }, - { - "widgetName": "Text2", - "rightColumn": 14, - "textAlign": "CENTER", - "widgetId": "5iytdt4zb8", - "topRow": 1, - "bottomRow": 2, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 2, - "text": "This page demonstrates how to efficiently display the important columns in a table and to display the row details as a drilldown", - "textStyle": "BODY" - }, - { - "hiddenColumns": [ - "createdAt", - "updatedAt", - "status", - "avatar", - "address", - "role", - "gender", - "dob", - "phoneNo" - ], - "widgetName": "usersTable", - "rightColumn": 8, - "widgetId": "2mameo5ws0", - "topRow": 4, - "bottomRow": 20, - "parentRowSpace": 40, - "onPageChange": "{{getUsersDrilldown.run()}}", - "tableData": "{{getUsersDrilldown.data}}", - "isVisible": true, - "label": "Data", - "searchKey": "", - "type": "TABLE_WIDGET", - "dynamicBindings": { - "tableData": true, - "selectedRow": true, - "filteredTableData": true - }, - "parentId": "0", - "serverSidePaginationEnabled": true, - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 0, - "dynamicTriggers": { - "onPageChange": true - }, - "columnSizeMap": { - "id": 72, - "phoneNo": 164, - "email": 362, - "name": 203 - } - }, - { - "backgroundColor": "#FFFFFF", - "widgetName": "detailsContainer", - "rightColumn": 16, - "widgetId": "ctgmvtblim", - "containerStyle": "card", - "topRow": 4, - "bottomRow": 9, - "parentRowSpace": 40, - "isVisible": true, - "type": "CONTAINER_WIDGET", - "parentId": "0", - "blueprint": { - "view": [ - { - "position": { - "top": 0, - "left": 0 - }, - "type": "CANVAS_WIDGET", - "props": { - "detachFromLayout": true, - "children": [ - "8f1tu5q2pt", - "u4p8iqclkx", - "img7hphdti", - "oas3cb2urw", - "lhhijlpqge", - "qbwww7njtr" - ], - "containerStyle": "none", - "canExtend": false - } - } - ] - }, - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 9, - "children": [ - { - "widgetName": "Canvas1", - "rightColumn": 592, - "detachFromLayout": true, - "widgetId": "cl6vqx5vsw", - "containerStyle": "none", - "topRow": 0, - "bottomRow": 400, - "parentRowSpace": 1, - "isVisible": true, - "canExtend": false, - "type": "CANVAS_WIDGET", - "parentId": "ctgmvtblim", - "minHeight": 400, - "isLoading": false, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "image": "{{usersTable.selectedRow.avatar}}", - "widgetName": "avatarImage", - "rightColumn": 4, - "widgetId": "8f1tu5q2pt", - "topRow": 0, - "bottomRow": 3, - "parentRowSpace": 40, - "isVisible": true, - "type": "IMAGE_WIDGET", - "dynamicBindings": { - "image": true - }, - "parentId": "cl6vqx5vsw", - "isLoading": false, - "parentColumnSpace": 34.5, - "imageShape": "RECTANGLE", - "leftColumn": 0, - "defaultImage": "https://res.cloudinary.com/drako999/image/upload/v1589196259/default.png" - }, - { - "widgetName": "emailText", - "rightColumn": 12, - "textAlign": "LEFT", - "widgetId": "u4p8iqclkx", - "topRow": 1, - "bottomRow": 2, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true - }, - "parentId": "cl6vqx5vsw", - "isLoading": false, - "parentColumnSpace": 34.5, - "leftColumn": 5, - "text": "{{usersTable.selectedRow.email}}", - "textStyle": "LABEL" - }, - { - "widgetName": "nameText", - "rightColumn": 12, - "textAlign": "LEFT", - "widgetId": "img7hphdti", - "topRow": 0, - "bottomRow": 1, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true - }, - "parentId": "cl6vqx5vsw", - "isLoading": false, - "parentColumnSpace": 34.5, - "leftColumn": 5, - "text": "{{usersTable.selectedRow.name}}", - "textStyle": "LABEL" - }, - { - "widgetName": "addressText", - "rightColumn": 16, - "textAlign": "LEFT", - "widgetId": "oas3cb2urw", - "topRow": 2, - "bottomRow": 3, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true - }, - "shouldScroll": false, - "parentId": "cl6vqx5vsw", - "isLoading": false, - "parentColumnSpace": 29.875, - "leftColumn": 5, - "text": "{{usersTable.selectedRow.address}}", - "textStyle": "LABEL" - }, - { - "widgetName": "roleText", - "rightColumn": 16, - "textAlign": "LEFT", - "widgetId": "lhhijlpqge", - "topRow": 0, - "bottomRow": 1, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true - }, - "parentId": "cl6vqx5vsw", - "isLoading": false, - "parentColumnSpace": 29.875, - "leftColumn": 12, - "text": "{{usersTable.selectedRow.role}}", - "textStyle": "LABEL" - }, - { - "widgetName": "dobText", - "rightColumn": 16, - "textAlign": "LEFT", - "widgetId": "1x38sheka8", - "topRow": 1, - "bottomRow": 2, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "parentId": "cl6vqx5vsw", - "isLoading": false, - "parentColumnSpace": 29.875, - "leftColumn": 12, - "text": "{{moment(usersTable.selectedRow.dob).format(\"Do MMM YYYY\")}}", - "textStyle": "LABEL", - "dynamicBindings": { - "text": true, - "value": true - } - } - ] - } - ] - }, - { - "widgetName": "Text8", - "rightColumn": 4, - "textAlign": "LEFT", - "widgetId": "rf2yjbzd20", - "topRow": 3, - "bottomRow": 4, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 0, - "text": "šŸ‘¤ Users", - "textStyle": "HEADING" - }, - { - "widgetName": "Text9", - "rightColumn": 15, - "textAlign": "LEFT", - "widgetId": "azglzewlcp", - "topRow": 3, - "bottomRow": 4, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true - }, - "shouldScroll": false, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 9, - "text": "{{usersTable.selectedRow ? \"šŸ™Ž User Details\" : \"šŸ‘ˆ Select a user in the table\"}}", - "textStyle": "HEADING" - }, - { - "widgetName": "Text10", - "rightColumn": 16, - "textAlign": "LEFT", - "widgetId": "fwvqp8bxqk", - "topRow": 10, - "bottomRow": 15, - "parentRowSpace": 40, - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "text": true, - "isVisible": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 9, - "text": "

šŸ”© The non-essential table columns are hidden and the detailsContainer displays a drill down view of the entire row.

\nšŸ–¼ļø The container is customised with widgets for each column in the table ex. Image widget for avatar.

\nšŸ”˜ The widgets are bound to the value of the selectedRow in the usersTable using {{\"{{ usersTable.selectedRow.columnName }}\"}}\n

", - "textStyle": "BODY", - "shouldScroll": true, - "dynamicProperties": { - "isVisible": true - } - }, - { - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "text": "---------------------------------------------------------------------", - "textStyle": "LABEL", - "textAlign": "LEFT", - "widgetName": "Text11", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 74, - "parentRowSpace": 40, - "leftColumn": 9, - "rightColumn": 16, - "topRow": 15, - "bottomRow": 16, - "parentId": "0", - "widgetId": "wc3bxw54hq", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "dynamicProperties": { - "isVisible": true - } - }, - { - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "text": "

šŸ” Inspect the widget properties in the detailsContainer.

ā˜æļø Try displaying the users gender in the detailsContainer.

", - "textStyle": "BODY", - "textAlign": "LEFT", - "widgetName": "Text12", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 74, - "parentRowSpace": 40, - "leftColumn": 9, - "rightColumn": 16, - "topRow": 16, - "bottomRow": 19, - "parentId": "0", - "widgetId": "7fuhyiakvc", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "dynamicProperties": { - "isVisible": true - } - } - ] - }, - "publishedDsl": { - "widgetName": "MainContainer", - "backgroundColor": "none", - "rightColumn": 1224, - "snapColumns": 16, - "detachFromLayout": true, - "widgetId": "0", - "topRow": 0, - "bottomRow": 1280, - "containerStyle": "none", - "snapRows": 33, - "parentRowSpace": 1, - "type": "CANVAS_WIDGET", - "canExtend": true, - "dynamicBindings": {}, - "version": 5, - "minHeight": 1292, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Text1", - "rightColumn": 12, - "textAlign": "CENTER", - "widgetId": "2jwect0lhg", - "topRow": 0, - "bottomRow": 1, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "text": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 4, - "text": "

{{appsmith.mode !== \"EDIT\" ? \"Edit this application to begin\" : \"Drilldown Table Data\"}}

", - "textStyle": "LABEL" - }, - { - "widgetName": "Text2", - "rightColumn": 14, - "textAlign": "CENTER", - "widgetId": "5iytdt4zb8", - "topRow": 1, - "bottomRow": 2, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 2, - "text": "This page demonstrates how to efficiently display the important columns in a table and to display the row details as a drilldown", - "textStyle": "BODY" - }, - { - "hiddenColumns": [ - "createdAt", - "updatedAt", - "status", - "avatar", - "address", - "role", - "gender", - "dob", - "phoneNo" - ], - "widgetName": "usersTable", - "rightColumn": 8, - "widgetId": "2mameo5ws0", - "topRow": 4, - "bottomRow": 20, - "parentRowSpace": 40, - "onPageChange": "{{getUsersDrilldown.run()}}", - "tableData": "{{getUsersDrilldown.data}}", - "isVisible": true, - "label": "Data", - "searchKey": "", - "type": "TABLE_WIDGET", - "dynamicBindings": { - "tableData": true, - "selectedRow": true, - "filteredTableData": true - }, - "parentId": "0", - "serverSidePaginationEnabled": true, - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 0, - "dynamicTriggers": { - "onPageChange": true - }, - "columnSizeMap": { - "id": 72, - "phoneNo": 164, - "email": 362, - "name": 203 - } - }, - { - "backgroundColor": "#FFFFFF", - "widgetName": "detailsContainer", - "rightColumn": 16, - "widgetId": "ctgmvtblim", - "containerStyle": "card", - "topRow": 4, - "bottomRow": 9, - "parentRowSpace": 40, - "isVisible": true, - "type": "CONTAINER_WIDGET", - "parentId": "0", - "blueprint": { - "view": [ - { - "position": { - "top": 0, - "left": 0 - }, - "type": "CANVAS_WIDGET", - "props": { - "detachFromLayout": true, - "children": [ - "8f1tu5q2pt", - "u4p8iqclkx", - "img7hphdti", - "oas3cb2urw", - "lhhijlpqge", - "qbwww7njtr" - ], - "containerStyle": "none", - "canExtend": false - } - } - ] - }, - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 9, - "children": [ - { - "widgetName": "Canvas1", - "rightColumn": 592, - "detachFromLayout": true, - "widgetId": "cl6vqx5vsw", - "containerStyle": "none", - "topRow": 0, - "bottomRow": 400, - "parentRowSpace": 1, - "isVisible": true, - "canExtend": false, - "type": "CANVAS_WIDGET", - "parentId": "ctgmvtblim", - "minHeight": 400, - "isLoading": false, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "image": "{{usersTable.selectedRow.avatar}}", - "widgetName": "avatarImage", - "rightColumn": 4, - "widgetId": "8f1tu5q2pt", - "topRow": 0, - "bottomRow": 3, - "parentRowSpace": 40, - "isVisible": true, - "type": "IMAGE_WIDGET", - "dynamicBindings": { - "image": true - }, - "parentId": "cl6vqx5vsw", - "isLoading": false, - "parentColumnSpace": 34.5, - "imageShape": "RECTANGLE", - "leftColumn": 0, - "defaultImage": "https://res.cloudinary.com/drako999/image/upload/v1589196259/default.png" - }, - { - "widgetName": "emailText", - "rightColumn": 12, - "textAlign": "LEFT", - "widgetId": "u4p8iqclkx", - "topRow": 1, - "bottomRow": 2, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true - }, - "parentId": "cl6vqx5vsw", - "isLoading": false, - "parentColumnSpace": 34.5, - "leftColumn": 5, - "text": "{{usersTable.selectedRow.email}}", - "textStyle": "LABEL" - }, - { - "widgetName": "nameText", - "rightColumn": 12, - "textAlign": "LEFT", - "widgetId": "img7hphdti", - "topRow": 0, - "bottomRow": 1, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true - }, - "parentId": "cl6vqx5vsw", - "isLoading": false, - "parentColumnSpace": 34.5, - "leftColumn": 5, - "text": "{{usersTable.selectedRow.name}}", - "textStyle": "LABEL" - }, - { - "widgetName": "addressText", - "rightColumn": 16, - "textAlign": "LEFT", - "widgetId": "oas3cb2urw", - "topRow": 2, - "bottomRow": 3, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true - }, - "shouldScroll": false, - "parentId": "cl6vqx5vsw", - "isLoading": false, - "parentColumnSpace": 29.875, - "leftColumn": 5, - "text": "{{usersTable.selectedRow.address}}", - "textStyle": "LABEL" - }, - { - "widgetName": "roleText", - "rightColumn": 16, - "textAlign": "LEFT", - "widgetId": "lhhijlpqge", - "topRow": 0, - "bottomRow": 1, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true - }, - "parentId": "cl6vqx5vsw", - "isLoading": false, - "parentColumnSpace": 29.875, - "leftColumn": 12, - "text": "{{usersTable.selectedRow.role}}", - "textStyle": "LABEL" - }, - { - "widgetName": "dobText", - "rightColumn": 16, - "textAlign": "LEFT", - "widgetId": "1x38sheka8", - "topRow": 1, - "bottomRow": 2, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "parentId": "cl6vqx5vsw", - "isLoading": false, - "parentColumnSpace": 29.875, - "leftColumn": 12, - "text": "{{moment(usersTable.selectedRow.dob).format(\"Do MMM YYYY\")}}", - "textStyle": "LABEL", - "dynamicBindings": { - "text": true, - "value": true - } - } - ] - } - ] - }, - { - "widgetName": "Text8", - "rightColumn": 4, - "textAlign": "LEFT", - "widgetId": "rf2yjbzd20", - "topRow": 3, - "bottomRow": 4, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 0, - "text": "šŸ‘¤ Users", - "textStyle": "HEADING" - }, - { - "widgetName": "Text9", - "rightColumn": 15, - "textAlign": "LEFT", - "widgetId": "azglzewlcp", - "topRow": 3, - "bottomRow": 4, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true - }, - "shouldScroll": false, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 9, - "text": "{{usersTable.selectedRow ? \"šŸ™Ž User Details\" : \"šŸ‘ˆ Select a user in the table\"}}", - "textStyle": "HEADING" - }, - { - "widgetName": "Text10", - "rightColumn": 16, - "textAlign": "LEFT", - "widgetId": "fwvqp8bxqk", - "topRow": 10, - "bottomRow": 15, - "parentRowSpace": 40, - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "text": true, - "isVisible": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 9, - "text": "

šŸ”© The non-essential table columns are hidden and the detailsContainer displays a drill down view of the entire row.

\nšŸ–¼ļø The container is customised with widgets for each column in the table ex. Image widget for avatar.

\nšŸ”˜ The widgets are bound to the value of the selectedRow in the usersTable using {{\"{{ usersTable.selectedRow.columnName }}\"}}\n

", - "textStyle": "BODY", - "shouldScroll": true, - "dynamicProperties": { - "isVisible": true - } - }, - { - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "text": "---------------------------------------------------------------------", - "textStyle": "LABEL", - "textAlign": "LEFT", - "widgetName": "Text11", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 74, - "parentRowSpace": 40, - "leftColumn": 9, - "rightColumn": 16, - "topRow": 15, - "bottomRow": 16, - "parentId": "0", - "widgetId": "wc3bxw54hq", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "dynamicProperties": { - "isVisible": true - } - }, - { - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "text": "

šŸ” Inspect the widget properties in the detailsContainer.

ā˜æļø Try displaying the users gender in the detailsContainer.

", - "textStyle": "BODY", - "textAlign": "LEFT", - "widgetName": "Text12", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 74, - "parentRowSpace": 40, - "leftColumn": 9, - "rightColumn": 16, - "topRow": 16, - "bottomRow": 19, - "parentId": "0", - "widgetId": "7fuhyiakvc", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "dynamicProperties": { - "isVisible": true - } - } - ] - }, - "layoutOnLoadActions": [ - [ - { - "name": "getUsersDrilldown", - "pluginType": "DB", - "jsonPathKeys": ["(usersTable.pageNo - 1) * 10"], - "timeoutInMillisecond": 10000 - } - ] - ], - "publishedLayoutOnLoadActions": [ - [ - { - "name": "getUsersDrilldown", - "pluginType": "DB", - "jsonPathKeys": ["(usersTable.pageNo - 1) * 10"], - "timeoutInMillisecond": 10000 - } - ] - ], - "widgetNames": [ - "dobText", - "Text9", - "Text8", - "detailsContainer", - "addressText", - "Text2", - "Text1", - "emailText", - "nameText", - "MainContainer", - "usersTable", - "Text12", - "Text10", - "Text11", - "Canvas1", - "avatarImage", - "roleText" - ], - "deleted": false, - "policies": [] - } - ], - "deleted": false, - "policies": [], - "_class": "com.appsmith.server.domains.Page" - }, - { - "name": "4. Editing Table Data", - "$isDefault": false, - "$actions": [ - { - "name": "getUsersToEdit", - "datasource": { - "$isEmbedded": false, - "name": "Mock Database", - "$pluginPackageName": "postgres-plugin", - "datasourceConfiguration": { - "connection": { - "mode": "READ_WRITE" - }, - "endpoints": [ - { - "host": "fake-api.cvuydmurdlas.us-east-1.rds.amazonaws.com", - "port": 5432 - } - ], - "authentication": { - "username": "fakeapi", - "password": "LimitedAccess123#", - "databaseName": "fakeapi" - }, - "sshProxyEnabled": false - }, - "invalids": [], - "deleted": false, - "policies": [] - }, - "actionConfiguration": { - "timeoutInMillisecond": 10000, - "paginationType": "NONE", - "body": "SELECT * FROM users ORDER BY id LIMIT 5 offset {{(usersTable.pageNo - 1) * 5}};\n" - }, - "pluginType": "DB", - "executeOnLoad": true, - "dynamicBindingPathList": [ - { - "key": "body" - } - ], - "isValid": true, - "invalids": [], - "jsonPathKeys": ["(usersTable.pageNo - 1) * 5"], - "deleted": false, - "policies": [], - "_class": "com.appsmith.server.domains.Action" - }, - { - "name": "updateUser", - "datasource": { - "$isEmbedded": false, - "name": "Mock Database", - "$pluginPackageName": "postgres-plugin", - "datasourceConfiguration": { - "connection": { - "mode": "READ_WRITE" - }, - "endpoints": [ - { - "host": "fake-api.cvuydmurdlas.us-east-1.rds.amazonaws.com", - "port": 5432 - } - ], - "authentication": { - "username": "fakeapi", - "password": "LimitedAccess123#", - "databaseName": "fakeapi" - }, - "sshProxyEnabled": false - }, - "invalids": [], - "deleted": false, - "policies": [] - }, - "actionConfiguration": { - "timeoutInMillisecond": 10000, - "paginationType": "NONE", - "body": "update users set \nname = '{{nameInput.text}}',\nemail = '{{emailInput.text}}',\ngender = '{{genderRadio.selectedOptionValue}}',\nrole = '{{roleDropdown.selectedOptionValue}}',\ndob = '{{dobPicker.selectedDate}}',\naddress = '{{addressInput.text}}'\nwhere id = '{{usersTable.selectedRow.id}}'" - }, - "pluginType": "DB", - "dynamicBindingPathList": [ - { - "key": "body" - } - ], - "isValid": true, - "invalids": [], - "jsonPathKeys": [ - "genderRadio.selectedOptionValue", - "roleDropdown.selectedOptionValue", - "dobPicker.selectedDate", - "addressInput.text", - "nameInput.text", - "usersTable.selectedRow.id", - "emailInput.text" - ], - "deleted": false, - "policies": [], - "_class": "com.appsmith.server.domains.Action" - } - ], - "layouts": [ - { - "viewMode": false, - "dsl": { - "widgetName": "MainContainer", - "backgroundColor": "none", - "rightColumn": 1224, - "snapColumns": 16, - "detachFromLayout": true, - "widgetId": "0", - "topRow": 0, - "bottomRow": 1280, - "containerStyle": "none", - "snapRows": 33, - "parentRowSpace": 1, - "type": "CANVAS_WIDGET", - "canExtend": true, - "dynamicBindings": {}, - "version": 5, - "minHeight": 1292, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Text1", - "rightColumn": 12, - "textAlign": "CENTER", - "widgetId": "6mfm6rqhpo", - "topRow": 0, - "bottomRow": 1, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "text": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 4, - "text": "

{{appsmith.mode !== \"EDIT\" ? \"Edit this application to begin\" : \"Editing Table Data\"}}

", - "textStyle": "LABEL" - }, - { - "hiddenColumns": [ - "createdAt", - "updatedAt", - "status", - "avatar", - "phoneNo" - ], - "widgetName": "usersTable", - "rightColumn": 16, - "widgetId": "9u4ssyjwvu", - "topRow": 3, - "bottomRow": 13, - "parentRowSpace": 40, - "onPageChange": "{{getUsersToEdit.run()}}", - "tableData": "{{getUsersToEdit.data}}", - "isVisible": true, - "label": "Data", - "searchKey": "", - "type": "TABLE_WIDGET", - "dynamicBindings": { - "tableData": true, - "selectedRow": true, - "filteredTableData": true - }, - "parentId": "0", - "serverSidePaginationEnabled": true, - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 0, - "dynamicTriggers": { - "onPageChange": true - }, - "columnActions": [ - { - "actionPayloads": [], - "label": "Edit", - "id": "6apm73t6ss", - "dynamicTrigger": "{{showModal('edit_user_modal')}}" - } - ], - "columnSizeMap": { - "address": 218, - "role": 96, - "id": 75, - "email": 185 - } - }, - { - "widgetName": "edit_user_modal", - "rightColumn": 0, - "detachFromLayout": true, - "widgetId": "xrk5ogzbyl", - "topRow": 0, - "bottomRow": 0, - "parentRowSpace": 1, - "isVisible": false, - "canOutsideClickClose": true, - "type": "MODAL_WIDGET", - "canEscapeKeyClose": true, - "dynamicBindings": {}, - "parentId": "0", - "shouldScrollContents": true, - "blueprint": { - "view": [ - { - "position": { - "top": 0, - "left": 0 - }, - "type": "CANVAS_WIDGET", - "props": { - "shouldScrollContents": false, - "blueprint": { - "view": [ - { - "size": { - "rows": 1, - "cols": 2 - }, - "position": { - "top": 0, - "left": 14 - }, - "type": "ICON_WIDGET", - "props": { - "color": "#040627", - "iconName": "cross", - "iconSize": 24 - } - }, - { - "size": { - "rows": 1, - "cols": 10 - }, - "position": { - "top": 0, - "left": 0 - }, - "type": "TEXT_WIDGET", - "props": { - "text": "Modal Title", - "textStyle": "HEADING" - } - }, - { - "size": { - "rows": 1, - "cols": 3 - }, - "position": { - "top": 4, - "left": 10 - }, - "type": "BUTTON_WIDGET", - "props": { - "buttonStyle": "SECONDARY_BUTTON", - "text": "Cancel" - } - }, - { - "size": { - "rows": 1, - "cols": 3 - }, - "position": { - "top": 4, - "left": 13 - }, - "type": "BUTTON_WIDGET", - "props": { - "buttonStyle": "PRIMARY_BUTTON", - "text": "Confirm" - } - } - ], - "operations": [ - { - "type": "MODIFY_PROPS" - } - ] - }, - "detachFromLayout": true, - "children": [], - "isVisible": true, - "isDisabled": false, - "canExtend": true - } - } - ] - }, - "isLoading": false, - "parentColumnSpace": 1, - "size": "MODAL_LARGE", - "leftColumn": 0, - "children": [ - { - "widgetName": "Canvas1", - "rightColumn": 0, - "detachFromLayout": true, - "widgetId": "e3ez3d0tal", - "topRow": 0, - "bottomRow": 640, - "parentRowSpace": 1, - "isVisible": true, - "canExtend": true, - "type": "CANVAS_WIDGET", - "parentId": "xrk5ogzbyl", - "shouldScrollContents": false, - "blueprint": { - "view": [ - { - "size": { - "rows": 1, - "cols": 2 - }, - "position": { - "top": 0, - "left": 14 - }, - "type": "ICON_WIDGET", - "props": { - "color": "#040627", - "iconName": "cross", - "iconSize": 24 - } - }, - { - "size": { - "rows": 1, - "cols": 10 - }, - "position": { - "top": 0, - "left": 0 - }, - "type": "TEXT_WIDGET", - "props": { - "text": "Modal Title", - "textStyle": "HEADING" - } - }, - { - "size": { - "rows": 1, - "cols": 3 - }, - "position": { - "top": 4, - "left": 10 - }, - "type": "BUTTON_WIDGET", - "props": { - "buttonStyle": "SECONDARY_BUTTON", - "text": "Cancel" - } - }, - { - "size": { - "rows": 1, - "cols": 3 - }, - "position": { - "top": 4, - "left": 13 - }, - "type": "BUTTON_WIDGET", - "props": { - "buttonStyle": "PRIMARY_BUTTON", - "text": "Confirm" - } - } - ], - "operations": [ - { - "type": "MODIFY_PROPS" - } - ] - }, - "minHeight": 0, - "isLoading": false, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Icon1", - "rightColumn": 16, - "onClick": "{{closeModal('edit_user_modal')}}", - "color": "#040627", - "iconName": "cross", - "widgetId": "ei1yvwhoo6", - "topRow": 0, - "bottomRow": 1, - "isVisible": true, - "type": "ICON_WIDGET", - "parentId": "e3ez3d0tal", - "isLoading": false, - "leftColumn": 15, - "iconSize": 24 - }, - { - "widgetName": "Text2", - "rightColumn": 10, - "textAlign": "LEFT", - "widgetId": "n8954upfed", - "topRow": 0, - "bottomRow": 1, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true - }, - "parentId": "e3ez3d0tal", - "isLoading": false, - "leftColumn": 0, - "text": "Edit {{usersTable.selectedRow ? usersTable.selectedRow.name : \"User\"}} Profile", - "textStyle": "HEADING" - }, - { - "widgetName": "Button1", - "rightColumn": 12, - "isDefaultClickDisabled": true, - "widgetId": "rezsknprd6", - "buttonStyle": "SECONDARY_BUTTON", - "topRow": 13, - "bottomRow": 14, - "isVisible": true, - "type": "BUTTON_WIDGET", - "parentId": "e3ez3d0tal", - "isLoading": false, - "leftColumn": 9, - "text": "Cancel", - "isDisabled": false - }, - { - "widgetName": "Button2", - "rightColumn": 16, - "onClick": "{{updateUser.run(() =>\n getUsersToEdit.run(() => closeModal('edit_user_modal')), () => {})}}", - "isDefaultClickDisabled": true, - "widgetId": "odxfvsu7yu", - "dynamicProperties": { - "onClick": true - }, - "buttonStyle": "PRIMARY_BUTTON", - "topRow": 13, - "bottomRow": 14, - "isVisible": true, - "type": "BUTTON_WIDGET", - "parentId": "e3ez3d0tal", - "isLoading": false, - "leftColumn": 12, - "dynamicTriggers": { - "onClick": true - }, - "text": "Update", - "isDisabled": false, - "dynamicBindings": {} - }, - { - "widgetName": "Text3", - "rightColumn": 4, - "textAlign": "RIGHT", - "widgetId": "rtizqvkf8i", - "topRow": 2, - "bottomRow": 3, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "e3ez3d0tal", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 0, - "text": "Name", - "textStyle": "LABEL" - }, - { - "widgetName": "nameInput", - "rightColumn": 12, - "widgetId": "lddk038cph", - "topRow": 2, - "bottomRow": 3, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "INPUT_WIDGET", - "dynamicBindings": { - "isValid": true, - "defaultText": true, - "value": true - }, - "parentId": "e3ez3d0tal", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 4, - "inputType": "TEXT", - "defaultText": "{{usersTable.selectedRow.name}}" - }, - { - "widgetName": "Text4", - "rightColumn": 4, - "textAlign": "RIGHT", - "widgetId": "69nnj7hrek", - "topRow": 3, - "bottomRow": 4, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "e3ez3d0tal", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 0, - "text": "Email", - "textStyle": "LABEL" - }, - { - "widgetName": "emailInput", - "rightColumn": 12, - "widgetId": "t3ym9irla8", - "topRow": 3, - "bottomRow": 4, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "INPUT_WIDGET", - "dynamicBindings": { - "isValid": true, - "defaultText": true, - "value": true - }, - "parentId": "e3ez3d0tal", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 4, - "inputType": "TEXT", - "defaultText": "{{usersTable.selectedRow.email}}" - }, - { - "widgetName": "Text5", - "rightColumn": 4, - "textAlign": "RIGHT", - "widgetId": "61gx996lf8", - "topRow": 4, - "bottomRow": 5, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "e3ez3d0tal", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 0, - "text": "Role", - "textStyle": "LABEL" - }, - { - "widgetName": "roleDropdown", - "rightColumn": 12, - "widgetId": "h8m5l0xnhq", - "topRow": 4, - "bottomRow": 5, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "DROP_DOWN_WIDGET", - "dynamicBindings": { - "defaultOptionValue": true, - "selectedOptionArr": true, - "isValid": true, - "selectedIndexArr": true, - "selectedOption": true, - "value": true, - "selectedIndex": true - }, - "parentId": "e3ez3d0tal", - "isLoading": false, - "defaultOptionValue": "{{usersTable.selectedRow.role}}", - "selectionType": "SINGLE_SELECT", - "parentColumnSpace": 30.75, - "leftColumn": 4, - "options": "[\n {\n \"label\": \"Admin\",\n \"value\": \"Admin\"\n },\n {\n \"label\": \"Editor\",\n \"value\": \"Editor\"\n },\n\t{\n \"label\": \"Viewer\",\n \"value\": \"Viewer\"\n }\n]" - }, - { - "widgetName": "Text6", - "rightColumn": 4, - "textAlign": "RIGHT", - "widgetId": "4cvt7ueu8x", - "topRow": 5, - "bottomRow": 6, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "e3ez3d0tal", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 0, - "text": "Gender", - "textStyle": "LABEL" - }, - { - "widgetName": "Text7", - "rightColumn": 4, - "textAlign": "RIGHT", - "widgetId": "r8u4ive9g2", - "topRow": 8, - "bottomRow": 9, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "e3ez3d0tal", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 0, - "text": "Address", - "textStyle": "LABEL" - }, - { - "widgetName": "addressInput", - "rightColumn": 12, - "widgetId": "fa42qbxle6", - "topRow": 8, - "bottomRow": 10, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "INPUT_WIDGET", - "dynamicBindings": { - "isValid": true, - "defaultText": true, - "value": true - }, - "parentId": "e3ez3d0tal", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 4, - "inputType": "TEXT", - "defaultText": "{{usersTable.selectedRow.address}}" - }, - { - "widgetName": "Text8", - "rightColumn": 4, - "textAlign": "RIGHT", - "widgetId": "ix9cdf6ffu", - "topRow": 7, - "bottomRow": 8, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "e3ez3d0tal", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 0, - "text": "Date of Birth", - "textStyle": "LABEL" - }, - { - "widgetName": "dobPicker", - "defaultDate": "{{usersTable.selectedRow.dob}}", - "rightColumn": 12, - "dateFormat": "YYYY-MM-DD", - "widgetId": "sc1fdb61r5", - "dynamicProperties": { - "defaultDate": true - }, - "topRow": 7, - "bottomRow": 8, - "parentRowSpace": 40, - "isVisible": true, - "datePickerType": "DATE_PICKER", - "label": "", - "type": "DATE_PICKER_WIDGET", - "dynamicBindings": { - "defaultDate": true, - "isValid": true, - "value": true - }, - "parentId": "e3ez3d0tal", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 4, - "isDisabled": false - }, - { - "isVisible": true, - "text": "

Add a radio buttin for gender and bind it to the update query

", - "textStyle": "BODY", - "textAlign": "CENTER", - "widgetName": "Text18", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 30.75, - "parentRowSpace": 40, - "leftColumn": 1, - "rightColumn": 16, - "topRow": 12, - "bottomRow": 13, - "parentId": "e3ez3d0tal", - "widgetId": "akbigj7yki", - "dynamicBindings": { - "value": true - } - } - ], - "isDisabled": false - } - ] - }, - { - "isVisible": true, - "text": "This page demonstrates how to edit data displayed in a table", - "textStyle": "BODY", - "textAlign": "CENTER", - "widgetName": "Text9", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 74, - "parentRowSpace": 40, - "leftColumn": 4, - "rightColumn": 12, - "topRow": 1, - "bottomRow": 2, - "parentId": "0", - "widgetId": "762rdibr8m", - "dynamicBindings": { - "value": true - } - }, - { - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "text": "

šŸ–‹ļø The table has an 'Edit' row action which opens a modal.

\nšŸ”Œ The modal contains input widgets with default values bound to the {{\"{{ usersTable.selectedRow }}\"}}.

\nšŸ”˜ The updateButton in the modal executes the\nupdateUser Query, executes the getUsersToEdit Query onSuccess and then closes the modal.

\nāœšŸ» This workflow which needs more than 2 steps is configured by converting the onClick field to JS.

\n

", - "textStyle": "BODY", - "textAlign": "LEFT", - "widgetName": "Text10", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 74, - "parentRowSpace": 40, - "leftColumn": 0, - "rightColumn": 8, - "topRow": 14, - "bottomRow": 21, - "parentId": "0", - "widgetId": "m7i35s4wii", - "dynamicBindings": { - "value": true, - "text": true, - "isVisible": true - }, - "dynamicProperties": { - "isVisible": true - } - }, - { - "isVisible": true, - "text": "šŸ‘¤ Users", - "textStyle": "HEADING", - "textAlign": "LEFT", - "widgetName": "Text17", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 74, - "parentRowSpace": 40, - "leftColumn": 0, - "rightColumn": 4, - "topRow": 2, - "bottomRow": 3, - "parentId": "0", - "widgetId": "i53n9ij8oe", - "dynamicBindings": { - "value": true - } - }, - { - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "text": "

šŸ” Inspect the table properties & the modal (Click Edit).

🌟 Add a gender field to the modal & connect it to the updateUser Query.

", - "textStyle": "BODY", - "textAlign": "LEFT", - "widgetName": "Text19", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 74, - "parentRowSpace": 40, - "leftColumn": 9, - "rightColumn": 16, - "topRow": 14, - "bottomRow": 17, - "parentId": "0", - "widgetId": "3ln6v3fwe7", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "shouldScroll": true, - "dynamicProperties": { - "isVisible": true - } - } - ] - }, - "publishedDsl": { - "widgetName": "MainContainer", - "backgroundColor": "none", - "rightColumn": 1224, - "snapColumns": 16, - "detachFromLayout": true, - "widgetId": "0", - "topRow": 0, - "bottomRow": 1280, - "containerStyle": "none", - "snapRows": 33, - "parentRowSpace": 1, - "type": "CANVAS_WIDGET", - "canExtend": true, - "dynamicBindings": {}, - "version": 5, - "minHeight": 1292, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Text1", - "rightColumn": 12, - "textAlign": "CENTER", - "widgetId": "6mfm6rqhpo", - "topRow": 0, - "bottomRow": 1, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true, - "text": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 4, - "text": "

{{appsmith.mode !== \"EDIT\" ? \"Edit this application to begin\" : \"Editing Table Data\"}}

", - "textStyle": "LABEL" - }, - { - "hiddenColumns": [ - "createdAt", - "updatedAt", - "status", - "avatar", - "phoneNo" - ], - "widgetName": "usersTable", - "rightColumn": 16, - "widgetId": "9u4ssyjwvu", - "topRow": 3, - "bottomRow": 13, - "parentRowSpace": 40, - "onPageChange": "{{getUsersToEdit.run()}}", - "tableData": "{{getUsersToEdit.data}}", - "isVisible": true, - "label": "Data", - "searchKey": "", - "type": "TABLE_WIDGET", - "dynamicBindings": { - "tableData": true, - "selectedRow": true, - "filteredTableData": true - }, - "parentId": "0", - "serverSidePaginationEnabled": true, - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 0, - "dynamicTriggers": { - "onPageChange": true - }, - "columnActions": [ - { - "actionPayloads": [], - "label": "Edit", - "id": "6apm73t6ss", - "dynamicTrigger": "{{showModal('edit_user_modal')}}" - } - ], - "columnSizeMap": { - "address": 218, - "role": 96, - "id": 75, - "email": 185 - } - }, - { - "widgetName": "edit_user_modal", - "rightColumn": 0, - "detachFromLayout": true, - "widgetId": "xrk5ogzbyl", - "topRow": 0, - "bottomRow": 0, - "parentRowSpace": 1, - "isVisible": false, - "canOutsideClickClose": true, - "type": "MODAL_WIDGET", - "canEscapeKeyClose": true, - "dynamicBindings": {}, - "parentId": "0", - "shouldScrollContents": true, - "blueprint": { - "view": [ - { - "position": { - "top": 0, - "left": 0 - }, - "type": "CANVAS_WIDGET", - "props": { - "shouldScrollContents": false, - "blueprint": { - "view": [ - { - "size": { - "rows": 1, - "cols": 2 - }, - "position": { - "top": 0, - "left": 14 - }, - "type": "ICON_WIDGET", - "props": { - "color": "#040627", - "iconName": "cross", - "iconSize": 24 - } - }, - { - "size": { - "rows": 1, - "cols": 10 - }, - "position": { - "top": 0, - "left": 0 - }, - "type": "TEXT_WIDGET", - "props": { - "text": "Modal Title", - "textStyle": "HEADING" - } - }, - { - "size": { - "rows": 1, - "cols": 3 - }, - "position": { - "top": 4, - "left": 10 - }, - "type": "BUTTON_WIDGET", - "props": { - "buttonStyle": "SECONDARY_BUTTON", - "text": "Cancel" - } - }, - { - "size": { - "rows": 1, - "cols": 3 - }, - "position": { - "top": 4, - "left": 13 - }, - "type": "BUTTON_WIDGET", - "props": { - "buttonStyle": "PRIMARY_BUTTON", - "text": "Confirm" - } - } - ], - "operations": [ - { - "type": "MODIFY_PROPS" - } - ] - }, - "detachFromLayout": true, - "children": [], - "isVisible": true, - "isDisabled": false, - "canExtend": true - } - } - ] - }, - "isLoading": false, - "parentColumnSpace": 1, - "size": "MODAL_LARGE", - "leftColumn": 0, - "children": [ - { - "widgetName": "Canvas1", - "rightColumn": 0, - "detachFromLayout": true, - "widgetId": "e3ez3d0tal", - "topRow": 0, - "bottomRow": 640, - "parentRowSpace": 1, - "isVisible": true, - "canExtend": true, - "type": "CANVAS_WIDGET", - "parentId": "xrk5ogzbyl", - "shouldScrollContents": false, - "blueprint": { - "view": [ - { - "size": { - "rows": 1, - "cols": 2 - }, - "position": { - "top": 0, - "left": 14 - }, - "type": "ICON_WIDGET", - "props": { - "color": "#040627", - "iconName": "cross", - "iconSize": 24 - } - }, - { - "size": { - "rows": 1, - "cols": 10 - }, - "position": { - "top": 0, - "left": 0 - }, - "type": "TEXT_WIDGET", - "props": { - "text": "Modal Title", - "textStyle": "HEADING" - } - }, - { - "size": { - "rows": 1, - "cols": 3 - }, - "position": { - "top": 4, - "left": 10 - }, - "type": "BUTTON_WIDGET", - "props": { - "buttonStyle": "SECONDARY_BUTTON", - "text": "Cancel" - } - }, - { - "size": { - "rows": 1, - "cols": 3 - }, - "position": { - "top": 4, - "left": 13 - }, - "type": "BUTTON_WIDGET", - "props": { - "buttonStyle": "PRIMARY_BUTTON", - "text": "Confirm" - } - } - ], - "operations": [ - { - "type": "MODIFY_PROPS" - } - ] - }, - "minHeight": 0, - "isLoading": false, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Icon1", - "rightColumn": 16, - "onClick": "{{closeModal('edit_user_modal')}}", - "color": "#040627", - "iconName": "cross", - "widgetId": "ei1yvwhoo6", - "topRow": 0, - "bottomRow": 1, - "isVisible": true, - "type": "ICON_WIDGET", - "parentId": "e3ez3d0tal", - "isLoading": false, - "leftColumn": 15, - "iconSize": 24 - }, - { - "widgetName": "Text2", - "rightColumn": 10, - "textAlign": "LEFT", - "widgetId": "n8954upfed", - "topRow": 0, - "bottomRow": 1, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true - }, - "parentId": "e3ez3d0tal", - "isLoading": false, - "leftColumn": 0, - "text": "Edit {{usersTable.selectedRow ? usersTable.selectedRow.name : \"User\"}} Profile", - "textStyle": "HEADING" - }, - { - "widgetName": "Button1", - "rightColumn": 12, - "isDefaultClickDisabled": true, - "widgetId": "rezsknprd6", - "buttonStyle": "SECONDARY_BUTTON", - "topRow": 13, - "bottomRow": 14, - "isVisible": true, - "type": "BUTTON_WIDGET", - "parentId": "e3ez3d0tal", - "isLoading": false, - "leftColumn": 9, - "text": "Cancel", - "isDisabled": false - }, - { - "widgetName": "Button2", - "rightColumn": 16, - "onClick": "{{updateUser.run(() =>\n getUsersToEdit.run(() => closeModal('edit_user_modal')), () => {})}}", - "isDefaultClickDisabled": true, - "widgetId": "odxfvsu7yu", - "dynamicProperties": { - "onClick": true - }, - "buttonStyle": "PRIMARY_BUTTON", - "topRow": 13, - "bottomRow": 14, - "isVisible": true, - "type": "BUTTON_WIDGET", - "parentId": "e3ez3d0tal", - "isLoading": false, - "leftColumn": 12, - "dynamicTriggers": { - "onClick": true - }, - "text": "Update", - "isDisabled": false, - "dynamicBindings": {} - }, - { - "widgetName": "Text3", - "rightColumn": 4, - "textAlign": "RIGHT", - "widgetId": "rtizqvkf8i", - "topRow": 2, - "bottomRow": 3, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "e3ez3d0tal", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 0, - "text": "Name", - "textStyle": "LABEL" - }, - { - "widgetName": "nameInput", - "rightColumn": 12, - "widgetId": "lddk038cph", - "topRow": 2, - "bottomRow": 3, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "INPUT_WIDGET", - "dynamicBindings": { - "isValid": true, - "defaultText": true, - "value": true - }, - "parentId": "e3ez3d0tal", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 4, - "inputType": "TEXT", - "defaultText": "{{usersTable.selectedRow.name}}" - }, - { - "widgetName": "Text4", - "rightColumn": 4, - "textAlign": "RIGHT", - "widgetId": "69nnj7hrek", - "topRow": 3, - "bottomRow": 4, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "e3ez3d0tal", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 0, - "text": "Email", - "textStyle": "LABEL" - }, - { - "widgetName": "emailInput", - "rightColumn": 12, - "widgetId": "t3ym9irla8", - "topRow": 3, - "bottomRow": 4, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "INPUT_WIDGET", - "dynamicBindings": { - "isValid": true, - "defaultText": true, - "value": true - }, - "parentId": "e3ez3d0tal", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 4, - "inputType": "TEXT", - "defaultText": "{{usersTable.selectedRow.email}}" - }, - { - "widgetName": "Text5", - "rightColumn": 4, - "textAlign": "RIGHT", - "widgetId": "61gx996lf8", - "topRow": 4, - "bottomRow": 5, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "e3ez3d0tal", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 0, - "text": "Role", - "textStyle": "LABEL" - }, - { - "widgetName": "roleDropdown", - "rightColumn": 12, - "widgetId": "h8m5l0xnhq", - "topRow": 4, - "bottomRow": 5, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "DROP_DOWN_WIDGET", - "dynamicBindings": { - "defaultOptionValue": true, - "selectedOptionArr": true, - "isValid": true, - "selectedIndexArr": true, - "selectedOption": true, - "value": true, - "selectedIndex": true - }, - "parentId": "e3ez3d0tal", - "isLoading": false, - "defaultOptionValue": "{{usersTable.selectedRow.role}}", - "selectionType": "SINGLE_SELECT", - "parentColumnSpace": 30.75, - "leftColumn": 4, - "options": "[\n {\n \"label\": \"Admin\",\n \"value\": \"Admin\"\n },\n {\n \"label\": \"Editor\",\n \"value\": \"Editor\"\n },\n\t{\n \"label\": \"Viewer\",\n \"value\": \"Viewer\"\n }\n]" - }, - { - "widgetName": "Text6", - "rightColumn": 4, - "textAlign": "RIGHT", - "widgetId": "4cvt7ueu8x", - "topRow": 5, - "bottomRow": 6, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "e3ez3d0tal", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 0, - "text": "Gender", - "textStyle": "LABEL" - }, - { - "widgetName": "Text7", - "rightColumn": 4, - "textAlign": "RIGHT", - "widgetId": "r8u4ive9g2", - "topRow": 8, - "bottomRow": 9, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "e3ez3d0tal", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 0, - "text": "Address", - "textStyle": "LABEL" - }, - { - "widgetName": "addressInput", - "rightColumn": 12, - "widgetId": "fa42qbxle6", - "topRow": 8, - "bottomRow": 10, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "INPUT_WIDGET", - "dynamicBindings": { - "isValid": true, - "defaultText": true, - "value": true - }, - "parentId": "e3ez3d0tal", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 4, - "inputType": "TEXT", - "defaultText": "{{usersTable.selectedRow.address}}" - }, - { - "widgetName": "Text8", - "rightColumn": 4, - "textAlign": "RIGHT", - "widgetId": "ix9cdf6ffu", - "topRow": 7, - "bottomRow": 8, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "e3ez3d0tal", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 0, - "text": "Date of Birth", - "textStyle": "LABEL" - }, - { - "widgetName": "dobPicker", - "defaultDate": "{{usersTable.selectedRow.dob}}", - "rightColumn": 12, - "dateFormat": "YYYY-MM-DD", - "widgetId": "sc1fdb61r5", - "dynamicProperties": { - "defaultDate": true - }, - "topRow": 7, - "bottomRow": 8, - "parentRowSpace": 40, - "isVisible": true, - "datePickerType": "DATE_PICKER", - "label": "", - "type": "DATE_PICKER_WIDGET", - "dynamicBindings": { - "defaultDate": true, - "isValid": true, - "value": true - }, - "parentId": "e3ez3d0tal", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 4, - "isDisabled": false - }, - { - "isVisible": true, - "text": "

Add a radio buttin for gender and bind it to the update query

", - "textStyle": "BODY", - "textAlign": "CENTER", - "widgetName": "Text18", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 30.75, - "parentRowSpace": 40, - "leftColumn": 1, - "rightColumn": 16, - "topRow": 12, - "bottomRow": 13, - "parentId": "e3ez3d0tal", - "widgetId": "akbigj7yki", - "dynamicBindings": { - "value": true - } - } - ], - "isDisabled": false - } - ] - }, - { - "isVisible": true, - "text": "This page demonstrates how to edit data displayed in a table", - "textStyle": "BODY", - "textAlign": "CENTER", - "widgetName": "Text9", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 74, - "parentRowSpace": 40, - "leftColumn": 4, - "rightColumn": 12, - "topRow": 1, - "bottomRow": 2, - "parentId": "0", - "widgetId": "762rdibr8m", - "dynamicBindings": { - "value": true - } - }, - { - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "text": "

šŸ–‹ļø The table has an 'Edit' row action which opens a modal.

\nšŸ”Œ The modal contains input widgets with default values bound to the {{\"{{ usersTable.selectedRow }}\"}}.

\nšŸ”˜ The updateButton in the modal executes the\nupdateUser Query, executes the getUsersToEdit Query onSuccess and then closes the modal.

\nāœšŸ» This workflow which needs more than 2 steps is configured by converting the onClick field to JS.

\n

", - "textStyle": "BODY", - "textAlign": "LEFT", - "widgetName": "Text10", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 74, - "parentRowSpace": 40, - "leftColumn": 0, - "rightColumn": 8, - "topRow": 14, - "bottomRow": 21, - "parentId": "0", - "widgetId": "m7i35s4wii", - "dynamicBindings": { - "value": true, - "text": true, - "isVisible": true - }, - "dynamicProperties": { - "isVisible": true - } - }, - { - "isVisible": true, - "text": "šŸ‘¤ Users", - "textStyle": "HEADING", - "textAlign": "LEFT", - "widgetName": "Text17", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 74, - "parentRowSpace": 40, - "leftColumn": 0, - "rightColumn": 4, - "topRow": 2, - "bottomRow": 3, - "parentId": "0", - "widgetId": "i53n9ij8oe", - "dynamicBindings": { - "value": true - } - }, - { - "isVisible": "{{appsmith.mode === \"EDIT\"}}", - "text": "

šŸ” Inspect the table properties & the modal (Click Edit).

🌟 Add a gender field to the modal & connect it to the updateUser Query.

", - "textStyle": "BODY", - "textAlign": "LEFT", - "widgetName": "Text19", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 74, - "parentRowSpace": 40, - "leftColumn": 9, - "rightColumn": 16, - "topRow": 14, - "bottomRow": 17, - "parentId": "0", - "widgetId": "3ln6v3fwe7", - "dynamicBindings": { - "value": true, - "isVisible": true - }, - "shouldScroll": true, - "dynamicProperties": { - "isVisible": true - } - } - ] - }, - "layoutOnLoadActions": [ - [ - { - "name": "getUsersToEdit", - "pluginType": "DB", - "jsonPathKeys": ["(usersTable.pageNo - 1) * 5"], - "timeoutInMillisecond": 10000 - } - ] - ], - "publishedLayoutOnLoadActions": [ - [ - { - "name": "getUsersToEdit", - "pluginType": "DB", - "jsonPathKeys": ["(usersTable.pageNo - 1) * 5"], - "timeoutInMillisecond": 10000 - } - ] - ], - "widgetNames": [ - "Text9", - "edit_user_modal", - "Button1", - "Text8", - "Text7", - "Text6", - "Text5", - "Text4", - "Text3", - "Text2", - "Text1", - "Icon1", - "usersTable", - "dobPicker", - "Text18", - "Text19", - "nameInput", - "Text17", - "emailInput", - "MainContainer", - "Text10", - "Canvas1", - "Button2", - "roleDropdown", - "addressInput" - ], - "deleted": false, - "policies": [] - } - ], - "deleted": false, - "policies": [], - "_class": "com.appsmith.server.domains.Page" - } - ], - "deleted": false, - "policies": [], - "_class": "com.appsmith.server.domains.Application" - } - ] -} diff --git a/app/server/appsmith-server/src/test/java/com/appsmith/server/controllers/ApplicationControllerTest.java b/app/server/appsmith-server/src/test/java/com/appsmith/server/controllers/ApplicationControllerTest.java index c6b1d5d1c5..09c30c0d6d 100644 --- a/app/server/appsmith-server/src/test/java/com/appsmith/server/controllers/ApplicationControllerTest.java +++ b/app/server/appsmith-server/src/test/java/com/appsmith/server/controllers/ApplicationControllerTest.java @@ -77,7 +77,7 @@ public class ApplicationControllerTest { webTestClient .post() - .uri(Url.APPLICATION_URL + "/import/orgId") + .uri(Url.APPLICATION_URL + "/import/workspaceId") .contentType(MediaType.MULTIPART_FORM_DATA) .body(BodyInserters.fromMultipartData(bodyBuilder.build())) .exchange() @@ -108,7 +108,7 @@ public class ApplicationControllerTest { webTestClient .post() - .uri(Url.APPLICATION_URL + "/import/orgId") + .uri(Url.APPLICATION_URL + "/import/workspaceId") .contentType(MediaType.MULTIPART_FORM_DATA) .body(BodyInserters.fromMultipartData(bodyBuilder.build())) .exchange() diff --git a/app/server/appsmith-server/src/test/java/com/appsmith/server/helpers/GitFileUtilsTest.java b/app/server/appsmith-server/src/test/java/com/appsmith/server/helpers/GitFileUtilsTest.java index 819d4e06de..a92ce81d55 100644 --- a/app/server/appsmith-server/src/test/java/com/appsmith/server/helpers/GitFileUtilsTest.java +++ b/app/server/appsmith-server/src/test/java/com/appsmith/server/helpers/GitFileUtilsTest.java @@ -189,10 +189,10 @@ public class GitFileUtilsTest { Mockito.when(fileInterface.saveApplicationToGitRepo( Mockito.any(Path.class), Mockito.any(ApplicationGitReference.class), Mockito.anyString())) - .thenReturn(Mono.just(Path.of("orgId", "appId", "repoName"))); + .thenReturn(Mono.just(Path.of("workspaceId", "appId", "repoName"))); Mono resultMono = commonGitFileUtils.saveArtifactToLocalRepoWithAnalytics( - Path.of("orgId/appId/repoName"), validAppJson, "gitFileTest"); + Path.of("workspaceId/appId/repoName"), validAppJson, "gitFileTest"); StepVerifier.create(resultMono) .assertNext(path -> { @@ -246,7 +246,7 @@ public class GitFileUtilsTest { Mono resultMono = commonGitFileUtils .reconstructArtifactExchangeJsonFromGitRepoWithAnalytics( - "orgId", "appId", "repoName", "branch", ArtifactType.APPLICATION) + "workspaceId", "appId", "repoName", "branch", ArtifactType.APPLICATION) .map(artifactExchangeJson -> (ApplicationJson) artifactExchangeJson) .cache(); diff --git a/app/server/appsmith-server/src/test/java/com/appsmith/server/services/ce/ActionServiceCE_Test.java b/app/server/appsmith-server/src/test/java/com/appsmith/server/services/ce/ActionServiceCE_Test.java index 3c46097d57..ee5934ede4 100644 --- a/app/server/appsmith-server/src/test/java/com/appsmith/server/services/ce/ActionServiceCE_Test.java +++ b/app/server/appsmith-server/src/test/java/com/appsmith/server/services/ce/ActionServiceCE_Test.java @@ -1418,45 +1418,6 @@ public class ActionServiceCE_Test { .verifyComplete(); } - @Test - @WithUserDetails(value = "api_user") - public void updateAction_withoutWorkspaceId_withOrganizationId() { - - Mockito.when(pluginExecutorHelper.getPluginExecutor(Mockito.any())) - .thenReturn(Mono.just(new MockPluginExecutor())); - - ActionDTO action = new ActionDTO(); - action.setName("validAction_nestedDatasource"); - action.setPageId(testPage.getId()); - action.setExecuteOnLoad(true); - ActionConfiguration actionConfiguration = new ActionConfiguration(); - actionConfiguration.setHttpMethod(HttpMethod.GET); - action.setActionConfiguration(actionConfiguration); - action.setDatasource(datasource); - - Mono createActionMono = - layoutActionService.createSingleAction(action, Boolean.FALSE).cache(); - - ActionDTO updateAction = new ActionDTO(); - Datasource nestedDatasource = new Datasource(); - nestedDatasource.setOrganizationId(workspaceId); - nestedDatasource.setName("DEFAULT_REST_DATASOURCE"); - nestedDatasource.setPluginId(datasource.getPluginId()); - nestedDatasource.setDatasourceConfiguration(new DatasourceConfiguration()); - - updateAction.setDatasource(nestedDatasource); - Mono actionMono = createActionMono.flatMap( - savedAction -> layoutActionService.updateAction(savedAction.getId(), updateAction)); - - StepVerifier.create(actionMono) - .assertNext(updatedAction -> { - Datasource datasource1 = updatedAction.getDatasource(); - assertThat(datasource1.getWorkspaceId()).isNotNull(); - assertThat(datasource1.getInvalids()).isEmpty(); - }) - .verifyComplete(); - } - @Test @WithUserDetails("api_user") public void validateAndSaveActionToRepository_noDatasourceEditPermission() { diff --git a/app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/valid-application-with-page-removed.json b/app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/valid-application-with-page-removed.json index 6bede42fba..918a28d59c 100644 --- a/app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/valid-application-with-page-removed.json +++ b/app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/valid-application-with-page-removed.json @@ -2,7 +2,7 @@ "clientSchemaVersion": 1, "serverSchemaVersion": 1, "exportedApplication": { - "name": "importApplicationIntoOrganization_pageRemovedInBranchApplication_Success", + "name": "importApplicationIntoWorkspace_pageRemovedInBranchApplication_Success", "isPublic": false, "appIsExample": false, "unreadCommentThreads": 0,