
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@pyramid-embed/embed-js
Advanced tools
The main embed client. This object manages the life cycle of the embed content on the host page.
The main embed client. This object manages the life cycle of the embed content on the host page.
yarn add @pyramid-embed/embed-js
npm i @pyramid-embed/embed-js
Please check online help for the general documentation.
import { PyramidEmbedClient } from '@pyramid-embed/embed-js';
const embedClient = new PyramidEmbedClient('http://pyramid:8181');
import { PyramidEmbedClient } from '@pyramid-embed/embed-js';
// create embed client
const embedClient = new PyramidEmbedClient('http://pyramid:8181');
// create embed options
const embedOptions = {
contentId: 'f5366b40-fbc7-4773-8180-7759bb0760df'
}
// embed a report into a div element
const el = document.getElementById('embed-container');
embedClient.content(el, embedOptions);
<div id="embed-container" style="width: 1280px; height: 720px;"></div>
import { PyramidEmbedClient, Filter } from '@pyramid-embed/embed-js';
const embedClient = new PyramidEmbedClient('http://pyramid:8181');
const filter = Filter.create().addUniqueName('[customer].[country].[France]');
const embedOptions = {
contentId: 'f5366b40-fbc7-4773-8180-7759bb0760df',
filters: filter
}
const el = document.getElementById('embed-container');
embedClient.content(el, embedOptions);
Name | Type | Description | Required |
---|---|---|---|
contentId | string | GUID string of the item that is to be embedded | yes |
filters | Filter | Filter object of items to drive filtering on the content. | |
targets | Target | Target object of items to drive targeted filtering on the content. | |
deviceType | 'desktop' | 'tablet' | 'phone' | Specifies the layout type of the presentation to use. If not supplied, the device type is determined automatically. | |
theme | 'dark' | 'light' | Theme colors of the built-in dialogs | |
contentTheme | string | Overrides all content themes (Pyramid 2025.0 version or greater is required) | |
contentThemeOverrides | object | Overrides the current content theme (Pyramid 2025.01 version or greater is required) | |
appStyles | object | Object of settings to highly customize the embedded client application's appearance. (Pyramid 2025.0 version or greater is required) | |
slideNumber | number | Initial slide number, starts from 1 | |
locale | string | User locale, applies when anonymous embed license is available | |
exporting | ExportingOptions | Exporting content options. (Pyramid 2023.02 version or greater is required) | |
fullDiscovery | boolean | Shows data discovery slicers and legends. (Pyramid 2023.02 version or greater is required) |
The filter objects contain information on how to dynamically filter embed content (both reports and dashboards).
See online help
The target objects contain information on how to dynamically filter embed dashboard content by directing the attached filters to the right named targets (as designed in the presentation itself)
See online help
Name | Type | Description |
---|---|---|
exportTypes | Array | Sets available export content options. Supported values: 'pdf', 'png', 'excel', 'csv'. To hide all exporting options set it to null or an empty array. By default all options are visible. |
For more help on embedding with Pyramid, especially instructions on authentication, scenarios and use of REST APIs together with embedding, please see online help.
<div id="embed-container" style="width:100%; height:800px;"></div>
import { PyramidEmbedClient } from "@pyramid-embed/embed-js";
const embedClient = new PyramidEmbedClient('http://pyramid:8181');
const container = document.getElementById('embed-container');
const hubEmbedOptions = {
theme: "dark",
editable: true,
showTabs: true,
responsiveness: "compact",
};
const hub = await embedClient.hub(container, hubEmbedOptions);
Method | Description |
---|---|
changeSelectedTab(tabIdx) | changes selected tab by index |
getSelectedTab() | returns selected tab index |
getTabsList() | returns all tabs as an object |
Name | Type | Description |
---|---|---|
theme | 'dark' | 'light' | Theme colors |
editable | boolean | Enables editing capabilities |
showTabs | boolean | Shows or hides tabs |
responsiveness | 'compact' | 'none' | Responsive layout behavior |
style | Object | Custom styles |
appStyles | object | Object of settings to highly customize the embedded client application's appearance. (Pyramid 2025.0 version or greater is required) |
smartReportDialogPopupMode | 'none' | 'tab' | 'popup' | Smart report button behavior, 'none' - not shown, 'tab' - opens pyramid client in a new browser tab, 'popup' - opens pyramid client in a flyout popup using an iframe |
template | string | use specific embed hub template |
{
'tabs.nonSelectedTab.color': 'red',
'tabs.nonSelectedTab.backgroundColor': '#f2f2f2',
'tabs.nonSelectedTab.fontSize': 12,
'tabs.nonSelectedTab.fontWeight': 500,
'tabs.selectedTab.color': '#353d42',
'tabs.selectedTab.backgroundColor': '#f2f2f2',
'tabs.selectedTab.fontSize': 12,
'tabs.selectedTab.fontWeight': 500,
'tabs.border': '2px solid #d2d6d9',
'tabs.backgroundColor': '#f2f2f2',
'tabs.addTabIconColor': '#d2d6d9',
'tabs.deleteTabIconColor': 'gray',
'tabs.iconColor': '#8599A8',
'buttons.color': 'green',
'buttons.secondaryColor': 'blue',
'buttons.hoverColor': 'red',
'tiles.backgroundColor': '#ffffff',
'tiles.titleColor': '#353d42',
'tiles.boxShadow': '1px 1px 1px 1px rgba(0, 0, 0, 0.19)',
'tiles.addWidgetPrimaryColor': '#8599A8',
'tiles.addWidgetSecondaryColor': '#328EC1',
'picker.backgroundColor': '#ffffff',
'picker.tabs.nonSelectedTab.color': 'red',
'picker.tabs.nonSelectedTab.backgroundColor': '#f2f2f2',
'picker.tabs.nonSelectedTab.fontSize': 12,
'picker.tabs.nonSelectedTab.fontWeight': 500,
'picker.tabs.selectedTab.color': '#353d42',
'picker.tabs.selectedTab.backgroundColor': '#f2f2f2',
'picker.tabs.selectedTab.fontSize': 12,
'picker.tabs.selectedTab.fontWeight': 500,
'picker.tabs.border': '2px solid #d2d6d9',
'picker.tabs.backgroundColor': '#f2f2f2',
'picker.tabs.addTabIconColor': '#d2d6d9',
'picker.tabs.deleteTabIconColor': 'gray',
'picker.tabs.iconColor': '#8599A8',
'container.border': '#8599A8',
'canvas.backgroundColor': 'lightblue',
}
<div id="embed-search-container"></div>
<div id="embed-preview-container"></div>
import { PyramidEmbedClient } from "@pyramid-embed/embed-js";
const embedClient = new PyramidEmbedClient('http://pyramid:8181');
const searchContainer = document.getElementById('embed-search-container');
const previewContainer = document.getElementById('embed-preview-container');
const embedSearchOptions = {
theme: 'light',
locale: 'en-US',
appStyles: { global: { font: '...' } },
contentTheme: 't1',
contentThemeOverrides: { General: { generalColor1: '...' } },
dataModelId: '',
hideChat: false,
onSearch: () => {
// search started
},
onCloseChat: () => {
// chatbot closed
},
onPreviewChange: (hasPreview) => {
// chatbot preview changed
}
};
const searchApi = await embedClient.search(searchContainer, previewContainer, embedSearchOptions);
// Hide the search
searchApi.hideSearch();
// Show the search
searchApi.showSearch();
// Save the generated report to the private content folder in Pyramid
const result = await searchApi.save();
Method | Description |
---|---|
hideSearch(): void | hides the search input |
showSearch(): void | shows the search input |
save(): Promise<{id: string, name: string}> | saves the generated report |
Name | Type | Description | Required |
---|---|---|---|
theme | 'dark' | 'light' | Theme colors of the built-in dialogs | |
contentTheme | string | Overrides all content themes | |
contentThemeOverrides | object | Overrides the current content theme | |
appStyles | object | Object of settings to highly customize the embedded client application's appearance. (Pyramid 2025.0 version or greater is required) | |
locale | string | User locale, applies when anonymous embed license is available | |
hideChat | boolean | Chatbot visibility | |
dataModelId | string | Predefined data model id for the chatbot | |
onSearch | Function | Search started callback function | |
onCloseChat | Function | Chatbot closed callback function | |
onPreviewChange | Function | Chatbot preview changed callback function |
FAQs
The main embed client. This object manages the life cycle of the embed content on the host page.
The npm package @pyramid-embed/embed-js receives a total of 880 weekly downloads. As such, @pyramid-embed/embed-js popularity was classified as not popular.
We found that @pyramid-embed/embed-js demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.