Skip to content

Commit e8aa37c

Browse files
committed
v14.2.13
1 parent ab6280c commit e8aa37c

File tree

7 files changed

+31
-40
lines changed

7 files changed

+31
-40
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/index.html

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
flex: 1;
9292
padding: 3rem;
9393
display: grid;
94-
grid-template-columns: repeat(1, 1fr);
94+
grid-template-columns: repeat(3, 1fr);
9595
grid-gap: 2rem;
9696
align-items: start;
9797
justify-content: start;
@@ -161,31 +161,6 @@
161161

162162
<!-- Main content wireframe blocks -->
163163
<main class="main-placeholder" id="main1">
164-
<div
165-
style="
166-
width: 100%;
167-
height: 400px;
168-
overflow: auto;
169-
background-color: red;
170-
"
171-
>
172-
<div class="wireframe-block" style="margin-top: 20px;"></div>
173-
<div class="wireframe-block" style="margin-top: 20px;">2</div>
174-
<div class="wireframe-block" style="margin-top: 20px;"></div>
175-
<div class="wireframe-block" style="margin-top: 20px;">3</div>
176-
<div class="wireframe-block" style="margin-top: 20px;"></div>
177-
178-
<div class="wireframe-block" style="margin-top: 20px;"></div>
179-
<div class="wireframe-block" style="margin-top: 20px;"></div>
180-
<div class="wireframe-block" style="margin-top: 20px;"></div>
181-
<div class="wireframe-block" style="margin-top: 20px;"></div>
182-
<div class="wireframe-block" style="margin-top: 20px;">4</div>
183-
<div class="wireframe-block" style="margin-top: 20px;"></div>
184-
<div class="wireframe-block" style="margin-top: 20px;"></div>
185-
<div class="wireframe-block" style="margin-top: 20px;"></div>
186-
<div class="wireframe-block" style="margin-top: 20px;"></div>
187-
<div class="wireframe-block" style="margin-top: 20px;"></div>
188-
</div>
189164
<div class="wireframe-block"></div>
190165
<div class="wireframe-block"></div>
191166
<div class="wireframe-block"></div>

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.2.12",
3+
"version": "14.2.13",
44
"main": "build/cjs/index.js",
55
"module": "build/esm/index.mjs",
66
"exports": {

published/14.2.13/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/GleapAdminHelper.js

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { ElementPicker } from "pick-dom-element";
2-
import unique from 'unique-selector';
2+
import unique from "unique-selector";
33

44
class GleapAdminHelper {
55
picker = null;
@@ -11,42 +11,57 @@ class GleapAdminHelper {
1111
this.picker = null;
1212
return;
1313
}
14-
}
14+
};
1515

1616
startPicker = () => {
1717
this.stopPicker();
1818
var self = this;
1919

20-
const style = { borderColor: "#2142E7", background: "transparent", borderWidth: "4px", borderRadius: "5px" };
20+
const style = {
21+
borderColor: "#2142E7",
22+
background: "transparent",
23+
borderWidth: "4px",
24+
borderRadius: "5px",
25+
};
2126
this.picker = new ElementPicker({ style });
2227
this.picker.start({
2328
useShadowDOM: false,
2429
onClick: (el) => {
2530
try {
26-
var selector = unique(el);
31+
let selector;
32+
const tourId = el.getAttribute("data-gleap-tour");
33+
if (tourId) {
34+
selector = `[data-gleap-tour="${tourId}"]`;
35+
} else {
36+
selector = unique(el);
37+
}
38+
2739
self.onElementPicked && self.onElementPicked(selector);
2840
} catch (e) {
29-
console.error('Error while getting unique selector', e);
41+
console.error("Error while getting unique selector", e);
3042
}
3143
},
3244
elementFilter: (el) => {
33-
if (el.classList.contains('gleap-admin-collapse-ui') || el.closest('.gleap-admin-collapse-ui')) {
45+
if (
46+
el.classList.contains("gleap-admin-collapse-ui") ||
47+
el.closest(".gleap-admin-collapse-ui")
48+
) {
3449
return false;
3550
}
3651
return true;
37-
}
52+
},
3853
});
3954
};
4055

4156
setMode = (mode) => {
4257
this.mode = mode;
43-
if (mode === 'navigate') {
58+
if (mode === "navigate") {
4459
this.stopPicker();
4560
}
46-
if (mode === 'picker') {
61+
if (mode === "picker") {
4762
this.startPicker();
4863
}
49-
}
64+
};
5065
}
5166

5267
export default GleapAdminHelper;

0 commit comments

Comments
 (0)