Skip to content

Commit 9cc6958

Browse files
committed
v14.1.0
1 parent 20f99fa commit 9cc6958

File tree

9 files changed

+44
-5
lines changed

9 files changed

+44
-5
lines changed

build/cjs/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/esm/index.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

demo/main.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,14 @@ Gleap.setFrameUrl("http://0.0.0.0:3001");
44
Gleap.setApiUrl("http://0.0.0.0:9000");
55
Gleap.setWSApiUrl("ws://0.0.0.0:9000");
66

7-
Gleap.initialize("nKT6erqDUjwqfVN2xRkOG4XOf8NEEJ52");
7+
Gleap.initialize("ogWhNhuiZcGWrva5nlDS8l7a78OfaLlV");
88

99
Gleap.registerCustomAction((customAction) => {
1010
console.log(customAction);
1111
});
12+
13+
Gleap.setTicketAttribute("test", "test");
14+
15+
Gleap.unsetTicketAttribute("test");
16+
17+
Gleap.clearTicketAttributes();

index.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ export namespace Gleap {
3838
function startConversation(showBackButton?: boolean): void;
3939
function attachCustomData(customData: any): void;
4040
function setTicketAttribute(key: string, value: string): void;
41+
function unsetTicketAttribute(key: string): void;
42+
function clearTicketAttributes(): void;
4143
function setCustomData(key: string, value: string): void;
4244
function removeCustomData(key: string): void;
4345
function clearCustomData(): void;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gleap",
3-
"version": "14.0.10",
3+
"version": "14.1.0",
44
"main": "build/cjs/index.js",
55
"module": "build/esm/index.mjs",
66
"exports": {

published/14.1.0/index.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

published/latest/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Gleap.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,21 @@ class Gleap {
516516
GleapCustomDataManager.getInstance().setTicketAttribute(key, value);
517517
}
518518

519+
/**
520+
* This method is used to unset ticket attributes programmatically.
521+
* @param {*} key The key of the attribute you want to unset.
522+
*/
523+
static unsetTicketAttribute(key) {
524+
GleapCustomDataManager.getInstance().unsetTicketAttribute(key);
525+
}
526+
527+
/**
528+
* This method is used to clear ticket attributes programmatically.
529+
*/
530+
static clearTicketAttributes() {
531+
GleapCustomDataManager.getInstance().clearTicketAttributes();
532+
}
533+
519534
/**
520535
* Set custom data that will be attached to the bug-report.
521536
* @param {*} data

src/GleapCustomDataManager.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,21 @@ export default class GleapCustomDataManager {
6565
this.ticketAttributes[key] = value;
6666
}
6767

68+
/**
69+
* This method is used to unset ticket attributes programmatically.
70+
* @param {*} key The key of the attribute you want to unset.
71+
*/
72+
unsetTicketAttribute(key) {
73+
delete this.ticketAttributes[key];
74+
}
75+
76+
/**
77+
* This method is used to clear ticket attributes programmatically.
78+
*/
79+
clearTicketAttributes() {
80+
this.ticketAttributes = {};
81+
}
82+
6883
getTicketAttributes() {
6984
return this.ticketAttributes;
7085
}

0 commit comments

Comments
 (0)