Skip to content

Commit

Permalink
Merge pull request #30 from williamtroup/2.2.0
Browse files Browse the repository at this point in the history
2.2.0
  • Loading branch information
william-troup authored Sep 4, 2024
2 parents f4eafaf + 3c1f526 commit d7a2f95
Show file tree
Hide file tree
Showing 84 changed files with 535 additions and 406 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
Journey.js

[![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Journey.js%2C%20a%20free%20JavaScript%journey%builder&url=https://github.com/williamtroup/Journey.js&hashtags=javascript,html,journey,guide)
[![npm](https://img.shields.io/badge/npmjs-v2.1.0-blue)](https://www.npmjs.com/package/jjourney.js)
[![nuget](https://img.shields.io/badge/nuget-v2.1.0-purple)](https://www.nuget.org/packages/jJourney.js/)
[![npm](https://img.shields.io/badge/npmjs-v2.2.0-blue)](https://www.npmjs.com/package/jjourney.js)
[![nuget](https://img.shields.io/badge/nuget-v2.2.0-purple)](https://www.nuget.org/packages/jJourney.js/)
[![license](https://img.shields.io/badge/license-MIT-green)](https://github.com/williamtroup/Journey.js/blob/main/LICENSE.txt)
[![discussions Welcome](https://img.shields.io/badge/discussions-Welcome-red)](https://github.com/williamtroup/Journey.js/discussions)
[![coded by William Troup](https://img.shields.io/badge/coded_by-William_Troup-yellow)](https://www.william-troup.com/)
</h1>

> <p align="center">🚶 A lightweight, easy-to-use JavaScript library to create interactive, customizable, accessible guided tours across your websites or web apps!</p>
> <p align="center">v2.1.0</p>
> <p align="center">v2.2.0</p>
<br />
![Journey.js](docs/images/main.png)
Expand Down Expand Up @@ -129,8 +129,8 @@ Or, you can download the latest zipped up version [here](https://www.william-tro
Or, you can also use the following CDN links:

```markdown
https://cdn.jsdelivr.net/gh/williamtroup/Journey.js@2.1.0/dist/journey.min.js
https://cdn.jsdelivr.net/gh/williamtroup/Journey.js@2.1.0/dist/journey.js.min.css
https://cdn.jsdelivr.net/gh/williamtroup/Journey.js@2.2.0/dist/journey.min.js
https://cdn.jsdelivr.net/gh/williamtroup/Journey.js@2.2.0/dist/journey.js.min.css
```
<br>
<br>
Expand Down
10 changes: 5 additions & 5 deletions README_NUGET.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Journey.js v2.1.0
# Journey.js v2.2.0

[![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Journey.js%2C%20a%20free%20JavaScript%journey%builder&url=https://github.com/williamtroup/Journey.js&hashtags=javascript,html,journey,guide)
[![npm](https://img.shields.io/badge/npmjs-v2.1.0-blue)](https://www.npmjs.com/package/jjourney.js)
[![nuget](https://img.shields.io/badge/nuget-v2.1.0-purple)](https://www.nuget.org/packages/jJourney.js/)
[![npm](https://img.shields.io/badge/npmjs-v2.2.0-blue)](https://www.npmjs.com/package/jjourney.js)
[![nuget](https://img.shields.io/badge/nuget-v2.2.0-purple)](https://www.nuget.org/packages/jJourney.js/)
[![license](https://img.shields.io/badge/license-MIT-green)](https://github.com/williamtroup/Journey.js/blob/main/LICENSE.txt)
[![discussions Welcome](https://img.shields.io/badge/discussions-Welcome-red)](https://github.com/williamtroup/Journey.js/discussions)
[![coded by William Troup](https://img.shields.io/badge/coded_by-William_Troup-yellow)](https://www.william-troup.com/)
Expand Down Expand Up @@ -111,8 +111,8 @@ Or, you can download the latest zipped up version [here](https://www.william-tro
Or, you can also use the following CDN links:

```markdown
https://cdn.jsdelivr.net/gh/williamtroup/Journey.js@2.1.0/dist/journey.min.js
https://cdn.jsdelivr.net/gh/williamtroup/Journey.js@2.1.0/dist/journey.js.min.css
https://cdn.jsdelivr.net/gh/williamtroup/Journey.js@2.2.0/dist/journey.min.js
https://cdn.jsdelivr.net/gh/williamtroup/Journey.js@2.2.0/dist/journey.js.min.css
```


Expand Down
147 changes: 80 additions & 67 deletions dist/journey.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,18 @@ var init_is = __esm({
return t(e) && typeof e === "string";
}
e.definedString = i;
function r(e) {
function s(e) {
return t(e) && typeof e === "function";
}
e.definedFunction = r;
function s(e) {
e.definedFunction = s;
function l(e) {
return t(e) && typeof e === "number";
}
e.definedNumber = s;
function l(e) {
e.definedNumber = l;
function r(e) {
return o(e) && e instanceof Array;
}
e.definedArray = l;
e.definedArray = r;
})(Is || (Is = {}));
}
});
Expand Down Expand Up @@ -91,18 +91,18 @@ var init_default = __esm({
return Is.definedNumber(e) ? e : t;
}
e.getNumber = i;
function r(e, t) {
function s(e, t) {
return Is.definedFunction(e) ? e : t;
}
e.getFunction = r;
function s(e, t) {
e.getFunction = s;
function l(e, t) {
return Is.definedObject(e) ? e : t;
}
e.getObject = s;
function l(e, t) {
e.getObject = l;
function r(e, t) {
return Is.definedArray(e) ? e : t;
}
e.getArray = l;
e.getArray = r;
function a(e, t) {
let o = t;
if (Is.definedString(e)) {
Expand All @@ -113,7 +113,7 @@ var init_default = __esm({
o = n;
}
} else {
o = l(e, t);
o = r(e, t);
}
return o;
}
Expand Down Expand Up @@ -141,10 +141,10 @@ var init_dom = __esm({
}
e.create = t;
function o(e, o, n, i) {
const r = t(o, n);
r.innerHTML = i;
e.appendChild(r);
return r;
const s = t(o, n);
s.innerHTML = i;
e.appendChild(s);
return s;
}
e.createWithHTML = o;
function n(e) {
Expand All @@ -169,13 +169,13 @@ var init_dom = __esm({
return t;
}
e.getScrollPosition = i;
function r(e, t) {
function s(e, t) {
const o = getComputedStyle(e);
let n = o.getPropertyValue(t);
return n;
}
e.getStyleValueByName = r;
function s(e, t) {
e.getStyleValueByName = s;
function l(e, t) {
try {
if (!e.contains(t)) {
e.appendChild(t);
Expand All @@ -184,8 +184,8 @@ var init_dom = __esm({
console.warn(e.message);
}
}
e.addNode = s;
function l(e, t) {
e.addNode = l;
function r(e, t) {
try {
if (e.contains(t)) {
e.removeChild(t);
Expand All @@ -194,35 +194,37 @@ var init_dom = __esm({
console.warn(e.message);
}
}
e.removeNode = l;
e.removeNode = r;
function a(e) {
e.preventDefault();
e.stopPropagation();
}
e.cancelBubble = a;
function _(e, t) {
let o = e.pageX;
let n = e.pageY;
const r = i();
function _(e, t, o) {
let n = e.pageX;
let s = e.pageY;
const l = i();
t.style.display = "block";
if (o + t.offsetWidth > window.innerWidth) {
o -= t.offsetWidth;
if (n + t.offsetWidth > window.innerWidth) {
n -= t.offsetWidth + o;
} else {
o++;
n++;
n += o;
}
if (n + t.offsetHeight > window.innerHeight) {
n -= t.offsetHeight;
if (s + t.offsetHeight > window.innerHeight) {
s -= t.offsetHeight + o;
} else {
n++;
s++;
s += o;
}
if (o < r.left) {
o = e.pageX + 1;
if (n < l.left) {
n = e.pageX + 1;
}
if (n < r.top) {
n = e.pageY + 1;
if (s < l.top) {
s = e.pageY + 1;
}
t.style.left = `${o}px`;
t.style.top = `${n}px`;
t.style.left = `${n}px`;
t.style.top = `${s}px`;
}
e.showElementAtMousePosition = _;
function u(e, t) {
Expand All @@ -240,17 +242,17 @@ var init_dom = __esm({
function g(e, o) {
const n = t("div");
const i = t("label", "checkbox");
const r = t("input");
const s = t("input");
e.appendChild(n);
n.appendChild(i);
i.appendChild(r);
r.type = "checkbox";
const s = t("span", "check-mark");
const l = t("span", "text");
l.innerHTML = o;
i.appendChild(s);
s.type = "checkbox";
const l = t("span", "check-mark");
const r = t("span", "text");
r.innerHTML = o;
i.appendChild(l);
return r;
i.appendChild(r);
return s;
}
e.createCheckBox = g;
function c(e, t) {
Expand Down Expand Up @@ -289,6 +291,8 @@ var init_binding = __esm({
t.group = Default.getString(t.group, Constant.DEFAULT_GROUP);
t.ignore = Default.getBoolean(t.ignore, false);
t.moveToNextOnClick = Default.getBoolean(t.moveToNextOnClick, false);
t.offset = Default.getNumber(t.offset, 0);
t.useLargerDisplay = Default.getBoolean(t.useLargerDisplay, false);
t = o(t);
t = n(t);
return t;
Expand Down Expand Up @@ -346,6 +350,8 @@ var init_config = __esm({
t.dialogMovingEnabled = Default.getBoolean(t.dialogMovingEnabled, false);
t.showProgressBarText = Default.getBoolean(t.showProgressBarText, false);
t.showStepNumbersInTitle = Default.getBoolean(t.showStepNumbersInTitle, false);
t.hintClickPositionOffset = Default.getNumber(t.hintClickPositionOffset, 0);
t.tooltipOffset = Default.getNumber(t.tooltipOffset, 0);
t = o(t);
t = n(t);
return t;
Expand Down Expand Up @@ -406,34 +412,28 @@ var init_tooltip = __esm({
t = DomElement.create("div", "journey-js-tooltip");
t.style.display = "none";
document.body.appendChild(t);
document.body.addEventListener("mousemove", (() => {
s();
}));
document.addEventListener("scroll", (() => {
s();
}));
document.body.addEventListener("mousemove", (() => l()));
document.addEventListener("scroll", (() => l()));
}
}
e.render = n;
function i(e, t, o) {
if (e !== null) {
e.onmousemove = e => {
r(e, t, o);
};
e.onmousemove = e => s(e, t, o);
}
}
e.add = i;
function r(e, n, i) {
function s(e, n, i) {
DomElement.cancelBubble(e);
s();
l();
o = setTimeout((() => {
t.innerHTML = n;
t.style.display = "block";
DomElement.showElementAtMousePosition(e, t);
DomElement.showElementAtMousePosition(e, t, i.tooltipOffset);
}), i.tooltipDelay);
}
e.show = r;
function s() {
e.show = s;
function l() {
if (Is.defined(t)) {
if (o !== 0) {
clearTimeout(o);
Expand All @@ -444,7 +444,7 @@ var init_tooltip = __esm({
}
}
}
e.hide = s;
e.hide = l;
})(ToolTip || (ToolTip = {}));
}
});
Expand Down Expand Up @@ -546,10 +546,8 @@ var require_journey = __commonJS({
_element_Dialog.style.display = "none";
document.body.appendChild(_element_Dialog);
_element_Dialog_Close_Button = DomElement.create("button", "close");
_element_Dialog_Close_Button.onclick = () => onDialogClose();
_element_Dialog.appendChild(_element_Dialog_Close_Button);
_element_Dialog_Close_Button.onclick = () => {
onDialogClose();
};
ToolTip.add(_element_Dialog_Close_Button, _configuration.text.closeButtonToolTipText, _configuration);
_element_Dialog_Title = DomElement.create("div", "title");
_element_Dialog.appendChild(_element_Dialog_Title);
Expand Down Expand Up @@ -679,27 +677,42 @@ var require_journey = __commonJS({
}
}
function setDialogPosition(e, t) {
_element_Dialog_IsHint = t.isHint === true;
if (_element_Dialog_IsHint) {
_element_Dialog.className = "journey-js-dialog";
} else {
if (t.useLargerDisplay && _element_Dialog.className === "journey-js-dialog") {
_element_Dialog.className = "journey-js-dialog-lg";
} else if (!t.useLargerDisplay && _element_Dialog.className === "journey-js-dialog-lg") {
_element_Dialog.className = "journey-js-dialog";
}
}
if (_element_Dialog.style.display !== "block") {
_element_Dialog.style.display = "block";
Trigger.customEvent(t.events.onOpen, t._currentView.element);
}
if (_groups[_groups_Current].position === 0) {
Trigger.customEvent(t.events.onStart, t._currentView.element);
}
_element_Dialog_IsHint = t.isHint === true;
if (t.attach || t.isHint) {
if (t.isHint && t.alignHintToClickPosition) {
DomElement.showElementAtMousePosition(e, _element_Dialog);
DomElement.showElementAtMousePosition(e, _element_Dialog, _configuration.hintClickPositionOffset);
} else {
const e = DomElement.getOffset(t._currentView.element);
let o = e.top + t._currentView.element.offsetHeight;
let n = e.left;
if (n + _element_Dialog.offsetWidth > window.innerWidth || t.alignRight) {
n -= _element_Dialog.offsetWidth;
n += t._currentView.element.offsetWidth;
n -= t.offset;
} else {
n += t.offset;
}
if (o + _element_Dialog.offsetHeight > window.innerHeight || t.alignTop) {
o -= _element_Dialog.offsetHeight + t._currentView.element.offsetHeight;
o -= t.offset;
} else {
o += t.offset;
}
_element_Dialog.style.top = `${o}px`;
_element_Dialog.style.left = `${n}px`;
Expand Down Expand Up @@ -1125,7 +1138,7 @@ var require_journey = __commonJS({
return _public;
},
getVersion: function() {
return "2.1.0";
return "2.2.0";
}
};
(() => {
Expand Down
2 changes: 1 addition & 1 deletion dist/journey.esm.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit d7a2f95

Please sign in to comment.