-
Notifications
You must be signed in to change notification settings - Fork 579
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into v420Source
- Loading branch information
Showing
57 changed files
with
568 additions
and
42 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
flow_action_components/ApprovalChecker/LockChecker.cls-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<apiVersion>61.0</apiVersion> | ||
<status>Active</status> | ||
</ApexClass> |
16 changes: 16 additions & 0 deletions
16
flow_action_components/ApprovalChecker/LockCheckerTest.cls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
@isTest | ||
private class LockCheckerTest { | ||
@isTest | ||
static void testIsLocked() { | ||
// Create test data | ||
Account acc = new Account(Name='Test Account'); | ||
insert acc; | ||
|
||
// Call the method to be tested | ||
List<Boolean> result = LockChecker.isLocked(new List<Id>{acc.Id}); | ||
|
||
// Perform assertions | ||
System.assertEquals(1, result.size(), 'Result should have only one entry'); | ||
System.assertEquals(false, result[0], 'The test account should not be locked'); | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
flow_action_components/ApprovalChecker/LockCheckerTest.cls-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<apiVersion>61.0</apiVersion> | ||
<status>Active</status> | ||
</ApexClass> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# List files or directories below to ignore them when running force:source:push, force:source:pull, and force:source:status | ||
# More information: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm | ||
# | ||
|
||
package.xml | ||
|
||
# LWC configuration files | ||
**/jsconfig.json | ||
**/.eslintrc.json | ||
|
||
# LWC Jest | ||
**/__tests__/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npm run precommit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Salesforce DX Project: Next Steps | ||
|
||
Now that you’ve created a Salesforce DX project, what’s next? Here are some documentation resources to get you started. | ||
|
||
## How Do You Plan to Deploy Your Changes? | ||
|
||
Do you want to deploy a set of changes, or create a self-contained application? Choose a [development model](https://developer.salesforce.com/tools/vscode/en/user-guide/development-models). | ||
|
||
## Configure Your Salesforce DX Project | ||
|
||
The `sfdx-project.json` file contains useful configuration information for your project. See [Salesforce DX Project Configuration](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_ws_config.htm) in the _Salesforce DX Developer Guide_ for details about this file. | ||
|
||
## Read All About It | ||
|
||
- [Salesforce Extensions Documentation](https://developer.salesforce.com/tools/vscode/) | ||
- [Salesforce CLI Setup Guide](https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_intro.htm) | ||
- [Salesforce DX Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_intro.htm) | ||
- [Salesforce CLI Command Reference](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference.htm) |
13 changes: 13 additions & 0 deletions
13
flow_action_components/ConvertTextToBase64/config/project-scratch-def.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"orgName": "Demo company", | ||
"edition": "Developer", | ||
"features": ["EnableSetPasswordInApi"], | ||
"settings": { | ||
"lightningExperienceSettings": { | ||
"enableS1DesktopEnabled": true | ||
}, | ||
"mobileSettings": { | ||
"enableS1EncryptedStoragePref2": false | ||
} | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
flow_action_components/ConvertTextToBase64/force-app/main/default/aura/.eslintrc.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"plugins": ["@salesforce/eslint-plugin-aura"], | ||
"extends": ["plugin:@salesforce/eslint-plugin-aura/recommended"], | ||
"rules": { | ||
"vars-on-top": "off", | ||
"no-unused-expressions": "off" | ||
} | ||
} |
75 changes: 75 additions & 0 deletions
75
...ion_components/ConvertTextToBase64/force-app/main/default/classes/ConvertTextToBase64.cls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
/** | ||
* Invocable Apex Action for Flow: ConvertTextToBase64 | ||
* | ||
* Created By: Eric Smith | ||
* | ||
* Description: This component is designed to be used in a Flow to convert a text string to Base64 | ||
* | ||
* Custom Property Editor: N/A | ||
* | ||
* CPE Supporting Components: N/A | ||
* | ||
* 04/03/24 - Eric Smith - Version 1.0.0 | ||
* | ||
**/ | ||
|
||
global with sharing class ConvertTextToBase64 { | ||
|
||
/* Flow Action */ | ||
@invocableMethod(label='Convert Text to Base64' | ||
iconName='slds:standard:data_transforms' | ||
category='Util' | ||
description='Convert a Text String to Base64 - By Eric Smith') | ||
|
||
global static List<Results> ConvertTextToBase64(List<Requests> requestList) { | ||
|
||
/* Prepare Response */ | ||
Results response = new Results(); | ||
List<Results> responseWrapper = new List<Results>(); | ||
|
||
/* Process Inputs */ | ||
for (Requests req : requestList) { | ||
|
||
/* Get Input Values */ | ||
String textValue = req.textInput; | ||
|
||
/* Perform Action(s) */ | ||
|
||
// Base64 the Text | ||
String base64Value = EncodingUtil.Base64Encode(Blob.valueOf(textValue)); | ||
|
||
/* TODO: Convert the other direction | ||
// Text the Base64 | ||
// Blob blobValue = EncodingUtil.base64Decode(base64Value); | ||
// String stringValue = blobValue.toString(); | ||
*/ | ||
|
||
/* Prepare Output */ | ||
response.base64Output = base64Value; | ||
|
||
/* Process Outputs */ | ||
responseWrapper.add(response); | ||
} | ||
|
||
/* Return Results */ | ||
return responseWrapper; | ||
|
||
} | ||
|
||
/* Input parameters for the Apex action */ | ||
global class Requests { | ||
|
||
@InvocableVariable(label='Text Value for Conversion' | ||
description='Text value to be converted into Base64') | ||
global String textInput; | ||
|
||
} | ||
|
||
/* Output parameters of the Apex action */ | ||
global class Results { | ||
@InvocableVariable(label='Base64 Value' | ||
description='The converted Base64 value') | ||
global String base64Output; | ||
} | ||
|
||
} |
5 changes: 5 additions & 0 deletions
5
...nents/ConvertTextToBase64/force-app/main/default/classes/ConvertTextToBase64.cls-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<apiVersion>59.0</apiVersion> | ||
<status>Active</status> | ||
</ApexClass> |
42 changes: 42 additions & 0 deletions
42
...components/ConvertTextToBase64/force-app/main/default/classes/ConvertTextToBase64Test.cls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/** | ||
* This class contains unit tests for validating the behavior of Apex classes | ||
* and triggers. | ||
* | ||
* Unit tests are class methods that verify whether a particular piece | ||
* of code is working properly. Unit test methods take no arguments, | ||
* commit no data to the database, and are flagged with the testMethod | ||
* keyword in the method definition. | ||
* | ||
* All test methods in an org are executed whenever Apex code is deployed | ||
* to a production org to confirm correctness, ensure code | ||
* coverage, and prevent regressions. All Apex classes are | ||
* required to have at least 75% code coverage in order to be deployed | ||
* to a production org. In addition, all triggers must have some code coverage. | ||
* | ||
* The @isTest class annotation indicates this class only contains test | ||
* methods. Classes defined with the @isTest annotation do not count against | ||
* the org size limit for all Apex scripts. | ||
* | ||
* See the Apex Language Reference for more information about Testing and Code Coverage. | ||
*/ | ||
|
||
@isTest | ||
public with sharing class ConvertTextToBase64Test { | ||
|
||
@isTest | ||
public static void myUnitTest() { | ||
|
||
ConvertTextToBase64.Requests request = new ConvertTextToBase64.Requests(); | ||
List<ConvertTextToBase64.Requests> requestList = new List<ConvertTextToBase64.Requests>(); | ||
request.textInput = '[FIELD_10] = "01865467"'; | ||
|
||
requestList.add(request); | ||
|
||
List<ConvertTextToBase64.Results> responseList = ConvertTextToBase64.ConvertTextToBase64(requestList); | ||
|
||
System.assertNotEquals(responseList[0].base64Output.length(), 0); | ||
System.assertEquals(responseList[0].base64Output, 'W0ZJRUxEXzEwXSA9ICIwMTg2NTQ2NyI='); | ||
|
||
} | ||
|
||
} |
5 changes: 5 additions & 0 deletions
5
...s/ConvertTextToBase64/force-app/main/default/classes/ConvertTextToBase64Test.cls-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<apiVersion>59.0</apiVersion> | ||
<status>Active</status> | ||
</ApexClass> |
14 changes: 14 additions & 0 deletions
14
flow_action_components/ConvertTextToBase64/force-app/main/default/lwc/.eslintrc.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"extends": ["@salesforce/eslint-config-lwc/recommended"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.test.js"], | ||
"rules": { | ||
"@lwc/lwc/no-unexpected-wire-adapter-usages": "off" | ||
}, | ||
"env": { | ||
"node": true | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
const { jestConfig } = require('@salesforce/sfdx-lwc-jest/config'); | ||
|
||
module.exports = { | ||
...jestConfig, | ||
modulePathIgnorePatterns: ['<rootDir>/.localdevserver'] | ||
}; |
36 changes: 36 additions & 0 deletions
36
flow_action_components/ConvertTextToBase64/manifest/package.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<Package xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<types> | ||
<members>*</members> | ||
<name>ApexClass</name> | ||
</types> | ||
<types> | ||
<members>*</members> | ||
<name>ApexComponent</name> | ||
</types> | ||
<types> | ||
<members>*</members> | ||
<name>ApexPage</name> | ||
</types> | ||
<types> | ||
<members>*</members> | ||
<name>ApexTestSuite</name> | ||
</types> | ||
<types> | ||
<members>*</members> | ||
<name>ApexTrigger</name> | ||
</types> | ||
<types> | ||
<members>*</members> | ||
<name>AuraDefinitionBundle</name> | ||
</types> | ||
<types> | ||
<members>*</members> | ||
<name>LightningComponentBundle</name> | ||
</types> | ||
<types> | ||
<members>*</members> | ||
<name>StaticResource</name> | ||
</types> | ||
<version>59.0</version> | ||
</Package> |
Oops, something went wrong.