Skip to content

Commit

Permalink
v14.0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
boehlerlukas committed Nov 26, 2024
1 parent ab5e805 commit 9bfe9f6
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build/cjs/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/esm/index.mjs

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion demo/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ Gleap.setFrameUrl("http://0.0.0.0:3001");
Gleap.setApiUrl("http://0.0.0.0:9000");
Gleap.setWSApiUrl("ws://0.0.0.0:9000");

Gleap.initialize("gbMLfLgtayFd2PeNJrjbxl6eB2OboAfn");
Gleap.initialize("nKT6erqDUjwqfVN2xRkOG4XOf8NEEJ52");

Gleap.registerCustomAction((customAction) => {
console.log(customAction);
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gleap",
"version": "14.0.8",
"version": "14.0.9",
"main": "build/cjs/index.js",
"module": "build/esm/index.mjs",
"exports": {
Expand Down
1 change: 1 addition & 0 deletions published/14.0.9/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion published/latest/index.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/GleapCustomActionManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@ export default class GleapCustomActionManager {
/**
* Triggers a custom action
*/
static triggerCustomAction(name) {
static triggerCustomAction(name, data) {
const instance = this.getInstance();
if (instance.customActionCallbacks) {
for (var i = 0; i < instance.customActionCallbacks.length; i++) {
var callback = instance.customActionCallbacks[i];
if (callback) {
callback({
name,
...(data ? data : {}),
});
}
}
Expand Down
4 changes: 3 additions & 1 deletion src/GleapFrameManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,9 @@ export default class GleapFrameManager {
}

if (data.name === "run-custom-action") {
GleapCustomActionManager.triggerCustomAction(data.data);
GleapCustomActionManager.triggerCustomAction(data.data, {
shareToken: data.shareToken,
});
}

if (data.name === "close-widget") {
Expand Down
2 changes: 1 addition & 1 deletion src/UI.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export const injectStyledCSS = (
right: ${buttonX}px;
bottom: ${61 + buttonY}px;
width: calc(100% - 40px);
max-width: 400px;
max-width: 410px;
position: fixed;
z-index: ${zIndexBase + 31};
visibility: visible;
Expand Down

0 comments on commit 9bfe9f6

Please sign in to comment.