-
Notifications
You must be signed in to change notification settings - Fork 9
/
importExampleContainer.js
52 lines (37 loc) · 1.27 KB
/
importExampleContainer.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import { LightningElement } from 'lwc';
import ImportExampleUtils, {getDateTime as getBundleDateTime} from "c/importExampleUtils";
import getDefaultFileDateTime, {getDateTime as getFileDateTime} from "./importExampleContainerUtils";
import {Timestamp} from "c/importExampleUtils"
import {InternalTimestamp} from "./importExampleContainerUtils"
/**
* Returns current timestamp as a string
* @returns {InternalTimestamp}
*/
const getDateTime = () => {
return "" + new Date().getTime();
}
export default class ImportExampleContainer extends LightningElement {
timestamp;
connectedCallback() {
this.timestamp = getDateTime();
}
handleSameFileUpdateClick() {
this.timestamp = getDateTime();
}
handleAnotherFileUpdateClick() {
this.timestamp = getFileDateTime();
}
handleAnotherFileDefaultUpdateClick() {
this.timestamp = getDefaultFileDateTime();
}
handleBundleUpdateClick() {
this.timestamp = getBundleDateTime();
}
handleBundleDefaultUpdateClick() {
this.timestamp = ImportExampleUtils.getDateTime();
}
handleComponentUpdateClick() {
const utilsComponent = this.template.querySelector('c-import-example-utils');
this.timestamp = utilsComponent.getDateTime();
}
}