diff --git a/force-app/main/default/lwc/timeline/timeline.js b/force-app/main/default/lwc/timeline/timeline.js
index f646519..784018b 100755
--- a/force-app/main/default/lwc/timeline/timeline.js
+++ b/force-app/main/default/lwc/timeline/timeline.js
@@ -16,6 +16,8 @@ import APEX from '@salesforce/label/c.Timeline_Error_Apex';
import SETUP from '@salesforce/label/c.Timeline_Error_Setup';
import NO_DATA_HEADER from '@salesforce/label/c.Timeline_Error_NoDataHeader';
import NO_DATA_SUBHEADER from '@salesforce/label/c.Timeline_Error_NoDataSubHeader';
+import CONSOLE_HEADER from '@salesforce/label/c.Timeline_Error_ConsoleTab';
+import CONSOLE_SUBHEADER from '@salesforce/label/c.Timeline_Error_ConsoleTabSubHeader';
import JAVASCRIPT_LOAD from '@salesforce/label/c.Timeline_Error_JavaScriptResources';
import UNHANDLED from '@salesforce/label/c.Timeline_Error_Unhandled';
@@ -126,6 +128,8 @@ export default class timeline extends NavigationMixin(LightningElement) {
error = {
APEX,
SETUP,
+ CONSOLE_HEADER,
+ CONSOLE_SUBHEADER,
NO_DATA_HEADER,
NO_DATA_SUBHEADER,
JAVASCRIPT_LOAD,
@@ -321,86 +325,90 @@ export default class timeline extends NavigationMixin(LightningElement) {
})
.then((result) => {
try {
- if (result.length > 0) {
- me.totalTimelineRecords = result.length;
-
- //Process timeline records
- me._timelineData = me.getTimelineRecords(result);
-
- //Process timeline canvas
- me._d3timelineCanvas = me.timelineCanvas();
-
- const axisDividerConfig = {
- innerTickSize: -me._d3timelineCanvas.SVGHeight,
- translate: [0, me._d3timelineCanvas.SVGHeight],
- tickPadding: 0,
- ticks: 6,
- class: 'axis-ticks'
- };
-
- me._d3timelineCanvasAxis = me.axis(
- axisDividerConfig,
- me._d3timelineCanvasSVG,
- me._d3timelineCanvas
- );
-
- const axisLabelConfig = {
- innerTickSize: 0,
- tickPadding: 2,
- translate: [0, 5],
- ticks: 6,
- class: 'axis-label'
- };
-
- me._d3timelineCanvasAxisLabel = me.axis(
- axisLabelConfig,
- me._d3timelineCanvasAxisSVG,
- me._d3timelineCanvas
- );
-
- //Process timeline map
- me._d3timelineMap = me.timelineMap();
- me._d3timelineMap.redraw();
-
- const mapAxisConfig = {
- innerTickSize: 4,
- tickPadding: 4,
- ticks: 6,
- class: 'axis-label'
- };
-
- me._d3timelineMapAxis = me.axis(mapAxisConfig, me._d3timelineMapAxisSVG, me._d3timelineMap);
-
- me._d3brush = me.brush();
-
- window.addEventListener(
- 'resize',
- me.debounce(() => {
- try {
- if (me.template.querySelector('div.timeline-canvas').offsetWidth !== 0) {
- me._d3timelineCanvas.x.range([
- 0,
- me.template.querySelector('div.timeline-canvas').offsetWidth
- ]);
- me._d3timelineMap.x.range([
- 0,
- Math.max(me.template.querySelector('div.timeline-map').offsetWidth, 0)
- ]);
- me._d3timelineCanvasAxis.redraw();
- me._d3timelineCanvasAxisLabel.redraw();
- me._d3timelineMap.redraw();
- me._d3timelineMapAxis.redraw();
- me._d3brush.redraw();
+ if ( this.template.querySelector('div.timeline-canvas').offsetWidth !== 0 ) {
+ if (result.length > 0) {
+ me.totalTimelineRecords = result.length;
+
+ //Process timeline records
+ me._timelineData = me.getTimelineRecords(result);
+
+ //Process timeline canvas
+ me._d3timelineCanvas = me.timelineCanvas();
+
+ const axisDividerConfig = {
+ innerTickSize: -me._d3timelineCanvas.SVGHeight,
+ translate: [0, me._d3timelineCanvas.SVGHeight],
+ tickPadding: 0,
+ ticks: 6,
+ class: 'axis-ticks'
+ };
+
+ me._d3timelineCanvasAxis = me.axis(
+ axisDividerConfig,
+ me._d3timelineCanvasSVG,
+ me._d3timelineCanvas
+ );
+
+ const axisLabelConfig = {
+ innerTickSize: 0,
+ tickPadding: 2,
+ translate: [0, 5],
+ ticks: 6,
+ class: 'axis-label'
+ };
+
+ me._d3timelineCanvasAxisLabel = me.axis(
+ axisLabelConfig,
+ me._d3timelineCanvasAxisSVG,
+ me._d3timelineCanvas
+ );
+
+ //Process timeline map
+ me._d3timelineMap = me.timelineMap();
+ me._d3timelineMap.redraw();
+
+ const mapAxisConfig = {
+ innerTickSize: 4,
+ tickPadding: 4,
+ ticks: 6,
+ class: 'axis-label'
+ };
+
+ me._d3timelineMapAxis = me.axis(mapAxisConfig, me._d3timelineMapAxisSVG, me._d3timelineMap);
+
+ me._d3brush = me.brush();
+
+ window.addEventListener(
+ 'resize',
+ me.debounce(() => {
+ try {
+ if (me.template.querySelector('div.timeline-canvas').offsetWidth !== 0) {
+ me._d3timelineCanvas.x.range([
+ 0,
+ me.template.querySelector('div.timeline-canvas').offsetWidth
+ ]);
+ me._d3timelineMap.x.range([
+ 0,
+ Math.max(me.template.querySelector('div.timeline-map').offsetWidth, 0)
+ ]);
+ me._d3timelineCanvasAxis.redraw();
+ me._d3timelineCanvasAxisLabel.redraw();
+ me._d3timelineMap.redraw();
+ me._d3timelineMapAxis.redraw();
+ me._d3brush.redraw();
+ }
+ } catch (error) {
+ //stay silent
}
- } catch (error) {
- //stay silent
- }
- }, 200)
- );
+ }, 200)
+ );
- me.isLoaded = true;
+ me.isLoaded = true;
+ } else {
+ me.processError('No-Data', me.error.NO_DATA_HEADER, me.error.NO_DATA_SUBHEADER);
+ }
} else {
- me.processError('No-Data', me.error.NO_DATA_HEADER, me.error.NO_DATA_SUBHEADER);
+ me.processError('Setup-Error', me.error.CONSOLE_HEADER, me.error.CONSOLE_SUBHEADER);
}
} catch (error) {
me.processError('Error', me.error.UNHANDLED, error.message);
diff --git a/force-app/main/default/translations/ar.translation-meta.xml b/force-app/main/default/translations/ar.translation-meta.xml
index ff8de02..4b04b69 100644
--- a/force-app/main/default/translations/ar.translation-meta.xml
+++ b/force-app/main/default/translations/ar.translation-meta.xml
@@ -4,6 +4,14 @@
Timeline_Error_Apex
+
+
+ Timeline_Error_ConsoleTab
+
+
+
+ Timeline_Error_ConsoleTabSubHeader
+
Timeline_Error_JavaScriptResources
@@ -65,7 +73,7 @@
Timeline_Label_Showing
-
+
Timeline_Navigation_Toast_Body
diff --git a/force-app/main/default/translations/de.translation-meta.xml b/force-app/main/default/translations/de.translation-meta.xml
index 9ddb1d0..16c0695 100644
--- a/force-app/main/default/translations/de.translation-meta.xml
+++ b/force-app/main/default/translations/de.translation-meta.xml
@@ -4,6 +4,14 @@
Timeline_Error_Apex
+
+
+ Timeline_Error_ConsoleTab
+
+
+
+ Timeline_Error_ConsoleTabSubHeader
+
Timeline_Error_JavaScriptResources
@@ -65,7 +73,7 @@
Timeline_Label_Showing
-
+
Timeline_Navigation_Toast_Body
diff --git a/force-app/main/default/translations/es.translation-meta.xml b/force-app/main/default/translations/es.translation-meta.xml
index a33e405..4242ec3 100644
--- a/force-app/main/default/translations/es.translation-meta.xml
+++ b/force-app/main/default/translations/es.translation-meta.xml
@@ -4,6 +4,14 @@
Timeline_Error_Apex
+
+
+ Timeline_Error_ConsoleTab
+
+
+
+ Timeline_Error_ConsoleTabSubHeader
+
Timeline_Error_JavaScriptResources
@@ -65,7 +73,7 @@
Timeline_Label_Showing
-
+
Timeline_Navigation_Toast_Body
diff --git a/force-app/main/default/translations/fr.translation-meta.xml b/force-app/main/default/translations/fr.translation-meta.xml
index 8606fa0..691a183 100644
--- a/force-app/main/default/translations/fr.translation-meta.xml
+++ b/force-app/main/default/translations/fr.translation-meta.xml
@@ -4,6 +4,14 @@
Timeline_Error_Apex
+
+
+ Timeline_Error_ConsoleTab
+
+
+
+ Timeline_Error_ConsoleTabSubHeader
+
Timeline_Error_JavaScriptResources
diff --git a/force-app/main/default/translations/hi.translation-meta.xml b/force-app/main/default/translations/hi.translation-meta.xml
index 0531f31..e4c6bd8 100644
--- a/force-app/main/default/translations/hi.translation-meta.xml
+++ b/force-app/main/default/translations/hi.translation-meta.xml
@@ -4,6 +4,14 @@
Timeline_Error_Apex
+
+
+ Timeline_Error_ConsoleTab
+
+
+
+ Timeline_Error_ConsoleTabSubHeader
+
Timeline_Error_JavaScriptResources
@@ -65,7 +73,7 @@
Timeline_Label_Showing
-
+
Timeline_Navigation_Toast_Body
diff --git a/force-app/main/default/translations/it.translation-meta.xml b/force-app/main/default/translations/it.translation-meta.xml
index 5120e64..bac76f4 100644
--- a/force-app/main/default/translations/it.translation-meta.xml
+++ b/force-app/main/default/translations/it.translation-meta.xml
@@ -4,6 +4,14 @@
Timeline_Error_Apex
+
+
+ Timeline_Error_ConsoleTab
+
+
+
+ Timeline_Error_ConsoleTabSubHeader
+
Timeline_Error_JavaScriptResources
@@ -65,7 +73,7 @@
Timeline_Label_Showing
-
+
Timeline_Navigation_Toast_Body
diff --git a/force-app/main/default/translations/iw.translation-meta.xml b/force-app/main/default/translations/iw.translation-meta.xml
index 458792e..024a2a5 100644
--- a/force-app/main/default/translations/iw.translation-meta.xml
+++ b/force-app/main/default/translations/iw.translation-meta.xml
@@ -4,6 +4,14 @@
Timeline_Error_Apex
+
+
+ Timeline_Error_ConsoleTab
+
+
+
+ Timeline_Error_ConsoleTabSubHeader
+
Timeline_Error_JavaScriptResources
@@ -65,7 +73,7 @@
Timeline_Label_Showing
-
+
Timeline_Navigation_Toast_Body
diff --git a/force-app/main/default/translations/ja.translation-meta.xml b/force-app/main/default/translations/ja.translation-meta.xml
index 13ca091..63fdbd1 100644
--- a/force-app/main/default/translations/ja.translation-meta.xml
+++ b/force-app/main/default/translations/ja.translation-meta.xml
@@ -4,6 +4,14 @@
Timeline_Error_Apex
+
+
+ Timeline_Error_ConsoleTab
+
+
+
+ Timeline_Error_ConsoleTabSubHeader
+
Timeline_Error_JavaScriptResources
@@ -70,6 +78,6 @@
- ナビゲーションは許可されていません
+ Timeline_Navigation_Toast_Header
diff --git a/force-app/main/default/translations/ko.translation-meta.xml b/force-app/main/default/translations/ko.translation-meta.xml
index 6e31e7b..1018508 100644
--- a/force-app/main/default/translations/ko.translation-meta.xml
+++ b/force-app/main/default/translations/ko.translation-meta.xml
@@ -4,6 +4,14 @@
Timeline_Error_Apex
+
+
+ Timeline_Error_ConsoleTab
+
+
+
+ Timeline_Error_ConsoleTabSubHeader
+
Timeline_Error_JavaScriptResources
@@ -65,7 +73,7 @@
Timeline_Label_Showing
-
+
Timeline_Navigation_Toast_Body
diff --git a/force-app/main/default/translations/no.translation-meta.xml b/force-app/main/default/translations/no.translation-meta.xml
index 8e1d338..2e2b33a 100644
--- a/force-app/main/default/translations/no.translation-meta.xml
+++ b/force-app/main/default/translations/no.translation-meta.xml
@@ -4,6 +4,14 @@
Timeline_Error_Apex
+
+
+ Timeline_Error_ConsoleTab
+
+
+
+ Timeline_Error_ConsoleTabSubHeader
+
Timeline_Error_JavaScriptResources
diff --git a/force-app/main/default/translations/pt_BR.translation-meta.xml b/force-app/main/default/translations/pt_BR.translation-meta.xml
index 63ae65a..65d56e2 100644
--- a/force-app/main/default/translations/pt_BR.translation-meta.xml
+++ b/force-app/main/default/translations/pt_BR.translation-meta.xml
@@ -4,6 +4,14 @@
Timeline_Error_Apex
+
+
+ Timeline_Error_ConsoleTab
+
+
+
+ Timeline_Error_ConsoleTabSubHeader
+
Timeline_Error_JavaScriptResources
@@ -65,7 +73,7 @@
Timeline_Label_Showing
-
+
Timeline_Navigation_Toast_Body
diff --git a/force-app/main/default/translations/sv.translation-meta.xml b/force-app/main/default/translations/sv.translation-meta.xml
index cf3d69f..5f52d2a 100644
--- a/force-app/main/default/translations/sv.translation-meta.xml
+++ b/force-app/main/default/translations/sv.translation-meta.xml
@@ -4,6 +4,14 @@
Timeline_Error_Apex
+
+
+ Timeline_Error_ConsoleTab
+
+
+
+ Timeline_Error_ConsoleTabSubHeader
+
Timeline_Error_JavaScriptResources
@@ -65,7 +73,7 @@
Timeline_Label_Showing
-
+
Timeline_Navigation_Toast_Body
diff --git a/force-app/main/default/translations/th.translation-meta.xml b/force-app/main/default/translations/th.translation-meta.xml
index 75e0c1e..6023c6d 100644
--- a/force-app/main/default/translations/th.translation-meta.xml
+++ b/force-app/main/default/translations/th.translation-meta.xml
@@ -4,6 +4,14 @@
Timeline_Error_Apex
+
+
+ Timeline_Error_ConsoleTab
+
+
+
+ Timeline_Error_ConsoleTabSubHeader
+
Timeline_Error_JavaScriptResources
@@ -65,7 +73,7 @@
Timeline_Label_Showing
-
+
Timeline_Navigation_Toast_Body
diff --git a/force-app/main/default/translations/zh_CN.translation-meta.xml b/force-app/main/default/translations/zh_CN.translation-meta.xml
index 555cf5b..677cbbe 100644
--- a/force-app/main/default/translations/zh_CN.translation-meta.xml
+++ b/force-app/main/default/translations/zh_CN.translation-meta.xml
@@ -4,6 +4,14 @@
Timeline_Error_Apex
+
+
+ Timeline_Error_ConsoleTab
+
+
+
+ Timeline_Error_ConsoleTabSubHeader
+
Timeline_Error_JavaScriptResources
@@ -65,7 +73,7 @@
Timeline_Label_Showing
-
+
Timeline_Navigation_Toast_Body
diff --git a/force-app/main/default/translations/zh_TW.translation-meta.xml b/force-app/main/default/translations/zh_TW.translation-meta.xml
index f56a68e..eb692dc 100644
--- a/force-app/main/default/translations/zh_TW.translation-meta.xml
+++ b/force-app/main/default/translations/zh_TW.translation-meta.xml
@@ -4,6 +4,14 @@
Timeline_Error_Apex
+
+
+ Timeline_Error_ConsoleTab
+
+
+
+ Timeline_Error_ConsoleTabSubHeader
+
Timeline_Error_JavaScriptResources
@@ -17,7 +25,7 @@
Timeline_Error_NoDataSubHeader
-
+
Timeline_Error_Setup
@@ -65,7 +73,7 @@
Timeline_Label_Showing
-
+
Timeline_Navigation_Toast_Body