Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

epsilon release #286

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ cd timeline-lwc
}
],
"sfdcLoginUrl": "https://login.salesforce.com",
"sourceApiVersion": "59.0"
"sourceApiVersion": "61.0"
}
```

Expand Down Expand Up @@ -159,11 +159,12 @@ The component has the following properties that can be set at design time in App
| `Parent Record` | Adjusts the timeline parent id | Dynamic Picklist (valid relationships) |
| `Title` | Adjusts the label | String |
| `Height` | Adjusts the vertical height | Picklist (1 - 5) |
| `Icon Style` | Adjusts the iconography style | Picklist (Square, Circular) |
| `Historical Time Range (Years)` | Adjusts the start date | Picklist (0.25 - 10) |
| `Future Time Range (Years)` | Adjusts the end date | Picklist (0.25 - 10) |
| `Zoom Based On` | Adjusts the position of the zoom | Picklist (First Date, Current Date, Last Activity) |
| `Zoom Range (Days)` | Adjusts the extent of the zoom | Integer min 15 max 365 |
| `Show Today` | Plots a line for the current date/time | Picklist (No/Various Colours) |
| `Show Today` | Plots a line for the current date/time | Picklist (No/Various Colours) |

#### Custom Labels

Expand Down
8 changes: 6 additions & 2 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@
## XX Xxx 2024 v1.15.0

**WHAT'S NEW**
- Changed Salesforce API to v60.0 from v59.0
- Changed Salesforce API to v61.0 from v59.0
- Added EmailMessage drilldown support for ActivityHistory and OpenActivities
- Added UI support for SLDS v2 (Enhanced Lightning)
- Added support for circular iconography to align with SLDS v2

**BUG FIXES**
- Fixed memory leak issue
- Fixed issue plotting tasks for Person Accounts
- Fixed font and font size mismatches with SLDS v1 and v2

## 30 Jan 2024 v1.14.0

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>59.0</apiVersion>
<apiVersion>61.0</apiVersion>
<status>Active</status>
</ApexClass>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>59.0</apiVersion>
<apiVersion>61.0</apiVersion>
<status>Active</status>
</ApexClass>
25 changes: 25 additions & 0 deletions force-app/main/default/classes/TimelineService.cls
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ public with sharing class TimelineService {
'Parent_Object__c =:parentConfigType'; //NOPMD

List<Timeline_Configuration__mdt> listOfTimelineConfigurations = Database.query(queryTimelineConfiguration); //NOPMD
Map<ID, Timeline_Configuration__mdt> timelineConfigObjectName = new Map <ID, Timeline_Configuration__mdt>([SELECT Id, Object_Name__c FROM Timeline_Configuration__mdt]);

if (listofTimelineConfigurations.size() < 1) {
String errorMsg =
Expand All @@ -141,6 +142,9 @@ public with sharing class TimelineService {

for (Timeline_Configuration__mdt timelineConfigurationRecord : listOfTimelineConfigurations) {
TimelineRecord timelineRecord = new timelineRecord();
Schema.SObjectType timelineRecordObjectType = Schema.getGlobalDescribe().get(timelineConfigurationRecord.Object_Name__c);
Schema.DescribeSObjectResult timelineDescribeResult = timelineRecordObjectType.getDescribe();
timelineRecord.objectLabel = timelineDescribeResult.getLabel();
timelineRecord.relationshipName = timelineConfigurationRecord.Relationship_Name__c;
timelineRecord.icon = timelineConfigurationRecord.Icon__c;
timelineRecord.iconBackground = timelineConfigurationRecord.Icon_Background_Colour__c;
Expand Down Expand Up @@ -187,6 +191,7 @@ public with sharing class TimelineService {
objName == 'ActivityHistory' ||
objName == 'TaskRelation' ||
objName == 'ContentDocumentLink' ||
objName == 'TaskWhoRelation' ||
objName == 'LookedUpFromActivity')
) {
selectStatement = selectStatement + ', ' + tcr.type + '';
Expand All @@ -199,6 +204,13 @@ public with sharing class TimelineService {
selectStatement = selectStatement + ', ActivityDate' + '';
}

if (
(objName == 'OpenActivity' || objName == 'ActivityHistory') &&
!selectStatement.contains('AlternateDetailId')
) {
selectStatement = selectStatement + ', AlternateDetailId' + '';
}

if (objName == 'ContentDocumentLink') {
selectStatement = selectStatement + ', ' + 'ContentDocumentId' + '';
}
Expand Down Expand Up @@ -330,6 +342,16 @@ public with sharing class TimelineService {

Map<String, String> typeValues = getFieldValues(tr.type, eachCh, tr.objectName);

String alternateDetailId = '';

if ( (tr.objectName == 'OpenActivity' || tr.objectName == 'ActivityHistory') &&
(String.valueOf(eachCh.get('AlternateDetailId')) != '' &&
String.valueOf(eachCh.get('AlternateDetailId')) != null) ) {
alternateDetailId = String.valueOf(eachCh.get('AlternateDetailId'));
}

mapData.put('alternateDetailId', alternateDetailId);

if (tr.objectName == 'ContentDocumentLink') {
//NOPMD
myId = String.valueOf(eachCh.get('ContentDocumentId'));
Expand All @@ -350,6 +372,7 @@ public with sharing class TimelineService {
mapData.put('positionDateValue', positionValues.get('value'));
mapData.put('positionDateType', positionValues.get('type'));
mapData.put('objectName', tr.objectName);
mapData.put('objectLabel', tr.objectLabel);
mapData.put('fallbackTooltipField', fallbackValues.get('label'));
mapData.put('fallbackTooltipValue', fallbackValues.get('value'));
mapData.put('drilldownId', drilldownIdValues.get('value'));
Expand Down Expand Up @@ -640,6 +663,7 @@ public with sharing class TimelineService {
private String positionDateValue;
private String positionDateType;
private String objectName;
private String objectLabel;
private String type;
private String tooltipIdField;
private String tooltipObject;
Expand All @@ -649,6 +673,7 @@ public with sharing class TimelineService {
private String fallbackNameField;
private String fallbackNameValue;
private String inclusionField;
private String alternateDetailId;
private Id recordId;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>59.0</apiVersion>
<apiVersion>61.0</apiVersion>
<status>Active</status>
</ApexClass>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>59.0</apiVersion>
<apiVersion>61.0</apiVersion>
<status>Active</status>
</ApexClass>
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</values>
<values>
<field>Object_Name__c</field>
<value xsi:type="xsd:string">EventRelation</value>
<value xsi:type="xsd:string">EventWhoRelation</value>
</values>
<values>
<field>Parent_Object__c</field>
Expand All @@ -40,7 +40,7 @@
</values>
<values>
<field>Relationship_Name__c</field>
<value xsi:type="xsd:string">EventRelations</value>
<value xsi:type="xsd:string">PersonEventWhoRelations</value>
</values>
<values>
<field>Sequence__c</field>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</values>
<values>
<field>Object_Name__c</field>
<value xsi:type="xsd:string">TaskRelation</value>
<value xsi:type="xsd:string">TaskWhoRelation</value>
</values>
<values>
<field>Parent_Object__c</field>
Expand All @@ -40,7 +40,7 @@
</values>
<values>
<field>Relationship_Name__c</field>
<value xsi:type="xsd:string">TaskRelations</value>
<value xsi:type="xsd:string">PersonTaskWhoRelations</value>
</values>
<values>
<field>Sequence__c</field>
Expand Down
8 changes: 8 additions & 0 deletions force-app/main/default/labels/CustomLabels.labels-meta.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,14 @@
<shortDescription>Timeline_Label_Filter_Type_Legend</shortDescription>
<value>Types to Show</value>
</labels>
<labels>
<fullName>Timeline_Label_Filter_Date_Legend</fullName>
<categories>Timeline</categories>
<language>en_US</language>
<protected>true</protected>
<shortDescription>Timeline_Label_Filter_Date_Legend</shortDescription>
<value>Dates in View</value>
</labels>
<labels>
<fullName>Timeline_Label_Filters</fullName>
<categories>Timeline</categories>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>59.0</apiVersion>
<apiVersion>61.0</apiVersion>
<isExposed>false</isExposed>
</LightningComponentBundle>
34 changes: 30 additions & 4 deletions force-app/main/default/lwc/timeline/timeline.css
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
.stencil-label {
background-color: #b0adab;
background-color: #83807f;
height: 0.4rem;
border-radius: 2rem;
width: 10rem;
}

.stencil-value {
background-color: #969492;
background-color: #5f5e5d;
height: 0.4rem;
border-radius: 2rem;
margin-top: 0.5rem;
width: 10rem;
}

Expand All @@ -24,6 +23,10 @@
text-align: center;
}

.slds-spinner_container, .slds-spinner--container {
border-radius: 20px !important;
}

.illustration {
padding: 10px 5px 5px 5px;
border-radius: 5px 5px 5px 5px;
Expand Down Expand Up @@ -214,7 +217,7 @@
}

.timeline-wrapper {
margin: 10px 10px 10px 10px;
--margin: 5px 5px 5px 5px;
border: 1px solid #747474;
border-radius: 3px;
position: relative;
Expand Down Expand Up @@ -281,10 +284,12 @@
}

.timeline-summary-verbose {
padding-right: 10px;
display: none;
}

.timeline-summary-short {
padding-right: 10px;
display: inline-block !important;
}
}
Expand All @@ -304,5 +309,26 @@
}

.timeline-summary-short {
padding-right: 10px;
display: none;
}

.sr-only {
font-size: 0;
}

.sticky-button {
position: sticky;
bottom: 0;
background-color: white;
padding: 5px;
}

.slds-panel__body {
padding-bottom: 50px;
}

.timeline-summary-verbose {
padding-right: 10px;

}
Loading
Loading