diff --git a/.github/workflows/pr-develop-branch.yml b/.github/workflows/pr-develop-branch.yml index 6764de0e..acff6d97 100644 --- a/.github/workflows/pr-develop-branch.yml +++ b/.github/workflows/pr-develop-branch.yml @@ -1,186 +1,102 @@ -# Unique name for this workflow name: Validate PR on develop branch - -# Definition when the workflow should run -on: - # The workflow will run whenever an event happens on a pull request - pull_request: - # The events are that a PR is opened, or when a commit is pushed - # to a branch that has an existing pull request - types: [opened, synchronize] - # The branches filter allows to specify that this workflow should only - # run if the branch name is "develop". This way we prevent this workflow - # from running when PRs are opened on other branches - branches: [ develop ] - # We only care about changes to the force-app directory, which is the - # root directory of the sfdx project. This prevents the job from running - # when changing non-salesforce files (like this yml file). - paths: - - 'force-app/**' - - -# Jobs to be executed when the above conditions are met +'on': + pull_request: + types: + - opened + - synchronize + branches: + - development + paths: + - force-app/** jobs: - # This is the name of the job. You can give it whatever name you want - validate-deployment-on-develop-org: - # As mentioned in the blog post, this job runs inside a VM. Here we - # can specify which OS this VM should run on. - # In this case, we are going to run our commands on the latest version - # of ubuntu - runs-on: ubuntu-latest - if: ${{ github.actor != 'dependabot[bot]' }} - steps: - # Now we install nodejs in the VM, and specify version 14 - - uses: actions/setup-node@v3 - with: - node-version: '14' - - # The idea is that the VM can access your remote repository - # because your repository is an sfdx project. - # This is a default action that allows us to enter the root - # directory of the repository - - # Make sure to specify fetch-depth:0. This allows us to - # access previous commits that have been pushed to the repository. - - # We'll need this later when we try to figure out which metadata has - # changed between commits, so that we can only deploy that metadata - # to the destination org - - - name: 'Checkout source code' - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - # Now, we need a way to let the developer specify which tests to run, which - # could be all tests or just the tests relevant to their deployment. - - # To do this, we can ask the developer to name their test classes in the - # body of the PR, using the following syntax - - # Apex::[CommunitiesLoginControllerTest,MyProfilePageControllerTest]::Apex - # or Apex::[all]::Apex to run all tests - - # This special delimeter can be added to the PR template so that your - # team doesn't have to remember the syntax. - - # Once a developer has specified a list of classes to run, we need to be able - # to extract this information from the PR, and pass it on the the VM. - - - name: 'Read PR Body' - env: - # The pull request body is available through the github context object - # we put the body of the pull request in an env variable (only available to this step) - PR_BODY: ${{github.event.pull_request.body}} - - # Here we print the content of the environment variable and - # pipe to a a text file. - - # Then we call the local script parsePR.js, which will create - # a new file called testsToRun.txt. This file will have the list - # of tests to run separated by a comma - - # Finally, we add the list of tests to the $GITHUB_ENV variable - # as this allows us to reference the list in a subsequent step. If you - # were using a normal env variable, its value would not be available outside this step. - run: | - echo $PR_BODY > ./pr_body.txt - node ./parsePR.js - TESTS=$(cat testsToRun.txt) - echo "APEX_TESTS=$TESTS" >> $GITHUB_ENV - - # Now Install Salesforce CLI - - name: 'Install Salesforce CLI' - run: | - wget https://developer.salesforce.com/media/salesforce-cli/sfdx/channels/stable/sfdx-linux-x64.tar.xz - mkdir ~/sfdx - tar xJf sfdx-linux-x64.tar.xz -C ~/sfdx --strip-components 1 - echo "$HOME/sfdx/bin" >> $GITHUB_PATH - ~/sfdx/bin/sfdx version - - # Then we install the SFDX-Git-Delta plugin - https://github.com/scolladon/sfdx-git-delta - # This is an awesome plugin that allows us to extract a package.xml with the metadata - # that has changed between commits. I highly recommend going over the github readme - # for more information on how this works. - - - name: 'Installing sfdx git delta' - run: | - echo y | sfdx plugins:install sfdx-git-delta - sfdx plugins - - # Install java as it is required for the next step - - name: 'Installing java' - run: | - sudo apt-get update - sudo apt install default-jdk - - # Install SFDX scanner - - name: 'Installing SFDX scanner' - run: sfdx plugins:install @salesforce/sfdx-scanner - - # Prior to setting up this workflow, you have to create a Github Secret - # that contains the sfdx url of the integration/qa org. - - # The steps to generate the url are here - # https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_auth_sfdxurl.htm - - # This URL can then be used with the sfdx auth:sfdxurl:store to authenticate - # the sfdx project in the repositry, against the org from which the URL - # was generated from. This works just like that, there's no need to create - # connected apps or any else. - - # The URL is stored in the Github Secret named SFDX_INTEGRATION_URL - # so here we store the URL into a text file - - name: 'Populate auth file with SFDX_URL secret of integration org' - shell: bash - run: | - echo ${{ secrets.SFDX_INTEGRATION_URL}} > ./SFDX_INTEGRATION_URL.txt - - # Authenticate to org using the URL stored in the text file - - name: 'Authenticate to Integration Org' - run: sfdx auth:sfdxurl:store -f ./SFDX_INTEGRATION_URL.txt -s -a integration - - # We use SFDX Git Delta to create a directory with only the metadata that has changed. - # this allows us to deploy only those changes, as opposed to deploying the entire branch. - # This helps reducing deployment times - - name: 'Create delta packages for new, modified or deleted metadata' - run: | - mkdir changed-sources - sfdx sgd:source:delta --to "HEAD" --from "HEAD^" --output changed-sources/ --generate-delta --source force-app/ - - # Now we can use the sfdx scanner to scan the code in the delta directory - # The output of the scan is stored in a file called apexScanResults.sarif - - # The .sarif file can later be uploaded to github, so that we can see the - # results of the scan directly from the PR. - - - name: 'Scan code' - run: | - cd changed-sources - sfdx scanner:run --format sarif --target './**/*.cls' --category "Design,Best Practices,Performance" --outfile 'apexScanResults.sarif' - cd .. - - # Now we upload the .sarif file as explained in the previous step - - name: Upload SARIF file - uses: github/codeql-action/upload-sarif@v1 - with: - sarif_file: changed-sources/apexScanResults.sarif - - # We do a check-only deploy and we only run the tests specified in the PR - # If the env variable does not equal 'all', we know that there is a list of - # tests that can be run - - - name: 'Check-only deploy delta changes - run specified tests' - if: ${{ env.APEX_TESTS != 'all' }} - run: | - echo ${{env.APEX_TESTS}} - sfdx force:source:deploy -p "changed-sources/force-app" --checkonly --testlevel RunSpecifiedTests --runtests ${{env.APEX_TESTS}} --json - - # If the env variable equals all, we run all tests - - name: 'Check-only deploy delta changes - run all tests' - if: ${{ env.APEX_TESTS == 'all' }} - run: | - sfdx force:source:deploy -p "changed-sources/force-app" --checkonly --testlevel RunLocalTests --json - - - name: 'Deploy destructive changes (if any)' - run: sfdx force:mdapi:deploy -d "changed-sources/destructiveChanges" --checkonly --ignorewarnings + validate-deployment-on-develop-org: + runs-on: ubuntu-latest + if: '${{ github.actor != ''dependabot[bot]'' }}' + steps: + - uses: actions/setup-node@v3 + with: + node-version: '14' + - name: Checkout source code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Read PR Body + env: + PR_BODY: '${{github.event.pull_request.body}}' + run: | + echo $PR_BODY > ./pr_body.txt + node ./parsePR.js + TESTS=$(cat testsToRun.txt) + echo "APEX_TESTS=$TESTS" >> $GITHUB_ENV + - name: Install Salesforce CLI + run: > + wget + https://developer.salesforce.com/media/salesforce-cli/sfdx/channels/stable/sfdx-linux-x64.tar.xz + + mkdir ~/sfdx + + tar xJf sfdx-linux-x64.tar.xz -C ~/sfdx --strip-components 1 + + echo "$HOME/sfdx/bin" >> $GITHUB_PATH + + ~/sfdx/bin/sfdx version + - name: Installing sfdx git delta + run: | + echo y | sfdx plugins:install sfdx-git-delta + sfdx plugins + - name: Installing java + run: | + sudo apt-get update + sudo apt install default-jdk + - name: Installing SFDX scanner + run: 'sfdx plugins:install @salesforce/sfdx-scanner' + - name: Install the JEST Plugin + run: npm install @salesforce/sfdx-lwc-jest --save-dev + - name: Populate auth file with SFDX_URL secret of integration org + shell: bash + run: | + echo ${{ secrets.SFDX_INTEGRATION_URL}} > ./SFDX_INTEGRATION_URL.txt + - name: Authenticate to Integration Org + run: >- + sfdx auth:sfdxurl:store -f ./SFDX_INTEGRATION_URL.txt -s -a + integration + - name: 'Create delta packages for new, modified or deleted metadata' + run: > + mkdir changed-sources + + sfdx sgd:source:delta --to "HEAD" --from "HEAD^" --output + changed-sources/ --generate-delta --source force-app/ + - name: Scan code + run: > + cd changed-sources + + sfdx scanner:run --format sarif --target './**/*.cls' --category + "Design,Best Practices,Performance" --outfile + 'apexScanResults.sarif' + + cd .. + - name: Upload SARIF file + uses: github/codeql-action/upload-sarif@v1 + with: + sarif_file: changed-sources/apexScanResults.sarif + - name: Check-only deploy delta changes - run specified tests + if: '${{ env.APEX_TESTS != ''all'' }}' + run: > + echo ${{env.APEX_TESTS}} + + sfdx force:source:deploy -p "changed-sources/force-app" --checkonly + --testlevel RunSpecifiedTests --runtests ${{env.APEX_TESTS}} --json + - name: Check-only deploy delta changes - run all tests + if: '${{ env.APEX_TESTS == ''all'' }}' + run: > + sfdx force:source:deploy -p "changed-sources/force-app" --checkonly + --testlevel RunLocalTests --json + - name: Deploy destructive changes (if any) + run: >- + sfdx force:mdapi:deploy -d "changed-sources/destructiveChanges" + --checkonly --ignorewarnings + - name: Run the Jest coverage script + if: github.event.pull_request.merged == true + run: | + npm run test:unit:coverage + echo "Run the Jest coverage script" diff --git a/force-app/main/default/aura/pageTemplate_2_7_3/pageTemplate_2_7_3.cmp b/force-app/main/default/aura/pageTemplate_2_7_3/pageTemplate_2_7_3.cmp deleted file mode 100644 index 23336321..00000000 --- a/force-app/main/default/aura/pageTemplate_2_7_3/pageTemplate_2_7_3.cmp +++ /dev/null @@ -1,27 +0,0 @@ - - - - - -
- - - {!v.left} - - - {!v.center} - - - {!v.right} - - -
-
\ No newline at end of file diff --git a/force-app/main/default/aura/pageTemplate_2_7_3/pageTemplate_2_7_3.cmp-meta.xml b/force-app/main/default/aura/pageTemplate_2_7_3/pageTemplate_2_7_3.cmp-meta.xml deleted file mode 100644 index 78a65f5d..00000000 --- a/force-app/main/default/aura/pageTemplate_2_7_3/pageTemplate_2_7_3.cmp-meta.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 53.0 - A Lightning Component Bundle - diff --git a/force-app/main/default/aura/pageTemplate_2_7_3/pageTemplate_2_7_3.css b/force-app/main/default/aura/pageTemplate_2_7_3/pageTemplate_2_7_3.css deleted file mode 100644 index 76229719..00000000 --- a/force-app/main/default/aura/pageTemplate_2_7_3/pageTemplate_2_7_3.css +++ /dev/null @@ -1,3 +0,0 @@ -.THIS .center { - padding: 0 12px; -} \ No newline at end of file diff --git a/force-app/main/default/aura/pageTemplate_2_7_3/pageTemplate_2_7_3.design b/force-app/main/default/aura/pageTemplate_2_7_3/pageTemplate_2_7_3.design deleted file mode 100644 index a7402cdd..00000000 --- a/force-app/main/default/aura/pageTemplate_2_7_3/pageTemplate_2_7_3.design +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/force-app/main/default/aura/pageTemplate_2_7_3/pageTemplate_2_7_3.svg b/force-app/main/default/aura/pageTemplate_2_7_3/pageTemplate_2_7_3.svg deleted file mode 100644 index 791b3c7e..00000000 --- a/force-app/main/default/aura/pageTemplate_2_7_3/pageTemplate_2_7_3.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/force-app/main/default/classes/ChangePasswordController.cls b/force-app/main/default/classes/ChangePasswordController.cls deleted file mode 100644 index c87dc8b0..00000000 --- a/force-app/main/default/classes/ChangePasswordController.cls +++ /dev/null @@ -1,15 +0,0 @@ -/** - * An apex page controller that exposes the change password functionality - */ -public with sharing class ChangePasswordController { - public String oldPassword {get; set;} - public String newPassword {get; set;} - public String verifyNewPassword {get; set;} - - public PageReference changePassword() { - System.debug(true);//change 344565 - return Site.changePassword(newPassword, verifyNewPassword, oldpassword); - } - - public ChangePasswordController() {} -} \ No newline at end of file diff --git a/force-app/main/default/classes/ChangePasswordControllerTest.cls b/force-app/main/default/classes/ChangePasswordControllerTest.cls deleted file mode 100644 index 2814e421..00000000 --- a/force-app/main/default/classes/ChangePasswordControllerTest.cls +++ /dev/null @@ -1,14 +0,0 @@ -/** - * An apex page controller that exposes the change password functionality - */ -@IsTest public with sharing class ChangePasswordControllerTest { - @IsTest(SeeAllData=true) public static void testChangePasswordController() { - // Instantiate a new controller with all parameters in the page - ChangePasswordController controller = new ChangePasswordController(); - controller.oldPassword = '123456'; - controller.newPassword = 'qwerty1'; - controller.verifyNewPassword = 'qwerty1'; - - System.assertEquals(controller.changePassword(),null); - } -} \ No newline at end of file diff --git a/force-app/main/default/classes/ChangePasswordControllerTest.cls-meta.xml b/force-app/main/default/classes/ChangePasswordControllerTest.cls-meta.xml deleted file mode 100644 index f928c8e5..00000000 --- a/force-app/main/default/classes/ChangePasswordControllerTest.cls-meta.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 53.0 - Active - diff --git a/force-app/main/default/classes/CommunitiesLandingController.cls b/force-app/main/default/classes/CommunitiesLandingController.cls deleted file mode 100644 index 9633c5ac..00000000 --- a/force-app/main/default/classes/CommunitiesLandingController.cls +++ /dev/null @@ -1,12 +0,0 @@ -/** - * An apex page controller that takes the user to the right start page based on credentials or lack thereof - */ -public with sharing class CommunitiesLandingController { - - // Code we will invoke on page load. - public PageReference forwardToStartPage() { - return Network.communitiesLanding(); - } - - public CommunitiesLandingController() {} -} \ No newline at end of file diff --git a/force-app/main/default/classes/CommunitiesLandingController.cls-meta.xml b/force-app/main/default/classes/CommunitiesLandingController.cls-meta.xml deleted file mode 100644 index f928c8e5..00000000 --- a/force-app/main/default/classes/CommunitiesLandingController.cls-meta.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 53.0 - Active - diff --git a/force-app/main/default/classes/CommunitiesLandingControllerTest.cls b/force-app/main/default/classes/CommunitiesLandingControllerTest.cls deleted file mode 100644 index 84b5643d..00000000 --- a/force-app/main/default/classes/CommunitiesLandingControllerTest.cls +++ /dev/null @@ -1,18 +0,0 @@ -/** - * An apex page controller that takes the user to the right start page based on credentials or lack thereof - */ -@IsTest public with sharing class CommunitiesLandingControllerTest { - @IsTest(SeeAllData=true) public static void testCommunitiesLandingController() { - // Instantiate a new controller with all parameters in the page - CommunitiesLandingController controller = new CommunitiesLandingController(); - PageReference pageRef = controller.forwardToStartPage(); - //PageRef is either null or an empty object in test context - if(pageRef != null){ - String url = pageRef.getUrl(); - if(url != null){ - System.assertEquals(true, String.isEmpty(url)); - //show up in perforce - } - } - } -} \ No newline at end of file diff --git a/force-app/main/default/classes/CommunitiesLoginController.cls b/force-app/main/default/classes/CommunitiesLoginController.cls deleted file mode 100644 index 35ab098e..00000000 --- a/force-app/main/default/classes/CommunitiesLoginController.cls +++ /dev/null @@ -1,14 +0,0 @@ -/** - * An apex page controller that exposes the site login functionality - */ -global with sharing class CommunitiesLoginController { - - global CommunitiesLoginController () {} - - // Code we will invoke on page load. - global PageReference forwardToAuthPage() { - String startUrl = System.currentPageReference().getParameters().get('startURL'); - String displayType = System.currentPageReference().getParameters().get('display'); - return Network.forwardToAuthPage(startUrl, displayType); - } -} \ No newline at end of file diff --git a/force-app/main/default/classes/CommunitiesLoginController.cls-meta.xml b/force-app/main/default/classes/CommunitiesLoginController.cls-meta.xml deleted file mode 100644 index f928c8e5..00000000 --- a/force-app/main/default/classes/CommunitiesLoginController.cls-meta.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 53.0 - Active - diff --git a/force-app/main/default/classes/CommunitiesLoginControllerTest.cls b/force-app/main/default/classes/CommunitiesLoginControllerTest.cls deleted file mode 100644 index b892fdce..00000000 --- a/force-app/main/default/classes/CommunitiesLoginControllerTest.cls +++ /dev/null @@ -1,10 +0,0 @@ -/** - * An apex page controller that exposes the site login functionality - */ -@IsTest global with sharing class CommunitiesLoginControllerTest { - @IsTest(SeeAllData=true) - global static void testCommunitiesLoginController () { - CommunitiesLoginController controller = new CommunitiesLoginController(); - System.assertEquals(null, controller.forwardToAuthPage()); - } -} \ No newline at end of file diff --git a/force-app/main/default/classes/CommunitiesLoginControllerTest.cls-meta.xml b/force-app/main/default/classes/CommunitiesLoginControllerTest.cls-meta.xml deleted file mode 100644 index f928c8e5..00000000 --- a/force-app/main/default/classes/CommunitiesLoginControllerTest.cls-meta.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 53.0 - Active - diff --git a/force-app/main/default/classes/CommunitiesSelfRegConfirmController.cls b/force-app/main/default/classes/CommunitiesSelfRegConfirmController.cls deleted file mode 100644 index d98d1fef..00000000 --- a/force-app/main/default/classes/CommunitiesSelfRegConfirmController.cls +++ /dev/null @@ -1,7 +0,0 @@ -/** - * An apex page controller that takes the user to the right start page based on credentials or lack thereof - */ -public with sharing class CommunitiesSelfRegConfirmController { - - public CommunitiesSelfRegConfirmController() {} -} \ No newline at end of file diff --git a/force-app/main/default/classes/CommunitiesSelfRegConfirmController.cls-meta.xml b/force-app/main/default/classes/CommunitiesSelfRegConfirmController.cls-meta.xml deleted file mode 100644 index f928c8e5..00000000 --- a/force-app/main/default/classes/CommunitiesSelfRegConfirmController.cls-meta.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 53.0 - Active - diff --git a/force-app/main/default/classes/CommunitiesSelfRegConfirmControllerTest.cls b/force-app/main/default/classes/CommunitiesSelfRegConfirmControllerTest.cls deleted file mode 100644 index 18a60bb1..00000000 --- a/force-app/main/default/classes/CommunitiesSelfRegConfirmControllerTest.cls +++ /dev/null @@ -1,9 +0,0 @@ -/** - * An apex page controller that takes the user to the right start page based on credentials or lack thereof - */ -@IsTest public with sharing class CommunitiesSelfRegConfirmControllerTest { - @IsTest(SeeAllData=true) public static void testCommunitiesSelfRegConfirmController() { - // Instantiate a new controller with all parameters in the page - CommunitiesSelfRegConfirmController controller = new CommunitiesSelfRegConfirmController(); - } -} \ No newline at end of file diff --git a/force-app/main/default/classes/CommunitiesSelfRegConfirmControllerTest.cls-meta.xml b/force-app/main/default/classes/CommunitiesSelfRegConfirmControllerTest.cls-meta.xml deleted file mode 100644 index f928c8e5..00000000 --- a/force-app/main/default/classes/CommunitiesSelfRegConfirmControllerTest.cls-meta.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 53.0 - Active - diff --git a/force-app/main/default/classes/CommunitiesSelfRegController.cls b/force-app/main/default/classes/CommunitiesSelfRegController.cls deleted file mode 100644 index 3b738aa4..00000000 --- a/force-app/main/default/classes/CommunitiesSelfRegController.cls +++ /dev/null @@ -1,74 +0,0 @@ -/** - * An apex page controller that supports self registration of users in communities that allow self registration - */ -public class CommunitiesSelfRegController { - - public String firstName {get; set;} - public String lastName {get; set;} - public String email {get; set;} - public String password {get; set {password = value == null ? value : value.trim(); } } - public String confirmPassword {get; set { confirmPassword = value == null ? value : value.trim(); } } - public String communityNickname {get; set { communityNickname = value == null ? value : value.trim(); } } - - public CommunitiesSelfRegController() { - String expid = ApexPages.currentPage().getParameters().get('expid'); - if (expId != null) { - Site.setExperienceId(expId); - } - } - - private boolean isValidPassword() { - return password == confirmPassword; - } - - public PageReference registerUser() { - - // it's okay if password is null - we'll send the user a random password in that case - if (!isValidPassword()) { - ApexPages.Message msg = new ApexPages.Message(ApexPages.Severity.ERROR, Label.site.passwords_dont_match); - ApexPages.addMessage(msg); - return null; - } - - String profileId = null; // To be filled in by customer. - String roleEnum = null; // To be filled in by customer. - String accountId = ''; // To be filled in by customer. - - String userName = email; - - User u = new User(); - u.Username = userName; - u.Email = email; - u.FirstName = firstName; - u.LastName = lastName; - u.CommunityNickname = communityNickname; - u.ProfileId = profileId; - - String userId; - - try { - userId = Site.createExternalUser(u, accountId, password); - } catch(Site.ExternalUserCreateException ex) { - List errors = ex.getDisplayMessages(); - for (String error : errors) { - ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.ERROR, error)); - } - - // This message is used for debugging. Do not display this in the UI to the end user. - // It has the information around why the user creation failed. - System.debug(ex.getMessage()); - } - - if (userId != null) { - if (password != null && password.length() > 1) { - return Site.login(userName, password, ApexPages.currentPage().getParameters().get('startURL')); - } - else { - PageReference page = System.Page.CommunitiesSelfRegConfirm; - page.setRedirect(true); - return page; - } - } - return null; - } -} \ No newline at end of file diff --git a/force-app/main/default/classes/CommunitiesSelfRegController.cls-meta.xml b/force-app/main/default/classes/CommunitiesSelfRegController.cls-meta.xml deleted file mode 100644 index f928c8e5..00000000 --- a/force-app/main/default/classes/CommunitiesSelfRegController.cls-meta.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 53.0 - Active - diff --git a/force-app/main/default/classes/CommunitiesSelfRegControllerTest.cls b/force-app/main/default/classes/CommunitiesSelfRegControllerTest.cls deleted file mode 100644 index bda9c05b..00000000 --- a/force-app/main/default/classes/CommunitiesSelfRegControllerTest.cls +++ /dev/null @@ -1,20 +0,0 @@ -/** - * An apex page controller that supports self registration of users in communities that allow self registration - */ -@IsTest public with sharing class CommunitiesSelfRegControllerTest { - @IsTest(SeeAllData=true) - public static void testCommunitiesSelfRegController() { - CommunitiesSelfRegController controller = new CommunitiesSelfRegController(); - controller.firstName = 'FirstName'; - controller.lastName = 'LastName'; - controller.email = 'test@force.com'; - controller.communityNickname = 'test'; - - // registerUser will always return null when the page isn't accessed as a guest user - System.assert(controller.registerUser() == null); - - controller.password = 'abcd1234'; - controller.confirmPassword = 'abcd123'; - System.assert(controller.registerUser() == null); - } -} \ No newline at end of file diff --git a/force-app/main/default/classes/CommunitiesSelfRegControllerTest.cls-meta.xml b/force-app/main/default/classes/CommunitiesSelfRegControllerTest.cls-meta.xml deleted file mode 100644 index f928c8e5..00000000 --- a/force-app/main/default/classes/CommunitiesSelfRegControllerTest.cls-meta.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 53.0 - Active - diff --git a/force-app/main/default/classes/Covid19.cls b/force-app/main/default/classes/Covid19.cls new file mode 100644 index 00000000..418c8fcf --- /dev/null +++ b/force-app/main/default/classes/Covid19.cls @@ -0,0 +1,46 @@ +public class Covid19 { + + public Integer recoveredInArea=0; + public static Integer recoveredcountry=0; + + //added comment to test changes from main org + //more deletion + //tmbulr girls geazy + //him&I +//ajbvshuqsvyuhgfhufyuyuvd + //some demop + //asnaubs +//checking fr full without class name + ///asguiageyuawgdyuvgd + + /* public Covid19() + { + system.debug('blank construtor is called'); + } + */ + public Covid19(Integer recoveredInArea) + { + + system.debug('construtor is called'); + if(recoveredInArea<0) + { + recoveredInArea=0; + } + else{ + this.recoveredInArea=recoveredInArea; + recoveredcountry+=recoveredInArea; + } + } + public void treatpatient() + { + recoveredInArea++; + recoveredcountry++; + + } + + public Integer gettreated() + { + return recoveredInArea; + } + +} \ No newline at end of file diff --git a/force-app/main/default/classes/ChangePasswordController.cls-meta.xml b/force-app/main/default/classes/Covid19.cls-meta.xml similarity index 80% rename from force-app/main/default/classes/ChangePasswordController.cls-meta.xml rename to force-app/main/default/classes/Covid19.cls-meta.xml index f928c8e5..754ecb15 100644 --- a/force-app/main/default/classes/ChangePasswordController.cls-meta.xml +++ b/force-app/main/default/classes/Covid19.cls-meta.xml @@ -1,5 +1,5 @@ - 53.0 + 57.0 Active diff --git a/force-app/main/default/classes/Covid19Test.cls b/force-app/main/default/classes/Covid19Test.cls new file mode 100644 index 00000000..0f848cab --- /dev/null +++ b/force-app/main/default/classes/Covid19Test.cls @@ -0,0 +1,37 @@ +@isTest +public class Covid19Test { + @isTest + public static void treatpatienttest() + { + //create instance of the class + Covid19 jaipur=new Covid19(10); + + //check if count is 10 or not + Integer treated = jaipur.gettreated(); + System.assertEquals(10, treated, 'check value does not match'); + + Covid19 hyd=new Covid19(112); + + //check if count is 10 or not + Integer treatedhyd = hyd.gettreated(); + System.assertEquals(112, treatedhyd, 'check value does not match'); + + + System.assertEquals(122, Covid19.recoveredcountry, 'check value does not match'); + jaipur.treatpatient(); + treated = jaipur.gettreated(); + system.assert(treated==11, 'treated count does not match'); + system.assert(Covid19.recoveredcountry==123, 'treated count does not match'); + + } + @isTest + public static void treatpatienttestnegative() + { + //create instance of the class + Covid19 jaipur=new Covid19(-10); + + //check if count is 10 or not + Integer treated = jaipur.gettreated(); + System.assertEquals(0, treated, 'check value does not match'); + } +} \ No newline at end of file diff --git a/force-app/main/default/classes/CommunitiesLandingControllerTest.cls-meta.xml b/force-app/main/default/classes/Covid19Test.cls-meta.xml similarity index 80% rename from force-app/main/default/classes/CommunitiesLandingControllerTest.cls-meta.xml rename to force-app/main/default/classes/Covid19Test.cls-meta.xml index f928c8e5..754ecb15 100644 --- a/force-app/main/default/classes/CommunitiesLandingControllerTest.cls-meta.xml +++ b/force-app/main/default/classes/Covid19Test.cls-meta.xml @@ -1,5 +1,5 @@ - 53.0 + 57.0 Active diff --git a/force-app/main/default/classes/ForgotPasswordController.cls b/force-app/main/default/classes/ForgotPasswordController.cls deleted file mode 100644 index 480df8bc..00000000 --- a/force-app/main/default/classes/ForgotPasswordController.cls +++ /dev/null @@ -1,19 +0,0 @@ -/** - * An apex page controller that exposes the site forgot password functionality - */ -public with sharing class ForgotPasswordController { - public String username {get; set;} - - public ForgotPasswordController() {} - - public PageReference forgotPassword() { - boolean success = Site.forgotPassword(username); - PageReference pr = Page.ForgotPasswordConfirm; - pr.setRedirect(true); - - if (success) { - return pr; - } - return null; - } -} \ No newline at end of file diff --git a/force-app/main/default/classes/ForgotPasswordController.cls-meta.xml b/force-app/main/default/classes/ForgotPasswordController.cls-meta.xml deleted file mode 100644 index f928c8e5..00000000 --- a/force-app/main/default/classes/ForgotPasswordController.cls-meta.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 53.0 - Active - diff --git a/force-app/main/default/classes/ForgotPasswordControllerTest.cls b/force-app/main/default/classes/ForgotPasswordControllerTest.cls deleted file mode 100644 index 1712f2cd..00000000 --- a/force-app/main/default/classes/ForgotPasswordControllerTest.cls +++ /dev/null @@ -1,12 +0,0 @@ -/** - * An apex page controller that exposes the site forgot password functionality - */ -@IsTest public with sharing class ForgotPasswordControllerTest { - @IsTest(SeeAllData=true) public static void testForgotPasswordController() { - // Instantiate a new controller with all parameters in the page - ForgotPasswordController controller = new ForgotPasswordController(); - controller.username = 'test@salesforce.com'; - - System.assertEquals(controller.forgotPassword(),null); - } -} \ No newline at end of file diff --git a/force-app/main/default/classes/ForgotPasswordControllerTest.cls-meta.xml b/force-app/main/default/classes/ForgotPasswordControllerTest.cls-meta.xml deleted file mode 100644 index f928c8e5..00000000 --- a/force-app/main/default/classes/ForgotPasswordControllerTest.cls-meta.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 53.0 - Active - diff --git a/force-app/main/default/classes/HeroDetailsPositionCustomPicklist.cls b/force-app/main/default/classes/HeroDetailsPositionCustomPicklist.cls deleted file mode 100644 index 9d7fb173..00000000 --- a/force-app/main/default/classes/HeroDetailsPositionCustomPicklist.cls +++ /dev/null @@ -1,20 +0,0 @@ -global class HeroDetailsPositionCustomPicklist extends VisualEditor.DynamicPickList { - global override VisualEditor.DataRow getDefaultValue() { - VisualEditor.DataRow defaultValue = new VisualEditor.DataRow( - 'Right', - 'right' - ); - return defaultValue; - } - global override VisualEditor.DynamicPickListRows getValues() { - VisualEditor.DataRow value1 = new VisualEditor.DataRow('Left', 'left'); - VisualEditor.DataRow value2 = new VisualEditor.DataRow( - 'Right', - 'right' - ); - VisualEditor.DynamicPickListRows myValues = new VisualEditor.DynamicPickListRows(); - myValues.addRow(value1); - myValues.addRow(value2); - return myValues; - } -} \ No newline at end of file diff --git a/force-app/main/default/classes/HeroDetailsPositionCustomPicklist.cls-meta.xml b/force-app/main/default/classes/HeroDetailsPositionCustomPicklist.cls-meta.xml deleted file mode 100644 index f928c8e5..00000000 --- a/force-app/main/default/classes/HeroDetailsPositionCustomPicklist.cls-meta.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 53.0 - Active - diff --git a/force-app/main/default/classes/MyProfilePageController.cls b/force-app/main/default/classes/MyProfilePageController.cls deleted file mode 100644 index f3fe255d..00000000 --- a/force-app/main/default/classes/MyProfilePageController.cls +++ /dev/null @@ -1,53 +0,0 @@ -/** - * An apex class that updates portal user details. - Guest users are never able to access this page. - */ -public with sharing class MyProfilePageController { - - private User user; - private boolean isEdit = false; - - public User getUser() { - return user; - } - - public MyProfilePageController() { - user = [SELECT id, email, username, usertype, communitynickname, timezonesidkey, languagelocalekey, firstname, lastname, phone, title, - street, city, country, postalcode, state, localesidkey, mobilephone, extension, fax, contact.email - FROM User - WHERE id = :UserInfo.getUserId()]; - // guest users should never be able to access this page - if (user.usertype == 'GUEST') { - throw new NoAccessException(); - } - } - - public Boolean getIsEdit() { - return isEdit; - } - - public void edit() { - isEdit=true; - } - - public void save() { - try { - update user; - isEdit=false; - } catch(DmlException e) { - ApexPages.addMessages(e); - } - } - - public PageReference changePassword() { - return Page.ChangePassword; - } - - public void cancel() { - isEdit=false; - user = [SELECT id, email, username, communitynickname, timezonesidkey, languagelocalekey, firstname, lastname, phone, title, - street, city, country, postalcode, state, localesidkey, mobilephone, extension, fax, contact.email - FROM User - WHERE id = :UserInfo.getUserId()]; - } -} \ No newline at end of file diff --git a/force-app/main/default/classes/MyProfilePageController.cls-meta.xml b/force-app/main/default/classes/MyProfilePageController.cls-meta.xml deleted file mode 100644 index f928c8e5..00000000 --- a/force-app/main/default/classes/MyProfilePageController.cls-meta.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 53.0 - Active - diff --git a/force-app/main/default/classes/MyProfilePageControllerTest.cls b/force-app/main/default/classes/MyProfilePageControllerTest.cls deleted file mode 100644 index 1b59342e..00000000 --- a/force-app/main/default/classes/MyProfilePageControllerTest.cls +++ /dev/null @@ -1,55 +0,0 @@ -/** - * An apex class that updates details of a portal user. - Guest users are never able to access this page. - */ -@IsTest public with sharing class MyProfilePageControllerTest { - - @IsTest(SeeAllData=true) static void testSave() { - // Modify the test to query for a portal user that exists in your org - List existingPortalUsers = [SELECT id, profileId, userRoleId FROM User WHERE UserRoleId <> null AND UserType='CustomerSuccess']; - - if (existingPortalUsers.isEmpty()) { - User currentUser = [select id, title, firstname, lastname, email, phone, mobilephone, fax, street, city, state, postalcode, country - FROM User WHERE id =: UserInfo.getUserId()]; - MyProfilePageController controller = new MyProfilePageController(); - System.assertEquals(currentUser.Id, controller.getUser().Id, 'Did not successfully load the current user'); - System.assert(controller.getIsEdit() == false, 'isEdit should default to false'); - controller.edit(); - System.assert(controller.getIsEdit() == true); - controller.cancel(); - System.assert(controller.getIsEdit() == false); - - System.assert(Page.ChangePassword.getUrl().equals(controller.changePassword().getUrl())); - - String randFax = Math.rint(Math.random() * 1000) + '5551234'; - controller.getUser().Fax = randFax; - controller.save(); - System.assert(controller.getIsEdit() == false); - - currentUser = [Select id, fax from User where id =: currentUser.Id]; - System.assert(currentUser.fax == randFax); - } else { - User existingPortalUser = existingPortalUsers[0]; - String randFax = Math.rint(Math.random() * 1000) + '5551234'; - - System.runAs(existingPortalUser) { - MyProfilePageController controller = new MyProfilePageController(); - System.assertEquals(existingPortalUser.Id, controller.getUser().Id, 'Did not successfully load the current user'); - System.assert(controller.getIsEdit() == false, 'isEdit should default to false'); - controller.edit(); - System.assert(controller.getIsEdit() == true); - - controller.cancel(); - System.assert(controller.getIsEdit() == false); - - controller.getUser().Fax = randFax; - controller.save(); - System.assert(controller.getIsEdit() == false); - } - - // verify that the user was updated - existingPortalUser = [Select id, fax from User where id =: existingPortalUser.Id]; - System.assert(existingPortalUser.fax == randFax); - } - } -} \ No newline at end of file diff --git a/force-app/main/default/classes/MyProfilePageControllerTest.cls-meta.xml b/force-app/main/default/classes/MyProfilePageControllerTest.cls-meta.xml deleted file mode 100644 index f928c8e5..00000000 --- a/force-app/main/default/classes/MyProfilePageControllerTest.cls-meta.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 53.0 - Active - diff --git a/force-app/main/default/classes/OrderController.cls b/force-app/main/default/classes/OrderController.cls deleted file mode 100644 index 43b21f66..00000000 --- a/force-app/main/default/classes/OrderController.cls +++ /dev/null @@ -1,20 +0,0 @@ -public with sharing class OrderController { - //comment - @AuraEnabled(Cacheable=true) - public static Order_Item__c[] getOrderItems(Id orderId) { - return [ - SELECT - Id, - Qty_S__c, - Qty_M__c, - Qty_L__c, - Price__c, - Product__r.Name, - Product__r.MSRP__c, - Product__r.Picture_URL__c - FROM Order_Item__c - WHERE Order__c = :orderId - WITH SECURITY_ENFORCED - ]; - } -} \ No newline at end of file diff --git a/force-app/main/default/classes/OrderController.cls-meta.xml b/force-app/main/default/classes/OrderController.cls-meta.xml deleted file mode 100644 index f928c8e5..00000000 --- a/force-app/main/default/classes/OrderController.cls-meta.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 53.0 - Active - diff --git a/force-app/main/default/classes/PagedResult.cls b/force-app/main/default/classes/PagedResult.cls deleted file mode 100644 index 8adf0017..00000000 --- a/force-app/main/default/classes/PagedResult.cls +++ /dev/null @@ -1,13 +0,0 @@ -public with sharing class PagedResult { - @AuraEnabled - public Integer pageSize { get; set; } - - @AuraEnabled - public Integer pageNumber { get; set; } - - @AuraEnabled - public Integer totalItemCount { get; set; } - - @AuraEnabled - public Object[] records { get; set; } -} \ No newline at end of file diff --git a/force-app/main/default/classes/PagedResult.cls-meta.xml b/force-app/main/default/classes/PagedResult.cls-meta.xml deleted file mode 100644 index f928c8e5..00000000 --- a/force-app/main/default/classes/PagedResult.cls-meta.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 53.0 - Active - diff --git a/force-app/main/default/classes/ProductController.cls b/force-app/main/default/classes/ProductController.cls deleted file mode 100644 index f2bae2e2..00000000 --- a/force-app/main/default/classes/ProductController.cls +++ /dev/null @@ -1,84 +0,0 @@ -public with sharing class ProductController { - static Integer PAGE_SIZE = 9; - - public class Filters { - @AuraEnabled - public String searchKey { get; set; } - @AuraEnabled - public Decimal maxPrice { get; set; } - @AuraEnabled - public String[] categories { get; set; } - @AuraEnabled - public String[] materials { get; set; } - @AuraEnabled - public String[] levels { get; set; } - } - - @AuraEnabled(Cacheable=true) - public static PagedResult getProducts(Filters filters, Integer pageNumber) { - String key, whereClause = ''; - Decimal maxPrice; - String[] categories, materials, levels, criteria = new List{}; - if (filters != null) { - maxPrice = filters.maxPrice; - materials = filters.materials; - levels = filters.levels; - if (!String.isEmpty(filters.searchKey)) { - key = '%' + filters.searchKey + '%'; - criteria.add('Name LIKE :key'); - } - if (filters.maxPrice >= 0) { - maxPrice = filters.maxPrice; - criteria.add('MSRP__c <= :maxPrice'); - } - if (filters.categories != null) { - categories = filters.categories; - criteria.add('Category__c IN :categories'); - } - if (filters.levels != null) { - levels = filters.levels; - criteria.add('Level__c IN :levels'); - } - if (filters.materials != null) { - materials = filters.materials; - criteria.add('Material__c IN :materials'); - } - if (criteria.size() > 0) { - whereClause = 'WHERE ' + String.join(criteria, ' AND '); - } - } - Integer pageSize = ProductController.PAGE_SIZE; - Integer offset = (pageNumber - 1) * pageSize; - PagedResult result = new PagedResult(); - result.pageSize = pageSize; - result.pageNumber = pageNumber; - result.totalItemCount = Database.countQuery( - 'SELECT count() FROM Product__c ' + whereClause - ); - result.records = Database.query( - 'SELECT Id, Name, MSRP__c, Description__c, Category__c, Level__c, Picture_URL__c, Material__c FROM Product__c ' + - whereClause + - ' WITH SECURITY_ENFORCED' + - ' ORDER BY Name LIMIT :pageSize OFFSET :offset' - ); - return result; - } - - @AuraEnabled(Cacheable=true) - public static Product__c[] getSimilarProducts(Id productId, Id familyId) { - return [ - SELECT - Id, - Name, - MSRP__c, - Description__c, - Category__c, - Level__c, - Picture_URL__c, - Material__c - FROM Product__c - WHERE Product_Family__c = :familyId AND Id != :productId - WITH SECURITY_ENFORCED - ]; - } -} \ No newline at end of file diff --git a/force-app/main/default/classes/ProductController.cls-meta.xml b/force-app/main/default/classes/ProductController.cls-meta.xml deleted file mode 100644 index f928c8e5..00000000 --- a/force-app/main/default/classes/ProductController.cls-meta.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 53.0 - Active - diff --git a/force-app/main/default/classes/ProductRecordInfoController.cls b/force-app/main/default/classes/ProductRecordInfoController.cls deleted file mode 100644 index 97de5ea1..00000000 --- a/force-app/main/default/classes/ProductRecordInfoController.cls +++ /dev/null @@ -1,31 +0,0 @@ -public with sharing class ProductRecordInfoController { - @AuraEnabled(Cacheable=true) - public static List getRecordInfo(String productOrFamilyName) { - List recordInfo = new List(); - - List cProductList = [ - SELECT ID - FROM Product__c - WHERE NAME = :productOrFamilyName - WITH SECURITY_ENFORCED - ]; - if (cProductList.size() > 0) { - recordInfo.add(cProductList[0].ID); - recordInfo.add('Product__c'); - return recordInfo; - } - - List cProductFamilyList = [ - SELECT ID - FROM Product_Family__c - WHERE NAME = :productOrFamilyName - WITH SECURITY_ENFORCED - ]; - if (cProductFamilyList.size() > 0) { - recordInfo.add(cProductFamilyList[0].ID); - recordInfo.add('Product_Family__c'); - return recordInfo; - } - return null; - } -} \ No newline at end of file diff --git a/force-app/main/default/classes/ProductRecordInfoController.cls-meta.xml b/force-app/main/default/classes/ProductRecordInfoController.cls-meta.xml deleted file mode 100644 index f928c8e5..00000000 --- a/force-app/main/default/classes/ProductRecordInfoController.cls-meta.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 53.0 - Active - diff --git a/force-app/main/default/classes/SiteLoginController.cls b/force-app/main/default/classes/SiteLoginController.cls deleted file mode 100644 index fb2f4c71..00000000 --- a/force-app/main/default/classes/SiteLoginController.cls +++ /dev/null @@ -1,14 +0,0 @@ -/** - * An apex page controller that exposes the site login functionality - */ -global with sharing class SiteLoginController { - global String username {get; set;} - global String password {get; set;} - - global PageReference login() { - String startUrl = System.currentPageReference().getParameters().get('startURL'); - return Site.login(username, password, startUrl); - } - - global SiteLoginController () {} -} \ No newline at end of file diff --git a/force-app/main/default/classes/SiteLoginController.cls-meta.xml b/force-app/main/default/classes/SiteLoginController.cls-meta.xml deleted file mode 100644 index f928c8e5..00000000 --- a/force-app/main/default/classes/SiteLoginController.cls-meta.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 53.0 - Active - diff --git a/force-app/main/default/classes/SiteLoginControllerTest.cls b/force-app/main/default/classes/SiteLoginControllerTest.cls deleted file mode 100644 index 88ec4a98..00000000 --- a/force-app/main/default/classes/SiteLoginControllerTest.cls +++ /dev/null @@ -1,13 +0,0 @@ -/** - * An apex page controller that exposes the site login functionality - */ -@IsTest global with sharing class SiteLoginControllerTest { - @IsTest(SeeAllData=true) global static void testSiteLoginController () { - // Instantiate a new controller with all parameters in the page - SiteLoginController controller = new SiteLoginController (); - controller.username = 'test@salesforce.com'; - controller.password = '123456'; - - System.assertEquals(controller.login(),null); - } -} \ No newline at end of file diff --git a/force-app/main/default/classes/SiteLoginControllerTest.cls-meta.xml b/force-app/main/default/classes/SiteLoginControllerTest.cls-meta.xml deleted file mode 100644 index f928c8e5..00000000 --- a/force-app/main/default/classes/SiteLoginControllerTest.cls-meta.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 53.0 - Active - diff --git a/force-app/main/default/classes/SiteRegisterController.cls b/force-app/main/default/classes/SiteRegisterController.cls deleted file mode 100644 index 9332bc4f..00000000 --- a/force-app/main/default/classes/SiteRegisterController.cls +++ /dev/null @@ -1,50 +0,0 @@ -/** - * An apex class that creates a portal user - */ -public with sharing class SiteRegisterController { - // PORTAL_ACCOUNT_ID is the account on which the contact will be created on and then enabled as a portal user. - // you need to add the account owner into the role hierarchy before this will work - please see Customer Portal Setup help for more information. - private static Id PORTAL_ACCOUNT_ID = '001x000xxx35tPN'; - - public SiteRegisterController () { - } - - public String username {get; set;} - public String email {get; set;} - public String password {get; set {password = value == null ? value : value.trim(); } } - public String confirmPassword {get; set { confirmPassword = value == null ? value : value.trim(); } } - public String communityNickname {get; set { communityNickname = value == null ? value : value.trim(); } } - - private boolean isValidPassword() { - return password == confirmPassword; - } - - public PageReference registerUser() { - // it's okay if password is null - we'll send the user a random password in that case - if (!isValidPassword()) { - ApexPages.Message msg = new ApexPages.Message(ApexPages.Severity.ERROR, Label.site.passwords_dont_match); - ApexPages.addMessage(msg); - return null; - } - User u = new User(); - u.Username = username; - u.Email = email; - u.CommunityNickname = communityNickname; - - String accountId = PORTAL_ACCOUNT_ID; - - // lastName is a required field on user, but if it isn't specified, we'll default it to the username - String userId = Site.createPortalUser(u, accountId, password); - if (userId != null) { - if (password != null && password.length() > 1) { - return Site.login(username, password, null); - } - else { - PageReference page = System.Page.SiteRegisterConfirm; - page.setRedirect(true); - return page; - } - } - return null; - } -} \ No newline at end of file diff --git a/force-app/main/default/classes/SiteRegisterController.cls-meta.xml b/force-app/main/default/classes/SiteRegisterController.cls-meta.xml deleted file mode 100644 index f928c8e5..00000000 --- a/force-app/main/default/classes/SiteRegisterController.cls-meta.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 53.0 - Active - diff --git a/force-app/main/default/classes/SiteRegisterControllerTest.cls b/force-app/main/default/classes/SiteRegisterControllerTest.cls deleted file mode 100644 index 79f27faf..00000000 --- a/force-app/main/default/classes/SiteRegisterControllerTest.cls +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Class containing tests for SiteRegisterController - */ -@IsTest public with sharing class SiteRegisterControllerTest { - @IsTest(SeeAllData=true) static void testRegistration() { - SiteRegisterController controller = new SiteRegisterController(); - controller.username = 'test@force.com'; - controller.email = 'test@force.com'; - controller.communityNickname = 'test'; - // registerUser will always return null when the page isn't accessed as a guest user - System.assert(controller.registerUser() == null); - - controller.password = 'abcd1234'; - controller.confirmPassword = 'abcd123'; - System.assert(controller.registerUser() == null); - } -} \ No newline at end of file diff --git a/force-app/main/default/classes/SiteRegisterControllerTest.cls-meta.xml b/force-app/main/default/classes/SiteRegisterControllerTest.cls-meta.xml deleted file mode 100644 index f928c8e5..00000000 --- a/force-app/main/default/classes/SiteRegisterControllerTest.cls-meta.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 53.0 - Active - diff --git a/force-app/main/default/classes/TestOrderController.cls b/force-app/main/default/classes/TestOrderController.cls deleted file mode 100644 index 5dc8d1e8..00000000 --- a/force-app/main/default/classes/TestOrderController.cls +++ /dev/null @@ -1,29 +0,0 @@ -@isTest -public class TestOrderController { - @testSetup - static void setup() { - Account acc = new Account(Name = 'Sample Account'); - insert acc; - - Order__c order = new Order__c(Account__c = acc.Id); - insert order; - - Product__c p = new Product__c(Name = 'Sample Product'); - insert p; - - Order_Item__c orderItem = new Order_Item__c( - Order__c = order.Id, - Product__c = p.Id - ); - insert orderItem; - } - - @isTest - static void testGetOrderItems() { - Order__c testOrder = [SELECT Id FROM Order__c]; - List orderItems = OrderController.getOrderItems( - testOrder.Id - ); - System.assertEquals(orderItems.size(), 1); - } -} \ No newline at end of file diff --git a/force-app/main/default/classes/TestOrderController.cls-meta.xml b/force-app/main/default/classes/TestOrderController.cls-meta.xml deleted file mode 100644 index f928c8e5..00000000 --- a/force-app/main/default/classes/TestOrderController.cls-meta.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 53.0 - Active - diff --git a/force-app/main/default/classes/TestProductController.cls b/force-app/main/default/classes/TestProductController.cls deleted file mode 100644 index 6fb4cb2a..00000000 --- a/force-app/main/default/classes/TestProductController.cls +++ /dev/null @@ -1,58 +0,0 @@ -@isTest -public class TestProductController { - @testSetup - static void createProducts() { - List products = new List(); - - products.add( - new Product__c( - Name = 'Sample Bike 1', - MSRP__c = 1000, - Category__c = 'Mountain', - Level__c = 'Beginner', - Material__c = 'Carbon' - ) - ); - - products.add( - new Product__c( - Name = 'Sample Bike 2', - MSRP__c = 1200, - Category__c = 'Mountain', - Level__c = 'Beginner', - Material__c = 'Carbon' - ) - ); - - insert products; - } - - @isTest - static void testGetProducts() { - ProductController.Filters filters = new ProductController.Filters(); - filters.searchKey = 'Sample'; - filters.maxPrice = 2000; - filters.categories = new List{ 'Mountain' }; - filters.levels = new List{ 'Beginner' }; - filters.materials = new List{ 'Carbon' }; - PagedResult result = ProductController.getProducts(filters, 1); - System.assertEquals(result.records.size(), 2); - } - - @isTest - static void testGetSimilarProducts() { - ProductController.Filters filters = new ProductController.Filters(); - filters.searchKey = 'Sample'; - filters.maxPrice = 2000; - filters.categories = new List{ 'Mountain' }; - filters.levels = new List{ 'Beginner' }; - filters.materials = new List{ 'Carbon' }; - PagedResult result = ProductController.getProducts(filters, 1); - Product__c productToCompare = (Product__c) result.records[0]; - Product__c[] products = ProductController.getSimilarProducts( - productToCompare.Id, - null - ); - System.assertEquals(products.size(), 1); - } -} \ No newline at end of file diff --git a/force-app/main/default/classes/TestProductController.cls-meta.xml b/force-app/main/default/classes/TestProductController.cls-meta.xml deleted file mode 100644 index f928c8e5..00000000 --- a/force-app/main/default/classes/TestProductController.cls-meta.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 53.0 - Active - diff --git a/force-app/main/default/classes/UltimateClass.cls b/force-app/main/default/classes/UltimateClass.cls deleted file mode 100644 index 178ce5de..00000000 --- a/force-app/main/default/classes/UltimateClass.cls +++ /dev/null @@ -1,9 +0,0 @@ -public with sharing class UltimateClass { - public UltimateClass() { - String a = 'hi'; - String b = null; - if(a == 'hi'){ - b = 'great'; - } - } -} \ No newline at end of file diff --git a/force-app/main/default/classes/UltimateClass.cls-meta.xml b/force-app/main/default/classes/UltimateClass.cls-meta.xml deleted file mode 100644 index dd61d1f9..00000000 --- a/force-app/main/default/classes/UltimateClass.cls-meta.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 52.0 - Active - diff --git a/force-app/main/default/classes/UltimateClassTests.cls b/force-app/main/default/classes/UltimateClassTests.cls deleted file mode 100644 index e533c5de..00000000 --- a/force-app/main/default/classes/UltimateClassTests.cls +++ /dev/null @@ -1,10 +0,0 @@ -@IsTest -public with sharing class UltimateClassTests { - - @IsTest - public static void testMyCode(){ - UltimateClass a = new UltimateClass(); - System.assert(true); - } - -} \ No newline at end of file diff --git a/force-app/main/default/classes/UltimateClassTests.cls-meta.xml b/force-app/main/default/classes/UltimateClassTests.cls-meta.xml deleted file mode 100644 index dd61d1f9..00000000 --- a/force-app/main/default/classes/UltimateClassTests.cls-meta.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 52.0 - Active - diff --git a/force-app/main/default/components/SiteFooter.component b/force-app/main/default/components/SiteFooter.component deleted file mode 100644 index 2023a51e..00000000 --- a/force-app/main/default/components/SiteFooter.component +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/force-app/main/default/components/SiteFooter.component-meta.xml b/force-app/main/default/components/SiteFooter.component-meta.xml deleted file mode 100644 index 660ce9fe..00000000 --- a/force-app/main/default/components/SiteFooter.component-meta.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - 53.0 - Default Lightning Platform site footer component - - - 1 - 7 - sf_com_apps - - - 1 - 6 - trlhdtips - - diff --git a/force-app/main/default/components/SiteHeader.component b/force-app/main/default/components/SiteHeader.component deleted file mode 100644 index 3ebfbe74..00000000 --- a/force-app/main/default/components/SiteHeader.component +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - {!$Label.site.login_button} - - {!$Label.site.forgot_your_password_q} - - {!$Label.site.new_user_q} - - {!$Label.site.logout} - - - \ No newline at end of file diff --git a/force-app/main/default/components/SiteHeader.component-meta.xml b/force-app/main/default/components/SiteHeader.component-meta.xml deleted file mode 100644 index aba8a6ad..00000000 --- a/force-app/main/default/components/SiteHeader.component-meta.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - 53.0 - Default Lightning Platform site header component - - - 1 - 7 - sf_com_apps - - - 1 - 6 - trlhdtips - - diff --git a/force-app/main/default/components/SiteLogin.component b/force-app/main/default/components/SiteLogin.component deleted file mode 100644 index ec891e0b..00000000 --- a/force-app/main/default/components/SiteLogin.component +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - {!$Label.site.forgot_your_password_q} - - {!$Label.site.new_user_q} - - - - - \ No newline at end of file diff --git a/force-app/main/default/components/SiteLogin.component-meta.xml b/force-app/main/default/components/SiteLogin.component-meta.xml deleted file mode 100644 index 894debe4..00000000 --- a/force-app/main/default/components/SiteLogin.component-meta.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - 53.0 - Default Salesforce Sites Login component - - - 1 - 7 - sf_com_apps - - - 1 - 6 - trlhdtips - - diff --git a/force-app/main/default/components/SitePoweredBy.component b/force-app/main/default/components/SitePoweredBy.component deleted file mode 100644 index 52b3779b..00000000 --- a/force-app/main/default/components/SitePoweredBy.component +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/force-app/main/default/components/SitePoweredBy.component-meta.xml b/force-app/main/default/components/SitePoweredBy.component-meta.xml deleted file mode 100644 index 75dc3af6..00000000 --- a/force-app/main/default/components/SitePoweredBy.component-meta.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - 53.0 - Default Lightning Platform site powered by component - - - 1 - 7 - sf_com_apps - - - 1 - 6 - trlhdtips - - diff --git a/force-app/main/default/lwc/.eslintrc.json b/force-app/main/default/lwc/.eslintrc.json deleted file mode 100644 index 49ca97d4..00000000 --- a/force-app/main/default/lwc/.eslintrc.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": ["@salesforce/eslint-config-lwc/recommended"], - "overrides": [ - { - "files": ["*.test.js"], - "rules": { - "@lwc/lwc/no-unexpected-wire-adapter-usages": "off" - } - } - ] -} diff --git a/force-app/main/default/lwc/accountMap/accountMap.html b/force-app/main/default/lwc/accountMap/accountMap.html deleted file mode 100644 index f76f0ad1..00000000 --- a/force-app/main/default/lwc/accountMap/accountMap.html +++ /dev/null @@ -1,19 +0,0 @@ - \ No newline at end of file diff --git a/force-app/main/default/lwc/accountMap/accountMap.js b/force-app/main/default/lwc/accountMap/accountMap.js deleted file mode 100644 index 92096e1a..00000000 --- a/force-app/main/default/lwc/accountMap/accountMap.js +++ /dev/null @@ -1,52 +0,0 @@ -import { LightningElement, api, wire } from 'lwc'; -import { getRecord, getFieldValue } from 'lightning/uiRecordApi'; - -import BILLING_CITY from '@salesforce/schema/Account.BillingCity'; -import BILLING_COUNTRY from '@salesforce/schema/Account.BillingCountry'; -import BILLING_POSTAL_CODE from '@salesforce/schema/Account.BillingPostalCode'; -import BILLING_STATE from '@salesforce/schema/Account.BillingState'; -import BILLING_STREET from '@salesforce/schema/Account.BillingStreet'; - -const fields = [ - BILLING_CITY, - BILLING_COUNTRY, - BILLING_POSTAL_CODE, - BILLING_STATE, - BILLING_STREET -]; - -export default class PropertyMap extends LightningElement { - @api recordId; - - zoomLevel = 14; - markers = []; - error; - - @wire(getRecord, { recordId: '$recordId', fields }) - wiredRecord({ error, data }) { - if (data) { - this.markers = []; - this.error = undefined; - const street = getFieldValue(data, BILLING_STREET); - if (street) { - this.markers = [ - { - location: { - City: getFieldValue(data, BILLING_CITY), - Country: getFieldValue(data, BILLING_COUNTRY), - PostalCode: getFieldValue( - data, - BILLING_POSTAL_CODE - ), - State: getFieldValue(data, BILLING_STATE), - Street: street - } - } - ]; - } - } else if (error) { - this.markers = []; - this.error = error; - } - } -} \ No newline at end of file diff --git a/force-app/main/default/lwc/accountMap/accountMap.js-meta.xml b/force-app/main/default/lwc/accountMap/accountMap.js-meta.xml deleted file mode 100644 index f7418f27..00000000 --- a/force-app/main/default/lwc/accountMap/accountMap.js-meta.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - 53.0 - true - Account Map - - lightning__RecordPage - - - - - Account - - - - - \ No newline at end of file diff --git a/force-app/main/default/lwc/createCase/createCase.css b/force-app/main/default/lwc/createCase/createCase.css deleted file mode 100644 index 0dfc90be..00000000 --- a/force-app/main/default/lwc/createCase/createCase.css +++ /dev/null @@ -1,8 +0,0 @@ -.title-order, -.submit-button { - font-weight: bold; -} - -.navigate-hidden { - display: none; -} \ No newline at end of file diff --git a/force-app/main/default/lwc/createCase/createCase.html b/force-app/main/default/lwc/createCase/createCase.html deleted file mode 100644 index 4e405bc3..00000000 --- a/force-app/main/default/lwc/createCase/createCase.html +++ /dev/null @@ -1,65 +0,0 @@ - \ No newline at end of file diff --git a/force-app/main/default/lwc/createCase/createCase.js b/force-app/main/default/lwc/createCase/createCase.js deleted file mode 100644 index b6db4ae0..00000000 --- a/force-app/main/default/lwc/createCase/createCase.js +++ /dev/null @@ -1,37 +0,0 @@ -import { LightningElement } from 'lwc'; -import { ShowToastEvent } from 'lightning/platformShowToastEvent'; - -import CASE_OBJECT from '@salesforce/schema/Case'; -import SUBJECT from '@salesforce/schema/Case.Subject'; -import DESCRIPTION from '@salesforce/schema/Case.Description'; -import PRODUCT from '@salesforce/schema/Case.Product__c'; -import PRIORITY from '@salesforce/schema/Case.Priority'; -import CASE_CATEGORY from '@salesforce/schema/Case.Case_Category__c'; -import REASON from '@salesforce/schema/Case.Reason'; - -const TITLE_SUCCESS = 'Case Created!'; -const MESSAGE_SUCCESS = 'You have successfully created a Case'; - -export default class CreateCase extends LightningElement { - caseObject = CASE_OBJECT; - subjectField = SUBJECT; - productField = PRODUCT; - descriptionField = DESCRIPTION; - priorityField = PRIORITY; - reasonField = REASON; - categoryField = CASE_CATEGORY; - - handleCaseCreated() { - // Fire event for Toast to appear that Order was created - const evt = new ShowToastEvent({ - title: TITLE_SUCCESS, - message: MESSAGE_SUCCESS, - variant: 'success' - }); - this.dispatchEvent(evt); - - const refreshEvt = new CustomEvent('refresh'); - // Fire the custom event - this.dispatchEvent(refreshEvt); - } -} \ No newline at end of file diff --git a/force-app/main/default/lwc/createCase/createCase.js-meta.xml b/force-app/main/default/lwc/createCase/createCase.js-meta.xml deleted file mode 100644 index 039c1620..00000000 --- a/force-app/main/default/lwc/createCase/createCase.js-meta.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - 53.0 - true - Create Case - - lightningCommunity__Page - - \ No newline at end of file diff --git a/force-app/main/default/lwc/errorPanel/errorPanel.js b/force-app/main/default/lwc/errorPanel/errorPanel.js deleted file mode 100644 index 5dafd3c4..00000000 --- a/force-app/main/default/lwc/errorPanel/errorPanel.js +++ /dev/null @@ -1,28 +0,0 @@ -import { LightningElement, api } from 'lwc'; -import { reduceErrors } from 'c/ldsUtils'; -import noDataIllustration from './templates/noDataIllustration.html'; -import inlineMessage from './templates/inlineMessage.html'; - -export default class ErrorPanel extends LightningElement { - /** Single or array of LDS errors */ - @api errors; - /** Generic / user-friendly message */ - @api friendlyMessage = 'Error retrieving data'; - /** Type of error message **/ - @api type; - - viewDetails = false; - - get errorMessages() { - return reduceErrors(this.errors); - } - - handleShowDetailsClick() { - this.viewDetails = !this.viewDetails; - } - - render() { - if (this.type === 'inlineMessage') return inlineMessage; - return noDataIllustration; - } -} \ No newline at end of file diff --git a/force-app/main/default/lwc/errorPanel/errorPanel.js-meta.xml b/force-app/main/default/lwc/errorPanel/errorPanel.js-meta.xml deleted file mode 100644 index 1007f02c..00000000 --- a/force-app/main/default/lwc/errorPanel/errorPanel.js-meta.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 53.0 - false - \ No newline at end of file diff --git a/force-app/main/default/lwc/errorPanel/templates/inlineMessage.html b/force-app/main/default/lwc/errorPanel/templates/inlineMessage.html deleted file mode 100644 index 3af81351..00000000 --- a/force-app/main/default/lwc/errorPanel/templates/inlineMessage.html +++ /dev/null @@ -1,19 +0,0 @@ - \ No newline at end of file diff --git a/force-app/main/default/lwc/errorPanel/templates/noDataIllustration.html b/force-app/main/default/lwc/errorPanel/templates/noDataIllustration.html deleted file mode 100644 index 3e5e3777..00000000 --- a/force-app/main/default/lwc/errorPanel/templates/noDataIllustration.html +++ /dev/null @@ -1,260 +0,0 @@ - \ No newline at end of file diff --git a/force-app/main/default/lwc/hero/hero.css b/force-app/main/default/lwc/hero/hero.css deleted file mode 100644 index c7417539..00000000 --- a/force-app/main/default/lwc/hero/hero.css +++ /dev/null @@ -1,31 +0,0 @@ -:host { - position: relative; - display: block; -} - -img, -video { - position: relative; - width: 100%; -} - -.c-hero-center-default, -.c-hero-center-left { - top: 30%; - left: 10%; -} - -.c-hero-center-right { - top: 30%; - right: 10%; -} - -div { - background-color: black; - opacity: 0.5; - top: 0; - bottom: 0; - left: 0; - right: 0; - position: absolute; -} \ No newline at end of file diff --git a/force-app/main/default/lwc/hero/hero.html b/force-app/main/default/lwc/hero/hero.html deleted file mode 100644 index d0aa167e..00000000 --- a/force-app/main/default/lwc/hero/hero.html +++ /dev/null @@ -1,15 +0,0 @@ - \ No newline at end of file diff --git a/force-app/main/default/lwc/hero/hero.js b/force-app/main/default/lwc/hero/hero.js deleted file mode 100644 index eaa9bc9a..00000000 --- a/force-app/main/default/lwc/hero/hero.js +++ /dev/null @@ -1,61 +0,0 @@ -import { LightningElement, api } from 'lwc'; -import IMAGE_URL from '@salesforce/resourceUrl/bike_assets'; - -const VIDEO = 'Video'; -const IMAGE = 'Image'; - -/** - * A Hero component that can display a Video or Image. - */ -export default class Hero extends LightningElement { - @api title; - @api slogan; - @api buttonText; - @api heroDetailsPosition; - @api resourceUrl; - @api imgOrVideo; - @api internalResource; - @api overlay; - @api opacity; - @api buttonClickProductOrFamilyName; - - get resUrl() { - if (this.isImg) { - if (this.internalResource) { - return IMAGE_URL + this.resourceUrl; - } - } - return this.resourceUrl; - } - - get isVideo() { - return this.imgOrVideo === VIDEO; - } - - get isImg() { - return this.imgOrVideo === IMAGE; - } - - get isOverlay() { - return this.overlay === 'true'; - } - - // Apply CSS Class depending upon what position to put the hero text block - get heroDetailsPositionClass() { - if (this.heroDetailsPosition === 'left') { - return 'c-hero-center-left'; - } else if (this.heroDetailsPosition === 'right') { - return 'c-hero-center-right'; - } - - return 'c-hero-center-default'; - } - - renderedCallback() { - // Update the overlay with the opacity configured by the admin in builder - const overlay = this.template.querySelector('div'); - if (overlay) { - overlay.style.opacity = parseInt(this.opacity, 10) / 10; - } - } -} \ No newline at end of file diff --git a/force-app/main/default/lwc/hero/hero.js-meta.xml b/force-app/main/default/lwc/hero/hero.js-meta.xml deleted file mode 100644 index b0aec5e3..00000000 --- a/force-app/main/default/lwc/hero/hero.js-meta.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - 53.0 - true - Hero - - lightningCommunity__Page - lightningCommunity__Default - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/force-app/main/default/lwc/heroDetails/heroDetails.css b/force-app/main/default/lwc/heroDetails/heroDetails.css deleted file mode 100644 index a68bbc27..00000000 --- a/force-app/main/default/lwc/heroDetails/heroDetails.css +++ /dev/null @@ -1,43 +0,0 @@ -:host { - position: absolute; - text-align: center; -} - -h1, -p { - color: var(--lwc-colorTextButtonBrand, white); - font-family: 'KlavikaWebRegularCond', 'Klavika', Helvetica; - margin-bottom: 10px; - font-weight: normal; - letter-spacing: 0.14em; - line-height: 1; - font-size: 1.5rem; - margin: 0.5em 0 0.74em; - padding: 0; - text-transform: uppercase; -} - -h1 { - letter-spacing: 0.03em; - line-height: 0.88; - margin: 0; - font-size: 3rem; - font-weight: bold; -} - -a { - text-align: center; - padding: 4rem; - padding-top: 0.5rem; - padding-bottom: 0.5rem; - border-radius: 10px; - border: none; - font-size: 1rem; - font-weight: bold; - text-transform: uppercase; -} - -button:hover { - background-position: right center; - color: white; -} \ No newline at end of file diff --git a/force-app/main/default/lwc/heroDetails/heroDetails.html b/force-app/main/default/lwc/heroDetails/heroDetails.html deleted file mode 100644 index 85f56d86..00000000 --- a/force-app/main/default/lwc/heroDetails/heroDetails.html +++ /dev/null @@ -1,7 +0,0 @@ - \ No newline at end of file diff --git a/force-app/main/default/lwc/heroDetails/heroDetails.js b/force-app/main/default/lwc/heroDetails/heroDetails.js deleted file mode 100644 index 23c075c0..00000000 --- a/force-app/main/default/lwc/heroDetails/heroDetails.js +++ /dev/null @@ -1,27 +0,0 @@ -import { LightningElement, api, wire } from 'lwc'; -import getRecordInfo from '@salesforce/apex/ProductRecordInfoController.getRecordInfo'; - -/** - * Details component that is on top of the video. - */ -export default class HeroDetails extends LightningElement { - @api title = 'Hero Details'; // Default title to comply with accessibility - @api slogan; - @api recordName; - - recordInfoData; - hrefUrl; - - @wire(getRecordInfo, { productOrFamilyName: '$recordName' }) - recordInfo({ error, data }) { - this.recordInfoData = { error, data }; - // Temporary workaround so that clicking on button navigates every time - if (!error && data) { - if (data[1] === 'Product__c') { - this.hrefUrl = `product/${data[0]}`; - } else { - this.hrefUrl = `product-family/${data[0]}`; - } - } - } -} \ No newline at end of file diff --git a/force-app/main/default/lwc/heroDetails/heroDetails.js-meta.xml b/force-app/main/default/lwc/heroDetails/heroDetails.js-meta.xml deleted file mode 100644 index 1007f02c..00000000 --- a/force-app/main/default/lwc/heroDetails/heroDetails.js-meta.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 53.0 - false - \ No newline at end of file diff --git a/force-app/main/default/lwc/ldsUtils/ldsUtils.js b/force-app/main/default/lwc/ldsUtils/ldsUtils.js deleted file mode 100644 index db988518..00000000 --- a/force-app/main/default/lwc/ldsUtils/ldsUtils.js +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Reduces one or more LDS errors into a string[] of error messages. - * @param {FetchResponse|FetchResponse[]} errors - * @return {String[]} Error messages - */ -export function reduceErrors(errors) { - if (!Array.isArray(errors)) { - errors = [errors]; - } - - return ( - errors - // Remove null/undefined items - .filter((error) => !!error) - // Extract an error message - .map((error) => { - // UI API read errors - if (Array.isArray(error.body)) { - return error.body.map((e) => e.message); - } - // UI API DML, Apex and network errors - else if (error.body && typeof error.body.message === 'string') { - return error.body.message; - } - // JS errors - else if (typeof error.message === 'string') { - return error.message; - } - // Unknown error shape so try HTTP status text - return error.statusText; - }) - // Flatten - .reduce((prev, curr) => prev.concat(curr), []) - // Remove empty strings - .filter((message) => !!message) - ); -} \ No newline at end of file diff --git a/force-app/main/default/lwc/ldsUtils/ldsUtils.js-meta.xml b/force-app/main/default/lwc/ldsUtils/ldsUtils.js-meta.xml deleted file mode 100644 index 46c8efb2..00000000 --- a/force-app/main/default/lwc/ldsUtils/ldsUtils.js-meta.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - 53.0 - false - \ No newline at end of file diff --git a/force-app/main/default/lwc/orderBuilder/orderBuilder.css b/force-app/main/default/lwc/orderBuilder/orderBuilder.css deleted file mode 100644 index 8236a5a0..00000000 --- a/force-app/main/default/lwc/orderBuilder/orderBuilder.css +++ /dev/null @@ -1,31 +0,0 @@ -header { - padding: 12px 16px; - background-color: rgba(194, 51, 53, 1); - color: #ffffff; - border-top-left-radius: 0.25rem; - border-top-right-radius: 0.25rem; - display: flex; -} - -header .right { - flex: 1; - text-align: right; -} - -.order-total { - margin-left: 4px; -} - -.drop-zone { - background: rgb(243, 242, 242); - display: flex; - flex-wrap: wrap; - border-bottom-left-radius: 0.25rem; - border-bottom-right-radius: 0.25rem; -} - -c-placeholder, -c-order-item-tile { - min-width: 250px; - flex: 1; -} \ No newline at end of file diff --git a/force-app/main/default/lwc/orderBuilder/orderBuilder.html b/force-app/main/default/lwc/orderBuilder/orderBuilder.html deleted file mode 100644 index 5fe9fbc1..00000000 --- a/force-app/main/default/lwc/orderBuilder/orderBuilder.html +++ /dev/null @@ -1,42 +0,0 @@ - \ No newline at end of file diff --git a/force-app/main/default/lwc/orderBuilder/orderBuilder.js b/force-app/main/default/lwc/orderBuilder/orderBuilder.js deleted file mode 100644 index d6a5717c..00000000 --- a/force-app/main/default/lwc/orderBuilder/orderBuilder.js +++ /dev/null @@ -1,210 +0,0 @@ -import { LightningElement, wire, api } from 'lwc'; -import { ShowToastEvent } from 'lightning/platformShowToastEvent'; -import { reduceErrors } from 'c/ldsUtils'; - -/** Record DML operations. */ -import { - createRecord, - updateRecord, - deleteRecord -} from 'lightning/uiRecordApi'; - -/** Use Apex to fetch related records. */ -import { refreshApex, getSObjectValue } from '@salesforce/apex'; -import getOrderItems from '@salesforce/apex/OrderController.getOrderItems'; - -/** Order_Item__c Schema. */ -import ORDER_ITEM_OBJECT from '@salesforce/schema/Order_Item__c'; -import ORDER_FIELD from '@salesforce/schema/Order_Item__c.Order__c'; -import PRODUCT_FIELD from '@salesforce/schema/Order_Item__c.Product__c'; -import QTY_SMALL_FIELD from '@salesforce/schema/Order_Item__c.Qty_S__c'; -import QTY_MEDIUM_FIELD from '@salesforce/schema/Order_Item__c.Qty_M__c'; -import QTY_LARGE_FIELD from '@salesforce/schema/Order_Item__c.Qty_L__c'; -import PRICE_FIELD from '@salesforce/schema/Order_Item__c.Price__c'; - -/** Order_Item__c Schema. */ -import PRODUCT_MSRP_FIELD from '@salesforce/schema/Product__c.MSRP__c'; - -/** Discount for resellers. TODO - move to custom field on Account. */ -const DISCOUNT = 0.6; - -/** - * Gets the quantity of all items in an Order_Item__c SObject. - */ -function getQuantity(orderItem) { - return ( - getSObjectValue(orderItem, QTY_SMALL_FIELD) + - getSObjectValue(orderItem, QTY_MEDIUM_FIELD) + - getSObjectValue(orderItem, QTY_LARGE_FIELD) - ); -} - -/** - * Gets the price for the specified quantity of Order_Item__c SObject. - */ -function getPrice(orderItem, quantity) { - return getSObjectValue(orderItem, PRICE_FIELD) * quantity; -} - -/** - * Calculates the quantity and price of all Order_Item__c SObjects. - */ -function calculateOrderSummary(orderItems) { - const summary = orderItems.reduce( - (acc, orderItem) => { - const quantity = getQuantity(orderItem); - const price = getPrice(orderItem, quantity); - acc.quantity += quantity; - acc.price += price; - return acc; - }, - { quantity: 0, price: 0 } - ); - return summary; -} - -/** - * Builds Order__c by CRUD'ing the related Order_Item__c SObjects. - */ -export default class OrderBuilder extends LightningElement { - /** Id of Order__c SObject to display. */ - @api recordId; - - /** The Order_Item__c SObjects to display. */ - orderItems; - - /** Total price of the Order__c. Calculated from this.orderItems. */ - orderPrice = 0; - - /** Total quantity of the Order__c. Calculated from this.orderItems. */ - orderQuantity = 0; - - error; - - /** Wired Apex result so it may be programmatically refreshed. */ - wiredOrderItems; - - /** Apex load the Order__c's Order_Item_c[] and their related Product__c details. */ - @wire(getOrderItems, { orderId: '$recordId' }) - wiredGetOrderItems(value) { - this.wiredOrderItems = value; - if (value.error) { - this.error = value.error; - } else if (value.data) { - this.setOrderItems(value.data); - } - } - - /** Updates the order items, recalculating the order quantity and price. */ - setOrderItems(orderItems) { - this.orderItems = orderItems.slice(); - const summary = calculateOrderSummary(this.orderItems); - this.orderQuantity = summary.quantity; - this.orderPrice = summary.price; - } - - /** Handles drag-and-dropping a new product to create a new Order_Item__c. */ - handleDrop(event) { - event.preventDefault(); - // Product__c from LDS - const product = JSON.parse(event.dataTransfer.getData('product')); - - // build new Order_Item__c record - const fields = {}; - fields[ORDER_FIELD.fieldApiName] = this.recordId; - fields[PRODUCT_FIELD.fieldApiName] = product.Id; - fields[PRICE_FIELD.fieldApiName] = Math.round( - getSObjectValue(product, PRODUCT_MSRP_FIELD) * DISCOUNT - ); - - // create Order_Item__c record on server - const recordInput = { - apiName: ORDER_ITEM_OBJECT.objectApiName, - fields - }; - createRecord(recordInput) - .then(() => { - // refresh the Order_Item__c SObjects - return refreshApex(this.wiredOrderItems); - }) - .catch((e) => { - this.dispatchEvent( - new ShowToastEvent({ - title: 'Error creating order', - message: reduceErrors(e).join(', '), - variant: 'error' - }) - ); - }); - } - - /** Handles for dragging events. */ - handleDragOver(event) { - event.preventDefault(); - } - - /** Handles event to change Order_Item__c details. */ - handleOrderItemChange(evt) { - const orderItemChanges = evt.detail; - - // optimistically make the change on the client - const previousOrderItems = this.orderItems; - const orderItems = this.orderItems.map((orderItem) => { - if (orderItem.Id === orderItemChanges.Id) { - // synthesize a new Order_Item__c SObject - return Object.assign({}, orderItem, orderItemChanges); - } - return orderItem; - }); - this.setOrderItems(orderItems); - - // update Order_Item__c on the server - const recordInput = { fields: orderItemChanges }; - updateRecord(recordInput) - .then(() => { - // if there were triggers/etc that invalidate the Apex result then we'd refresh it - // return refreshApex(this.wiredOrderItems); - }) - .catch((e) => { - // error updating server so rollback to previous data - this.setOrderItems(previousOrderItems); - this.dispatchEvent( - new ShowToastEvent({ - title: 'Error updating order item', - message: reduceErrors(e).join(', '), - variant: 'error' - }) - ); - }); - } - - /** Handles event to delete Order_Item__c. */ - handleOrderItemDelete(evt) { - const id = evt.detail.id; - - // optimistically make the change on the client - const previousOrderItems = this.orderItems; - const orderItems = this.orderItems.filter( - (orderItem) => orderItem.Id !== id - ); - this.setOrderItems(orderItems); - - // delete Order_Item__c SObject on the server - deleteRecord(id) - .then(() => { - // if there were triggers/etc that invalidate the Apex result then we'd refresh it - // return refreshApex(this.wiredOrderItems); - }) - .catch((e) => { - // error updating server so rollback to previous data - this.setOrderItems(previousOrderItems); - this.dispatchEvent( - new ShowToastEvent({ - title: 'Error deleting order item', - message: reduceErrors(e).join(', '), - variant: 'error' - }) - ); - }); - } -} \ No newline at end of file diff --git a/force-app/main/default/lwc/orderBuilder/orderBuilder.js-meta.xml b/force-app/main/default/lwc/orderBuilder/orderBuilder.js-meta.xml deleted file mode 100644 index 60d2d13c..00000000 --- a/force-app/main/default/lwc/orderBuilder/orderBuilder.js-meta.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - 53.0 - true - Order Builder - - lightning__AppPage - lightning__RecordPage - lightning__HomePage - lightningCommunity__Page - lightningCommunity__Default - - - - - Order__c - - - - \ No newline at end of file diff --git a/force-app/main/default/lwc/orderItemTile/orderItemTile.css b/force-app/main/default/lwc/orderItemTile/orderItemTile.css deleted file mode 100644 index b035a8d4..00000000 --- a/force-app/main/default/lwc/orderItemTile/orderItemTile.css +++ /dev/null @@ -1,47 +0,0 @@ -.content { - padding: 8px 8px 12px 8px; - background-color: #ffffff; - position: relative; - border-radius: 0.25rem; -} - -img.product { - height: 120px; - max-width: initial; -} - -.title { - font-weight: bold; - text-transform: uppercase; -} - -.quantity { - width: 58px; - margin: 0 2px; -} - -.price { - width: 94px; - margin: 0 2px; -} - -.form { - display: flex; -} - -.save-button { - position: absolute; - top: 10px; - right: 10px; -} - -.delete-button { - position: absolute; - top: 10px; - left: 10px; - display: none; -} - -.content:hover .delete-button { - display: inherit; -} \ No newline at end of file diff --git a/force-app/main/default/lwc/orderItemTile/orderItemTile.html b/force-app/main/default/lwc/orderItemTile/orderItemTile.html deleted file mode 100644 index 0f9c3341..00000000 --- a/force-app/main/default/lwc/orderItemTile/orderItemTile.html +++ /dev/null @@ -1,76 +0,0 @@ - \ No newline at end of file diff --git a/force-app/main/default/lwc/orderItemTile/orderItemTile.js b/force-app/main/default/lwc/orderItemTile/orderItemTile.js deleted file mode 100644 index 262195c4..00000000 --- a/force-app/main/default/lwc/orderItemTile/orderItemTile.js +++ /dev/null @@ -1,48 +0,0 @@ -import { LightningElement, api } from 'lwc'; - -/** - * Displays an Order_Item__c SObject. Note that this component does not use schema imports and uses dynamic - * references to the schema instead. For example, orderItem.Price__c (see template). The dynamic approach is - * less verbose but does not provide referential integrity. The schema imports approach is more verbose but - * enforces referential integrity: 1) The existence of the fields you reference is checked at compile time. - * 2) Fields that are statically imported in a component cannot be deleted in the object model. - */ -export default class OrderItemTile extends LightningElement { - /** Order_Item__c SObject to display. */ - @api orderItem; - - /** Whether the component has unsaved changes. */ - isModified = false; - - /** Mutated/unsaved Order_Item__c values. */ - form = {}; - - /** Handles form input. */ - handleFormChange(evt) { - this.isModified = true; - const field = evt.target.dataset.fieldName; - let value = parseInt(evt.detail.value.trim(), 10); - if (!Number.isInteger(value)) { - value = 0; - } - this.form[field] = value; - } - - /** Fires event to update the Order_Item__c SObject. */ - - saveOrderItem() { - const event = new CustomEvent('orderitemchange', { - detail: Object.assign({}, { Id: this.orderItem.Id }, this.form) - }); - this.dispatchEvent(event); - this.isModified = false; - } - - /** Fires event to delete the Order_Item__c SObject. */ - deleteOrderItem() { - const event = new CustomEvent('orderitemdelete', { - detail: { id: this.orderItem.Id } - }); - this.dispatchEvent(event); - } -} \ No newline at end of file diff --git a/force-app/main/default/lwc/orderItemTile/orderItemTile.js-meta.xml b/force-app/main/default/lwc/orderItemTile/orderItemTile.js-meta.xml deleted file mode 100644 index 1007f02c..00000000 --- a/force-app/main/default/lwc/orderItemTile/orderItemTile.js-meta.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 53.0 - false - \ No newline at end of file diff --git a/force-app/main/default/lwc/paginator/paginator.css b/force-app/main/default/lwc/paginator/paginator.css deleted file mode 100644 index 21728db3..00000000 --- a/force-app/main/default/lwc/paginator/paginator.css +++ /dev/null @@ -1,8 +0,0 @@ -.nav-info { - text-align: center; -} - -.nav-next { - text-align: right; - height: 32px; -} \ No newline at end of file diff --git a/force-app/main/default/lwc/paginator/paginator.html b/force-app/main/default/lwc/paginator/paginator.html deleted file mode 100644 index 95e4d36a..00000000 --- a/force-app/main/default/lwc/paginator/paginator.html +++ /dev/null @@ -1,28 +0,0 @@ - \ No newline at end of file diff --git a/force-app/main/default/lwc/paginator/paginator.js b/force-app/main/default/lwc/paginator/paginator.js deleted file mode 100644 index 73568351..00000000 --- a/force-app/main/default/lwc/paginator/paginator.js +++ /dev/null @@ -1,36 +0,0 @@ -import { LightningElement, api } from 'lwc'; - -export default class Paginator extends LightningElement { - /** The current page number. */ - @api pageNumber; - - /** The number of items on a page. */ - @api pageSize; - - /** The total number of items in the list. */ - @api totalItemCount; - - handlePrevious() { - this.dispatchEvent(new CustomEvent('previous')); - } - - handleNext() { - this.dispatchEvent(new CustomEvent('next')); - } - - get currentPageNumber() { - return this.totalItemCount === 0 ? 0 : this.pageNumber; - } - - get isFirstPage() { - return this.pageNumber === 1; - } - - get isLastPage() { - return this.pageNumber >= this.totalPages; - } - - get totalPages() { - return Math.ceil(this.totalItemCount / this.pageSize); - } -} \ No newline at end of file diff --git a/force-app/main/default/lwc/paginator/paginator.js-meta.xml b/force-app/main/default/lwc/paginator/paginator.js-meta.xml deleted file mode 100644 index 1007f02c..00000000 --- a/force-app/main/default/lwc/paginator/paginator.js-meta.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 53.0 - false - \ No newline at end of file diff --git a/force-app/main/default/lwc/placeholder/placeholder.css b/force-app/main/default/lwc/placeholder/placeholder.css deleted file mode 100644 index 0306dc7f..00000000 --- a/force-app/main/default/lwc/placeholder/placeholder.css +++ /dev/null @@ -1,8 +0,0 @@ -:host > div { - text-align: center; - color: #c23335; -} - -img { - height: 70px; -} \ No newline at end of file diff --git a/force-app/main/default/lwc/placeholder/placeholder.html b/force-app/main/default/lwc/placeholder/placeholder.html deleted file mode 100644 index 42a1c530..00000000 --- a/force-app/main/default/lwc/placeholder/placeholder.html +++ /dev/null @@ -1,6 +0,0 @@ - \ No newline at end of file diff --git a/force-app/main/default/lwc/placeholder/placeholder.js b/force-app/main/default/lwc/placeholder/placeholder.js deleted file mode 100644 index 46ff33ae..00000000 --- a/force-app/main/default/lwc/placeholder/placeholder.js +++ /dev/null @@ -1,11 +0,0 @@ -import { LightningElement, api } from 'lwc'; - -/** Static Resources. */ -import BIKE_ASSETS_URL from '@salesforce/resourceUrl/bike_assets'; - -export default class Placeholder extends LightningElement { - @api message; - - /** Url for bike logo. */ - logoUrl = `${BIKE_ASSETS_URL}/logo.svg`; -} \ No newline at end of file diff --git a/force-app/main/default/lwc/placeholder/placeholder.js-meta.xml b/force-app/main/default/lwc/placeholder/placeholder.js-meta.xml deleted file mode 100644 index 1007f02c..00000000 --- a/force-app/main/default/lwc/placeholder/placeholder.js-meta.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 53.0 - false - \ No newline at end of file diff --git a/force-app/main/default/lwc/productCard/productCard.css b/force-app/main/default/lwc/productCard/productCard.css deleted file mode 100644 index 2b5ef73d..00000000 --- a/force-app/main/default/lwc/productCard/productCard.css +++ /dev/null @@ -1,11 +0,0 @@ -img.product { - width: 100%; - margin-bottom: 0.5rem; -} - -section { - font-weight: bold; - font-size: 0.85rem; - margin-top: 0.75rem; - text-transform: uppercase; -} \ No newline at end of file diff --git a/force-app/main/default/lwc/productCard/productCard.html b/force-app/main/default/lwc/productCard/productCard.html deleted file mode 100644 index 9951878e..00000000 --- a/force-app/main/default/lwc/productCard/productCard.html +++ /dev/null @@ -1,82 +0,0 @@ - \ No newline at end of file diff --git a/force-app/main/default/lwc/productCard/productCard.js b/force-app/main/default/lwc/productCard/productCard.js deleted file mode 100644 index e9e0f2f6..00000000 --- a/force-app/main/default/lwc/productCard/productCard.js +++ /dev/null @@ -1,89 +0,0 @@ -import { LightningElement, wire } from 'lwc'; - -// Lightning Message Service and a message channel -import { NavigationMixin } from 'lightning/navigation'; -import { subscribe, MessageContext } from 'lightning/messageService'; -import PRODUCT_SELECTED_MESSAGE from '@salesforce/messageChannel/ProductSelected__c'; - -// Utils to extract field values -import { getFieldValue } from 'lightning/uiRecordApi'; - -// Product__c Schema -import PRODUCT_OBJECT from '@salesforce/schema/Product__c'; -import NAME_FIELD from '@salesforce/schema/Product__c.Name'; -import PICTURE_URL_FIELD from '@salesforce/schema/Product__c.Picture_URL__c'; -import CATEGORY_FIELD from '@salesforce/schema/Product__c.Category__c'; -import LEVEL_FIELD from '@salesforce/schema/Product__c.Level__c'; -import MSRP_FIELD from '@salesforce/schema/Product__c.MSRP__c'; -import BATTERY_FIELD from '@salesforce/schema/Product__c.Battery__c'; -import CHARGER_FIELD from '@salesforce/schema/Product__c.Charger__c'; -import MOTOR_FIELD from '@salesforce/schema/Product__c.Motor__c'; -import MATERIAL_FIELD from '@salesforce/schema/Product__c.Material__c'; -import FOPK_FIELD from '@salesforce/schema/Product__c.Fork__c'; -import FRONT_BRAKES_FIELD from '@salesforce/schema/Product__c.Front_Brakes__c'; -import REAR_BRAKES_FIELD from '@salesforce/schema/Product__c.Rear_Brakes__c'; - -/** - * Component to display details of a Product__c. - */ -export default class ProductCard extends NavigationMixin(LightningElement) { - // Exposing fields to make them available in the template - categoryField = CATEGORY_FIELD; - levelField = LEVEL_FIELD; - msrpField = MSRP_FIELD; - batteryField = BATTERY_FIELD; - chargerField = CHARGER_FIELD; - motorField = MOTOR_FIELD; - materialField = MATERIAL_FIELD; - forkField = FOPK_FIELD; - frontBrakesField = FRONT_BRAKES_FIELD; - rearBrakesField = REAR_BRAKES_FIELD; - - // Id of Product__c to display - recordId; - - // Product fields displayed with specific format - productName; - productPictureUrl; - - /** Load context for Lightning Messaging Service */ - @wire(MessageContext) messageContext; - - /** Subscription for ProductSelected Lightning message */ - productSelectionSubscription; - - connectedCallback() { - // Subscribe to ProductSelected message - this.productSelectionSubscription = subscribe( - this.messageContext, - PRODUCT_SELECTED_MESSAGE, - (message) => this.handleProductSelected(message.productId) - ); - } - - handleRecordLoaded(event) { - const { records } = event.detail; - const recordData = records[this.recordId]; - this.productName = getFieldValue(recordData, NAME_FIELD); - this.productPictureUrl = getFieldValue(recordData, PICTURE_URL_FIELD); - } - - /** - * Handler for when a product is selected. When `this.recordId` changes, the - * lightning-record-view-form component will detect the change and provision new data. - */ - handleProductSelected(productId) { - this.recordId = productId; - } - - handleNavigateToRecord() { - this[NavigationMixin.Navigate]({ - type: 'standard__recordPage', - attributes: { - recordId: this.recordId, - objectApiName: PRODUCT_OBJECT.objectApiName, - actionName: 'view' - } - }); - } -} \ No newline at end of file diff --git a/force-app/main/default/lwc/productCard/productCard.js-meta.xml b/force-app/main/default/lwc/productCard/productCard.js-meta.xml deleted file mode 100644 index d384a93c..00000000 --- a/force-app/main/default/lwc/productCard/productCard.js-meta.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - 53.0 - true - Product Card - - lightning__AppPage - lightning__RecordPage - lightning__HomePage - lightningCommunity__Page - - - - - Product__c - - - - \ No newline at end of file diff --git a/force-app/main/default/lwc/productFilter/productFilter.css b/force-app/main/default/lwc/productFilter/productFilter.css deleted file mode 100644 index 7d1605af..00000000 --- a/force-app/main/default/lwc/productFilter/productFilter.css +++ /dev/null @@ -1,8 +0,0 @@ -section { - margin-top: 16px; -} - -section > h1 { - font-weight: bold; - text-transform: uppercase; -} \ No newline at end of file diff --git a/force-app/main/default/lwc/productFilter/productFilter.html b/force-app/main/default/lwc/productFilter/productFilter.html deleted file mode 100644 index 7407bb17..00000000 --- a/force-app/main/default/lwc/productFilter/productFilter.html +++ /dev/null @@ -1,96 +0,0 @@ - \ No newline at end of file diff --git a/force-app/main/default/lwc/productFilter/productFilter.js b/force-app/main/default/lwc/productFilter/productFilter.js deleted file mode 100644 index 0265d585..00000000 --- a/force-app/main/default/lwc/productFilter/productFilter.js +++ /dev/null @@ -1,103 +0,0 @@ -import { LightningElement, wire } from 'lwc'; -import { getPicklistValues } from 'lightning/uiObjectInfoApi'; - -// Product schema -import CATEGORY_FIELD from '@salesforce/schema/Product__c.Category__c'; -import LEVEL_FIELD from '@salesforce/schema/Product__c.Level__c'; -import MATERIAL_FIELD from '@salesforce/schema/Product__c.Material__c'; - -// Lightning Message Service and a message channel -import { publish, MessageContext } from 'lightning/messageService'; -import PRODUCTS_FILTERED_MESSAGE from '@salesforce/messageChannel/ProductsFiltered__c'; - -// The delay used when debouncing event handlers before firing the event -const DELAY = 350; - -/** - * Displays a filter panel to search for Product__c[]. - */ -export default class ProductFilter extends LightningElement { - searchKey = ''; - maxPrice = 10000; - - filters = { - searchKey: '', - maxPrice: 10000 - }; - - @wire(MessageContext) - messageContext; - - @wire(getPicklistValues, { - recordTypeId: '012000000000000AAA', - fieldApiName: CATEGORY_FIELD - }) - categories; - - @wire(getPicklistValues, { - recordTypeId: '012000000000000AAA', - fieldApiName: LEVEL_FIELD - }) - levels; - - @wire(getPicklistValues, { - recordTypeId: '012000000000000AAA', - fieldApiName: MATERIAL_FIELD - }) - materials; - - handleSearchKeyChange(event) { - this.filters.searchKey = event.target.value; - this.delayedFireFilterChangeEvent(); - } - - handleMaxPriceChange(event) { - const maxPrice = event.target.value; - this.filters.maxPrice = maxPrice; - this.delayedFireFilterChangeEvent(); - } - - handleCheckboxChange(event) { - if (!this.filters.categories) { - // Lazy initialize filters with all values initially set - this.filters.categories = this.categories.data.values.map( - (item) => item.value - ); - this.filters.levels = this.levels.data.values.map( - (item) => item.value - ); - this.filters.materials = this.materials.data.values.map( - (item) => item.value - ); - } - const value = event.target.dataset.value; - const filterArray = this.filters[event.target.dataset.filter]; - if (event.target.checked) { - if (!filterArray.includes(value)) { - filterArray.push(value); - } - } else { - this.filters[event.target.dataset.filter] = filterArray.filter( - (item) => item !== value - ); - } - // Published ProductsFiltered message - publish(this.messageContext, PRODUCTS_FILTERED_MESSAGE, { - filters: this.filters - }); - } - - delayedFireFilterChangeEvent() { - // Debouncing this method: Do not actually fire the event as long as this function is - // being called within a delay of DELAY. This is to avoid a very large number of Apex - // method calls in components listening to this event. - window.clearTimeout(this.delayTimeout); - // eslint-disable-next-line @lwc/lwc/no-async-operation - this.delayTimeout = setTimeout(() => { - // Published ProductsFiltered message - publish(this.messageContext, PRODUCTS_FILTERED_MESSAGE, { - filters: this.filters - }); - }, DELAY); - } -} \ No newline at end of file diff --git a/force-app/main/default/lwc/productFilter/productFilter.js-meta.xml b/force-app/main/default/lwc/productFilter/productFilter.js-meta.xml deleted file mode 100644 index 141f921f..00000000 --- a/force-app/main/default/lwc/productFilter/productFilter.js-meta.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - 53.0 - true - Product Filter - - lightning__AppPage - lightning__HomePage - lightningCommunity__Page - - \ No newline at end of file diff --git a/force-app/main/default/lwc/productListItem/productListItem.css b/force-app/main/default/lwc/productListItem/productListItem.css deleted file mode 100644 index ecf53606..00000000 --- a/force-app/main/default/lwc/productListItem/productListItem.css +++ /dev/null @@ -1,5 +0,0 @@ -img.product { - height: 80px; - max-width: initial; - pointer-events: none; -} \ No newline at end of file diff --git a/force-app/main/default/lwc/productListItem/productListItem.html b/force-app/main/default/lwc/productListItem/productListItem.html deleted file mode 100644 index ae50becc..00000000 --- a/force-app/main/default/lwc/productListItem/productListItem.html +++ /dev/null @@ -1,31 +0,0 @@ - \ No newline at end of file diff --git a/force-app/main/default/lwc/productListItem/productListItem.js b/force-app/main/default/lwc/productListItem/productListItem.js deleted file mode 100644 index 9b343de2..00000000 --- a/force-app/main/default/lwc/productListItem/productListItem.js +++ /dev/null @@ -1,23 +0,0 @@ -import { LightningElement, api } from 'lwc'; -import { NavigationMixin } from 'lightning/navigation'; -import PRODUCT_OBJECT from '@salesforce/schema/Product__c'; - -/** - * A presentation component to display a Product__c sObject. The provided - * Product__c data must contain all fields used by this component. - */ -export default class ProductListItem extends NavigationMixin(LightningElement) { - @api product; - - /** View Details Handler to navigates to the record page */ - handleViewDetailsClick() { - this[NavigationMixin.Navigate]({ - type: 'standard__recordPage', - attributes: { - recordId: this.product.Id, - objectApiName: PRODUCT_OBJECT.objectApiName, - actionName: 'view' - } - }); - } -} \ No newline at end of file diff --git a/force-app/main/default/lwc/productListItem/productListItem.js-meta.xml b/force-app/main/default/lwc/productListItem/productListItem.js-meta.xml deleted file mode 100644 index 1007f02c..00000000 --- a/force-app/main/default/lwc/productListItem/productListItem.js-meta.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 53.0 - false - \ No newline at end of file diff --git a/force-app/main/default/lwc/productTile/productTile.css b/force-app/main/default/lwc/productTile/productTile.css deleted file mode 100644 index f2e72232..00000000 --- a/force-app/main/default/lwc/productTile/productTile.css +++ /dev/null @@ -1,20 +0,0 @@ -.content { - padding: 8px; - background-color: #ffffff; - border-radius: 0.25rem; -} - -a { - color: inherit; -} - -img.product { - height: 120px; - max-width: initial; - pointer-events: none; -} - -.title { - font-weight: bold; - text-transform: uppercase; -} \ No newline at end of file diff --git a/force-app/main/default/lwc/productTile/productTile.html b/force-app/main/default/lwc/productTile/productTile.html deleted file mode 100644 index 6c870c5f..00000000 --- a/force-app/main/default/lwc/productTile/productTile.html +++ /dev/null @@ -1,26 +0,0 @@ - \ No newline at end of file diff --git a/force-app/main/default/lwc/productTile/productTile.js b/force-app/main/default/lwc/productTile/productTile.js deleted file mode 100644 index 7e44714d..00000000 --- a/force-app/main/default/lwc/productTile/productTile.js +++ /dev/null @@ -1,39 +0,0 @@ -import { LightningElement, api } from 'lwc'; - -/** - * A presentation component to display a Product__c sObject. The provided - * Product__c data must contain all fields used by this component. - */ -export default class ProductTile extends LightningElement { - /** Whether the tile is draggable. */ - @api draggable; - - _product; - /** Product__c to display. */ - @api - get product() { - return this._product; - } - set product(value) { - this._product = value; - this.pictureUrl = value.Picture_URL__c; - this.name = value.Name; - this.msrp = value.MSRP__c; - } - - /** Product__c field values to display. */ - pictureUrl; - name; - msrp; - - handleClick() { - const selectedEvent = new CustomEvent('selected', { - detail: this.product.Id - }); - this.dispatchEvent(selectedEvent); - } - - handleDragStart(event) { - event.dataTransfer.setData('product', JSON.stringify(this.product)); - } -} \ No newline at end of file diff --git a/force-app/main/default/lwc/productTile/productTile.js-meta.xml b/force-app/main/default/lwc/productTile/productTile.js-meta.xml deleted file mode 100644 index 4f6cba89..00000000 --- a/force-app/main/default/lwc/productTile/productTile.js-meta.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - 53.0 - true - Product Tile - \ No newline at end of file diff --git a/force-app/main/default/lwc/productTileList/productTileList.css b/force-app/main/default/lwc/productTileList/productTileList.css deleted file mode 100644 index 4e127030..00000000 --- a/force-app/main/default/lwc/productTileList/productTileList.css +++ /dev/null @@ -1,22 +0,0 @@ -.slds-card { - background: rgb(243, 242, 242); -} - -.search-bar { - display: block; - margin: 0 0.5rem 0.3rem 0.5rem; -} - -.content { - display: flex; - flex-wrap: wrap; -} - -c-product-tile { - min-width: 200px; - flex: 1; -} - -c-paginator { - display: block; -} \ No newline at end of file diff --git a/force-app/main/default/lwc/productTileList/productTileList.html b/force-app/main/default/lwc/productTileList/productTileList.html deleted file mode 100644 index 6749caa8..00000000 --- a/force-app/main/default/lwc/productTileList/productTileList.html +++ /dev/null @@ -1,46 +0,0 @@ - \ No newline at end of file diff --git a/force-app/main/default/lwc/productTileList/productTileList.js b/force-app/main/default/lwc/productTileList/productTileList.js deleted file mode 100644 index 01c8dc11..00000000 --- a/force-app/main/default/lwc/productTileList/productTileList.js +++ /dev/null @@ -1,86 +0,0 @@ -import { LightningElement, api, wire } from 'lwc'; - -// Lightning Message Service and message channels -import { publish, subscribe, MessageContext } from 'lightning/messageService'; -import PRODUCTS_FILTERED_MESSAGE from '@salesforce/messageChannel/ProductsFiltered__c'; -import PRODUCT_SELECTED_MESSAGE from '@salesforce/messageChannel/ProductSelected__c'; - -// getProducts() method in ProductController Apex class -import getProducts from '@salesforce/apex/ProductController.getProducts'; - -/** - * Container component that loads and displays a list of Product__c records. - */ -export default class ProductTileList extends LightningElement { - /** - * Whether to display the search bar. - * TODO - normalize value because it may come as a boolean, string or otherwise. - */ - @api searchBarIsVisible = false; - - /** - * Whether the product tiles are draggable. - * TODO - normalize value because it may come as a boolean, string or otherwise. - */ - @api tilesAreDraggable = false; - - /** Current page in the product list. */ - pageNumber = 1; - - /** The number of items on a page. */ - pageSize; - - /** The total number of items matching the selection. */ - totalItemCount = 0; - - /** JSON.stringified version of filters to pass to apex */ - filters = {}; - - /** Load context for Lightning Messaging Service */ - @wire(MessageContext) messageContext; - - /** Subscription for ProductsFiltered Lightning message */ - productFilterSubscription; - - /** - * Load the list of available products. - */ - @wire(getProducts, { filters: '$filters', pageNumber: '$pageNumber' }) - products; - - connectedCallback() { - // Subscribe to ProductsFiltered message - this.productFilterSubscription = subscribe( - this.messageContext, - PRODUCTS_FILTERED_MESSAGE, - (message) => this.handleFilterChange(message) - ); - } - - handleProductSelected(event) { - // Published ProductSelected message - publish(this.messageContext, PRODUCT_SELECTED_MESSAGE, { - productId: event.detail - }); - } - - handleSearchKeyChange(event) { - this.filters = { - searchKey: event.target.value.toLowerCase() - }; - this.pageNumber = 1; - } - - handleFilterChange(message) { - this.filters = { ...message.filters }; - this.pageNumber = 1; - } - - handlePreviousPage() { - this.pageNumber = this.pageNumber - 1; - } - - handleNextPage() { - this.pageNumber = this.pageNumber + 1; - } -} \ No newline at end of file diff --git a/force-app/main/default/lwc/productTileList/productTileList.js-meta.xml b/force-app/main/default/lwc/productTileList/productTileList.js-meta.xml deleted file mode 100644 index 3acc9e01..00000000 --- a/force-app/main/default/lwc/productTileList/productTileList.js-meta.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - 53.0 - true - Product Tile List - - lightning__AppPage - lightning__RecordPage - lightning__HomePage - lightningCommunity__Page - lightningCommunity__Default - - - - - - - Order__c - - - - - - - - \ No newline at end of file diff --git a/force-app/main/default/lwc/similarProducts/similarProducts.css b/force-app/main/default/lwc/similarProducts/similarProducts.css deleted file mode 100644 index fcbe2718..00000000 --- a/force-app/main/default/lwc/similarProducts/similarProducts.css +++ /dev/null @@ -1,5 +0,0 @@ -img.product { - height: 120px; - max-width: initial; - pointer-events: none; -} \ No newline at end of file diff --git a/force-app/main/default/lwc/similarProducts/similarProducts.html b/force-app/main/default/lwc/similarProducts/similarProducts.html deleted file mode 100644 index 46a20c3c..00000000 --- a/force-app/main/default/lwc/similarProducts/similarProducts.html +++ /dev/null @@ -1,25 +0,0 @@ - \ No newline at end of file diff --git a/force-app/main/default/lwc/similarProducts/similarProducts.js b/force-app/main/default/lwc/similarProducts/similarProducts.js deleted file mode 100644 index 524549bd..00000000 --- a/force-app/main/default/lwc/similarProducts/similarProducts.js +++ /dev/null @@ -1,30 +0,0 @@ -import { LightningElement, api, wire } from 'lwc'; -import { getRecord } from 'lightning/uiRecordApi'; -import getSimilarProducts from '@salesforce/apex/ProductController.getSimilarProducts'; -import PRODUCT_FAMILY_FIELD from '@salesforce/schema/Product__c.Product_Family__c'; - -const fields = [PRODUCT_FAMILY_FIELD]; - -export default class SimilarProducts extends LightningElement { - @api recordId; - @api familyId; - - // Track changes to the Product_Family__c field that could be made in other components. - // If Product_Family__c is updated in another component, getSimilarProducts - // is automatically re-invoked with the new this.familyId parameter - @wire(getRecord, { recordId: '$recordId', fields }) - product; - - @wire(getSimilarProducts, { - productId: '$recordId', - familyId: '$product.data.fields.Product_Family__c.value' - }) - similarProducts; - - get errors() { - const errors = [this.product.error, this.similarProducts.error].filter( - (error) => error - ); - return errors.length ? errors : undefined; - } -} \ No newline at end of file diff --git a/force-app/main/default/lwc/similarProducts/similarProducts.js-meta.xml b/force-app/main/default/lwc/similarProducts/similarProducts.js-meta.xml deleted file mode 100644 index 43b30304..00000000 --- a/force-app/main/default/lwc/similarProducts/similarProducts.js-meta.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - 53.0 - true - Similar Products - - lightning__RecordPage - lightningCommunity__Page - lightningCommunity__Default - - - - - Product__c - - - - - - - \ No newline at end of file diff --git a/force-app/main/default/pages/AnswersHome.page b/force-app/main/default/pages/AnswersHome.page deleted file mode 100644 index a305b75d..00000000 --- a/force-app/main/default/pages/AnswersHome.page +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/force-app/main/default/pages/AnswersHome.page-meta.xml b/force-app/main/default/pages/AnswersHome.page-meta.xml deleted file mode 100644 index 75c42dd6..00000000 --- a/force-app/main/default/pages/AnswersHome.page-meta.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - 53.0 - false - false - Default Lightning Platform home page for Answers sites - - - 1 - 7 - sf_com_apps - - - 1 - 6 - trlhdtips - - diff --git a/force-app/main/default/pages/BandwidthExceeded.page b/force-app/main/default/pages/BandwidthExceeded.page deleted file mode 100644 index c6619ce0..00000000 --- a/force-app/main/default/pages/BandwidthExceeded.page +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - -
-
- -
-
-
\ No newline at end of file diff --git a/force-app/main/default/pages/BandwidthExceeded.page-meta.xml b/force-app/main/default/pages/BandwidthExceeded.page-meta.xml deleted file mode 100644 index 26e9b280..00000000 --- a/force-app/main/default/pages/BandwidthExceeded.page-meta.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - 53.0 - false - false - Default Lightning Platform Limit Exceeded page - - - 1 - 7 - sf_com_apps - - - 1 - 6 - trlhdtips - - diff --git a/force-app/main/default/pages/ChangePassword.page b/force-app/main/default/pages/ChangePassword.page deleted file mode 100644 index ffb6b69a..00000000 --- a/force-app/main/default/pages/ChangePassword.page +++ /dev/null @@ -1,41 +0,0 @@ - - - -
- -
-
- -
- - - - -
- -
- - - - - - - - - - - - - -
-
-
-
- -
-
-
-
-
-
-
\ No newline at end of file diff --git a/force-app/main/default/pages/ChangePassword.page-meta.xml b/force-app/main/default/pages/ChangePassword.page-meta.xml deleted file mode 100644 index 7b57a37f..00000000 --- a/force-app/main/default/pages/ChangePassword.page-meta.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - 53.0 - false - false - Default Salesforce Sites Change Password page - - - 1 - 7 - sf_com_apps - - - 1 - 6 - trlhdtips - - diff --git a/force-app/main/default/pages/CommunitiesLanding.page b/force-app/main/default/pages/CommunitiesLanding.page deleted file mode 100644 index 4e9ca156..00000000 --- a/force-app/main/default/pages/CommunitiesLanding.page +++ /dev/null @@ -1,6 +0,0 @@ - - \ No newline at end of file diff --git a/force-app/main/default/pages/CommunitiesLanding.page-meta.xml b/force-app/main/default/pages/CommunitiesLanding.page-meta.xml deleted file mode 100644 index 9fbfebd3..00000000 --- a/force-app/main/default/pages/CommunitiesLanding.page-meta.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - 53.0 - false - false - Default communities landing page - - - 1 - 7 - sf_com_apps - - - 1 - 6 - trlhdtips - - diff --git a/force-app/main/default/pages/CommunitiesLogin.page b/force-app/main/default/pages/CommunitiesLogin.page deleted file mode 100644 index ba837c96..00000000 --- a/force-app/main/default/pages/CommunitiesLogin.page +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/force-app/main/default/pages/CommunitiesLogin.page-meta.xml b/force-app/main/default/pages/CommunitiesLogin.page-meta.xml deleted file mode 100644 index 88adb768..00000000 --- a/force-app/main/default/pages/CommunitiesLogin.page-meta.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - 53.0 - false - false - Default experiences login page - - - 1 - 7 - sf_com_apps - - - 1 - 6 - trlhdtips - - diff --git a/force-app/main/default/pages/CommunitiesSelfReg.page b/force-app/main/default/pages/CommunitiesSelfReg.page deleted file mode 100644 index ba08f093..00000000 --- a/force-app/main/default/pages/CommunitiesSelfReg.page +++ /dev/null @@ -1,28 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - -
-
-
-
-
- -
\ No newline at end of file diff --git a/force-app/main/default/pages/CommunitiesSelfReg.page-meta.xml b/force-app/main/default/pages/CommunitiesSelfReg.page-meta.xml deleted file mode 100644 index 926d0e9f..00000000 --- a/force-app/main/default/pages/CommunitiesSelfReg.page-meta.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - 53.0 - false - false - Default experiences self registration page - - - 1 - 7 - sf_com_apps - - - 1 - 6 - trlhdtips - - diff --git a/force-app/main/default/pages/CommunitiesSelfRegConfirm.page b/force-app/main/default/pages/CommunitiesSelfRegConfirm.page deleted file mode 100644 index 33f9830f..00000000 --- a/force-app/main/default/pages/CommunitiesSelfRegConfirm.page +++ /dev/null @@ -1,28 +0,0 @@ - - -
- -
-
- -
- - - - -
- -
-
- {!$Label.site.go_to_login_page} -
-
-
-
- -
-
-
-
-
-
\ No newline at end of file diff --git a/force-app/main/default/pages/CommunitiesSelfRegConfirm.page-meta.xml b/force-app/main/default/pages/CommunitiesSelfRegConfirm.page-meta.xml deleted file mode 100644 index 931f1584..00000000 --- a/force-app/main/default/pages/CommunitiesSelfRegConfirm.page-meta.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - 53.0 - false - false - Default experiences self registration confirmation page - - - 1 - 7 - sf_com_apps - - - 1 - 6 - trlhdtips - - diff --git a/force-app/main/default/pages/CommunitiesTemplate.page b/force-app/main/default/pages/CommunitiesTemplate.page deleted file mode 100644 index 345cb1da..00000000 --- a/force-app/main/default/pages/CommunitiesTemplate.page +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/force-app/main/default/pages/CommunitiesTemplate.page-meta.xml b/force-app/main/default/pages/CommunitiesTemplate.page-meta.xml deleted file mode 100644 index 78c51d6c..00000000 --- a/force-app/main/default/pages/CommunitiesTemplate.page-meta.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - 53.0 - false - false - Default template for experiences pages - - - 1 - 7 - sf_com_apps - - - 1 - 6 - trlhdtips - - diff --git a/force-app/main/default/pages/Exception.page b/force-app/main/default/pages/Exception.page deleted file mode 100644 index 6a1c44f9..00000000 --- a/force-app/main/default/pages/Exception.page +++ /dev/null @@ -1,33 +0,0 @@ - - - -
- -
-
- -
- - - - - - - - - -
-
-
-
-
- -
-
- -
-
-
-
-
-
\ No newline at end of file diff --git a/force-app/main/default/pages/Exception.page-meta.xml b/force-app/main/default/pages/Exception.page-meta.xml deleted file mode 100644 index 5468fc38..00000000 --- a/force-app/main/default/pages/Exception.page-meta.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - 53.0 - false - false - Default Lightning Platform page for post-authentication errors - - - 1 - 7 - sf_com_apps - - - 1 - 6 - trlhdtips - - diff --git a/force-app/main/default/pages/FileNotFound.page b/force-app/main/default/pages/FileNotFound.page deleted file mode 100644 index de87624b..00000000 --- a/force-app/main/default/pages/FileNotFound.page +++ /dev/null @@ -1,31 +0,0 @@ - - - -
- -
-
- -
- - - - - - - - -
-
- -
-
-
- -
-
-
-
-
- -
\ No newline at end of file diff --git a/force-app/main/default/pages/FileNotFound.page-meta.xml b/force-app/main/default/pages/FileNotFound.page-meta.xml deleted file mode 100644 index fb768264..00000000 --- a/force-app/main/default/pages/FileNotFound.page-meta.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - 53.0 - false - false - Default Lightning Platform Page/Data Not Found page - - - 1 - 7 - sf_com_apps - - - 1 - 6 - trlhdtips - - diff --git a/force-app/main/default/pages/ForgotPassword.page b/force-app/main/default/pages/ForgotPassword.page deleted file mode 100644 index 9877886a..00000000 --- a/force-app/main/default/pages/ForgotPassword.page +++ /dev/null @@ -1,36 +0,0 @@ - - - -
- -
-
- -
- - - - -
- -
- - - - - - - - -
-
-
-
- -
-
-
-
-
-
-
\ No newline at end of file diff --git a/force-app/main/default/pages/ForgotPassword.page-meta.xml b/force-app/main/default/pages/ForgotPassword.page-meta.xml deleted file mode 100644 index 66338987..00000000 --- a/force-app/main/default/pages/ForgotPassword.page-meta.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - 53.0 - false - false - Default Salesforce Sites Forgot Password Confirmation page - - - 1 - 7 - sf_com_apps - - - 1 - 6 - trlhdtips - - diff --git a/force-app/main/default/pages/ForgotPasswordConfirm.page b/force-app/main/default/pages/ForgotPasswordConfirm.page deleted file mode 100644 index 77f26545..00000000 --- a/force-app/main/default/pages/ForgotPasswordConfirm.page +++ /dev/null @@ -1,30 +0,0 @@ - - - -
- -
-
- -
- - - - -
- -
-
- {!$Label.site.go_to_login_page} -
-
-
-
- -
-
-
-
-
-
-
\ No newline at end of file diff --git a/force-app/main/default/pages/ForgotPasswordConfirm.page-meta.xml b/force-app/main/default/pages/ForgotPasswordConfirm.page-meta.xml deleted file mode 100644 index 6ff63afd..00000000 --- a/force-app/main/default/pages/ForgotPasswordConfirm.page-meta.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - 53.0 - false - false - Default Salesforce Sites Forgot Password Confirmation page - - - 1 - 7 - sf_com_apps - - - 1 - 6 - trlhdtips - - diff --git a/force-app/main/default/pages/IdeasHome.page b/force-app/main/default/pages/IdeasHome.page deleted file mode 100644 index 165405b1..00000000 --- a/force-app/main/default/pages/IdeasHome.page +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/force-app/main/default/pages/IdeasHome.page-meta.xml b/force-app/main/default/pages/IdeasHome.page-meta.xml deleted file mode 100644 index 0a457555..00000000 --- a/force-app/main/default/pages/IdeasHome.page-meta.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - 53.0 - false - false - Default Lightning Platform home page for ideas sites - - - 1 - 7 - sf_com_apps - - - 1 - 6 - trlhdtips - - diff --git a/force-app/main/default/pages/InMaintenance.page b/force-app/main/default/pages/InMaintenance.page deleted file mode 100644 index a0f5f0f3..00000000 --- a/force-app/main/default/pages/InMaintenance.page +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - -
-
- -
-
-
\ No newline at end of file diff --git a/force-app/main/default/pages/InMaintenance.page-meta.xml b/force-app/main/default/pages/InMaintenance.page-meta.xml deleted file mode 100644 index a2518ed8..00000000 --- a/force-app/main/default/pages/InMaintenance.page-meta.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - 53.0 - false - false - Default Lightning Platform In Maintenance page - - - 1 - 7 - sf_com_apps - - - 1 - 6 - trlhdtips - - diff --git a/force-app/main/default/pages/MyProfilePage.page b/force-app/main/default/pages/MyProfilePage.page deleted file mode 100644 index bf729300..00000000 --- a/force-app/main/default/pages/MyProfilePage.page +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/force-app/main/default/pages/MyProfilePage.page-meta.xml b/force-app/main/default/pages/MyProfilePage.page-meta.xml deleted file mode 100644 index 093203d5..00000000 --- a/force-app/main/default/pages/MyProfilePage.page-meta.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - 53.0 - false - false - Default Salesforce Sites My Profile page - - - 1 - 7 - sf_com_apps - - - 1 - 6 - trlhdtips - - diff --git a/force-app/main/default/pages/SiteLogin.page b/force-app/main/default/pages/SiteLogin.page deleted file mode 100644 index 6f0900b8..00000000 --- a/force-app/main/default/pages/SiteLogin.page +++ /dev/null @@ -1,29 +0,0 @@ - - - -
- -
-
- -
- - - - -
- -
- -
-
-
-
- -
-
-
-
-
-
-
\ No newline at end of file diff --git a/force-app/main/default/pages/SiteLogin.page-meta.xml b/force-app/main/default/pages/SiteLogin.page-meta.xml deleted file mode 100644 index 10fec4b0..00000000 --- a/force-app/main/default/pages/SiteLogin.page-meta.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - 53.0 - false - false - Default Salesforce Sites Login page - - - 1 - 7 - sf_com_apps - - - 1 - 6 - trlhdtips - - diff --git a/force-app/main/default/pages/SiteRegister.page b/force-app/main/default/pages/SiteRegister.page deleted file mode 100644 index b4e443e4..00000000 --- a/force-app/main/default/pages/SiteRegister.page +++ /dev/null @@ -1,45 +0,0 @@ - - - -
- -
-
- -
- - - - -
- -
- - - - - - - - - - - - - - - - - -
-
-
-
- -
-
-
-
-
-
-
\ No newline at end of file diff --git a/force-app/main/default/pages/SiteRegister.page-meta.xml b/force-app/main/default/pages/SiteRegister.page-meta.xml deleted file mode 100644 index 60b42d96..00000000 --- a/force-app/main/default/pages/SiteRegister.page-meta.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - 53.0 - false - false - Default Salesforce Sites User Registration page - - - 1 - 7 - sf_com_apps - - - 1 - 6 - trlhdtips - - diff --git a/force-app/main/default/pages/SiteRegisterConfirm.page b/force-app/main/default/pages/SiteRegisterConfirm.page deleted file mode 100644 index 6001957a..00000000 --- a/force-app/main/default/pages/SiteRegisterConfirm.page +++ /dev/null @@ -1,30 +0,0 @@ - - - -
- -
-
- -
- - - - -
- -
-
- {!$Label.site.go_to_login_page} -
-
-
-
- -
-
-
-
-
-
-
\ No newline at end of file diff --git a/force-app/main/default/pages/SiteRegisterConfirm.page-meta.xml b/force-app/main/default/pages/SiteRegisterConfirm.page-meta.xml deleted file mode 100644 index 8b7bbb43..00000000 --- a/force-app/main/default/pages/SiteRegisterConfirm.page-meta.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - 53.0 - false - false - Default Salesforce Sites User Registration Confirmation page - - - 1 - 7 - sf_com_apps - - - 1 - 6 - trlhdtips - - diff --git a/force-app/main/default/pages/SiteTemplate.page b/force-app/main/default/pages/SiteTemplate.page deleted file mode 100644 index 2476eb5e..00000000 --- a/force-app/main/default/pages/SiteTemplate.page +++ /dev/null @@ -1,13 +0,0 @@ - - - - -
-
- - -
- - -
-
\ No newline at end of file diff --git a/force-app/main/default/pages/SiteTemplate.page-meta.xml b/force-app/main/default/pages/SiteTemplate.page-meta.xml deleted file mode 100644 index 97695c5d..00000000 --- a/force-app/main/default/pages/SiteTemplate.page-meta.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - 53.0 - false - false - Default Lightning Platform template for site pages - - - 1 - 7 - sf_com_apps - - - 1 - 6 - trlhdtips - - diff --git a/force-app/main/default/pages/StdExceptionTemplate.page b/force-app/main/default/pages/StdExceptionTemplate.page deleted file mode 100644 index 965917df..00000000 --- a/force-app/main/default/pages/StdExceptionTemplate.page +++ /dev/null @@ -1,23 +0,0 @@ - - -
- -
-
- -
- - - - - - - - -
-
- -
-
-
-
\ No newline at end of file diff --git a/force-app/main/default/pages/StdExceptionTemplate.page-meta.xml b/force-app/main/default/pages/StdExceptionTemplate.page-meta.xml deleted file mode 100644 index 4376ed54..00000000 --- a/force-app/main/default/pages/StdExceptionTemplate.page-meta.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - 53.0 - false - false - Default Lightning Platform template for standard exception pages - - - 1 - 7 - sf_com_apps - - - 1 - 6 - trlhdtips - - diff --git a/force-app/main/default/pages/Unauthorized.page b/force-app/main/default/pages/Unauthorized.page deleted file mode 100644 index b0e4ff2d..00000000 --- a/force-app/main/default/pages/Unauthorized.page +++ /dev/null @@ -1,38 +0,0 @@ - - - -
- -
-
- -
- - - - - - -
-
- -
- -
-
-
- - - -
-
-
- -
-
-
-
-
-
- -
\ No newline at end of file diff --git a/force-app/main/default/pages/Unauthorized.page-meta.xml b/force-app/main/default/pages/Unauthorized.page-meta.xml deleted file mode 100644 index ef4d8ba4..00000000 --- a/force-app/main/default/pages/Unauthorized.page-meta.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - 53.0 - false - false - Default Lightning Platform Authorization Required page - - - 1 - 7 - sf_com_apps - - - 1 - 6 - trlhdtips - - diff --git a/force-app/main/default/pages/UnderConstruction.page b/force-app/main/default/pages/UnderConstruction.page deleted file mode 100644 index 81dc16ea..00000000 --- a/force-app/main/default/pages/UnderConstruction.page +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - -
-
- -
-
-
\ No newline at end of file diff --git a/force-app/main/default/pages/UnderConstruction.page-meta.xml b/force-app/main/default/pages/UnderConstruction.page-meta.xml deleted file mode 100644 index 8e1f746c..00000000 --- a/force-app/main/default/pages/UnderConstruction.page-meta.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - 53.0 - false - false - Default Lightning Platform Under Construction page - - - 1 - 7 - sf_com_apps - - - 1 - 6 - trlhdtips - - diff --git a/force-app/main/default/staticresources/SiteSamples.resource-meta.xml b/force-app/main/default/staticresources/SiteSamples.resource-meta.xml deleted file mode 100644 index 1ed30e1a..00000000 --- a/force-app/main/default/staticresources/SiteSamples.resource-meta.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Public - application/zip - Static resource for sites sample pages - diff --git a/force-app/main/default/staticresources/SiteSamples/SiteStyles.css b/force-app/main/default/staticresources/SiteSamples/SiteStyles.css deleted file mode 100644 index c61cbc0d..00000000 --- a/force-app/main/default/staticresources/SiteSamples/SiteStyles.css +++ /dev/null @@ -1,28 +0,0 @@ -.topPanelContainer { - text-align:left; - border:1px solid #ccc; -} - -.topPanel { - background-color: white; - border: 1px solid #ccc; - padding: 0px; - margin-top: 10px; - margin-bottom: 0px; - margin-left: 10px; - margin-right: 10px; -} - -.title { - font-size: larger; - font-weight: bold; -} - -.poweredByImage { - vertical-align: middle; - margin:12px 8px 8px 0; -} - -img { - border: none; -} \ No newline at end of file diff --git a/force-app/main/default/staticresources/SiteSamples/img/clock.png b/force-app/main/default/staticresources/SiteSamples/img/clock.png deleted file mode 100644 index dc1cbecf..00000000 Binary files a/force-app/main/default/staticresources/SiteSamples/img/clock.png and /dev/null differ diff --git a/force-app/main/default/staticresources/SiteSamples/img/construction.png b/force-app/main/default/staticresources/SiteSamples/img/construction.png deleted file mode 100644 index 236ead92..00000000 Binary files a/force-app/main/default/staticresources/SiteSamples/img/construction.png and /dev/null differ diff --git a/force-app/main/default/staticresources/SiteSamples/img/force_logo.png b/force-app/main/default/staticresources/SiteSamples/img/force_logo.png deleted file mode 100644 index 96122284..00000000 Binary files a/force-app/main/default/staticresources/SiteSamples/img/force_logo.png and /dev/null differ diff --git a/force-app/main/default/staticresources/SiteSamples/img/maintenance.png b/force-app/main/default/staticresources/SiteSamples/img/maintenance.png deleted file mode 100644 index 45b636a7..00000000 Binary files a/force-app/main/default/staticresources/SiteSamples/img/maintenance.png and /dev/null differ diff --git a/force-app/main/default/staticresources/SiteSamples/img/poweredby.png b/force-app/main/default/staticresources/SiteSamples/img/poweredby.png deleted file mode 100644 index 806fba88..00000000 Binary files a/force-app/main/default/staticresources/SiteSamples/img/poweredby.png and /dev/null differ diff --git a/force-app/main/default/staticresources/SiteSamples/img/tools.png b/force-app/main/default/staticresources/SiteSamples/img/tools.png deleted file mode 100644 index e4288538..00000000 Binary files a/force-app/main/default/staticresources/SiteSamples/img/tools.png and /dev/null differ diff --git a/force-app/main/default/staticresources/SiteSamples/img/unauthorized.png b/force-app/main/default/staticresources/SiteSamples/img/unauthorized.png deleted file mode 100644 index d0d07e26..00000000 Binary files a/force-app/main/default/staticresources/SiteSamples/img/unauthorized.png and /dev/null differ diff --git a/force-app/main/default/staticresources/SiteSamples/img/warning.png b/force-app/main/default/staticresources/SiteSamples/img/warning.png deleted file mode 100644 index b49fd8f7..00000000 Binary files a/force-app/main/default/staticresources/SiteSamples/img/warning.png and /dev/null differ diff --git a/force-app/main/default/staticresources/bike_assets.resource-meta.xml b/force-app/main/default/staticresources/bike_assets.resource-meta.xml deleted file mode 100644 index 78e2716b..00000000 --- a/force-app/main/default/staticresources/bike_assets.resource-meta.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - Public - application/zip - diff --git a/force-app/main/default/staticresources/bike_assets/CyclingGrass.jpg b/force-app/main/default/staticresources/bike_assets/CyclingGrass.jpg deleted file mode 100644 index 2d5586d6..00000000 Binary files a/force-app/main/default/staticresources/bike_assets/CyclingGrass.jpg and /dev/null differ diff --git a/force-app/main/default/staticresources/bike_assets/commuter.png b/force-app/main/default/staticresources/bike_assets/commuter.png deleted file mode 100644 index ed5ecebe..00000000 Binary files a/force-app/main/default/staticresources/bike_assets/commuter.png and /dev/null differ diff --git a/force-app/main/default/staticresources/bike_assets/enthusiast.png b/force-app/main/default/staticresources/bike_assets/enthusiast.png deleted file mode 100644 index 1510332d..00000000 Binary files a/force-app/main/default/staticresources/bike_assets/enthusiast.png and /dev/null differ diff --git a/force-app/main/default/staticresources/bike_assets/logo.svg b/force-app/main/default/staticresources/bike_assets/logo.svg deleted file mode 100644 index 70e455be..00000000 --- a/force-app/main/default/staticresources/bike_assets/logo.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - Slice - Created with Sketch. - - - - - - - - - - - - \ No newline at end of file diff --git a/force-app/main/default/staticresources/bike_assets/racer.png b/force-app/main/default/staticresources/bike_assets/racer.png deleted file mode 100644 index eab81d1f..00000000 Binary files a/force-app/main/default/staticresources/bike_assets/racer.png and /dev/null differ