Skip to main content

Configurations

Interfaces

Here you can find the properties and/or methods used in the widget and the structures they conform to.

Widget Props

type GraphTypes = "radial" | "interconnect" | "lbo" | "investee";

type WidgetProps = {
key: string;
parentElementSelector: string;

hideSidePanel?: boolean; // optional
hideSearch?: boolean; // optional
hideZoomControls?: boolean; // optional
hideExports?: boolean; // optional

hideNullFields?: boolean; // optional
hideFields?: {
entity?: string[];
relationship?: string[];
}; // optional
rightClickOptions?: {
generateNewGraph?: {
hideForGraph?: GraphTypes[];
};
}; // optional

functionMap_getStatus?: string; // optional
functionMap_getSelectedElements?: string; // optional
};

Widget Parameters

type WidgetParametersEndpointData = {
graphType: string;
datasets: string[];
entities: { id: string; dataset: string }[];
degree: number;
};

Widget Methods

interface HandshakesWidget {
drawGraphWithEndpointData(
parameters: WidgetParametersEndpointData,
data: GraphData
): void;

drawGraphWithCustomData(
parameters: WidgetParametersCustomData,
data: GraphData
): void;

displayEmptyState: (props: typeof widgetProps, message?: string) => void;

load: (message?: string) => void;
}

You can create a file to house all the widget types:

types.ts
export type WidgetProps = {
key: string;
parentElementSelector: string;

hideSidePanel?: boolean; // optional
hideSearch?: boolean; // optional
hideZoomControls?: boolean; // optional
hideExports?: boolean;

hideNullFields?: boolean; // optional
hideFields?: {
entity?: string[];
relationship?: string[];
}; // optional

functionMap_getStatus?: string; // optional
functionMap_getSelectedElements?: string; // optional
};

export type WidgetParametersEndpointData = {
graphType: string;
datasets: string[];
entities: { id: string; dataset: string }[];
degree: number;
};

export type WidgetParametersCustomData = {
graphType: string;
};

export interface HandshakesWidget {
drawGraphWithEndpointData(
parameters: WidgetParametersEndpointData,
data: GraphData
): void;

drawGraphWithCustomData(
parameters: WidgetParametersCustomData,
data: GraphData
): void;

displayEmptyState: (props: typeof widgetProps, message?: string) => void;

load: (message?: string) => void;
}

Graph Data

To be able to have your data displayed in the Handshakes Graph Widget, it will have to be structured in a way that the widget can consume.
When using your own JSON data, it should be in this format below.

type GraphData = {
originEntities: {
dataset: string; // "CRSG" | "CRMY" | "CM"
id: string; // or comapny UEN/Identification number
};
graph: {
graphType: string; // "radial" | "interconnect" | "lbo" | "investee"
nodes: {
id: string;
entities: EntityInfo[];
distanceFromOrigin: number;
effectiveEquity?: number;
}[];
edges: {
id: string;
source: string;
target: string;
relationships: RelationshipInfo[];
directEquity?: number;
directVotingInterest?: number;
}[];
stats: {
datasets: string[];
degree: number; // degree of separation
};
};
generatedAt: string; // ISO Date Format
};

type EntityInfo = {
id: string;
type: string;
subtype: string;
lastUpdated: string;
isActive: boolean;
names: {
name: string;
effectiveDates: {
start: string;
end: string;
startUncertainty: string;
endUncertainty: string;
};
isPrimary: boolean;
isPast: boolean;
language: string;
isTranslation: boolean;
}[];
addresses: {
addressType: string;
addressLines: string[];
effectiveDates: {
start: string;
end: string;
startUncertainty: string;
endUncertainty: string;
};
isPrimary: boolean;
isPast: boolean;
}[];
identifications: {
id: string;
type: string;
effectiveDates: {
start: string;
end: string;
startUncertainty: string;
endUncertainty: string;
};
isPast: boolean;
country: string;
issuer: string;
}[];
statuses: {
status: string;
isActive: boolean;
effectiveDates: {
start: string;
end: string;
startUncertainty: string;
endUncertainty: string;
};
isPast: boolean;
}[];
person?: Person;
firm?: Firm;
event?: Event;
remarks: string;
dataset: string; // "CRSG" | "CRMY" | "CM"
isRedListed?: boolean;
};

type RelationshipInfo = {
id: string;
sourceEntityId: string;
targetEntityId: string;
type: string;
subtype: string;
effectiveDates: {
start: string;
end: string;
startUncertainty: string;
endUncertainty: string;
};
isPast: boolean;
ownerships: {
ownershipType: string;
percentage: number;
amount: number;
currency: string;
sharesAllotted: number;
levelOfControl: string;
isJoint: boolean;
jointShareholding: string;
effectiveDates: {
start: string;
end: string;
startUncertainty: string;
endUncertainty: string;
};
isPast: boolean;
}[];
remarks: string;
dataset: string; // "CRSG" | "CRMY" | "CM"
};

type Person = {
placeOfBirth: string;
dateOfBirth: string;
dateOfBirthUncertainty: string;
salutation: string;
citizenships: {
country: string;
effectiveDates: {
start: string;
end: string;
startUncertainty: string;
endUncertainty: string;
};
isPast: boolean;
}[];
gender: string;
};

type Firm = {
dateOfIncorporation: string;
dateOfIncorporationUncertainty: string;
placeOfIncorporation: string;
businessActivities: {
description: string;
code: string;
classificationStandard: string;
isPrimary: boolean;
}[];
capitals: {
isPast: boolean;
shareType: string;
currency: string;
shareCategory: string;
amount: number;
}[];
financials: {
isPast: boolean;
isConsolidated: boolean;
companyType: string;
periodStartDate: string;
periodEndDate: string;
financialYear: number;
filingDate: string;
filingType: string;
audit: {
isAudited: boolean;
};
statements: {
currency: string;
profitOrLoss: {
income: {
items: {
label: string;
value: number;
tags: string[];
}[];
};
expenses: {
items: {
label: string;
value: number;
tags: string[];
}[];
};
profit: {
items: {
label: string;
value: number;
tags: string[];
}[];
};
};
financialPosition: {
assets: {
current: {
total: number;
};
nonCurrent: {
total: number;
};
total: number;
};
liabilities: {
current: {
total: number;
};
nonCurrent: {
total: number;
};
total: number;
};
equities: {
total: number;
items: {
label: string;
value: number;
tags: string[];
}[];
};
};
cashFlows: {
operatingActivities: {
total: number;
};
investingActivities: {
total: number;
};
financingActivities: {
total: number;
};
};
};
}[];
stockListings: {
stockExchange: string;
stockCode: string;
effectiveDates: {
start: string;
end: string;
startUncertainty: string;
endUncertainty: string;
};
}[];
employeeCount: {
min: number;
max: number;
};
};

type Event = {
grossProceeds: number;
issuePrice: number;
issuedShares: number;
transactionCurrency: string;
transactionDate: string;
transactionDateUncertainty: string;
};

Hide Widget UI Elements

The widget can disable selected UI elements based on the following object keys.

Object KeyValuesDefault ValueDescription
hideSidePaneltrue | falsefalseRemoves the Side Panel of the Graph Widget
hideSearchtrue | falsefalseRemoves the Search Bar of the Graph Widget
hideZoomControlstrue | falsefalseRemoves the zoom buttons of the Graph Widget
hideExportstrue | falsefalseRemoves the export buttons of the Graph Widget (xlsx, pdf)

Add Hide to the Widget Props

widget-props.js
const widgetProps = {
key: CLIENT_KEY,
parentElementSelector: ELEMENT_SELECTOR,

// Add these to your Widget Props
hideSidePanel: true,
hideSearch: true,
hideZoomControls: true,
};

Hide Info on the Widget Sidebar

The widget can selectively hide entity/relationship information in the Widget Sidebar based on the following object keys.

Object KeyValuesDefault ValueDescription
hideNullFieldstrue | falsefalseHides information that has null values in the Sidebar's Info panel. Otherwise the null values with be displayed as "-"
hideFieldsAn object of parameters "entity" and/or "relationship" that contains an array of stringnullHides information in the Sidebar's Info panel if their keys are included in the "entity" or "relationship" string array

Add Hide to the Widget Props

widget-props.js
const widgetProps = {
key: CLIENT_KEY,
parentElementSelector: ELEMENT_SELECTOR,

// Add these to your Widget Props
hideNullFields: true,
// some examples below of fields you can hide
hideFields: {
entity: ["currentNameEffectiveDate", "status", "remarks"],
relationship: ["pastRelationship", "startDate", "endDate", "remarks"],
},
};

Hidable Fields in the Widget Sidebar

The table below shows the fields you can use to hide entity and/or relationship information in the widget sidebar. Simply add them in the hideFields object (like in the example above).

Entity Fields

TypeFieldDisplayed Name
entitycurrentNameCurrent Name / Current Description (Event)
entitycurrentNameEffectiveDate(Effective Date) (In the same label as currentName)
entityotherNamesOther Names / Other Descriptions (Event)
entityotherNamesEffectiveDate(Effective Date) (In the same label as otherNames)
entityentityTypeEntity Type
entityentitySubTypeEntity Sub-type
entityremarksRemarks
entityplaceOfIncorporationCountry/Region of Incorporation/Registration
entityidentificationsIdentifications
entitysocialCreditNumberSocial Credit Number
entityregistrationDateRegistration Date
entityaddressAddress
entitycapitalCapital
entitystatusStatus
entityprimaryBusinessActivityPrimary Business Activity
entityprimaryBusinessActivityCodePrimary Business Activity Code
entitysecondaryBusinessActivitySecondary Business Activity
entitysecondaryBusinessActivityCodeSecondary Business Activity Code
entitytransactionDateTransaction Date

Relationship Fields

TypeFieldDisplayed Name
relationshiprelationshipTypeRelationship Main-type
relationshiprelationshipSubTypeRelationship Sub-type
relationshipstartDateStart Date
relationshipendDateEnd Date
relationshippastRelationshipPast Relationship
relationshipremarksRemarks
relationshipsourceDateLatest Source / Disclosure Date
relationshipshareTypeShare Type (LBO & Investee graphs)
relationshiptotalSharesTotal Shares (LBO & Investee graphs)
relationshipallotmentDateAllotment Date (LBO & Investee graphs)

Hide Right-click options in the Widget

The widget can selectively hide right-click options based on the following object keys.

Object KeyValuesDefault ValueDescription
generateNewGraph.hideForGraphArray<"radial" | "interconnect" | "lbo" | "investee">undefinedHides the "Generate New Graph" option for specific graph types

Configure Right-click options in the Widget Props

widget-props.js
const widgetProps = {
key: CLIENT_KEY,
parentElementSelector: ELEMENT_SELECTOR,

// Add these to your Widget Props
rightClickOptions: {
generateNewGraph: {
// Include the GraphTypes you wish to disable generateNewGraph for
hideForGraph: ["interconnect", "lbo", "investee"];
};
};
};