-
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.
Initial commit of DreamHouse metadata
- Loading branch information
Showing
46 changed files
with
689 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
29 changes: 29 additions & 0 deletions
29
PROJECT/Exercise Files/feature-chan-map/RecordMap/RecordMap.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,29 @@ | ||
<aura:component implements="force:hasRecordId,flexipage:availableForAllPageTypes" | ||
access="global"> | ||
|
||
<aura:attribute name="recordId" type="Id" /> | ||
<aura:attribute name="dsRecordId" type="Id" /> | ||
<aura:attribute name="sObject" type="SObject" /> | ||
<aura:attribute name="titleField" type="String" default="Name" /> | ||
<aura:attribute name="latField" type="String" default="Location__Latitude__s" /> | ||
<aura:attribute name="longField" type="String" default="Location__Longitude__s" /> | ||
<aura:attribute name="title" type="String" /> | ||
<aura:attribute name="fields" type="String[]" default="['Id']" /> | ||
<aura:attribute name="mapMarkers" type="Object[]" /> | ||
<aura:attribute name="zoomLevel" type="Integer" default="16" /> | ||
|
||
<aura:handler name="init" value="{!this}" action="{!c.doInit}" /> | ||
|
||
<force:recordData aura:id="service" | ||
recordId="{!v.dsRecordId}" | ||
targetFields="{!v.sObject}" | ||
fields="{!v.fields}" | ||
recordUpdated="{!c.onRecordUpdated}" /> | ||
|
||
<aura:handler event="ltng:selectSObject" action="{!c.recordChangeHandler}" /> | ||
|
||
<lightning:card title="{!v.title}" iconName="custom:custom106"> | ||
<lightning:map mapMarkers="{!v.mapMarkers}" zoomLevel="{!v.zoomLevel}" /> | ||
</lightning:card> | ||
|
||
</aura:component> |
5 changes: 5 additions & 0 deletions
5
PROJECT/Exercise Files/feature-chan-map/RecordMap/RecordMap.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="urn:metadata.tooling.soap.sforce.com" fqn="RecordMap"> | ||
<apiVersion>47.0</apiVersion> | ||
<description>A Lightning Component Bundle</description> | ||
</AuraDefinitionBundle> |
3 changes: 3 additions & 0 deletions
3
PROJECT/Exercise Files/feature-chan-map/RecordMap/RecordMap.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,3 @@ | ||
.THIS .slds-card__body { | ||
margin-bottom: 0; | ||
} |
5 changes: 5 additions & 0 deletions
5
PROJECT/Exercise Files/feature-chan-map/RecordMap/RecordMap.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,5 @@ | ||
<design:component label="Record Map"> | ||
<design:attribute name="titleField" label="Title Field" default="Name"/> | ||
<design:attribute name="latField" label="Latitude Field" default="Location__Latitude__s" /> | ||
<design:attribute name="longField" label="Longitude Field" default="Location__Longitude__s" /> | ||
</design:component> |
31 changes: 31 additions & 0 deletions
31
PROJECT/Exercise Files/feature-chan-map/RecordMap/RecordMapController.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,31 @@ | ||
({ | ||
doInit : function(component, event, helper) { | ||
component.set("v.fields", ["Id", component.get("v.latField"), component.get("v.longField"), component.get("v.titleField")]); | ||
var recordId = component.get("v.recordId"); | ||
component.set("v.dsRecordId", recordId); | ||
helper.reloadRecord(component); | ||
}, | ||
|
||
recordChangeHandler : function(component, event, helper) { | ||
console.log('recordChangeHandler'); | ||
var id = event.getParam("recordId"); | ||
component.set("v.dsRecordId", id); | ||
helper.reloadRecord(component); | ||
}, | ||
|
||
onRecordUpdated : function(component, event) { | ||
console.log('onRecordUpdated'); | ||
var sObject = component.get("v.sObject"); | ||
if (sObject) { | ||
component.set("v.title", sObject[component.get("v.titleField")]); | ||
component.set("v.mapMarkers", [ | ||
{ | ||
location: { | ||
Latitude: sObject[component.get("v.latField")], | ||
Longitude: sObject[component.get("v.longField")] | ||
} | ||
} | ||
]); | ||
} | ||
} | ||
}) |
17 changes: 17 additions & 0 deletions
17
PROJECT/Exercise Files/feature-chan-map/RecordMap/RecordMapHelper.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 @@ | ||
({ | ||
reloadRecord : function(component) { | ||
var service = component.find("service"); | ||
service.reloadRecord(false, function() { | ||
var sObject = component.get("v.sObject"); | ||
component.set("v.mapMarkers", [ | ||
{ | ||
location: { | ||
Latitude: sObject[component.get("v.latField")], | ||
Longitude: sObject[component.get("v.longField")] | ||
} | ||
} | ||
]); | ||
}); | ||
} | ||
|
||
}) |
Binary file not shown.
Binary file not shown.
24 changes: 24 additions & 0 deletions
24
PROJECT/Exercise Files/feature-maria-gallery/PictureCarousel/PictureCarousel.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,24 @@ | ||
<aura:component access="global"> | ||
|
||
<aura:attribute name="slideIndex" type="Integer" default="0"/> | ||
<aura:attribute name="slideWidth" type="Integer" default="0"/> | ||
<aura:attribute name="slides" type="Object[]"/> | ||
|
||
<div aura:id="gallery" class="gallery"> | ||
<div class="filmstrip" style="{! 'margin-left: -' + (v.slideIndex * v.slideWidth) + 'px' }"> | ||
<aura:iteration items="{!v.slides}" var="slide" indexVar="index"> | ||
<div class="slide" style="{!'width:' + v.slideWidth + 'px;background-image:url(' + slide + ')' }"></div> | ||
</aura:iteration> | ||
</div> | ||
<div class="{! v.slideWidth>640 ? 'btn prev x-large' : 'btn prev'}"> | ||
<lightning:buttonIcon variant="border-filled" onclick="{!c.prev}" | ||
size="large" iconName="utility:chevronleft" | ||
disabled="{! v.slideIndex <= 0 }" /> | ||
</div> | ||
<div class="{! v.slideWidth>640 ? 'btn next x-large' : 'btn next'}"> | ||
<lightning:buttonIcon variant="border-filled" onclick="{!c.next}" | ||
size="large" iconName="utility:chevronright" | ||
disabled="{! v.slideIndex >= (v.slides.length-1) }" /> | ||
</div> | ||
</div> | ||
</aura:component> |
5 changes: 5 additions & 0 deletions
5
PROJECT/Exercise Files/feature-maria-gallery/PictureCarousel/PictureCarousel.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>47.0</apiVersion> | ||
<description>A Lightning Component Bundle</description> | ||
</AuraDefinitionBundle> |
57 changes: 57 additions & 0 deletions
57
PROJECT/Exercise Files/feature-maria-gallery/PictureCarousel/PictureCarousel.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,57 @@ | ||
.THIS { | ||
position: relative; | ||
width: 100%; | ||
height: 100%; | ||
overflow: hidden; | ||
} | ||
|
||
.THIS * { | ||
box-sizing: border-box; | ||
} | ||
|
||
.THIS .filmstrip { | ||
-webkit-transform: translate3d(0, 0, 0); | ||
transform: translate3d(0, 0, 0); | ||
transition: all .5s ease-in-out; | ||
height: 100%; | ||
display: inline-block; | ||
white-space: nowrap; | ||
} | ||
|
||
.THIS .slide { | ||
height: 100%; | ||
display: inline-block; | ||
background-size: cover; | ||
background-repeat: no-repeat; | ||
background-position: center; | ||
} | ||
|
||
.THIS .btn { | ||
position: absolute; | ||
} | ||
|
||
.THIS .btn.next { | ||
top: 44%; | ||
right: 6px; | ||
} | ||
|
||
.THIS .btn.prev { | ||
top: 44%; | ||
left: 6px; | ||
} | ||
|
||
.THIS .btn.fullscreen, | ||
.THIS .btn.close | ||
{ | ||
bottom: 0; | ||
left: 0; | ||
} | ||
|
||
.THIS .btn.x-large .slds-button { | ||
width: 3.5rem; | ||
height: 3.5rem; | ||
} | ||
.THIS .btn.x-large .slds-button__icon { | ||
width: 1.7rem; | ||
height: 1.7rem; | ||
} |
19 changes: 19 additions & 0 deletions
19
PROJECT/Exercise Files/feature-maria-gallery/PictureCarousel/PictureCarouselController.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,19 @@ | ||
({ | ||
next: function(component) { | ||
var slideIndex = component.get("v.slideIndex"); | ||
var slides = component.get("v.slides"); | ||
if (slideIndex + 1 < slides.length) { | ||
slideIndex = slideIndex + 1; | ||
component.set("v.slideIndex", slideIndex); | ||
} | ||
}, | ||
|
||
prev: function(component) { | ||
var slideIndex = component.get("v.slideIndex"); | ||
if (slideIndex > 0) { | ||
slideIndex = slideIndex - 1; | ||
component.set("v.slideIndex", slideIndex); | ||
} | ||
} | ||
|
||
}) |
6 changes: 6 additions & 0 deletions
6
PROJECT/Exercise Files/feature-maria-gallery/PictureCarousel/PictureCarouselHelper.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,6 @@ | ||
({ | ||
setSlideWidth: function (component) { | ||
var slideWidth = component.find("gallery").getElement().offsetWidth; | ||
component.set("v.slideWidth", slideWidth); | ||
} | ||
}) |
6 changes: 6 additions & 0 deletions
6
PROJECT/Exercise Files/feature-maria-gallery/PictureCarousel/PictureCarouselRenderer.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,6 @@ | ||
({ | ||
afterRender: function (component, helper) { | ||
this.superAfterRender(); | ||
helper.setSlideWidth(component, helper); | ||
} | ||
}) |
Binary file added
BIN
+6 KB
PROJECT/Exercise Files/feature-maria-gallery/PictureGalleryCard/.DS_Store
Binary file not shown.
30 changes: 30 additions & 0 deletions
30
PROJECT/Exercise Files/feature-maria-gallery/PictureGalleryCard/PictureGalleryCard.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,30 @@ | ||
<aura:component implements="flexipage:availableForAllPageTypes" | ||
access="global"> | ||
|
||
<aura:attribute name="fullScreen" type="Boolean" default="false"/> | ||
<aura:attribute name="animations" type="Boolean" default="true"/> | ||
<aura:attribute name="slides" type="Object[]"/> | ||
|
||
<aura:handler name="init" value="{!this}" action="{!c.doInit}" /> | ||
|
||
<lightning:card iconName="utility:image" title="Picture Gallery"> | ||
<aura:set attribute="actions"> | ||
<lightning:buttonIcon onclick="{!c.fullScreen}" size="large" iconName="utility:expand" /> | ||
</aura:set> | ||
<c:PictureCarousel slides="{!v.slides}"/> | ||
<aura:if isTrue="{!v.fullScreen==true}"> | ||
<div role="dialog" tabindex="-1" aria-labelledby="header43" class="slds-modal slds-fade-in-open"> | ||
<div class="slds-modal__container"> | ||
<c:PictureCarousel slides="{!v.slides}"/> | ||
</div> | ||
|
||
<div class="btn slds-modal__close close x-large"> | ||
<lightning:buttonIcon variant="border-filled" onclick="{!c.closeDialog}" size="large" iconName="utility:close" /> | ||
</div> | ||
|
||
</div> | ||
<div class="slds-backdrop slds-backdrop--open"></div> | ||
</aura:if> | ||
</lightning:card> | ||
|
||
</aura:component> |
5 changes: 5 additions & 0 deletions
5
...T/Exercise Files/feature-maria-gallery/PictureGalleryCard/PictureGalleryCard.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>47.0</apiVersion> | ||
<description>A Lightning Component Bundle</description> | ||
</AuraDefinitionBundle> |
21 changes: 21 additions & 0 deletions
21
PROJECT/Exercise Files/feature-maria-gallery/PictureGalleryCard/PictureGalleryCard.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,21 @@ | ||
.THIS * { | ||
box-sizing: border-box; | ||
} | ||
|
||
.THIS .slds-card__body { | ||
height: 340px; | ||
margin-bottom: 0; | ||
} | ||
|
||
.THIS .slds-modal__container { | ||
margin-top: 100px; | ||
height: 90%; | ||
width: 90%; | ||
max-width: initial; | ||
} | ||
|
||
.THIS .slds-modal__close { | ||
position: absolute; | ||
top: 100px; | ||
right: 5%; | ||
} |
3 changes: 3 additions & 0 deletions
3
PROJECT/Exercise Files/feature-maria-gallery/PictureGalleryCard/PictureGalleryCard.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,3 @@ | ||
<design:component label="Picture Gallery"> | ||
<design:attribute name="animations" label="Animations" description="Animated transitions" /> | ||
</design:component> |
14 changes: 14 additions & 0 deletions
14
.../Exercise Files/feature-maria-gallery/PictureGalleryCard/PictureGalleryCard.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions
19
...T/Exercise Files/feature-maria-gallery/PictureGalleryCard/PictureGalleryCardController.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,19 @@ | ||
({ | ||
doInit : function(component) { | ||
// Hardcoding images in this demo component | ||
component.set("v.slides", [ | ||
'https://s3-us-west-1.amazonaws.com/sfdc-demo/houses/living_room.jpg', | ||
'https://s3-us-west-1.amazonaws.com/sfdc-demo/houses/eatinkitchen.jpg', | ||
'https://s3-us-west-1.amazonaws.com/sfdc-demo/houses/kitchen.jpg' | ||
]); | ||
}, | ||
|
||
fullScreen : function(component) { | ||
component.set("v.fullScreen", true); | ||
}, | ||
|
||
closeDialog : function(component) { | ||
component.set("v.fullScreen", 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,16 @@ | ||
**/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 | ||
**/aura/**/*.app | ||
.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__/** |
Oops, something went wrong.