From 5003a4bbfd76416b2ed41e1f6fda2f8cf656b419 Mon Sep 17 00:00:00 2001 From: malens Date: Wed, 1 Jun 2022 09:16:44 +0200 Subject: [PATCH 1/2] Minimal span timeline support. (#189) * Minimal span timeline support. * Missing line. * Fix map swimming lanes. --- .../main/default/classes/TimelineService.cls | 23 +++++++++++- ...eline Configuration Layout.layout-meta.xml | 4 +++ .../main/default/lwc/timeline/timeline.js | 36 ++++++++++++++++--- .../Position_End_Date_Field__c.field-meta.xml | 12 +++++++ 4 files changed, 69 insertions(+), 6 deletions(-) create mode 100644 force-app/main/default/objects/Timeline_Configuration__mdt/fields/Position_End_Date_Field__c.field-meta.xml diff --git a/force-app/main/default/classes/TimelineService.cls b/force-app/main/default/classes/TimelineService.cls index fe37413a..dd8eb9ae 100644 --- a/force-app/main/default/classes/TimelineService.cls +++ b/force-app/main/default/classes/TimelineService.cls @@ -115,6 +115,7 @@ public with sharing class TimelineService { 'Icon__c, ' + 'Icon_Background_Colour__c, ' + 'Position_Date_Field__c, ' + + 'Position_End_Date_Field__c, ' + 'Object_Name__c, ' + 'Type_Field__c, ' + 'Drilldown_Id_Field__c, ' + @@ -151,6 +152,7 @@ public with sharing class TimelineService { timelineRecord.objectName = timelineConfigurationRecord.Object_Name__c; timelineRecord.type = timelineConfigurationRecord.Type_Field__c; timelineRecord.positionDateField = timelineConfigurationRecord.Position_Date_Field__c; + timelineRecord.positionEndDateField = timelineConfigurationRecord.Position_End_Date_Field__c; timelineRecord.fallbackTooltipField = timelineConfigurationRecord.Fallback_Tooltip_Field__c; timelineRecord.tooltipIdField = timelineConfigurationRecord.Tooltip_Id_Field__c; timelineRecord.tooltipObject = timelineConfigurationRecord.Tooltip_Object_Name__c; @@ -183,7 +185,13 @@ public with sharing class TimelineService { String drilldownIdField = String.valueOf(tcr.drilldownIdField); String typeField = String.valueOf(tcr.type); - String selectStatement = '(SELECT Id, ' + tcr.detailField + ', ' + tcr.positionDateField + ''; + String selectStatement = '(SELECT Id, ' + + tcr.detailField + ', ' + + tcr.positionDateField + + (String.isBlank(tcr.positionEndDateField) + ? '' + : (', ' + tcr.positionEndDateField) + ); if ( (typeField != null && typeField != '') && @@ -293,6 +301,11 @@ public with sharing class TimelineService { eachCh, tr.objectName ); + Map positionEndValues = getFieldValues( + tr.positionEndDateField, + eachCh, + tr.objectName + ); Map fallbackValues = getFieldValues( tr.fallbackTooltipField, eachCh, @@ -329,6 +342,12 @@ public with sharing class TimelineService { mapData.put('detailFieldLabel', detailValues.get('label')); mapData.put('positionDateField', positionValues.get('label')); mapData.put('positionDateValue', positionValues.get('value')); + mapData.put('positionEndDateField', positionEndValues.get('label')); + if (String.isBlank(positionEndValues.get('value'))){ + mapData.put('positionEndDateValue', positionValues.get('value')); + } else { + mapData.put('positionEndDateValue', positionEndValues.get('value')); + } mapData.put('objectName', tr.objectName); mapData.put('fallbackTooltipField', fallbackValues.get('label')); mapData.put('fallbackTooltipValue', fallbackValues.get('value')); @@ -603,6 +622,8 @@ public with sharing class TimelineService { private String detailFieldLabel; private String icon; private String iconBackground; + private String positionEndDateField; + private String positionEndDateValue; private String positionDateField; private String positionDateValue; private String objectName; diff --git a/force-app/main/default/layouts/Timeline_Configuration__mdt-Timeline Configuration Layout.layout-meta.xml b/force-app/main/default/layouts/Timeline_Configuration__mdt-Timeline Configuration Layout.layout-meta.xml index 51ae0b82..77259b93 100644 --- a/force-app/main/default/layouts/Timeline_Configuration__mdt-Timeline Configuration Layout.layout-meta.xml +++ b/force-app/main/default/layouts/Timeline_Configuration__mdt-Timeline Configuration Layout.layout-meta.xml @@ -26,6 +26,10 @@ Required Position_Date_Field__c + + Edit + Position_End_Date_Field__c + Edit Type_Field__c diff --git a/force-app/main/default/lwc/timeline/timeline.js b/force-app/main/default/lwc/timeline/timeline.js index cb54a514..4c383ea1 100755 --- a/force-app/main/default/lwc/timeline/timeline.js +++ b/force-app/main/default/lwc/timeline/timeline.js @@ -415,13 +415,17 @@ export default class timeline extends NavigationMixin(LightningElement) { recordCopy.positionDateField = record.positionDateField; let convertDate = record.positionDateValue.replace(' ', 'T'); + let convertEndDate = record.positionEndDateValue.replace(' ', 'T'); convertDate = convertDate + '.000Z'; + convertEndDate = convertEndDate + '.000Z'; let localDate = new Date(convertDate); + let localEndDate = new Date(convertEndDate); let localPositionDate = dateFormatter.format(localDate); recordCopy.positionDateValue = localPositionDate; recordCopy.time = localDate; + recordCopy.length = localEndDate - localDate; recordCopy.detailField = record.detailField; recordCopy.detailFieldLabel = record.detailFieldLabel; @@ -453,6 +457,20 @@ export default class timeline extends NavigationMixin(LightningElement) { return timelineRecords; } + getEventLength(length){ + length = Math.abs(length/1000); + let earliestRange = parseFloat(this.earliestRange); + let latestRange = parseFloat(this.latestRange); + let yearRange = earliestRange + latestRange; + let width = ((length / (365 * 24 * 60 * 60 * yearRange)) * this?._d3timelineCanvas?.width); + return Math.max(3, width); + } + + getIconEventLength(length){ + let width = this.unitInterval * length; + return Math.max(width, 24); + } + timelineCanvas() { const me = this; const timelineCanvasDIV = this.template.querySelector('div.timeline-canvas'); @@ -495,11 +513,11 @@ export default class timeline extends NavigationMixin(LightningElement) { let data = timelineData.data .filter(function (d) { if (me.isLanguageRightToLeft) { - d.endTime = new Date(d.time.getTime() - unitInterval * (d.label.length * 6 + 80)); + d.endTime = new Date(d.time.getTime() - Math.max(d.length, unitInterval * (d.label.length * 6 + 80))); return timelineCanvas.x.domain()[0] < d.time && d.endTime < timelineCanvas.x.domain()[1]; } - d.endTime = new Date(d.time.getTime() + unitInterval * (d.label.length * 6 + 80)); + d.endTime = new Date(d.time.getTime() + Math.max(d.length, unitInterval * (d.label.length * 6 + 80))); return timelineCanvas.x.domain()[0] < d.endTime && d.time < timelineCanvas.x.domain()[1]; }) .filter(timelineCanvas.filter); @@ -547,6 +565,10 @@ export default class timeline extends NavigationMixin(LightningElement) { return 'translate(' + timelineCanvas.x(d.time) + ', ' + timelineCanvas.y(d.swimlane) + ')'; }); + timelineCanvas.data + .selectAll('[class~=timeline-canvas-icon-wrap]') + .attr('width', d => me.getIconEventLength(d.length)) + timelineCanvas.records = timelineCanvas.data .enter() .append('g') @@ -582,7 +604,7 @@ export default class timeline extends NavigationMixin(LightningElement) { }) .attr('x', 0) .attr('y', 0) - .attr('width', 24) + .attr('width', d => me.getIconEventLength(d.length)) .attr('height', 24) .attr('rx', 3) .attr('ry', 3); @@ -851,6 +873,10 @@ export default class timeline extends NavigationMixin(LightningElement) { return height; } + get unitInterval(){ + return this._d3timelineMapSVG.width / (this._d3timelineCanvas.x.domain()[1] - this._d3timelineCanvas.x.domain()[0]); + } + timelineMap() { const me = this; @@ -883,7 +909,7 @@ export default class timeline extends NavigationMixin(LightningElement) { let data = timelineData.data .filter(function (d) { - d.endTime = new Date(d.time.getTime() + unitInterval * 10); + d.endTime = new Date(d.time.getTime() + Math.max(d.length, unitInterval * 10)); return true; }) .filter(timelineMap.filter); @@ -931,7 +957,7 @@ export default class timeline extends NavigationMixin(LightningElement) { .attr('style', function () { return 'fill: #98C3EE; stroke: #4B97E6'; }) - .attr('width', 3) + .attr('width', d => me.getEventLength(d.length)) .attr('height', 2) .attr('rx', 0.2) .attr('ry', 0.2); diff --git a/force-app/main/default/objects/Timeline_Configuration__mdt/fields/Position_End_Date_Field__c.field-meta.xml b/force-app/main/default/objects/Timeline_Configuration__mdt/fields/Position_End_Date_Field__c.field-meta.xml new file mode 100644 index 00000000..39954334 --- /dev/null +++ b/force-app/main/default/objects/Timeline_Configuration__mdt/fields/Position_End_Date_Field__c.field-meta.xml @@ -0,0 +1,12 @@ + + + Position_End_Date_Field__c + false + SubscriberControlled + The date fields API name used to determine where on the timeline to plot the record end + + 150 + false + Text + false + \ No newline at end of file From b0f2e58cbe54cb864a675c8fd615fe3078748b55 Mon Sep 17 00:00:00 2001 From: Dave Norris Date: Fri, 3 Jun 2022 11:17:08 +1000 Subject: [PATCH 2/2] Matqo fsl&span support (#193) * Added support for related Asset objects * Added support for span and Assets object --- .../main/default/classes/TimelineService.cls | 12 ++ ...ccount_AccountContactRelations.md-meta.xml | 8 + ...e_Configuration.Account_Assets.md-meta.xml | 4 + ...ne_Configuration.Account_Cases.md-meta.xml | 20 +++ ...Configuration.Account_Contacts.md-meta.xml | 8 + ...iguration.Account_Entitlements.md-meta.xml | 8 + ...e_Configuration.Account_Events.md-meta.xml | 20 +++ ...ne_Configuration.Account_Files.md-meta.xml | 20 +++ ...guration.Account_Opportunities.md-meta.xml | 20 +++ ...e_Configuration.Account_Orders.md-meta.xml | 8 + ...ation.Account_ServiceContracts.md-meta.xml | 8 + ...ne_Configuration.Account_Tasks.md-meta.xml | 20 +++ ...nfiguration.Account_Tasks_Test.md-meta.xml | 4 + ...nfiguration.Account_WorkOrders.md-meta.xml | 8 + ...ation.Asset_AssetRelationships.md-meta.xml | 6 +- ...line_Configuration.Asset_Cases.md-meta.xml | 6 +- ...onfiguration.Asset_ChildAssets.md-meta.xml | 6 +- ...ration.Asset_ContractLineItems.md-meta.xml | 6 +- ...guration.Asset_DowntimePeriods.md-meta.xml | 6 +- ...nfiguration.Asset_Entitlements.md-meta.xml | 6 +- ...ration.Asset_MaintenanceAssets.md-meta.xml | 6 +- ...ion.Asset_ReturnOrderLineItems.md-meta.xml | 6 +- ...line_Configuration.Asset_Tasks.md-meta.xml | 6 +- ...ation.Asset_WorkOrderLineItems.md-meta.xml | 73 ++++++++ ...Configuration.Asset_WorkOrders.md-meta.xml | 4 + ...onfiguration.Case_CaseComments.md-meta.xml | 20 +++ ...line_Configuration.Case_Events.md-meta.xml | 20 +++ ...eline_Configuration.Case_Files.md-meta.xml | 20 +++ ...eline_Configuration.Case_Tasks.md-meta.xml | 20 +++ ..._Configuration.Case_WorkOrders.md-meta.xml | 20 +++ ...e_Configuration.Contact_Assets.md-meta.xml | 20 +++ ...ration.Contact_CampaignMembers.md-meta.xml | 20 +++ ...n.Contact_CampaignMembers_Test.md-meta.xml | 4 + ...ne_Configuration.Contact_Cases.md-meta.xml | 20 +++ ...uration.Contact_EventRelations.md-meta.xml | 8 + ...e_Configuration.Contact_Events.md-meta.xml | 8 + ...ne_Configuration.Contact_Files.md-meta.xml | 20 +++ ...nfiguration.Contact_Files_Test.md-meta.xml | 4 + ...on.Contact_LiveChatTranscripts.md-meta.xml | 20 +++ ...tion.Contact_MessagingSessions.md-meta.xml | 20 +++ ...guration.Contact_Opportunities.md-meta.xml | 8 + ...ontact_OpportunityContactRoles.md-meta.xml | 8 + ...guration.Contact_TaskRelations.md-meta.xml | 8 + ...ne_Configuration.Contact_Tasks.md-meta.xml | 8 + ...nfiguration.Contact_Tasks_Test.md-meta.xml | 4 + ...nfiguration.Contact_WorkOrders.md-meta.xml | 20 +++ ...iguration.Person_Cases_Contact.md-meta.xml | 20 +++ ...guration.Person_Events_Contact.md-meta.xml | 20 +++ ...ine_Configuration.Person_Files.md-meta.xml | 20 +++ ...iguration.Person_Opportunities.md-meta.xml | 20 +++ ...iguration.Person_Tasks_Contact.md-meta.xml | 20 +++ .../main/default/lwc/timeline/timeline.html | 6 + .../main/default/lwc/timeline/timeline.js | 158 +++++++++++++++++- .../default/lwc/timeline/timeline.js-meta.xml | 12 ++ .../Position_End_Date_Field__c.field-meta.xml | 2 +- package.xml | 8 + 56 files changed, 873 insertions(+), 12 deletions(-) create mode 100644 force-app/main/default/customMetadata/Timeline_Configuration.Asset_WorkOrderLineItems.md-meta.xml create mode 100644 package.xml diff --git a/force-app/main/default/classes/TimelineService.cls b/force-app/main/default/classes/TimelineService.cls index dd8eb9ae..089dbc7e 100644 --- a/force-app/main/default/classes/TimelineService.cls +++ b/force-app/main/default/classes/TimelineService.cls @@ -165,6 +165,7 @@ public with sharing class TimelineService { ); mapOfFields.put(timelineRecord.detailField, timelineRecord.objectName); mapOfFields.put(timelineRecord.positionDateField, timelineRecord.objectName); + mapOfFields.put(timelineRecord.positionEndDateField, timelineRecord.objectName); mapOfFields.put(timelineRecord.fallbackTooltipField, timelineRecord.objectName); mapOfFields.put(timelineRecord.tooltipIdField, timelineRecord.objectName); mapOfFields.put(timelineRecord.drilldownIdField, timelineRecord.objectName); @@ -184,6 +185,15 @@ public with sharing class TimelineService { String tooltipIdField = String.valueOf(tcr.tooltipIdField); String drilldownIdField = String.valueOf(tcr.drilldownIdField); String typeField = String.valueOf(tcr.type); + + String selectStatement = '(SELECT Id, ' + + tcr.detailField + ', ' + + tcr.positionDateField + ''; + + if (String.valueOf(tcr.positionEndDateField) != null && String.valueOf(tcr.positionEndDateField) != ''){ + selectStatement = selectStatement + ', ' + + tcr.positionEndDateField + ''; + } String selectStatement = '(SELECT Id, ' + tcr.detailField + ', ' + @@ -626,6 +636,8 @@ public with sharing class TimelineService { private String positionEndDateValue; private String positionDateField; private String positionDateValue; + private String positionEndDateField; + private String positionDateEndValue; private String objectName; private String type; private String tooltipIdField; diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Account_AccountContactRelations.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Account_AccountContactRelations.md-meta.xml index e54a279b..8b4ed27a 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Account_AccountContactRelations.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Account_AccountContactRelations.md-meta.xml @@ -38,6 +38,10 @@ Position_Date_Field__c CreatedDate + + Position_End_Date_Field__c + + Relationship_Name__c AccountContactRelations @@ -46,6 +50,10 @@ Sequence__c 40.0 + + Test__c + false + Tooltip_Id_Field__c diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Account_Assets.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Account_Assets.md-meta.xml index 55e052b5..8e3d5bff 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Account_Assets.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Account_Assets.md-meta.xml @@ -38,6 +38,10 @@ Position_Date_Field__c PurchaseDate + + Position_End_Date_Field__c + + Relationship_Name__c Assets diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Account_Cases.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Account_Cases.md-meta.xml index 8defabd4..c3bca073 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Account_Cases.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Account_Cases.md-meta.xml @@ -10,6 +10,10 @@ Detail_Field__c Subject + + Drilldown_Id_Field__c + + Fallback_Tooltip_Field__c @@ -34,6 +38,10 @@ Position_Date_Field__c CreatedDate + + Position_End_Date_Field__c + + Relationship_Name__c Cases @@ -42,6 +50,18 @@ Sequence__c 50.0 + + Test__c + false + + + Tooltip_Id_Field__c + + + + Tooltip_Object_Name__c + + Type_Field__c diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Account_Contacts.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Account_Contacts.md-meta.xml index e77625d6..a5f8904a 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Account_Contacts.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Account_Contacts.md-meta.xml @@ -38,6 +38,10 @@ Position_Date_Field__c CreatedDate + + Position_End_Date_Field__c + + Relationship_Name__c Contacts @@ -46,6 +50,10 @@ Sequence__c 40.0 + + Test__c + false + Tooltip_Id_Field__c diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Account_Entitlements.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Account_Entitlements.md-meta.xml index 2224949a..6ca3829c 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Account_Entitlements.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Account_Entitlements.md-meta.xml @@ -38,6 +38,10 @@ Position_Date_Field__c StartDate + + Position_End_Date_Field__c + + Relationship_Name__c Entitlements @@ -46,6 +50,10 @@ Sequence__c 86.0 + + Test__c + false + Tooltip_Id_Field__c diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Account_Events.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Account_Events.md-meta.xml index 77022767..c681864a 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Account_Events.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Account_Events.md-meta.xml @@ -10,6 +10,10 @@ Detail_Field__c Subject + + Drilldown_Id_Field__c + + Fallback_Tooltip_Field__c Owner.Name @@ -34,6 +38,10 @@ Position_Date_Field__c StartDateTime + + Position_End_Date_Field__c + + Relationship_Name__c Events @@ -42,6 +50,18 @@ Sequence__c 20.0 + + Test__c + false + + + Tooltip_Id_Field__c + + + + Tooltip_Object_Name__c + + Type_Field__c diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Account_Files.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Account_Files.md-meta.xml index 5e063dd5..2bfb576c 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Account_Files.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Account_Files.md-meta.xml @@ -10,6 +10,10 @@ Detail_Field__c ContentDocument.Title + + Drilldown_Id_Field__c + + Fallback_Tooltip_Field__c ContentDocument.FileExtension @@ -34,6 +38,10 @@ Position_Date_Field__c SystemModstamp + + Position_End_Date_Field__c + + Relationship_Name__c ContentDocumentLinks @@ -42,6 +50,18 @@ Sequence__c 30.0 + + Test__c + false + + + Tooltip_Id_Field__c + + + + Tooltip_Object_Name__c + + Type_Field__c ContentDocument.FileType diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Account_Opportunities.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Account_Opportunities.md-meta.xml index a5f2a2a8..be3298dc 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Account_Opportunities.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Account_Opportunities.md-meta.xml @@ -10,6 +10,10 @@ Detail_Field__c Name + + Drilldown_Id_Field__c + + Fallback_Tooltip_Field__c @@ -34,6 +38,10 @@ Position_Date_Field__c CreatedDate + + Position_End_Date_Field__c + + Relationship_Name__c Opportunities @@ -42,6 +50,18 @@ Sequence__c 60.0 + + Test__c + false + + + Tooltip_Id_Field__c + + + + Tooltip_Object_Name__c + + Type_Field__c diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Account_Orders.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Account_Orders.md-meta.xml index 579ae613..627560af 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Account_Orders.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Account_Orders.md-meta.xml @@ -38,6 +38,10 @@ Position_Date_Field__c EffectiveDate + + Position_End_Date_Field__c + + Relationship_Name__c Orders @@ -46,6 +50,10 @@ Sequence__c 87.0 + + Test__c + false + Tooltip_Id_Field__c diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Account_ServiceContracts.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Account_ServiceContracts.md-meta.xml index 8ce300b7..37d7b295 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Account_ServiceContracts.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Account_ServiceContracts.md-meta.xml @@ -38,6 +38,10 @@ Position_Date_Field__c StartDate + + Position_End_Date_Field__c + + Relationship_Name__c ServiceContracts @@ -46,6 +50,10 @@ Sequence__c 85.0 + + Test__c + false + Tooltip_Id_Field__c diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Account_Tasks.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Account_Tasks.md-meta.xml index 4ce74cb0..7253b8cd 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Account_Tasks.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Account_Tasks.md-meta.xml @@ -10,6 +10,10 @@ Detail_Field__c Subject + + Drilldown_Id_Field__c + + Fallback_Tooltip_Field__c Status @@ -34,6 +38,10 @@ Position_Date_Field__c ActivityDate + + Position_End_Date_Field__c + + Relationship_Name__c Tasks @@ -42,6 +50,18 @@ Sequence__c 10.0 + + Test__c + false + + + Tooltip_Id_Field__c + + + + Tooltip_Object_Name__c + + Type_Field__c TaskSubtype diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Account_Tasks_Test.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Account_Tasks_Test.md-meta.xml index 45d162a4..c1467434 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Account_Tasks_Test.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Account_Tasks_Test.md-meta.xml @@ -38,6 +38,10 @@ Position_Date_Field__c ActivityDate + + Position_End_Date_Field__c + + Relationship_Name__c Tasks diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Account_WorkOrders.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Account_WorkOrders.md-meta.xml index ca1d45a2..b1521be1 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Account_WorkOrders.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Account_WorkOrders.md-meta.xml @@ -38,6 +38,10 @@ Position_Date_Field__c StartDate + + Position_End_Date_Field__c + + Relationship_Name__c WorkOrders @@ -46,6 +50,10 @@ Sequence__c 40.0 + + Test__c + false + Tooltip_Id_Field__c diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Asset_AssetRelationships.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Asset_AssetRelationships.md-meta.xml index f36ca098..5fb736a9 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Asset_AssetRelationships.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Asset_AssetRelationships.md-meta.xml @@ -38,6 +38,10 @@ Position_Date_Field__c FromDate + + Position_End_Date_Field__c + ToDate + Relationship_Name__c PrimaryAssets @@ -62,4 +66,4 @@ Type_Field__c - \ No newline at end of file + diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Asset_Cases.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Asset_Cases.md-meta.xml index cef3cf88..4abf7c44 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Asset_Cases.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Asset_Cases.md-meta.xml @@ -38,6 +38,10 @@ Position_Date_Field__c CreatedDate + + Position_End_Date_Field__c + ClosedDate + Relationship_Name__c Cases @@ -62,4 +66,4 @@ Type_Field__c - \ No newline at end of file + diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Asset_ChildAssets.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Asset_ChildAssets.md-meta.xml index 4b6fc832..67099010 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Asset_ChildAssets.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Asset_ChildAssets.md-meta.xml @@ -38,6 +38,10 @@ Position_Date_Field__c InstallDate + + Position_End_Date_Field__c + + Relationship_Name__c ChildAssets @@ -62,4 +66,4 @@ Type_Field__c - \ No newline at end of file + diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Asset_ContractLineItems.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Asset_ContractLineItems.md-meta.xml index ccdc3c2d..7c5d8c78 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Asset_ContractLineItems.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Asset_ContractLineItems.md-meta.xml @@ -38,6 +38,10 @@ Position_Date_Field__c StartDate + + Position_End_Date_Field__c + EndDate + Relationship_Name__c ContractLineItems @@ -62,4 +66,4 @@ Type_Field__c - \ No newline at end of file + diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Asset_DowntimePeriods.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Asset_DowntimePeriods.md-meta.xml index c503316c..a78728c1 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Asset_DowntimePeriods.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Asset_DowntimePeriods.md-meta.xml @@ -38,6 +38,10 @@ Position_Date_Field__c StartTime + + Position_End_Date_Field__c + EndTime + Relationship_Name__c AssetDowntimePeriods @@ -62,4 +66,4 @@ Type_Field__c - \ No newline at end of file + diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Asset_Entitlements.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Asset_Entitlements.md-meta.xml index cd803fc4..84f74d22 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Asset_Entitlements.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Asset_Entitlements.md-meta.xml @@ -38,6 +38,10 @@ Position_Date_Field__c StartDate + + Position_End_Date_Field__c + EndDate + Relationship_Name__c Entitlements @@ -62,4 +66,4 @@ Type_Field__c - \ No newline at end of file + diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Asset_MaintenanceAssets.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Asset_MaintenanceAssets.md-meta.xml index 4e6282f4..c78cbe50 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Asset_MaintenanceAssets.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Asset_MaintenanceAssets.md-meta.xml @@ -38,6 +38,10 @@ Position_Date_Field__c MaintenancePlan.StartDate + + Position_End_Date_Field__c + MaintenancePlan.EndDate + Relationship_Name__c MaintenanceAssets @@ -62,4 +66,4 @@ Type_Field__c - \ No newline at end of file + diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Asset_ReturnOrderLineItems.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Asset_ReturnOrderLineItems.md-meta.xml index 04d7cdf6..9dcef9ff 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Asset_ReturnOrderLineItems.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Asset_ReturnOrderLineItems.md-meta.xml @@ -38,6 +38,10 @@ Position_Date_Field__c CreatedDate + + Position_End_Date_Field__c + + Relationship_Name__c ReturnOrderLineItems @@ -62,4 +66,4 @@ Type_Field__c - \ No newline at end of file + diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Asset_Tasks.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Asset_Tasks.md-meta.xml index d15f0233..6fa059a1 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Asset_Tasks.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Asset_Tasks.md-meta.xml @@ -38,6 +38,10 @@ Position_Date_Field__c ActivityDate + + Position_End_Date_Field__c + + Relationship_Name__c Tasks @@ -62,4 +66,4 @@ Type_Field__c - \ No newline at end of file + diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Asset_WorkOrderLineItems.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Asset_WorkOrderLineItems.md-meta.xml new file mode 100644 index 00000000..a81fa1e1 --- /dev/null +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Asset_WorkOrderLineItems.md-meta.xml @@ -0,0 +1,73 @@ + + + + false + + Active__c + true + + + Allow_Drilldown__c + true + + + Detail_Field__c + Subject + + + Drilldown_Id_Field__c + + + + Fallback_Tooltip_Field__c + + + + Icon_Background_Colour__c + #33A8DC + + + Icon__c + /img/icon/t4v35/standard/work_order_item.svg + + + Object_Name__c + WorkOrderLineItem + + + Parent_Object__c + Asset + + + Position_Date_Field__c + StartDate + + + Position_End_Date_Field__c + EndDate + + + Relationship_Name__c + WorkOrderLineItems + + + Sequence__c + 50.0 + + + Test__c + false + + + Tooltip_Id_Field__c + + + + Tooltip_Object_Name__c + + + + Type_Field__c + + + diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Asset_WorkOrders.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Asset_WorkOrders.md-meta.xml index 2a859b7a..792b6020 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Asset_WorkOrders.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Asset_WorkOrders.md-meta.xml @@ -38,6 +38,10 @@ Position_Date_Field__c StartDate + + Position_End_Date_Field__c + EndDate + Relationship_Name__c WorkOrders diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Case_CaseComments.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Case_CaseComments.md-meta.xml index 0f7670e9..3f7d2970 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Case_CaseComments.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Case_CaseComments.md-meta.xml @@ -10,6 +10,10 @@ Detail_Field__c CommentBody + + Drilldown_Id_Field__c + + Fallback_Tooltip_Field__c IsPublished @@ -34,6 +38,10 @@ Position_Date_Field__c CreatedDate + + Position_End_Date_Field__c + + Relationship_Name__c CaseComments @@ -42,6 +50,18 @@ Sequence__c 50.0 + + Test__c + false + + + Tooltip_Id_Field__c + + + + Tooltip_Object_Name__c + + Type_Field__c diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Case_Events.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Case_Events.md-meta.xml index 2089c597..2676c145 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Case_Events.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Case_Events.md-meta.xml @@ -10,6 +10,10 @@ Detail_Field__c Subject + + Drilldown_Id_Field__c + + Fallback_Tooltip_Field__c Owner.Name @@ -34,6 +38,10 @@ Position_Date_Field__c StartDateTime + + Position_End_Date_Field__c + + Relationship_Name__c Events @@ -42,6 +50,18 @@ Sequence__c 20.0 + + Test__c + false + + + Tooltip_Id_Field__c + + + + Tooltip_Object_Name__c + + Type_Field__c diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Case_Files.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Case_Files.md-meta.xml index 960c25ac..92528aa5 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Case_Files.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Case_Files.md-meta.xml @@ -10,6 +10,10 @@ Detail_Field__c ContentDocument.Title + + Drilldown_Id_Field__c + + Fallback_Tooltip_Field__c ContentDocument.FileExtension @@ -34,6 +38,10 @@ Position_Date_Field__c SystemModstamp + + Position_End_Date_Field__c + + Relationship_Name__c ContentDocumentLinks @@ -42,6 +50,18 @@ Sequence__c 30.0 + + Test__c + false + + + Tooltip_Id_Field__c + + + + Tooltip_Object_Name__c + + Type_Field__c ContentDocument.FileType diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Case_Tasks.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Case_Tasks.md-meta.xml index bf5f70e0..11dcf8c9 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Case_Tasks.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Case_Tasks.md-meta.xml @@ -10,6 +10,10 @@ Detail_Field__c Subject + + Drilldown_Id_Field__c + + Fallback_Tooltip_Field__c Status @@ -34,6 +38,10 @@ Position_Date_Field__c ActivityDate + + Position_End_Date_Field__c + + Relationship_Name__c Tasks @@ -42,6 +50,18 @@ Sequence__c 10.0 + + Test__c + false + + + Tooltip_Id_Field__c + + + + Tooltip_Object_Name__c + + Type_Field__c TaskSubtype diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Case_WorkOrders.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Case_WorkOrders.md-meta.xml index bd586e86..3de12f52 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Case_WorkOrders.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Case_WorkOrders.md-meta.xml @@ -10,6 +10,10 @@ Detail_Field__c Description + + Drilldown_Id_Field__c + + Fallback_Tooltip_Field__c @@ -34,6 +38,10 @@ Position_Date_Field__c CreatedDate + + Position_End_Date_Field__c + + Relationship_Name__c WorkOrders @@ -42,6 +50,18 @@ Sequence__c 70.0 + + Test__c + false + + + Tooltip_Id_Field__c + + + + Tooltip_Object_Name__c + + Type_Field__c diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Contact_Assets.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Contact_Assets.md-meta.xml index a93be117..110a3a87 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Contact_Assets.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Contact_Assets.md-meta.xml @@ -10,6 +10,10 @@ Detail_Field__c Name + + Drilldown_Id_Field__c + + Fallback_Tooltip_Field__c @@ -34,6 +38,10 @@ Position_Date_Field__c PurchaseDate + + Position_End_Date_Field__c + + Relationship_Name__c Assets @@ -42,6 +50,18 @@ Sequence__c 80.0 + + Test__c + false + + + Tooltip_Id_Field__c + + + + Tooltip_Object_Name__c + + Type_Field__c diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Contact_CampaignMembers.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Contact_CampaignMembers.md-meta.xml index 76f397fd..86315b8b 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Contact_CampaignMembers.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Contact_CampaignMembers.md-meta.xml @@ -10,6 +10,10 @@ Detail_Field__c Campaign.Name + + Drilldown_Id_Field__c + + Fallback_Tooltip_Field__c @@ -34,6 +38,10 @@ Position_Date_Field__c Campaign.StartDate + + Position_End_Date_Field__c + + Relationship_Name__c CampaignMembers @@ -42,6 +50,18 @@ Sequence__c 60.0 + + Test__c + false + + + Tooltip_Id_Field__c + + + + Tooltip_Object_Name__c + + Type_Field__c diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Contact_CampaignMembers_Test.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Contact_CampaignMembers_Test.md-meta.xml index b7f611ae..29d8545b 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Contact_CampaignMembers_Test.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Contact_CampaignMembers_Test.md-meta.xml @@ -38,6 +38,10 @@ Position_Date_Field__c Campaign.StartDate + + Position_End_Date_Field__c + + Relationship_Name__c CampaignMembers diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Contact_Cases.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Contact_Cases.md-meta.xml index 97d9f825..c9c99565 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Contact_Cases.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Contact_Cases.md-meta.xml @@ -10,6 +10,10 @@ Detail_Field__c Subject + + Drilldown_Id_Field__c + + Fallback_Tooltip_Field__c @@ -34,6 +38,10 @@ Position_Date_Field__c CreatedDate + + Position_End_Date_Field__c + + Relationship_Name__c Cases @@ -42,6 +50,18 @@ Sequence__c 40.0 + + Test__c + false + + + Tooltip_Id_Field__c + + + + Tooltip_Object_Name__c + + Type_Field__c diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Contact_EventRelations.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Contact_EventRelations.md-meta.xml index b26ca856..49e1cb38 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Contact_EventRelations.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Contact_EventRelations.md-meta.xml @@ -38,6 +38,10 @@ Position_Date_Field__c Event.StartDateTime + + Position_End_Date_Field__c + + Relationship_Name__c EventRelations @@ -46,6 +50,10 @@ Sequence__c 20.0 + + Test__c + false + Tooltip_Id_Field__c Event.Id diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Contact_Events.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Contact_Events.md-meta.xml index ae7740bc..00b57760 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Contact_Events.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Contact_Events.md-meta.xml @@ -38,6 +38,10 @@ Position_Date_Field__c StartDateTime + + Position_End_Date_Field__c + + Relationship_Name__c Events @@ -46,6 +50,10 @@ Sequence__c 20.0 + + Test__c + false + Tooltip_Id_Field__c diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Contact_Files.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Contact_Files.md-meta.xml index 98302bf5..a9ed6ead 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Contact_Files.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Contact_Files.md-meta.xml @@ -10,6 +10,10 @@ Detail_Field__c ContentDocument.Title + + Drilldown_Id_Field__c + + Fallback_Tooltip_Field__c ContentDocument.FileExtension @@ -34,6 +38,10 @@ Position_Date_Field__c SystemModstamp + + Position_End_Date_Field__c + + Relationship_Name__c ContentDocumentLinks @@ -42,6 +50,18 @@ Sequence__c 30.0 + + Test__c + false + + + Tooltip_Id_Field__c + + + + Tooltip_Object_Name__c + + Type_Field__c ContentDocument.FileType diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Contact_Files_Test.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Contact_Files_Test.md-meta.xml index 89636633..8995d77c 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Contact_Files_Test.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Contact_Files_Test.md-meta.xml @@ -38,6 +38,10 @@ Position_Date_Field__c SystemModstamp + + Position_End_Date_Field__c + + Relationship_Name__c ContentDocumentLinks diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Contact_LiveChatTranscripts.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Contact_LiveChatTranscripts.md-meta.xml index 96f22668..d5eab663 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Contact_LiveChatTranscripts.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Contact_LiveChatTranscripts.md-meta.xml @@ -10,6 +10,10 @@ Detail_Field__c Name + + Drilldown_Id_Field__c + + Fallback_Tooltip_Field__c Status @@ -34,6 +38,10 @@ Position_Date_Field__c RequestTime + + Position_End_Date_Field__c + + Relationship_Name__c LiveChatTranscripts @@ -42,6 +50,18 @@ Sequence__c 110.0 + + Test__c + false + + + Tooltip_Id_Field__c + + + + Tooltip_Object_Name__c + + Type_Field__c diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Contact_MessagingSessions.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Contact_MessagingSessions.md-meta.xml index bf510368..4ce48a82 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Contact_MessagingSessions.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Contact_MessagingSessions.md-meta.xml @@ -10,6 +10,10 @@ Detail_Field__c PreviewDetails + + Drilldown_Id_Field__c + + Fallback_Tooltip_Field__c EndTime @@ -34,6 +38,10 @@ Position_Date_Field__c StartTime + + Position_End_Date_Field__c + + Relationship_Name__c MessagingSessions @@ -42,6 +50,18 @@ Sequence__c 100.0 + + Test__c + false + + + Tooltip_Id_Field__c + + + + Tooltip_Object_Name__c + + Type_Field__c diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Contact_Opportunities.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Contact_Opportunities.md-meta.xml index c88c5918..a3e8b4c6 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Contact_Opportunities.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Contact_Opportunities.md-meta.xml @@ -38,6 +38,10 @@ Position_Date_Field__c CreatedDate + + Position_End_Date_Field__c + + Relationship_Name__c Opportunities @@ -46,6 +50,10 @@ Sequence__c 50.0 + + Test__c + false + Tooltip_Id_Field__c diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Contact_OpportunityContactRoles.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Contact_OpportunityContactRoles.md-meta.xml index 90a5643c..b401fe3a 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Contact_OpportunityContactRoles.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Contact_OpportunityContactRoles.md-meta.xml @@ -38,6 +38,10 @@ Position_Date_Field__c Opportunity.CreatedDate + + Position_End_Date_Field__c + + Relationship_Name__c OpportunityContactRoles @@ -46,6 +50,10 @@ Sequence__c 50.0 + + Test__c + false + Tooltip_Id_Field__c Opportunity.Id diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Contact_TaskRelations.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Contact_TaskRelations.md-meta.xml index 560802e2..19c26366 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Contact_TaskRelations.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Contact_TaskRelations.md-meta.xml @@ -38,6 +38,10 @@ Position_Date_Field__c Task.ActivityDate + + Position_End_Date_Field__c + + Relationship_Name__c TaskRelations @@ -46,6 +50,10 @@ Sequence__c 10.0 + + Test__c + false + Tooltip_Id_Field__c Task.Id diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Contact_Tasks.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Contact_Tasks.md-meta.xml index 9fc5b310..df38e80a 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Contact_Tasks.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Contact_Tasks.md-meta.xml @@ -38,6 +38,10 @@ Position_Date_Field__c ActivityDate + + Position_End_Date_Field__c + + Relationship_Name__c Tasks @@ -46,6 +50,10 @@ Sequence__c 10.0 + + Test__c + false + Tooltip_Id_Field__c diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Contact_Tasks_Test.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Contact_Tasks_Test.md-meta.xml index 2f5b3b4a..72e67317 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Contact_Tasks_Test.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Contact_Tasks_Test.md-meta.xml @@ -38,6 +38,10 @@ Position_Date_Field__c ActivityDate + + Position_End_Date_Field__c + + Relationship_Name__c Tasks diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Contact_WorkOrders.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Contact_WorkOrders.md-meta.xml index 36266455..01618cdf 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Contact_WorkOrders.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Contact_WorkOrders.md-meta.xml @@ -10,6 +10,10 @@ Detail_Field__c Subject + + Drilldown_Id_Field__c + + Fallback_Tooltip_Field__c @@ -34,6 +38,10 @@ Position_Date_Field__c StartDate + + Position_End_Date_Field__c + + Relationship_Name__c WorkOrders @@ -42,6 +50,18 @@ Sequence__c 40.0 + + Test__c + false + + + Tooltip_Id_Field__c + + + + Tooltip_Object_Name__c + + Type_Field__c diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Person_Cases_Contact.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Person_Cases_Contact.md-meta.xml index dcf73bfb..fbd6ece5 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Person_Cases_Contact.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Person_Cases_Contact.md-meta.xml @@ -10,6 +10,10 @@ Detail_Field__c Subject + + Drilldown_Id_Field__c + + Fallback_Tooltip_Field__c @@ -34,6 +38,10 @@ Position_Date_Field__c CreatedDate + + Position_End_Date_Field__c + + Relationship_Name__c PersonCases @@ -42,6 +50,18 @@ Sequence__c 50.0 + + Test__c + false + + + Tooltip_Id_Field__c + + + + Tooltip_Object_Name__c + + Type_Field__c diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Person_Events_Contact.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Person_Events_Contact.md-meta.xml index fe32c7d3..63921597 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Person_Events_Contact.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Person_Events_Contact.md-meta.xml @@ -10,6 +10,10 @@ Detail_Field__c Subject + + Drilldown_Id_Field__c + + Fallback_Tooltip_Field__c Owner.Name @@ -34,6 +38,10 @@ Position_Date_Field__c StartDateTime + + Position_End_Date_Field__c + + Relationship_Name__c PersonEvents @@ -42,6 +50,18 @@ Sequence__c 20.0 + + Test__c + false + + + Tooltip_Id_Field__c + + + + Tooltip_Object_Name__c + + Type_Field__c diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Person_Files.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Person_Files.md-meta.xml index 98488e30..f3df14df 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Person_Files.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Person_Files.md-meta.xml @@ -10,6 +10,10 @@ Detail_Field__c ContentDocument.Title + + Drilldown_Id_Field__c + + Fallback_Tooltip_Field__c ContentDocument.FileExtension @@ -34,6 +38,10 @@ Position_Date_Field__c SystemModstamp + + Position_End_Date_Field__c + + Relationship_Name__c ContentDocumentLinks @@ -42,6 +50,18 @@ Sequence__c 30.0 + + Test__c + false + + + Tooltip_Id_Field__c + + + + Tooltip_Object_Name__c + + Type_Field__c ContentDocument.FileType diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Person_Opportunities.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Person_Opportunities.md-meta.xml index f4a22ddc..59920232 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Person_Opportunities.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Person_Opportunities.md-meta.xml @@ -10,6 +10,10 @@ Detail_Field__c Name + + Drilldown_Id_Field__c + + Fallback_Tooltip_Field__c @@ -34,6 +38,10 @@ Position_Date_Field__c CreatedDate + + Position_End_Date_Field__c + + Relationship_Name__c PersonOpportunities @@ -42,6 +50,18 @@ Sequence__c 60.0 + + Test__c + false + + + Tooltip_Id_Field__c + + + + Tooltip_Object_Name__c + + Type_Field__c diff --git a/force-app/main/default/customMetadata/Timeline_Configuration.Person_Tasks_Contact.md-meta.xml b/force-app/main/default/customMetadata/Timeline_Configuration.Person_Tasks_Contact.md-meta.xml index 061bbb0e..d2968b4a 100644 --- a/force-app/main/default/customMetadata/Timeline_Configuration.Person_Tasks_Contact.md-meta.xml +++ b/force-app/main/default/customMetadata/Timeline_Configuration.Person_Tasks_Contact.md-meta.xml @@ -10,6 +10,10 @@ Detail_Field__c Subject + + Drilldown_Id_Field__c + + Fallback_Tooltip_Field__c Status @@ -34,6 +38,10 @@ Position_Date_Field__c ActivityDate + + Position_End_Date_Field__c + + Relationship_Name__c PersonTasks @@ -42,6 +50,18 @@ Sequence__c 10.0 + + Test__c + false + + + Tooltip_Id_Field__c + + + + Tooltip_Object_Name__c + + Type_Field__c TaskSubtype diff --git a/force-app/main/default/lwc/timeline/timeline.html b/force-app/main/default/lwc/timeline/timeline.html index 909ddba9..e79ae795 100755 --- a/force-app/main/default/lwc/timeline/timeline.html +++ b/force-app/main/default/lwc/timeline/timeline.html @@ -35,6 +35,12 @@

{timelineTitle}

alternative-text="Refresh" onclick={processTimeline} > + threshold){return "#3f4247";} else { return "#ffffff";} + } + timelineCanvas.redraw = function (domain) { var i = 0; var swimlane = 0; + const minWidth = 74; if (domain) { timelineCanvas.x.domain(domain); @@ -517,6 +543,12 @@ export default class timeline extends NavigationMixin(LightningElement) { return timelineCanvas.x.domain()[0] < d.time && d.endTime < timelineCanvas.x.domain()[1]; } + d.endTime = new Date(d.time.getTime() + unitInterval * (d.label.length * 6 + 80)); + var labelLength; + const wrapWidth = (timelineCanvas.x(d.timeEnded) - timelineCanvas.x(d.time)); + wrapWidth > minWidth ? labelLength = wrapWidth - 34 : labelLength = (d.label.length * 6 + 80); + !d.timeEnded ? (d.endTime = new Date(d.time.getTime() + unitInterval * labelLength)) + : (wrapWidth > minWidth ? (d.endTime = d.timeEnded) : (d.endTime = new Date(d.time.getTime() + unitInterval * labelLength))); d.endTime = new Date(d.time.getTime() + Math.max(d.length, unitInterval * (d.label.length * 6 + 80))); return timelineCanvas.x.domain()[0] < d.endTime && d.time < timelineCanvas.x.domain()[1]; }) @@ -611,6 +643,7 @@ export default class timeline extends NavigationMixin(LightningElement) { timelineCanvas.records .append('image') + .attr('class', 'timeline-canvas-record-icon') .attr('x', 1) .attr('y', 1) .attr('height', 22) @@ -751,6 +784,117 @@ export default class timeline extends NavigationMixin(LightningElement) { return d.label; }); } + + timelineCanvas.records = timelineCanvas + .selectAll('[class~=timeline-canvas-record-icon]') + .attr('x', function (d) { + const wrapWidth = !d.timeEnded ? 34 : (timelineCanvas.x(d.timeEnded) - timelineCanvas.x(d.time)); + if(wrapWidth > minWidth || wrapWidth < 24){ + if(-14 > timelineCanvas.x(d.time) && timelineCanvas.x(d.timeEnded) > 38){ + return Math.abs(timelineCanvas.x(d.time)) + 1; + }else{ + return 1; + } + }else{ + return 1; + } + }) + + timelineCanvas.records = timelineCanvas + .selectAll('[class~=timeline-canvas-icon-wrap]') + .data(data, function (d) { + return d.id; + }) + .attr('width', function (d) { + const wrapWidth = !d.timeEnded ? 24 : (timelineCanvas.x(d.timeEnded) - timelineCanvas.x(d.time)); + return wrapWidth < 24 ? 24 : wrapWidth; + }); + + timelineCanvas.records = timelineCanvas + .selectAll('[class~=timeline-canvas-record-line]') + .data(data, function (d) { + return d.id; + }) + .attr('x1', function (d) { + const wrapWidth = !d.timeEnded ? 24 : (timelineCanvas.x(d.timeEnded) - timelineCanvas.x(d.time)); + if(wrapWidth > minWidth || wrapWidth < 24){ + if(-14 > timelineCanvas.x(d.time) && timelineCanvas.x(d.timeEnded) > 38){ + return Math.abs(timelineCanvas.x(d.time)) + 24; + }else{ + return 24 + } + }else{ + return wrapWidth + 4 + } + }) + .attr('x2', function (d) { + const wrapWidth = !d.timeEnded ? 32 : (timelineCanvas.x(d.timeEnded) - timelineCanvas.x(d.time)); + if(wrapWidth > minWidth || wrapWidth < 24){ + if(-14 > timelineCanvas.x(d.time) && timelineCanvas.x(d.timeEnded) > 38){ + return Math.abs(timelineCanvas.x(d.time)) + 32; + }else{ + return 32 + } + }else{ + return wrapWidth + 12 + } + }); + + timelineCanvas.records = timelineCanvas + .selectAll('[class~=timeline-canvas-record-label]') + .data(data, function (d) { + return d.id; + }) + .style('fill', function (d) { + const wrapWidth = !d.timeEnded ? 34 : (timelineCanvas.x(d.timeEnded) - timelineCanvas.x(d.time)); + if(wrapWidth > minWidth){ + let iconColour = ''; + switch (d.type) { + case 'Call': + iconColour = '#48C3CC'; + break; + case 'Email': + iconColour = '#95AEC5'; + break; + case 'SNOTE': + iconColour = '#E6D478'; + break; + default: + iconColour = d.iconBackground; + break; + } + return getTextColor(iconColour); + }else{ + return '#3f4247'; + } + }) + .attr('x', function (d) { + const wrapWidth = !d.timeEnded ? 34 : (timelineCanvas.x(d.timeEnded) - timelineCanvas.x(d.time)); + if(wrapWidth > minWidth || wrapWidth < 24){ + if(-14 > timelineCanvas.x(d.time) && timelineCanvas.x(d.timeEnded) > 38){ + return Math.abs(timelineCanvas.x(d.time)) + 34; + }else{ + return 34; + } + }else{ + return wrapWidth + 14 + } + }) + .each( function (d) { + var self = d3.select(this); + self.text(d.label); + var textLength = self.node().getComputedTextLength(), + text = self.text(), + wrapWidth = (timelineCanvas.x(d.timeEnded) - timelineCanvas.x(d.time)); + if(wrapWidth > minWidth){ + while ((textLength > (wrapWidth - 42) && text.length > 0) || (textLength > (timelineCanvas.x(d.timeEnded) - 34) && text.length > 0)) { + text = text.slice(0, -1); + self.text(text + '...'); + textLength = self.node().getComputedTextLength(); + } + } + }); + timelineCanvas.data.exit().remove(); }; return timelineCanvas; @@ -909,7 +1053,8 @@ export default class timeline extends NavigationMixin(LightningElement) { let data = timelineData.data .filter(function (d) { - d.endTime = new Date(d.time.getTime() + Math.max(d.length, unitInterval * 10)); + !d.timeEnded ? d.endTime = new Date(d.time.getTime() + unitInterval * 10) : d.endTime = d.timeEnded; + //d.endTime = new Date(d.time.getTime() + Math.max(d.length, unitInterval * 10)); return true; }) .filter(timelineMap.filter); @@ -957,7 +1102,10 @@ export default class timeline extends NavigationMixin(LightningElement) { .attr('style', function () { return 'fill: #98C3EE; stroke: #4B97E6'; }) - .attr('width', d => me.getEventLength(d.length)) + .attr('width', function (d){ + return !d.timeEnded ? 2 : Math.ceil(timelineMap.x(d.timeEnded) - timelineMap.x(d.time)); + }) + //.attr('width', d => me.getEventLength(d.length)) .attr('height', 2) .attr('rx', 0.2) .attr('ry', 0.2); @@ -1219,6 +1367,12 @@ export default class timeline extends NavigationMixin(LightningElement) { return this.filterValues.join(', '); } + toggleMultiDay() { + this.isMultiDay = !this.isMultiDay; + this.localStorage.setItem('multiDay', this.isMultiDay); + this.processTimeline(); + } + handleFilterChange(e) { this.filterValues = e.detail.value; this.handleAllTypes(); diff --git a/force-app/main/default/lwc/timeline/timeline.js-meta.xml b/force-app/main/default/lwc/timeline/timeline.js-meta.xml index e7f2a654..d44f09de 100755 --- a/force-app/main/default/lwc/timeline/timeline.js-meta.xml +++ b/force-app/main/default/lwc/timeline/timeline.js-meta.xml @@ -12,12 +12,22 @@ + + Contact + Lead + Account + Case + Opportunity + Asset + + + @@ -33,7 +43,9 @@ + + diff --git a/force-app/main/default/objects/Timeline_Configuration__mdt/fields/Position_End_Date_Field__c.field-meta.xml b/force-app/main/default/objects/Timeline_Configuration__mdt/fields/Position_End_Date_Field__c.field-meta.xml index 39954334..ae450832 100644 --- a/force-app/main/default/objects/Timeline_Configuration__mdt/fields/Position_End_Date_Field__c.field-meta.xml +++ b/force-app/main/default/objects/Timeline_Configuration__mdt/fields/Position_End_Date_Field__c.field-meta.xml @@ -9,4 +9,4 @@ false Text false - \ No newline at end of file + diff --git a/package.xml b/package.xml new file mode 100644 index 00000000..cf361c72 --- /dev/null +++ b/package.xml @@ -0,0 +1,8 @@ + + + + * + CustomMetadata + + 45.0 + \ No newline at end of file