Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Commit

Permalink
Summer '18 Release (#10)
Browse files Browse the repository at this point in the history
* Upgraded to SimpleMetadata v1.0.0
* Updated all Lightning components to API v43.0
* Updated all references to Apex properties to use PascalCase instead of camelCase
* Removed listViewMetadata.cmp & references
  • Loading branch information
jongpie authored Jun 11, 2018
1 parent 19b5928 commit 86dc874
Show file tree
Hide file tree
Showing 84 changed files with 1,258 additions and 1,280 deletions.
2 changes: 1 addition & 1 deletion src/aura/currentUser/currentUser.cmp-meta.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>42.0</apiVersion>
<apiVersion>43.0</apiVersion>
<description>currentUser</description>
</AuraDefinitionBundle>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>42.0</apiVersion>
<apiVersion>43.0</apiVersion>
<description>environmentMetadata</description>
</AuraDefinitionBundle>
6 changes: 3 additions & 3 deletions src/aura/fieldLabel/fieldLabel.cmp
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ See LICENSE file or go to https://github.com/jongpie/LightningComponents for ful
<aura:component extends="c.fieldMetadata">

<!-- Markup -->
<ui:outputText value="{!v.fieldMetadata.label}" />
<aura:if isTrue="{!v.fieldMetadata.inlineHelpText != null}">
<lightning:helptext iconName="utility:info" content="{!v.fieldMetadata.inlineHelpText}" />
<ui:outputText value="{!v.fieldMetadata.Label}" />
<aura:if isTrue="{!v.fieldMetadata.InlineHelpText != null}">
<lightning:helptext iconName="utility:info" content="{!v.fieldMetadata.InlineHelpText}" />
</aura:if>

</aura:component>
2 changes: 1 addition & 1 deletion src/aura/fieldLabel/fieldLabel.cmp-meta.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>41.0</apiVersion>
<apiVersion>43.0</apiVersion>
<description>fieldLabel</description>
</AuraDefinitionBundle>
2 changes: 1 addition & 1 deletion src/aura/fieldMetadata/fieldMetadata.cmp-meta.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>42.0</apiVersion>
<apiVersion>43.0</apiVersion>
<description>fieldMetadata</description>
</AuraDefinitionBundle>
2 changes: 1 addition & 1 deletion src/aura/fieldMetadata/fieldMetadataHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

var params = event.getParam('arguments');

var action = component.get('c.getFieldMetadataByName');
var action = component.get('c.getFieldMetadataByApiName');
action.setParams({
sobjectApiName : sobjectApiName,
fieldApiName : fieldApiName
Expand Down
2 changes: 1 addition & 1 deletion src/aura/fieldSetMetadata/fieldSetMetadata.cmp-meta.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>42.0</apiVersion>
<apiVersion>43.0</apiVersion>
<description>fieldSetMetadata</description>
</AuraDefinitionBundle>
2 changes: 1 addition & 1 deletion src/aura/fieldSetMetadata/fieldSetMetadataHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

var params = event.getParam('arguments');

var action = component.get('c.getFieldSetMetadataByName');
var action = component.get('c.getFieldSetMetadataByApiName');
action.setParams({
sobjectApiName : component.get('v.sobjectApiName'),
fieldSetApiName : component.get('v.fieldSetApiName')
Expand Down
34 changes: 17 additions & 17 deletions src/aura/inputField/inputField.cmp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ See LICENSE file or go to https://github.com/jongpie/LightningComponents for ful
<aura:component extends="c.fieldMetadata">

<!-- Public Attributes -->
<aura:attribute name="record" type="SObject" default="{}" />
<aura:attribute name="record" type="Sobject" default="{}" />
<aura:attribute name="displayType" type="String" />
<aura:attribute name="picklistOptions" type="Object[]" description="(Optional) List of picklist options, used when displayType == 'PICKLIST'" />
<aura:attribute name="variant" type="String" default="form" description="Options: form (default) and bare" />
Expand All @@ -24,7 +24,7 @@ See LICENSE file or go to https://github.com/jongpie/LightningComponents for ful
<aura:handler name="change" value="{!v.handleBlur}" action="{!c.handleFieldValueChanged}" />

<!-- Markup -->
<aura:if isTrue="{!and(v.sobjectMetadata.isAccessible, v.fieldMetadata.isAccessible, v.render)}">
<aura:if isTrue="{!and(v.sobjectMetadata.IsAccessible, v.fieldMetadata.IsAccessible, v.render)}">
<div class="slds-form-element">
<aura:if isTrue="{!v.variant == 'form'}">
<label class="slds-form-element__label" for="{!v.auraId}">
Expand Down Expand Up @@ -52,7 +52,7 @@ See LICENSE file or go to https://github.com/jongpie/LightningComponents for ful
<div class="slds-form-element">
<label class="slds-checkbox_toggle slds-grid">
<!-- <span class="slds-form-element__label slds-m-bottom_none">Toggle Label</span> -->
<ui:inputCheckbox value="{!v.fieldValue}" required="{!v.required}" disabled="{!or(v.fieldMetadata.isUpdateable == false, v.disabled)}" class="slds-input slds-checkbox uiInput--checkbox" />
<ui:inputCheckbox value="{!v.fieldValue}" required="{!v.required}" disabled="{!or(v.fieldMetadata.IsUpdateable == false, v.disabled)}" class="slds-input slds-checkbox uiInput--checkbox" />
<span id="toggle-desc" class="slds-checkbox_faux_container" aria-live="assertive">
<span class="slds-checkbox_faux"></span>
<!-- <span class="slds-checkbox_on">Enabled</span>
Expand All @@ -64,95 +64,95 @@ See LICENSE file or go to https://github.com/jongpie/LightningComponents for ful

<!-- CURRENCY -->
<aura:if isTrue="{!v.displayType == 'CURRENCY'}">
<ui:inputCurrency aura:id="inputField" value="{!v.fieldValue}" required="{!v.required}" disabled="{!or(v.fieldMetadata.isUpdateable == false, v.disabled)}" class="slds-input"
<ui:inputCurrency aura:id="inputField" value="{!v.fieldValue}" required="{!v.required}" disabled="{!or(v.fieldMetadata.IsUpdateable == false, v.disabled)}" class="slds-input"
blur="{!c.handleBlur}"
/>
</aura:if>

<!-- DATE -->
<aura:if isTrue="{!v.displayType == 'DATE'}">
<ui:inputDate aura:id="inputField" value="{!v.fieldValue}" required="{!v.required}" disabled="{!or(v.fieldMetadata.isUpdateable == false, v.disabled)}" class="slds-input" displayDatePicker="true"
<ui:inputDate aura:id="inputField" value="{!v.fieldValue}" required="{!v.required}" disabled="{!or(v.fieldMetadata.IsUpdateable == false, v.disabled)}" class="slds-input" displayDatePicker="true"
blur="{!c.handleBlur}"
/>
</aura:if>

<!-- DATETIME -->
<aura:if isTrue="{!v.displayType == 'DATETIME'}">
<ui:inputDatetime aura:id="inputField" value="{!v.fieldValue}" required="{!v.required}" disabled="{!or(v.fieldMetadata.isUpdateable == false, v.disabled)}" class="slds-input" displayDatePicker="true"
<ui:inputDatetime aura:id="inputField" value="{!v.fieldValue}" required="{!v.required}" disabled="{!or(v.fieldMetadata.IsUpdateable == false, v.disabled)}" class="slds-input" displayDatePicker="true"
blur="{!c.handleBlur}"
/>
</aura:if>

<!-- DOUBLE or INTEGER -->
<aura:if isTrue="{!or(v.displayType == 'DOUBLE', v.displayType == 'INTEGER')}">
<ui:inputNumber aura:id="inputField" value="{!v.fieldValue}" required="{!v.required}" disabled="{!or(v.fieldMetadata.isUpdateable == false, v.disabled)}" class="slds-input"
<ui:inputNumber aura:id="inputField" value="{!v.fieldValue}" required="{!v.required}" disabled="{!or(v.fieldMetadata.IsUpdateable == false, v.disabled)}" class="slds-input"
blur="{!c.handleBlur}"
/>
</aura:if>

<!-- EMAIL -->
<aura:if isTrue="{!v.displayType == 'EMAIL'}">
<ui:inputEmail aura:id="inputField" value="{!v.fieldValue}" required="{!v.required}" disabled="{!or(v.fieldMetadata.isUpdateable == false, v.disabled)}" class="slds-input" maxlength="{!v.fieldMetadata.maxLength}"
<ui:inputEmail aura:id="inputField" value="{!v.fieldValue}" required="{!v.required}" disabled="{!or(v.fieldMetadata.IsUpdateable == false, v.disabled)}" class="slds-input" maxlength="{!v.fieldMetadata.MaxLength}"
blur="{!c.handleBlur}"
/>
</aura:if>

<!-- ENCRYPTEDSTRING -->
<aura:if isTrue="{!v.displayType == 'ENCRYPTEDSTRING'}">
<ui:inputSecret aura:id="inputField" value="{!v.fieldValue}" required="{!v.required}" disabled="{!or(v.fieldMetadata.isUpdateable == false, v.disabled)}" class="slds-input" maxlength="{!v.fieldMetadata.maxLength}"
<ui:inputSecret aura:id="inputField" value="{!v.fieldValue}" required="{!v.required}" disabled="{!or(v.fieldMetadata.IsUpdateable == false, v.disabled)}" class="slds-input" maxlength="{!v.fieldMetadata.MaxLength}"
blur="{!c.handleBlur}"
/>
</aura:if>

<!-- MULTIPICKLIST or PICKLIST -->
<aura:if isTrue="{!or(v.displayType == 'MULTIPICKLIST', v.displayType == 'PICKLIST')}">
<ui:inputSelect aura:id="inputField" required="{!v.required}" disabled="{!or(v.fieldMetadata.isUpdateable == false, v.disabled)}" class="{!'slds-select ' + v.styleClass}"
<ui:inputSelect aura:id="inputField" required="{!v.required}" disabled="{!or(v.fieldMetadata.IsUpdateable == false, v.disabled)}" class="{!'slds-select ' + v.styleClass}"
blur="{!c.handleBlur}" multiple="{!v.displayType == 'MULTIPICKLIST'}" change="{!c.handleFieldValueChanged}"
>
<aura:iteration items="{!v.picklistOptions}" var="picklistOption">
<ui:inputSelectOption label="{!picklistOption.label}" text="{!picklistOption.value}" value="{!picklistOption.value == v.fieldValue}" />
<ui:inputSelectOption label="{!picklistOption.Label}" text="{!picklistOption.Value}" value="{!picklistOption.Value == v.fieldValue}" />
</aura:iteration>
</ui:inputSelect>
</aura:if>

<!-- PERCENT -->
<aura:if isTrue="{!v.displayType == 'PERCENT'}">
<ui:inputNumber aura:id="inputField" value="{!v.fieldValue}" required="{!v.required}" disabled="{!or(v.fieldMetadata.isUpdateable == false, v.disabled)}" class="slds-input"
<ui:inputNumber aura:id="inputField" value="{!v.fieldValue}" required="{!v.required}" disabled="{!or(v.fieldMetadata.IsUpdateable == false, v.disabled)}" class="slds-input"
blur="{!c.handleBlur}"
/>
</aura:if>

<!-- PHONE -->
<aura:if isTrue="{!v.displayType == 'PHONE'}">
<ui:inputPhone aura:id="inputField" value="{!v.fieldValue}" required="{!v.required}" disabled="{!or(v.fieldMetadata.isUpdateable == false, v.disabled)}" class="slds-input" maxlength="{!v.fieldMetadata.maxLength}"
<ui:inputPhone aura:id="inputField" value="{!v.fieldValue}" required="{!v.required}" disabled="{!or(v.fieldMetadata.IsUpdateable == false, v.disabled)}" class="slds-input" maxlength="{!v.fieldMetadata.MaxLength}"
blur="{!c.handleBlur}"
/>
</aura:if>

<!-- REFERENCE -->
<aura:if isTrue="{!v.displayType == 'REFERENCE'}">
<c:lookup sobjectApiName="{!v.sobjectApiName}" fieldApiName="{!v.fieldApiName}" required="{!v.required}" disabled="{!or(v.fieldMetadata.isUpdateable == false, v.disabled)}"
<c:lookup sobjectApiName="{!v.sobjectApiName}" fieldApiName="{!v.fieldApiName}" required="{!v.required}" disabled="{!or(v.fieldMetadata.IsUpdateable == false, v.disabled)}"
record="{!v.record}"
/>
</aura:if>

<!-- STRING -->
<aura:if isTrue="{!v.displayType == 'STRING'}">
<ui:inputText aura:id="inputField" value="{!v.fieldValue}" required="{!v.required}" disabled="{!or(v.fieldMetadata.isUpdateable == false, v.disabled)}" class="slds-input" maxlength="{!v.fieldMetadata.maxLength}"
<ui:inputText aura:id="inputField" value="{!v.fieldValue}" required="{!v.required}" disabled="{!or(v.fieldMetadata.IsUpdateable == false, v.disabled)}" class="slds-input" maxlength="{!v.fieldMetadata.MaxLength}"
blur="{!c.handleBlur}"
/>
</aura:if>

<!-- TEXTAREA -->
<aura:if isTrue="{!v.displayType == 'TEXTAREA'}">
<ui:inputTextArea aura:id="inputField" value="{!v.fieldValue}" required="{!v.required}" disabled="{!or(v.fieldMetadata.isUpdateable == false, v.disabled)}" class="slds-input" maxlength="{!v.fieldMetadata.maxLength}"
<ui:inputTextArea aura:id="inputField" value="{!v.fieldValue}" required="{!v.required}" disabled="{!or(v.fieldMetadata.IsUpdateable == false, v.disabled)}" class="slds-input" maxlength="{!v.fieldMetadata.MaxLength}"
blur="{!c.handleBlur}"
/>
</aura:if>

<!-- URL -->
<aura:if isTrue="{!v.displayType == 'URL'}">
<ui:inputURL aura:id="inputField" value="{!v.fieldValue}" required="{!v.required}" disabled="{!or(v.fieldMetadata.isUpdateable == false, v.disabled)}" class="slds-input" maxlength="{!v.fieldMetadata.maxLength}"
<ui:inputURL aura:id="inputField" value="{!v.fieldValue}" required="{!v.required}" disabled="{!or(v.fieldMetadata.IsUpdateable == false, v.disabled)}" class="slds-input" maxlength="{!v.fieldMetadata.MaxLength}"
blur="{!c.handleBlur}"
/>
</aura:if>
Expand Down
2 changes: 1 addition & 1 deletion src/aura/inputField/inputField.cmp-meta.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>42.0</apiVersion>
<apiVersion>43.0</apiVersion>
<description>inputField</description>
</AuraDefinitionBundle>
14 changes: 7 additions & 7 deletions src/aura/inputField/inputFieldHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
var fieldMetadata = component.get('v.fieldMetadata');

if(component.get('v.displayType') === undefined) {
component.set('v.displayType', fieldMetadata.displayType);
component.set('v.displayType', fieldMetadata.DisplayType);
}
if(component.get('v.disabled') === undefined) {
component.set('v.disabled', fieldMetadata.isUpdateable == false);
component.set('v.disabled', fieldMetadata.IsUpdateable == false);
}
if(component.get('v.required') === undefined) {
var isUpdateableRequired = fieldMetadata.isUpdateable && fieldMetadata.isRequired;
var isUpdateableNameField = fieldMetadata.isUpdateable && fieldMetadata.isNameField;
var isUpdateableRequired = fieldMetadata.IsUpdateable && fieldMetadata.IsRequired;
var isUpdateableNameField = fieldMetadata.IsUpdateable && fieldMetadata.IsNameField;
component.set('v.required', isUpdateableRequired || isUpdateableNameField);
}
this.parsePicklistOptions(component, event);
Expand All @@ -34,7 +34,7 @@

if(fieldMetadata == null) return;

picklistOptions = fieldMetadata.picklistOptions;
picklistOptions = fieldMetadata.PicklistOptions;
}
component.set('v.picklistOptions', picklistOptions);
},
Expand All @@ -51,14 +51,14 @@

var fieldChanged = newFieldValue !== oldFieldValue;
// If the displayType is different from the field metadata and it should be a string, then cast to strings and compare to see if the field changed
if(newFieldValue !== null && typeof newFieldValue !== 'string' && fieldMetadata != null && (fieldMetadata.displayType === 'TEXT' || fieldMetadata.displayType === 'TEXTAREA')) {
if(newFieldValue !== null && typeof newFieldValue !== 'string' && fieldMetadata != null && (fieldMetadata.DisplayType === 'TEXT' || fieldMetadata.DisplayType === 'TEXTAREA')) {
var newFieldValueString = newFieldValue == null ? null : newFieldValue.toString();
var oldFieldValueString = oldFieldValue == null ? null : oldFieldValue.toString();
fieldChanged = newFieldValueString !== oldFieldValueString;
}

if(fieldChanged) {
if(newFieldValue !== null && typeof newFieldValue !== 'string' && fieldMetadata != null && (fieldMetadata.displayType === 'TEXT' || fieldMetadata.displayType === 'TEXTAREA')) {
if(newFieldValue !== null && typeof newFieldValue !== 'string' && fieldMetadata != null && (fieldMetadata.DisplayType === 'TEXT' || fieldMetadata.DisplayType === 'TEXTAREA')) {
newFieldValue = newFieldValue.toString();
}
record[changedField] = newFieldValue;
Expand Down
24 changes: 0 additions & 24 deletions src/aura/listViewMetadata/listViewMetadata.cmp

This file was deleted.

5 changes: 0 additions & 5 deletions src/aura/listViewMetadata/listViewMetadata.cmp-meta.xml

This file was deleted.

5 changes: 0 additions & 5 deletions src/aura/listViewMetadata/listViewMetadataController.js

This file was deleted.

34 changes: 0 additions & 34 deletions src/aura/listViewMetadata/listViewMetadataHelper.js

This file was deleted.

Loading

0 comments on commit 86dc874

Please sign in to comment.