-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Demen Selcan
committed
Sep 1, 2020
0 parents
commit 0f34c10
Showing
22 changed files
with
318 additions
and
0 deletions.
There are no files selected for viewing
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,15 @@ | ||
**/lwc/**/*.css | ||
**/lwc/**/*.html | ||
**/lwc/**/*.json | ||
**/lwc/**/*.svg | ||
**/lwc/**/*.xml | ||
**/aura/**/*.auradoc | ||
**/aura/**/*.cmp | ||
**/aura/**/*.css | ||
**/aura/**/*.design | ||
**/aura/**/*.evt | ||
**/aura/**/*.json | ||
**/aura/**/*.svg | ||
**/aura/**/*.tokens | ||
**/aura/**/*.xml | ||
.sfdx |
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,38 @@ | ||
# This file is used for Git repositories to specify intentionally untracked files that Git should ignore. | ||
# If you are not using git, you can delete this file. For more information see: https://git-scm.com/docs/gitignore | ||
# For useful gitignore templates see: https://github.com/github/gitignore | ||
|
||
# Salesforce cache | ||
.sfdx/ | ||
.localdevserver/ | ||
|
||
#VsCode | ||
.vscode/ | ||
|
||
# LWC VSCode autocomplete | ||
**/lwc/jsconfig.json | ||
|
||
# LWC Jest coverage reports | ||
coverage/ | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Dependency directories | ||
node_modules/ | ||
|
||
# Eslint cache | ||
.eslintcache | ||
|
||
# MacOS system files | ||
.DS_Store | ||
|
||
# Windows system files | ||
Thumbs.db | ||
ehthumbs.db | ||
[Dd]esktop.ini | ||
$RECYCLE.BIN/ |
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,10 @@ | ||
# List files or directories below to ignore them when running prettier | ||
# More information: https://prettier.io/docs/en/ignore.html | ||
# | ||
|
||
**/staticresources/** | ||
.localdevserver | ||
.sfdx | ||
.vscode | ||
|
||
coverage/ |
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 @@ | ||
{ | ||
"trailingComma": "none", | ||
"overrides": [ | ||
{ | ||
"files": "**/lwc/**/*.html", | ||
"options": { "parser": "lwc" } | ||
}, | ||
{ | ||
"files": "*.{cmp,page,component}", | ||
"options": { "parser": "html" } | ||
} | ||
] | ||
} |
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 @@ | ||
# Dynamic iFrame Component | ||
|
||
This component lets admins embed iFrames by using a Lightning Component. | ||
The component also lets them add the url, design attributes as well as a custom field to pass parameters to the url. | ||
|
||
## Deploy this to your Org | ||
|
||
<a href="https://githubsfdeploy.herokuapp.com?owner=CoreSEs&repo=dynamicAuraiFrameComponent"> | ||
<img alt="Deploy to Salesforce" | ||
src="https://raw.githubusercontent.com/afawcett/githubsfdeploy/master/deploy.png"> | ||
</a> | ||
### Special thanks to | ||
|
||
[nikitakarpenkov](https://github.com/nikitakarpenkov/iframe-lightning-component) and [jlondrejcka](https://github.com/jlondrejcka/LDS-Dynamic-Field-Input) as this component uses their code mainly and has only been slightly modified. |
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 @@ | ||
{ | ||
"orgName": "dselcan company", | ||
"edition": "Developer", | ||
"features": [], | ||
"settings": { | ||
"lightningExperienceSettings": { | ||
"enableS1DesktopEnabled": true | ||
}, | ||
"securitySettings": { | ||
"passwordPolicies": { | ||
"enableSetPasswordInApi": true | ||
} | ||
}, | ||
"mobileSettings": { | ||
"enableS1EncryptedStoragePref2": false | ||
} | ||
} | ||
} |
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 @@ | ||
{ | ||
"plugins": ["@salesforce/eslint-plugin-aura"], | ||
"extends": ["plugin:@salesforce/eslint-plugin-aura/recommended", "prettier"] | ||
} |
6 changes: 6 additions & 0 deletions
6
force-app/main/default/aura/iFrameWithCustomAttributes/iFrameWithCustomAttributes.auradoc
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 @@ | ||
<aura:documentation> | ||
<aura:description>Documentation</aura:description> | ||
<aura:example name="ExampleName" ref="exampleComponentName" label="Label"> | ||
Example Description | ||
</aura:example> | ||
</aura:documentation> |
32 changes: 32 additions & 0 deletions
32
force-app/main/default/aura/iFrameWithCustomAttributes/iFrameWithCustomAttributes.cmp
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,32 @@ | ||
<aura:component | ||
implements="forceCommunity:availableForAllPageTypes,force:hasRecordId,force:appHostable,flexipage:availableForAllPageTypes, flexipage:availableForRecordHome" | ||
access="global"> | ||
<!-- Attributes --> | ||
<aura:attribute name="iframeUrl" type="String" /> | ||
<aura:attribute name="width" type="String" /> | ||
<aura:attribute name="height" type="String" /> | ||
<aura:attribute name="scrolling" type="String" /> | ||
<aura:attribute name="frameBorder" type="String" /> | ||
<aura:attribute name="style" type="String" /> | ||
<aura:attribute name="crossOrigin" type="String" /> | ||
<aura:attribute name="parameter" type="String" /> | ||
<aura:attribute name="recordId" type="Id" /> | ||
<aura:attribute name="passThroughValue" type="String" /> | ||
|
||
|
||
<!-- Lightning Data Service (LDS) Attributes --> | ||
<aura:attribute name="record" type="Object" /> | ||
<aura:attribute name="simpleRecord" type="Object" /> | ||
<aura:attribute name="recordError" type="String" /> | ||
|
||
|
||
<!-- Lightning Data Service (LDS) avoid an Apex controller --> | ||
<force:recordData aura:id="recordLoader" recordId="{!v.recordId}" targetRecord="{!v.record}" | ||
targetFields="{!v.simpleRecord}" targetError="{!v.recordError}" recordUpdated="{!c.doInit}" layoutType="FULL" /> | ||
|
||
|
||
<!-- iFrame --> | ||
<iframe src="{!v.iframeUrl + v.passThroughValue}" width="{!v.width}" height="{!v.height}" style="{!v.style}" | ||
frameBorder="{!v.frameBorder}" sandbox="{!v.crossOrigin}" scrolling="{!v.scrolling}" /> | ||
|
||
</aura:component> |
5 changes: 5 additions & 0 deletions
5
...-app/main/default/aura/iFrameWithCustomAttributes/iFrameWithCustomAttributes.cmp-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" ?> | ||
<AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<apiVersion>49.0</apiVersion> | ||
<description>A Lightning Component Bundle</description> | ||
</AuraDefinitionBundle> |
2 changes: 2 additions & 0 deletions
2
force-app/main/default/aura/iFrameWithCustomAttributes/iFrameWithCustomAttributes.css
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,2 @@ | ||
.THIS { | ||
} |
11 changes: 11 additions & 0 deletions
11
force-app/main/default/aura/iFrameWithCustomAttributes/iFrameWithCustomAttributes.design
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,11 @@ | ||
<design:component label="dynamic iFrame Component"> | ||
<design:attribute name="iframeUrl" label="Source URL (HTTPS only)" default="https://put-your-url.here/" /> | ||
<design:attribute name="parameter" label="Custom Field API Name (Optional)" | ||
default="Custom_Field_With_Parameter__c" /> | ||
<design:attribute name="width" label="Width" default="100%" /> | ||
<design:attribute name="height" label="Height" default="500px" /> | ||
<design:attribute name="style" label="Style" default="border: none; overflow: scroll;" /> | ||
<design:attribute name="scrolling" label="Scrolling" default="auto" /> | ||
<design:attribute name="frameBorder" label="Frame Border" default="0" /> | ||
<design:attribute name="crossOrigin" label="Cross Origin" default="allow-same-origin allow-scripts allow-forms" /> | ||
</design:component> |
7 changes: 7 additions & 0 deletions
7
...app/main/default/aura/iFrameWithCustomAttributes/iFrameWithCustomAttributes.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions
17
...-app/main/default/aura/iFrameWithCustomAttributes/iFrameWithCustomAttributesController.js
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,17 @@ | ||
({ | ||
doInit: function (component, event, helper) { | ||
if ("v.parameter" != null) { | ||
//get the field name passed to the component | ||
var field = component.get("v.parameter"); | ||
|
||
//set key to lookup the field value (the simple Record component holds the object information) | ||
var key = "v.simpleRecord." + field; | ||
|
||
//use the key to lookup value returned in LDS | ||
var value = component.get(key); | ||
|
||
//set the value to and attribute to be used in your component | ||
component.set("v.passThroughValue", value); | ||
} | ||
} | ||
}); |
5 changes: 5 additions & 0 deletions
5
force-app/main/default/aura/iFrameWithCustomAttributes/iFrameWithCustomAttributesHelper.js
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 @@ | ||
({ | ||
helperMethod : function() { | ||
|
||
} | ||
}) |
5 changes: 5 additions & 0 deletions
5
force-app/main/default/aura/iFrameWithCustomAttributes/iFrameWithCustomAttributesRenderer.js
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 @@ | ||
({ | ||
|
||
// Your renderer method overrides go here | ||
|
||
}) |
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>49.0</version> | ||
</Package> |
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,41 @@ | ||
{ | ||
"name": "salesforce-app", | ||
"private": true, | ||
"version": "1.0.0", | ||
"description": "Salesforce App", | ||
"scripts": { | ||
"lint": "npm run lint:lwc && npm run lint:aura", | ||
"lint:aura": "eslint **/aura/**", | ||
"lint:lwc": "eslint **/lwc/**", | ||
"test": "npm run test:unit", | ||
"test:unit": "sfdx-lwc-jest", | ||
"test:unit:watch": "sfdx-lwc-jest --watch", | ||
"test:unit:debug": "sfdx-lwc-jest --debug", | ||
"test:unit:coverage": "sfdx-lwc-jest --coverage", | ||
"prettier": "prettier --write \"**/*.{cls,cmp,component,css,html,js,json,md,page,trigger,xml,yaml,yml}\"", | ||
"prettier:verify": "prettier --list-different \"**/*.{cls,cmp,component,css,html,js,json,md,page,trigger,xml,yaml,yml}\"" | ||
}, | ||
"devDependencies": { | ||
"@prettier/plugin-xml": "^0.10.0", | ||
"@salesforce/eslint-config-lwc": "^0.7.0", | ||
"@salesforce/eslint-plugin-aura": "^1.4.0", | ||
"@salesforce/sfdx-lwc-jest": "^0.9.2", | ||
"eslint": "^7.6.0", | ||
"eslint-config-prettier": "^6.11.0", | ||
"husky": "^4.2.1", | ||
"lint-staged": "^10.0.7", | ||
"prettier": "^2.0.5", | ||
"prettier-plugin-apex": "^1.6.0" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "lint-staged" | ||
} | ||
}, | ||
"lint-staged": { | ||
"**/*.{cls,cmp,component,css,html,js,json,md,page,trigger,xml,yaml,yml}": [ | ||
"prettier --write" | ||
], | ||
"**/{aura|lwc}/**": ["eslint"] | ||
} | ||
} |
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,10 @@ | ||
// Use .apex files to store anonymous Apex. | ||
// You can execute anonymous Apex in VS Code by selecting the | ||
// apex text and running the command: | ||
// SFDX: Execute Anonymous Apex with Currently Selected Text | ||
// You can also execute the entire file by running the command: | ||
// SFDX: Execute Anonymous Apex with Editor Contents | ||
|
||
string tempvar = 'Enter_your_name_here'; | ||
System.debug('Hello World!'); | ||
System.debug('My name is ' + tempvar); |
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 @@ | ||
// Use .soql files to store SOQL queries. | ||
// You can execute queries in VS Code by selecting the | ||
// query text and running the command: | ||
// SFDX: Execute SOQL Query with Currently Selected Text | ||
|
||
SELECT Id, Name FROM Account |
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,11 @@ | ||
{ | ||
"packageDirectories": [ | ||
{ | ||
"path": "force-app", | ||
"default": true | ||
} | ||
], | ||
"namespace": "", | ||
"sfdcLoginUrl": "https://login.salesforce.com", | ||
"sourceApiVersion": "49.0" | ||
} |