diff --git a/.gitignore b/.gitignore index d1c40b7..005d2f2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ /.vs /.vscode .DS_Store -*.nupkg \ No newline at end of file +*.nupkg +/build +/node_modules \ No newline at end of file diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..7114ac1 --- /dev/null +++ b/.npmignore @@ -0,0 +1,19 @@ +/.github +/.vscode +/test +/build +CODE_OF_CONDUCT.md +CONTRIBUTING.md +journey.js.nuspec +PACK.sh +PUBLISH.sh +README_NUGET.md +SECURITY.md +SERVE.sh +package-lock.json +tsconfig.json +tsup.build.config.ts +tsup.build.esm.config.ts +tsup.build.min.config.ts +BUILD_INSTRUCTIONS.md +*.nupkg \ No newline at end of file diff --git a/BUILD_INSTRUCTIONS.md b/BUILD_INSTRUCTIONS.md new file mode 100644 index 0000000..ed811c2 --- /dev/null +++ b/BUILD_INSTRUCTIONS.md @@ -0,0 +1,83 @@ +# Building Journey.js v2.0.0 + +Before getting started with Journey.js, please read through the following instructions: + + +## Step 1: Install Packages: + +Install the packages using the following NPM commands: + +### 1. Install TypeScript: + +```markdown +npm install -g typescript +``` + +### 2. Install tsup: + +```markdown +npm i tsup -D +``` + +### 3. Install terser: + +```markdown +npm install terser -D +``` + +### 4. Install swc/core (if ES5 is required): + +```markdown +npm install @swc/core -D +``` + + +## Step 2: Build Project: + +### 1. Full Build: + +To build the TypeScript, run the following command: + +```markdown +npm run build-typescript +``` + +To build the SASS, run the following command: + +```markdown +npm run build-sass +``` + +To build the everything, run the following command: + +```markdown +npm run build +``` + +### 2. Minimized Build: + +To build the TypeScript, run the following command: + +```markdown +npm run build-minimized-typescript +``` + +To build the SASS, run the following command: + +```markdown +npm run build-minimized-sass +``` + +To build the everything, run the following command: + +```markdown +npm run build-minimized +``` + +### 3. ESM Build: + +To build the TypeScript, run the following command: + +```markdown +npm run build-typescript-esm +``` \ No newline at end of file diff --git a/README.md b/README.md index 4c1f025..8af077f 100644 --- a/README.md +++ b/README.md @@ -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-v1.7.2-blue)](https://www.npmjs.com/package/jjourney.js) -[![nuget](https://img.shields.io/badge/nuget-v1.7.2-purple)](https://www.nuget.org/packages/jJourney.js/) +[![npm](https://img.shields.io/badge/npmjs-v2.0.0-blue)](https://www.npmjs.com/package/jjourney.js) +[![nuget](https://img.shields.io/badge/nuget-v2.0.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/) >

🚶 A lightweight, easy-to-use JavaScript library to create interactive, customizable, accessible guided tours across your websites or web apps!

->

v1.7.2

+>

v2.0.0


![Journey.js](docs/images/main.png) @@ -21,7 +21,7 @@ Journey.js

What features does Journey.js have?

- Zero-dependencies and extremely lightweight! -- Exportable for use in other frameworks! +- Written in TypeScript, allowing greater support for React, Angular, and other libraries! - Full API available via public functions. - Fully styled in CSS/SASS and compatible with the Bootstrap library. - Full CSS theme support (using :root variables, with a default dark-mode theme). @@ -125,6 +125,13 @@ npm install jjourney.js ``` Or, you can download the latest zipped up version [here](https://www.william-troup.com/journey-js/download.html). + +Or, you can also use the following CDN links: + +```markdown +https://cdn.jsdelivr.net/gh/williamtroup/Journey.js@main/dist/journey.min.js +https://cdn.jsdelivr.net/gh/williamtroup/Journey.js@main/dist/journey.js.min.css +```

diff --git a/README_NUGET.md b/README_NUGET.md index df75eaf..68410ce 100644 --- a/README_NUGET.md +++ b/README_NUGET.md @@ -1,8 +1,8 @@ -# Journey.js v1.7.2 +# Journey.js v2.0.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-v1.7.2-blue)](https://www.npmjs.com/package/jjourney.js) -[![nuget](https://img.shields.io/badge/nuget-v1.7.2-purple)](https://www.nuget.org/packages/jJourney.js/) +[![npm](https://img.shields.io/badge/npmjs-v2.0.0-blue)](https://www.npmjs.com/package/jjourney.js) +[![nuget](https://img.shields.io/badge/nuget-v2.0.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/) @@ -13,7 +13,7 @@ ## What features does Journey.js have? - Zero-dependencies and extremely lightweight! -- Exportable for use in other frameworks! +- Written in TypeScript, allowing greater support for React, Angular, and other libraries! - Full API available via public functions. - Fully styled in CSS/SASS and compatible with the Bootstrap library. - Full CSS theme support (using :root variables, with a default dark-mode theme). @@ -110,6 +110,13 @@ npm install jjourney.js Or, you can download the latest zipped up version [here](https://www.william-troup.com/journey-js/download.html). +Or, you can also use the following CDN links: + +```markdown +https://cdn.jsdelivr.net/gh/williamtroup/Journey.js@main/dist/journey.min.js +https://cdn.jsdelivr.net/gh/williamtroup/Journey.js@main/dist/journey.js.min.css +``` + ## How do I get started? diff --git a/dist/journey.d.mts b/dist/journey.d.mts new file mode 100644 index 0000000..223e65e --- /dev/null +++ b/dist/journey.d.mts @@ -0,0 +1,2 @@ + +export { } diff --git a/dist/journey.d.ts b/dist/journey.d.ts new file mode 100644 index 0000000..223e65e --- /dev/null +++ b/dist/journey.d.ts @@ -0,0 +1,2 @@ + +export { } diff --git a/dist/journey.esm.js b/dist/journey.esm.js new file mode 100644 index 0000000..31e2207 --- /dev/null +++ b/dist/journey.esm.js @@ -0,0 +1,1044 @@ +var __getOwnPropNames = Object.getOwnPropertyNames; + +var __esm = (e, t) => function o() { + return e && (t = (0, e[__getOwnPropNames(e)[0]])(e = 0)), t; +}; + +var __commonJS = (e, t) => function o() { + return t || (0, e[__getOwnPropNames(e)[0]])((t = { + exports: {} + }).exports, t), t.exports; +}; + +var init_enum = __esm({ + "src/ts/enum.ts"() { + "use strict"; + } +}); + +var Constants; + +var init_constant = __esm({ + "src/ts/constant.ts"() { + "use strict"; + (e => { + e.JOURNEY_JS_ATTRIBUTE_NAME = "data-journey-js"; + })(Constants || (Constants = {})); + } +}); + +var Is; + +var init_is = __esm({ + "src/ts/is.ts"() { + "use strict"; + init_enum(); + (e => { + function t(e) { + return e !== null && e !== void 0 && e !== ""; + } + e.defined = t; + function o(e) { + return t(e) && typeof e === "object"; + } + e.definedObject = o; + function n(e) { + return t(e) && typeof e === "boolean"; + } + e.definedBoolean = n; + function i(e) { + return t(e) && typeof e === "string"; + } + e.definedString = i; + function r(e) { + return t(e) && typeof e === "function"; + } + e.definedFunction = r; + function l(e) { + return t(e) && typeof e === "number"; + } + e.definedNumber = l; + function s(e) { + return o(e) && e instanceof Array; + } + e.definedArray = s; + })(Is || (Is = {})); + } +}); + +var Data; + +var init_data = __esm({ + "src/ts/data.ts"() { + "use strict"; + init_enum(); + init_is(); + (e => { + function t(e, t) { + return typeof e === "string" ? e : t; + } + e.getDefaultAnyString = t; + function o(e, t) { + return Is.definedString(e) ? e : t; + } + e.getDefaultString = o; + function n(e, t) { + return Is.definedBoolean(e) ? e : t; + } + e.getDefaultBoolean = n; + function i(e, t) { + return Is.definedNumber(e) ? e : t; + } + e.getDefaultNumber = i; + function r(e, t) { + return Is.definedFunction(e) ? e : t; + } + e.getDefaultFunction = r; + function l(e, t) { + return Is.definedObject(e) ? e : t; + } + e.getDefaultObject = l; + function s(e, t) { + return Is.definedArray(e) ? e : t; + } + e.getDefaultArray = s; + function a(e, t) { + let o = t; + if (Is.definedString(e)) { + const n = e.toString().split(" "); + if (n.length === 0) { + e = t; + } else { + o = n; + } + } else { + o = s(e, t); + } + return o; + } + e.getDefaultStringOrArray = a; + })(Data || (Data = {})); + } +}); + +var DomElement; + +var init_dom = __esm({ + "src/ts/dom.ts"() { + "use strict"; + init_enum(); + init_is(); + (e => { + function t(e, t = "") { + const o = e.toLowerCase(); + const n = o === "text"; + let i = n ? document.createTextNode("") : document.createElement(o); + if (Is.defined(t)) { + i.className = t; + } + return i; + } + e.create = t; + function o(e) { + const t = { + left: 0, + top: 0 + }; + while (e && !isNaN(e.offsetLeft) && !isNaN(e.offsetTop)) { + t.left += e.offsetLeft - e.scrollLeft; + t.top += e.offsetTop - e.scrollTop; + e = e.offsetParent; + } + return t; + } + e.getOffset = o; + function n() { + const e = document.documentElement; + const t = { + left: e.scrollLeft - (e.clientLeft || 0), + top: e.scrollTop - (e.clientTop || 0) + }; + return t; + } + e.getScrollPosition = n; + function i(e, t) { + let o = null; + if (document.defaultView.getComputedStyle) { + o = document.defaultView.getComputedStyle(e, null).getPropertyValue(t); + } else if (e.currentStyle) { + o = e.currentStyle[t]; + } + return o; + } + e.getStyleValueByName = i; + function r(e, t) { + try { + if (!e.contains(t)) { + e.appendChild(t); + } + } catch (e) { + console.warn(e.message); + } + } + e.addNode = r; + function l(e, t) { + try { + if (e.contains(t)) { + e.removeChild(t); + } + } catch (e) { + console.warn(e.message); + } + } + e.removeNode = l; + function s(e) { + e.preventDefault(); + e.cancelBubble = true; + } + e.cancelBubble = s; + function a(e, t) { + let o = e.pageX; + let i = e.pageY; + const r = n(); + t.style.display = "block"; + if (o + t.offsetWidth > window.innerWidth) { + o -= t.offsetWidth; + } else { + o++; + } + if (i + t.offsetHeight > window.innerHeight) { + i -= t.offsetHeight; + } else { + i++; + } + if (o < r.left) { + o = e.pageX + 1; + } + if (i < r.top) { + i = e.pageY + 1; + } + t.style.left = o + "px"; + t.style.top = i + "px"; + } + e.showElementAtMousePosition = a; + function _(e, t) { + if (t) { + if (e.style.display !== "block") { + e.style.display = "block"; + } + } else { + if (e.style.display !== "none") { + e.style.display = "none"; + } + } + } + e.showElementBasedOnCondition = _; + function u(e, o) { + const n = t("div"); + const i = t("label", "checkbox"); + const r = t("input"); + e.appendChild(n); + n.appendChild(i); + i.appendChild(r); + r.type = "checkbox"; + const l = t("span", "check-mark"); + const s = t("span", "text"); + s.innerHTML = o; + i.appendChild(l); + i.appendChild(s); + return r; + } + e.createCheckBox = u; + function g(e, t) { + let o = e.getElementsByClassName(t); + while (o[0]) { + o[0].parentNode.removeChild(o[0]); + } + } + e.clearElementsByClassName = g; + })(DomElement || (DomElement = {})); + } +}); + +var require_journey = __commonJS({ + "src/journey.ts"(exports, module) { + init_enum(); + init_constant(); + init_is(); + init_data(); + init_dom(); + (() => { + let _configuration = {}; + let _configuration_ShortcutKeysEnabled = true; + const _groups_Default = "default"; + let _groups_Current = _groups_Default; + let _groups = {}; + let _element_Focus_Element_PositionStyle = ""; + let _element_Disabled_Background; + let _element_Dialog; + let _element_Dialog_Close_Button; + let _element_Dialog_Title; + let _element_Dialog_Description; + let _element_Dialog_CheckBox_Container; + let _element_Dialog_CheckBox_Input; + let _element_Dialog_ProgressDots; + let _element_Dialog_ProgressBar; + let _element_Dialog_ProgressBar_Percentage; + let _element_Dialog_ProgressBar_Percentage_Text; + let _element_Dialog_Buttons; + let _element_Dialog_Buttons_Back_Button; + let _element_Dialog_Buttons_Next_Button; + let _element_Dialog_IsHint = false; + let _element_Dialog_Move_Original_X = 0; + let _element_Dialog_Move_Original_Y = 0; + let _element_Dialog_Move_IsMoving = false; + let _element_Dialog_Move_X = 0; + let _element_Dialog_Move_Y = 0; + let _element_ToolTip; + let _element_ToolTip_Timer = 0; + function setupDefaultGroup(e = null) { + _groups = Data.getDefaultObject(e, {}); + _groups[_groups_Default] = { + json: {}, + keys: [], + position: 0 + }; + } + function setupNewGroup(e) { + if (!_groups.hasOwnProperty(e)) { + _groups[e] = { + json: {}, + keys: [], + position: 0 + }; + } + } + function getGroupBindingOptions() { + return _groups[_groups_Current].json[_groups[_groups_Current].keys[_groups[_groups_Current].position]]; + } + function renderDisabledBackground() { + _element_Disabled_Background = DomElement.create("div", "journey-js-disabled-background"); + _element_Disabled_Background.onclick = () => { + if (_configuration.closeDialogOnDisabledBackgroundClick) { + onDialogClose(); + } + }; + } + function showDisabledBackground() { + DomElement.addNode(document.body, _element_Disabled_Background); + } + function hideDisabledBackground() { + DomElement.removeNode(document.body, _element_Disabled_Background); + } + function renderDialog() { + _element_Dialog = DomElement.create("div", "journey-js-dialog"); + _element_Dialog.style.display = "none"; + document.body.appendChild(_element_Dialog); + _element_Dialog_Close_Button = DomElement.create("button", "close"); + _element_Dialog.appendChild(_element_Dialog_Close_Button); + _element_Dialog_Close_Button.onclick = () => { + onDialogClose(); + }; + addToolTip(_element_Dialog_Close_Button, _configuration.closeButtonToolTipText); + _element_Dialog_Title = DomElement.create("div", "title"); + _element_Dialog.appendChild(_element_Dialog_Title); + _element_Dialog_Description = DomElement.create("div", "description"); + _element_Dialog.appendChild(_element_Dialog_Description); + _element_Dialog_CheckBox_Container = DomElement.create("div", "checkbox-container"); + _element_Dialog.appendChild(_element_Dialog_CheckBox_Container); + _element_Dialog_CheckBox_Input = DomElement.createCheckBox(_element_Dialog_CheckBox_Container, _configuration.doNotShowAgainText); + _element_Dialog_CheckBox_Input.onchange = () => { + if (_configuration.showDoNotShowAgain) { + fireCustomTriggerEvent(_configuration.onDoNotShowAgainChange, _element_Dialog_CheckBox_Input.checked); + } + }; + _element_Dialog_ProgressDots = DomElement.create("div", "progress-dots"); + _element_Dialog.appendChild(_element_Dialog_ProgressDots); + _element_Dialog_ProgressBar = DomElement.create("div", "progress-bar"); + _element_Dialog.appendChild(_element_Dialog_ProgressBar); + _element_Dialog_ProgressBar_Percentage = DomElement.create("div", "progress-bar-percentage"); + _element_Dialog_ProgressBar.appendChild(_element_Dialog_ProgressBar_Percentage); + _element_Dialog_ProgressBar_Percentage_Text = DomElement.create("p", "progress-bar-percentage-text"); + _element_Dialog_ProgressBar_Percentage.appendChild(_element_Dialog_ProgressBar_Percentage_Text); + _element_Dialog_Buttons = DomElement.create("div", "buttons"); + _element_Dialog.appendChild(_element_Dialog_Buttons); + _element_Dialog_Buttons_Back_Button = DomElement.create("button", "back"); + _element_Dialog_Buttons_Back_Button.onclick = onDialogBack; + _element_Dialog_Buttons.appendChild(_element_Dialog_Buttons_Back_Button); + _element_Dialog_Buttons_Next_Button = DomElement.create("button", "next"); + _element_Dialog_Buttons_Next_Button.onclick = onDialogNext; + _element_Dialog_Buttons.appendChild(_element_Dialog_Buttons_Next_Button); + makeDialogMovable(); + } + function onDialogClose(e = true) { + let t = false; + if (Is.definedString(_configuration.closeDialogConfirmationText) && e) { + t = confirm(_configuration.closeDialogConfirmationText); + } else { + t = true; + } + if (t) { + const e = getGroupBindingOptions(); + if (Is.defined(e) && Is.defined(e._currentView.element)) { + fireCustomTriggerEvent(e.events.onClose, e._currentView.element); + } + removeFocusClassFromLastElement(false); + hideDisabledBackground(); + hideToolTip(); + _element_Dialog.style.display = "none"; + } + } + function onDialogBack() { + if (_groups[_groups_Current].position > 0) { + removeFocusClassFromLastElement(); + _groups[_groups_Current].position--; + showDialogAndSetPosition(); + } + } + function onDialogNext() { + if (_groups[_groups_Current].position === _groups[_groups_Current].keys.length - 1) { + const e = getGroupBindingOptions(); + onDialogClose(false); + fireCustomTriggerEvent(e.events.onFinish, e._currentView.element); + } else { + removeFocusClassFromLastElement(); + _groups[_groups_Current].position++; + showDialogAndSetPosition(); + } + } + function showDialogAndSetPosition() { + const e = getGroupBindingOptions(); + if (Is.defined(e) && Is.defined(e._currentView.element)) { + if (e.showDisabledBackground) { + showDisabledBackground(); + } else { + hideDisabledBackground(); + } + hideToolTip(); + _element_Dialog_Close_Button.style.display = _configuration.showCloseButton ? "block" : "none"; + _configuration_ShortcutKeysEnabled = true; + e._currentView.element.className += " " + "journey-js-element-focus"; + if (_configuration.scrollToElements) { + e._currentView.element.scrollIntoView(); + } + const t = DomElement.getStyleValueByName(e._currentView.element, "position"); + if (t !== "" && t.toLowerCase() === "static") { + _element_Focus_Element_PositionStyle = t; + e._currentView.element.style.position = "relative"; + } + DomElement.showElementBasedOnCondition(_element_Dialog_CheckBox_Container, _configuration.showDoNotShowAgain); + DomElement.showElementBasedOnCondition(_element_Dialog_ProgressDots, _configuration.showProgressDots && _groups[_groups_Current].keys.length > 1); + DomElement.showElementBasedOnCondition(_element_Dialog_ProgressBar, _configuration.showProgressBar && _groups[_groups_Current].keys.length > 1); + DomElement.showElementBasedOnCondition(_element_Dialog_ProgressBar_Percentage_Text, _configuration.showProgressBarText); + DomElement.showElementBasedOnCondition(_element_Dialog_Buttons, _configuration.showButtons); + _element_Dialog_Buttons_Back_Button.innerHTML = _configuration.backButtonText; + _element_Dialog_Buttons_Back_Button.disabled = _groups[_groups_Current].position === 0; + if (_groups[_groups_Current].position >= _groups[_groups_Current].keys.length - 1) { + _element_Dialog_Buttons_Next_Button.innerHTML = _configuration.finishButtonText; + } else { + _element_Dialog_Buttons_Next_Button.innerHTML = _configuration.nextButtonText; + } + setDialogText(e); + setDialogPosition(null, e); + buildProcessDots(); + setProgressBarPosition(); + fireCustomTriggerEvent(e.events.onEnter, e._currentView.element); + if (e.sendClick) { + e._currentView.element.click(); + } + } + } + function setDialogText(e) { + if (Is.definedString(e.title)) { + _element_Dialog_Title.innerHTML = e.title; + } else { + _element_Dialog_Title.innerHTML = ""; + } + if (Is.definedString(e.description)) { + _element_Dialog_Description.innerHTML = e.description; + } else { + _element_Dialog_Description.innerHTML = ""; + } + } + function setDialogPosition(e, t) { + if (_element_Dialog.style.display !== "block") { + _element_Dialog.style.display = "block"; + fireCustomTriggerEvent(t.events.onOpen, t._currentView.element); + } + if (_groups[_groups_Current].position === 0) { + fireCustomTriggerEvent(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); + } 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; + } + if (o + _element_Dialog.offsetHeight > window.innerHeight || t.alignTop) { + o -= _element_Dialog.offsetHeight + t._currentView.element.offsetHeight; + } + _element_Dialog.style.top = o + "px"; + _element_Dialog.style.left = n + "px"; + } + } else { + const e = DomElement.getScrollPosition(); + const t = Math.max(0, (window.innerWidth - _element_Dialog.offsetWidth) / 2 + e.left); + const o = Math.max(0, (window.innerHeight - _element_Dialog.offsetHeight) / 2 + e.top); + _element_Dialog.style.left = t + "px"; + _element_Dialog.style.top = o + "px"; + } + } + function removeFocusClassFromLastElement(e = true) { + const t = getGroupBindingOptions(); + if (Is.defined(t) && Is.defined(t._currentView.element)) { + t._currentView.element.className = t._currentView.element.className.replace(" " + "journey-js-element-focus", ""); + if (Is.defined(_element_Focus_Element_PositionStyle)) { + t._currentView.element.style.position = _element_Focus_Element_PositionStyle; + } + if (e) { + fireCustomTriggerEvent(t.events.onLeave, t._currentView.element); + } + } + } + function buildProcessDots() { + _element_Dialog_ProgressDots.innerHTML = ""; + if (_configuration.showProgressDots) { + const e = _groups[_groups_Current].keys.length; + for (let t = 0; t < e; t++) { + buildProgressDot(t, _groups[_groups_Current].keys[t]); + } + } + } + function buildProgressDot(e, t) { + const o = _groups[_groups_Current].json[t]; + let n; + if (e === _groups[_groups_Current].position) { + n = DomElement.create("div", "dot-active"); + } else { + n = DomElement.create("div", "dot"); + n.onclick = () => { + removeFocusClassFromLastElement(); + _groups[_groups_Current].position = e; + showDialogAndSetPosition(); + }; + } + _element_Dialog_ProgressDots.appendChild(n); + if (_configuration.showProgressDotToolTips) { + if (Is.definedString(o.tooltip)) { + addToolTip(n, o.tooltip); + } else { + addToolTip(n, o.title); + } + } + if (_configuration.showProgressDotNumbers) { + n.className += " dot-number"; + n.innerHTML = (e + 1).toString(); + } + } + function setProgressBarPosition() { + if (_configuration.showProgressBar) { + const e = _element_Dialog_ProgressBar.offsetWidth / _groups[_groups_Current].keys.length; + const t = (_groups[_groups_Current].position + 1) * e; + const o = Math.ceil((_groups[_groups_Current].position + 1) / _groups[_groups_Current].keys.length * 100); + _element_Dialog_ProgressBar_Percentage.style.width = t + "px"; + _element_Dialog_ProgressBar_Percentage_Text.innerHTML = o + "%"; + } + } + function makeDialogMovable() { + _element_Dialog_Title.onmousedown = onMoveTitleBarMouseDown; + _element_Dialog_Title.onmouseup = onMoveTitleBarMouseUp; + _element_Dialog_Title.oncontextmenu = onMoveTitleBarMouseUp; + document.body.addEventListener("mousemove", onMoveDocumentMouseMove); + document.body.addEventListener("mouseleave", onMoveDocumentMouseLeave); + } + function onMoveTitleBarMouseDown(e) { + if (!_element_Dialog_Move_IsMoving && !_element_Dialog_IsHint && _configuration.dialogMovingEnabled) { + _element_Dialog.className += " journey-js-dialog-moving"; + _element_Dialog_Move_IsMoving = true; + _element_Dialog_Move_X = e.pageX - _element_Dialog.offsetLeft; + _element_Dialog_Move_Y = e.pageY - _element_Dialog.offsetTop; + _element_Dialog_Move_Original_X = _element_Dialog.offsetLeft; + _element_Dialog_Move_Original_Y = _element_Dialog.offsetTop; + } + } + function onMoveTitleBarMouseUp() { + if (_element_Dialog_Move_IsMoving) { + _element_Dialog_Move_IsMoving = false; + _element_Dialog_Move_Original_X = 0; + _element_Dialog_Move_Original_Y = 0; + _element_Dialog.className = "journey-js-dialog"; + } + } + function onMoveDocumentMouseMove(e) { + if (_element_Dialog_Move_IsMoving) { + _element_Dialog.style.left = e.pageX - _element_Dialog_Move_X + "px"; + _element_Dialog.style.top = e.pageY - _element_Dialog_Move_Y + "px"; + } + } + function onMoveDocumentMouseLeave() { + if (_element_Dialog_Move_IsMoving) { + _element_Dialog.style.left = _element_Dialog_Move_Original_X + "px"; + _element_Dialog.style.top = _element_Dialog_Move_Original_Y + "px"; + _element_Dialog_Move_IsMoving = false; + _element_Dialog_Move_Original_X = 0; + _element_Dialog_Move_Original_Y = 0; + _element_Dialog.className = "journey-js-dialog"; + } + } + function renderToolTip() { + if (!Is.defined(_element_ToolTip)) { + _element_ToolTip = DomElement.create("div", "journey-js-tooltip"); + _element_ToolTip.style.display = "none"; + document.body.appendChild(_element_ToolTip); + document.body.addEventListener("mousemove", (() => { + hideToolTip(); + })); + document.addEventListener("scroll", (() => { + hideToolTip(); + })); + } + } + function addToolTip(e, t) { + if (e !== null) { + e.onmousemove = e => { + showToolTip(e, t); + }; + } + } + function showToolTip(e, t) { + DomElement.cancelBubble(e); + hideToolTip(); + _element_ToolTip_Timer = setTimeout((() => { + _element_ToolTip.innerHTML = t; + _element_ToolTip.style.display = "block"; + DomElement.showElementAtMousePosition(e, _element_ToolTip); + }), _configuration.tooltipDelay); + } + function hideToolTip() { + if (Is.defined(_element_ToolTip)) { + if (_element_ToolTip_Timer !== 0) { + clearTimeout(_element_ToolTip_Timer); + _element_ToolTip_Timer = 0; + } + if (_element_ToolTip.style.display === "block") { + _element_ToolTip.style.display = "none"; + } + } + } + function getElements() { + const e = _configuration.domElementTypes; + const t = e.length; + for (let o = 0; o < t; o++) { + const t = document.getElementsByTagName(e[o]); + const n = [].slice.call(t); + const i = n.length; + for (let e = 0; e < i; e++) { + if (!getElement(n[e])) { + break; + } + } + } + _groups[_groups_Current].keys.sort(); + } + function getElement(e) { + let t = true; + if (Is.defined(e) && e.hasAttribute(Constants.JOURNEY_JS_ATTRIBUTE_NAME)) { + const o = e.getAttribute(Constants.JOURNEY_JS_ATTRIBUTE_NAME); + if (Is.definedString(o)) { + const n = getObjectFromString(o); + if (n.parsed && Is.definedObject(n.object)) { + setupElement(e, buildAttributeOptions(n.object)); + } else { + if (!_configuration.safeMode) { + console.error(_configuration.attributeNotValidErrorText.replace("{{attribute_name}}", Constants.JOURNEY_JS_ATTRIBUTE_NAME)); + t = false; + } + } + } else { + if (!_configuration.safeMode) { + console.error(_configuration.attributeNotSetErrorText.replace("{{attribute_name}}", Constants.JOURNEY_JS_ATTRIBUTE_NAME)); + t = false; + } + } + } + return t; + } + function setupElement(e, t) { + t._currentView = {}; + t._currentView.element = e; + if (Is.definedNumber(t.order) && (Is.definedString(t.title) || Is.definedString(t.description))) { + e.removeAttribute(Constants.JOURNEY_JS_ATTRIBUTE_NAME); + if (!t.isHint) { + setupNewGroup(t.group); + _groups[t.group].json[t.order] = t; + _groups[t.group].keys.push(t.order); + fireCustomTriggerEvent(t.events.onAddStep, e); + } else { + renderHint(t); + } + } + } + function renderHint(e) { + const t = DomElement.getStyleValueByName(e._currentView.element, "position"); + if (t !== "" && t.toLowerCase() === "static") { + e._currentView.element.style.position = "relative"; + } + const o = DomElement.create("div", "journey-js-hint"); + e._currentView.element.appendChild(o); + o.onclick = t => { + DomElement.cancelBubble(t); + _element_Dialog_CheckBox_Container.style.display = "none"; + _element_Dialog_ProgressDots.style.display = "none"; + _element_Dialog_ProgressBar.style.display = "none"; + _element_Dialog_Buttons.style.display = "none"; + _configuration_ShortcutKeysEnabled = false; + setDialogText(e); + setDialogPosition(t, e); + if (e.removeHintWhenViewed) { + DomElement.clearElementsByClassName(e._currentView.element, "journey-js-hint"); + } + }; + } + function buildDocumentEvents(e = true) { + const t = e ? document.addEventListener : document.removeEventListener; + const o = e ? window.addEventListener : window.removeEventListener; + if (_configuration.shortcutKeysEnabled) { + t("keydown", onWindowKeyDown); + } + o("resize", onWindowResize); + } + function onWindowKeyDown(e) { + if (_public.isOpen() && _configuration.shortcutKeysEnabled) { + if (e.code === "Escape") { + e.preventDefault(); + onDialogClose(); + } else { + if (_configuration_ShortcutKeysEnabled) { + if (e.code === "ArrowLeft") { + e.preventDefault(); + onDialogBack(); + } else if (e.code === "ArrowRight") { + e.preventDefault(); + onDialogNext(); + } else if (e.code === "ArrowUp") { + e.preventDefault(); + onWindowKeyCodeUp(); + } else if (e.code === "ArrowDown") { + e.preventDefault(); + onWindowKeyCodeDown(); + } + } + } + } + } + function onWindowResize() { + if (_public.isOpen()) { + showDialogAndSetPosition(); + } + } + function onWindowKeyCodeUp() { + if (_groups[_groups_Current].position !== 0) { + removeFocusClassFromLastElement(); + _groups[_groups_Current].position = 0; + showDialogAndSetPosition(); + } + } + function onWindowKeyCodeDown() { + if (_groups[_groups_Current].position !== _groups[_groups_Current].keys.length - 1) { + removeFocusClassFromLastElement(); + _groups[_groups_Current].position = _groups[_groups_Current].keys.length - 1; + showDialogAndSetPosition(); + } + } + function buildAttributeOptions(e) { + let t = Data.getDefaultObject(e, {}); + t.order = Data.getDefaultNumber(t.order, 0); + t.attach = Data.getDefaultBoolean(t.attach, true); + t.sendClick = Data.getDefaultBoolean(t.sendClick, false); + t.alignTop = Data.getDefaultBoolean(t.alignTop, false); + t.alignRight = Data.getDefaultBoolean(t.alignRight, false); + t.isHint = Data.getDefaultBoolean(t.isHint, false); + t.alignHintToClickPosition = Data.getDefaultBoolean(t.alignHintToClickPosition, false); + t.showDisabledBackground = Data.getDefaultBoolean(t.showDisabledBackground, true); + t.removeHintWhenViewed = Data.getDefaultBoolean(t.removeHintWhenViewed, false); + t.group = Data.getDefaultString(t.group, _groups_Default); + t = buildAttributeOptionStrings(t); + return buildAttributeOptionCustomTriggers(t); + } + function buildAttributeOptionStrings(e) { + e.title = Data.getDefaultString(e.title, ""); + e.description = Data.getDefaultString(e.description, ""); + e.tooltip = Data.getDefaultString(e.tooltip, ""); + return e; + } + function buildAttributeOptionCustomTriggers(e) { + e.events = Data.getDefaultObject(e.events, {}); + e.events.onEnter = Data.getDefaultFunction(e.events.onEnter, null); + e.events.onLeave = Data.getDefaultFunction(e.events.onLeave, null); + e.events.onClose = Data.getDefaultFunction(e.events.onClose, null); + e.events.onFinish = Data.getDefaultFunction(e.events.onFinish, null); + e.events.onOpen = Data.getDefaultFunction(e.events.onOpen, null); + e.events.onStart = Data.getDefaultFunction(e.events.onStart, null); + e.events.onAddStep = Data.getDefaultFunction(e.events.onAddStep, null); + e.events.onRemoveStep = Data.getDefaultFunction(e.events.onRemoveStep, null); + return e; + } + function fireCustomTriggerEvent(e, ...t) { + if (Is.definedFunction(e)) { + e.apply(null, [].slice.call(t, 0)); + } + } + function getBrowserUrlParameters() { + let e = false; + if (_configuration.browserUrlParametersEnabled) { + const t = window.location.href; + const o = getBrowserUrlArguments(t); + if (Is.defined(o.sjOrderId)) { + const e = parseInt(o.sjOrderId, 10); + if (!isNaN(e) && e <= _groups[_groups_Current].keys.length - 1) { + _groups[_groups_Current].position = e; + } + } + if (Is.defined(o.sjShow)) { + e = o.sjShow === "true"; + } + } + return e; + } + function getBrowserUrlArguments(e) { + const t = {}; + const o = e.split("?"); + if (o.length > 1) { + const e = o[1].split("&"); + const n = e.length; + for (let o = 0; o < n; o++) { + const n = e[o].split("="); + t[n[0]] = n[1]; + } + } + return t; + } + function getObjectFromString(objectString) { + const result = { + parsed: true, + object: null + }; + try { + if (Is.definedString(objectString)) { + result.object = JSON.parse(objectString); + } + } catch (e1) { + try { + result.object = eval("(" + objectString + ")"); + if (Is.definedFunction(result.object)) { + result.object = result.object(); + } + } catch (e) { + if (!_configuration.safeMode) { + console.error(_configuration.objectErrorText.replace("{{error_1}}", e1.message).replace("{{error_2}}", e.message)); + result.parsed = false; + } + result.object = null; + } + } + return result; + } + function resetDialogPosition() { + if (_public.isOpen()) { + onDialogClose(false); + _groups[_groups_Current].position = 0; + } + } + function buildDefaultConfiguration(e = {}) { + _configuration = Data.getDefaultObject(e, {}); + _configuration.safeMode = Data.getDefaultBoolean(_configuration.safeMode, true); + _configuration.domElementTypes = Data.getDefaultStringOrArray(_configuration.domElementTypes, [ "*" ]); + _configuration.showCloseButton = Data.getDefaultBoolean(_configuration.showCloseButton, true); + _configuration.shortcutKeysEnabled = Data.getDefaultBoolean(_configuration.shortcutKeysEnabled, true); + _configuration.showProgressDots = Data.getDefaultBoolean(_configuration.showProgressDots, true); + _configuration.browserUrlParametersEnabled = Data.getDefaultBoolean(_configuration.browserUrlParametersEnabled, true); + _configuration.showProgressDotNumbers = Data.getDefaultBoolean(_configuration.showProgressDotNumbers, false); + _configuration.showButtons = Data.getDefaultBoolean(_configuration.showButtons, true); + _configuration.showDoNotShowAgain = Data.getDefaultBoolean(_configuration.showDoNotShowAgain, false); + _configuration.tooltipDelay = Data.getDefaultNumber(_configuration.tooltipDelay, 750); + _configuration.showProgressDotToolTips = Data.getDefaultBoolean(_configuration.showProgressDotToolTips, true); + _configuration.closeDialogOnDisabledBackgroundClick = Data.getDefaultBoolean(_configuration.closeDialogOnDisabledBackgroundClick, false); + _configuration.showProgressBar = Data.getDefaultBoolean(_configuration.showProgressBar, false); + _configuration.scrollToElements = Data.getDefaultBoolean(_configuration.scrollToElements, false); + _configuration.dialogMovingEnabled = Data.getDefaultBoolean(_configuration.dialogMovingEnabled, false); + _configuration.showProgressBarText = Data.getDefaultBoolean(_configuration.showProgressBarText, false); + buildDefaultConfigurationStrings(); + buildDefaultConfigurationCustomTriggers(); + } + function buildDefaultConfigurationStrings() { + _configuration.backButtonText = Data.getDefaultAnyString(_configuration.backButtonText, "Back"); + _configuration.nextButtonText = Data.getDefaultAnyString(_configuration.nextButtonText, "Next"); + _configuration.finishButtonText = Data.getDefaultAnyString(_configuration.finishButtonText, "Finish"); + _configuration.closeButtonToolTipText = Data.getDefaultAnyString(_configuration.closeButtonToolTipText, "Close"); + _configuration.doNotShowAgainText = Data.getDefaultAnyString(_configuration.doNotShowAgainText, "Do not show again"); + _configuration.objectErrorText = Data.getDefaultAnyString(_configuration.objectErrorText, "Errors in object: {{error_1}}, {{error_2}}"); + _configuration.attributeNotValidErrorText = Data.getDefaultAnyString(_configuration.attributeNotValidErrorText, "The attribute '{{attribute_name}}' is not a valid object."); + _configuration.attributeNotSetErrorText = Data.getDefaultAnyString(_configuration.attributeNotSetErrorText, "The attribute '{{attribute_name}}' has not been set correctly."); + _configuration.closeDialogConfirmationText = Data.getDefaultAnyString(_configuration.closeDialogConfirmationText, ""); + } + function buildDefaultConfigurationCustomTriggers() { + _configuration.onDoNotShowAgainChange = Data.getDefaultFunction(_configuration.onDoNotShowAgainChange, null); + } + const _public = { + start: function(e = "") { + if (!_public.isOpen()) { + _groups_Current = Data.getDefaultString(e, _groups_Default); + if (_groups.hasOwnProperty(_groups_Current)) { + _groups[_groups_Current].position = 0; + showDialogAndSetPosition(); + } + } + return _public; + }, + show: function(e = "") { + if (!_public.isOpen()) { + _groups_Current = Data.getDefaultString(e, _groups_Current); + if (_groups.hasOwnProperty(_groups_Current)) { + if (_groups[_groups_Current].position === _groups[_groups_Current].keys.length - 1) { + _groups[_groups_Current].position = 0; + } + showDialogAndSetPosition(); + } + } + return _public; + }, + hide: function() { + if (_public.isOpen()) { + onDialogClose(); + } + return _public; + }, + isOpen: function() { + return Is.defined(_element_Dialog) && _element_Dialog.style.display === "block"; + }, + isComplete: function() { + return _groups[_groups_Current].position >= _groups[_groups_Current].keys.length - 1; + }, + addDocumentSteps: function() { + getElements(); + return _public; + }, + addStep: function(e, t) { + if (Is.definedObject(e) && Is.definedObject(t)) { + setupElement(e, buildAttributeOptions(t)); + _groups[_groups_Current].keys.sort(); + resetDialogPosition(); + } + return _public; + }, + removeStep: function(e) { + if (Is.definedObject(e)) { + let t = false; + for (let o in _groups) { + if (_groups.hasOwnProperty(o)) { + for (let n in _groups[o].json) { + if (_groups[o].json.hasOwnProperty(n)) { + const i = _groups[o].json[n]; + if (i._currentView.element === e) { + fireCustomTriggerEvent(i.events.onRemoveStep, i._currentView.element); + _groups[o].keys.splice(_groups[o].keys.indexOf(i.order), 1); + delete _groups[o].json[i.order]; + _groups[o].keys.sort(); + t = true; + break; + } + } + } + } + } + if (!t) { + DomElement.clearElementsByClassName(e, "journey-js-hint"); + } else { + resetDialogPosition(); + } + } + return _public; + }, + clearSteps: function(e = "") { + resetDialogPosition(); + for (let t in _groups) { + if (_groups.hasOwnProperty(t)) { + if (!Is.definedString(e) || e === t) { + for (let e in _groups[t].json) { + if (_groups[t].json.hasOwnProperty(e)) { + const o = _groups[t].json[e]; + fireCustomTriggerEvent(o.events.onRemoveStep, o._currentView.element); + } + } + } + } + } + if (Is.definedString(e)) { + if (_groups.hasOwnProperty(e)) { + delete _groups[e]; + } + } else { + _groups = {}; + } + if (!Is.definedString(e) || e === _groups_Default) { + setupDefaultGroup(_groups); + } + return _public; + }, + clearHints: function() { + DomElement.clearElementsByClassName(document.body, "journey-js-hint"); + return _public; + }, + reverseStepOrder: function() { + _groups[_groups_Current].keys.reverse(); + resetDialogPosition(); + return _public; + }, + setConfiguration: function(e) { + if (Is.definedObject(e)) { + let t = false; + const o = _configuration; + for (let n in e) { + if (e.hasOwnProperty(n) && _configuration.hasOwnProperty(n) && o[n] !== e[n]) { + o[n] = e[n]; + t = true; + } + } + if (t) { + buildDefaultConfiguration(o); + } + } + return _public; + }, + getVersion: function() { + return "2.0.0"; + } + }; + (() => { + buildDefaultConfiguration(); + document.addEventListener("DOMContentLoaded", (() => { + setupDefaultGroup(); + renderDisabledBackground(); + renderDialog(); + renderToolTip(); + getElements(); + buildDocumentEvents(); + if (getBrowserUrlParameters()) { + _public.show(); + } + })); + if (!Is.defined(window.$journey)) { + window.$journey = _public; + } + })(); + })(); + } +}); + +export default require_journey();//# sourceMappingURL=journey.esm.js.map \ No newline at end of file diff --git a/dist/journey.esm.js.map b/dist/journey.esm.js.map new file mode 100644 index 0000000..8ad4398 --- /dev/null +++ b/dist/journey.esm.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../src/ts/enum.ts","../src/ts/constant.ts","../src/ts/is.ts","../src/ts/data.ts","../src/ts/dom.ts","../src/journey.ts"],"names":["Constants","Is","Data","result","DomElement"],"mappings":";;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAaiB;AAbjB;AAAA;AAAA;AAaO,MAAUA,eAAV;AACI,MAAMA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;AAEA,iBAAO;AAAA,QACX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QASA,YAAY,WAAoB;AAC5B,iBAAO;AAAA,QACX;AAAA,MACJ;AASA,OAAE,MAAM;AACJ,kCAA0B;AAE1B,iBAAS,iBAAkB,oBAAoB,MAAM;AACjD,4BAAkB;AAClB,mCAAyB;AACzB,uBAAa;AACb,wBAAc;AACd,sBAAY;AACZ,8BAAoB;AAEpB,cAAK,wBAAwB,GAAI;AAC7B,oBAAQ,KAAK;AAAA,UACjB;AAAA,QACJ,CAAE;AAEF,YAAK,CAAC,GAAG,QAAS,OAAO,QAAS,GAAI;AAClC,iBAAO,WAAW;AAAA,QACtB;AAAA,MACJ,GAAK;AAAA,IACT,GAAK;AAAA;AAAA","sourcesContent":["/**\n * Journey.js\n * \n * A lightweight, easy-to-use JavaScript library to create interactive, customizable, accessible guided tours across your websites or web apps!\n * \n * @file journey.js\n * @version v2.0.0\n * @author Bunoon\n * @license MIT License\n * @copyright Bunoon 2024\n */\n\n\nexport const enum Char {\n empty = \"\",\n space = \" \",\n}\n\nexport const enum KeyCode {\n escape = \"Escape\",\n left = \"ArrowLeft\",\n up = \"ArrowUp\",\n right = \"ArrowRight\",\n down = \"ArrowDown\",\n}","/**\n * Journey.js\n * \n * A lightweight, easy-to-use JavaScript library to create interactive, customizable, accessible guided tours across your websites or web apps!\n * \n * @file journey.js\n * @version v2.0.0\n * @author Bunoon\n * @license MIT License\n * @copyright Bunoon 2024\n */\n\n\nexport namespace Constants {\n export const JOURNEY_JS_ATTRIBUTE_NAME = \"data-journey-js\";\n}","/**\n * Journey.js\n * \n * A lightweight, easy-to-use JavaScript library to create interactive, customizable, accessible guided tours across your websites or web apps!\n * \n * @file journey.js\n * @version v2.0.0\n * @author Bunoon\n * @license MIT License\n * @copyright Bunoon 2024\n */\n\n\nimport { Char } from \"./enum\";\n\n\nexport namespace Is {\n export function defined( value: any ) : boolean {\n return value !== null && value !== undefined && value !== Char.empty;\n }\n\n export function definedObject( object: any ) : boolean {\n return defined( object ) && typeof object === \"object\";\n }\n\n export function definedBoolean( object: any ) : boolean {\n return defined( object ) && typeof object === \"boolean\";\n }\n\n export function definedString( object: any ) : boolean {\n return defined( object ) && typeof object === \"string\";\n }\n\n export function definedFunction( object: any ) : boolean {\n return defined( object ) && typeof object === \"function\";\n }\n\n export function definedNumber( object: any ) : boolean {\n return defined( object ) && typeof object === \"number\";\n }\n\n export function definedArray( object: any ) : boolean {\n return definedObject( object ) && object instanceof Array;\n }\n}","/**\n * Journey.js\n * \n * A lightweight, easy-to-use JavaScript library to create interactive, customizable, accessible guided tours across your websites or web apps!\n * \n * @file journey.js\n * @version v2.0.0\n * @author Bunoon\n * @license MIT License\n * @copyright Bunoon 2024\n */\n\n\nimport { Char } from \"./enum\";\nimport { Is } from \"./is\";\n\n\nexport namespace Data {\n export function getDefaultAnyString( value: any, defaultValue: string ) : string {\n return typeof value === \"string\" ? value : defaultValue;\n }\n\n export function getDefaultString( value: any, defaultValue: string ) : string {\n return Is.definedString( value ) ? value : defaultValue;\n }\n\n export function getDefaultBoolean( value: any, defaultValue: boolean ) : boolean {\n return Is.definedBoolean( value ) ? value : defaultValue;\n }\n\n export function getDefaultNumber( value: any, defaultValue: number ) : number {\n return Is.definedNumber( value ) ? value : defaultValue;\n }\n\n export function getDefaultFunction( value: any, defaultValue: any ) : any {\n return Is.definedFunction( value ) ? value : defaultValue;\n }\n\n export function getDefaultObject( value: any, defaultValue: any ) : any {\n return Is.definedObject( value ) ? value : defaultValue;\n }\n\n export function getDefaultArray( value: any, defaultValue: any[] ) : any[] {\n return Is.definedArray( value ) ? value : defaultValue;\n }\n\n export function getDefaultStringOrArray( value: any, defaultValue: any[] ) : any[] {\n let result: any[] = defaultValue;\n\n if ( Is.definedString( value ) ) {\n const values: string[] = value.toString().split( Char.space );\n\n if ( values.length === 0 ) {\n value = defaultValue;\n } else {\n result = values;\n }\n\n } else {\n result = getDefaultArray( value, defaultValue );\n }\n\n return result;\n }\n}","/**\n * Journey.js\n * \n * A lightweight, easy-to-use JavaScript library to create interactive, customizable, accessible guided tours across your websites or web apps!\n * \n * @file journey.js\n * @version v2.0.0\n * @author Bunoon\n * @license MIT License\n * @copyright Bunoon 2024\n */\n\n\nimport { Char } from \"./enum\";\nimport { Is } from \"./is\";\nimport { type Position } from \"./type\";\n\n\nexport namespace DomElement {\n export function create( type: string, className: string = Char.empty ) : HTMLElement {\n const nodeType: string = type.toLowerCase();\n const isText: boolean = nodeType === \"text\";\n\n let result: any = isText ? document.createTextNode( Char.empty ) : document.createElement( nodeType );\n\n if ( Is.defined( className ) ) {\n result.className = className;\n }\n\n return result;\n }\n\n export function getOffset( element: HTMLElement ) : Position {\n const result: Position = {\n left: 0,\n top: 0\n } as Position;\n\n while ( element && !isNaN( element.offsetLeft ) && !isNaN( element.offsetTop ) ) {\n result.left += element.offsetLeft - element.scrollLeft;\n result.top += element.offsetTop - element.scrollTop;\n\n element = element.offsetParent as HTMLElement;\n }\n\n return result;\n }\n\n export function getScrollPosition() : Position {\n const documentElement: HTMLElement = document.documentElement;\n\n const result: Position = {\n left: documentElement.scrollLeft - ( documentElement.clientLeft || 0 ),\n top: documentElement.scrollTop - ( documentElement.clientTop || 0 )\n } as Position;\n\n return result;\n }\n\n export function getStyleValueByName( element: any, stylePropertyName: string ) : any {\n let value: any = null;\n \n if ( document.defaultView!.getComputedStyle! ) {\n value = document.defaultView!.getComputedStyle( element, null ).getPropertyValue( stylePropertyName ); \n } else if ( element.currentStyle ) {\n value = element.currentStyle[ stylePropertyName ];\n } \n\n return value;\n }\n\n export function addNode( parent: HTMLElement, node: HTMLElement ) : void {\n try {\n if ( !parent.contains( node ) ) {\n parent.appendChild( node );\n }\n } catch ( e: any ) {\n console.warn( e.message );\n }\n }\n\n export function removeNode( parent: HTMLElement, node: HTMLElement ) : void {\n try {\n if ( parent.contains( node ) ) {\n parent.removeChild( node );\n }\n } catch ( e: any ) {\n console.warn( e.message );\n }\n }\n\n export function cancelBubble( e: any ) : void {\n e.preventDefault();\n e.cancelBubble = true;\n }\n\n export function showElementAtMousePosition( e: MouseEvent, element: HTMLElement ) : void {\n let left: number = e.pageX;\n let top: number = e.pageY;\n const scrollPosition: Position = getScrollPosition();\n\n element.style.display = \"block\";\n\n if ( left + element.offsetWidth > window.innerWidth ) {\n left -= element.offsetWidth;\n } else {\n left++;\n }\n\n if ( top + element.offsetHeight > window.innerHeight ) {\n top -= element.offsetHeight;\n } else {\n top++;\n }\n\n if ( left < scrollPosition.left ) {\n left = e.pageX + 1;\n }\n\n if ( top < scrollPosition.top ) {\n top = e.pageY + 1;\n }\n \n element.style.left = left + \"px\";\n element.style.top = top + \"px\";\n }\n\n export function showElementBasedOnCondition( element: HTMLElement, condition: boolean ) : void {\n if ( condition ) {\n if ( element.style.display !== \"block\" ) {\n element.style.display = \"block\";\n }\n \n } else {\n if ( element.style.display !== \"none\" ) {\n element.style.display = \"none\";\n }\n }\n }\n\n export function createCheckBox( container: HTMLElement, labelText: string ) : HTMLInputElement {\n const lineContainer: HTMLElement = create( \"div\" );\n const label: HTMLElement = create( \"label\", \"checkbox\" );\n const input: HTMLInputElement = create( \"input\" ) as HTMLInputElement;\n\n container.appendChild( lineContainer );\n lineContainer.appendChild( label );\n label.appendChild( input );\n\n input.type = \"checkbox\";\n\n const checkMark: HTMLElement = create( \"span\", \"check-mark\" );\n const text: HTMLElement = create( \"span\", \"text\" );\n\n text.innerHTML = labelText;\n \n label.appendChild( checkMark );\n label.appendChild( text );\n\n return input;\n }\n\n export function clearElementsByClassName( container: HTMLElement, className: string ) : void {\n let elements: HTMLCollectionOf = container.getElementsByClassName( className );\n\n while ( elements[ 0 ] ) {\n elements[ 0 ].parentNode!.removeChild( elements[ 0 ] );\n }\n }\n}","/**\n * Journey.js\n * \n * A lightweight, easy-to-use JavaScript library to create interactive, customizable, accessible guided tours across your websites or web apps!\n * \n * @file journey.js\n * @version v2.0.0\n * @author Bunoon\n * @license MIT License\n * @copyright Bunoon 2024\n */\n\n\nimport {\n type Configuration,\n type BindingOptions,\n type Events, \n type CurrentView, \n type Position} from \"./ts/type\";\n\nimport { Char, KeyCode } from \"./ts/enum\";\nimport { Constants } from \"./ts/constant\";\nimport { PublicApi } from \"./ts/api\";\nimport { Is } from \"./ts/is\";\nimport { Data } from \"./ts/data\";\nimport { DomElement } from \"./ts/dom\";\n\n\ntype StringToJson = {\n parsed: boolean;\n object: any;\n};\n\ntype Groups = Record;\n keys: number[];\n position: number;\n}>;\n\n\n( () => {\n // Variables: Configuration\n let _configuration: Configuration = {} as Configuration;\n\n // Variables: Configuration (overrides)\n let _configuration_ShortcutKeysEnabled: boolean = true;\n\n // Variables: Groups\n const _groups_Default: string = \"default\";\n let _groups_Current: string = _groups_Default;\n let _groups: Groups = {} as Groups;\n\n // Variables: Focus Element\n let _element_Focus_Element_PositionStyle: string = Char.empty;\n\n // Variables: Disabled Background\n let _element_Disabled_Background: HTMLElement;\n\n // Variables: Dialog\n let _element_Dialog: HTMLElement;\n let _element_Dialog_Close_Button: HTMLElement;\n let _element_Dialog_Title: HTMLElement;\n let _element_Dialog_Description: HTMLElement;\n let _element_Dialog_CheckBox_Container: HTMLElement;\n let _element_Dialog_CheckBox_Input: HTMLInputElement;\n let _element_Dialog_ProgressDots: HTMLElement;\n let _element_Dialog_ProgressBar: HTMLElement;\n let _element_Dialog_ProgressBar_Percentage: HTMLElement;\n let _element_Dialog_ProgressBar_Percentage_Text: HTMLElement;\n let _element_Dialog_Buttons: HTMLElement;\n let _element_Dialog_Buttons_Back_Button: HTMLInputElement;\n let _element_Dialog_Buttons_Next_Button: HTMLInputElement;\n let _element_Dialog_IsHint: boolean = false;\n\n // Variables: Dialog - Move\n let _element_Dialog_Move_Original_X: number = 0;\n let _element_Dialog_Move_Original_Y: number = 0;\n let _element_Dialog_Move_IsMoving: boolean = false;\n let _element_Dialog_Move_X: number = 0;\n let _element_Dialog_Move_Y: number = 0;\n\n // Variables: Dialog\n let _element_ToolTip: HTMLElement;\n let _element_ToolTip_Timer: number = 0;\n\n\n /*\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n * Groups\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n */\n\n function setupDefaultGroup( groups: any = null ) : void {\n _groups = Data.getDefaultObject( groups, {} as Groups );\n\n _groups[ _groups_Default ] = {\n json: {} as BindingOptions,\n keys: [],\n position: 0\n };\n }\n\n function setupNewGroup( group: string ) : void {\n if ( !_groups.hasOwnProperty( group ) ) {\n _groups[ group ] = {\n json: {} as BindingOptions,\n keys: [],\n position: 0\n };\n }\n }\n\n function getGroupBindingOptions() : BindingOptions {\n return _groups[ _groups_Current ].json[ _groups[ _groups_Current ].keys[ _groups[ _groups_Current ].position ] ];\n }\n\n\n /*\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n * Disabled Background\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n */\n\n function renderDisabledBackground() : void {\n _element_Disabled_Background = DomElement.create( \"div\", \"journey-js-disabled-background\" );\n\n _element_Disabled_Background.onclick = () => {\n if ( _configuration.closeDialogOnDisabledBackgroundClick ) {\n onDialogClose();\n }\n };\n }\n\n function showDisabledBackground() : void {\n DomElement.addNode( document.body, _element_Disabled_Background );\n }\n\n function hideDisabledBackground() : void {\n DomElement.removeNode( document.body, _element_Disabled_Background );\n }\n\n\n /*\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n * Render: Dialog\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n */\n\n function renderDialog() : void {\n _element_Dialog = DomElement.create( \"div\", \"journey-js-dialog\" );\n _element_Dialog.style.display = \"none\";\n document.body.appendChild( _element_Dialog );\n\n _element_Dialog_Close_Button = DomElement.create( \"button\", \"close\" );\n _element_Dialog.appendChild( _element_Dialog_Close_Button );\n\n _element_Dialog_Close_Button.onclick = () => {\n onDialogClose();\n };\n\n addToolTip( _element_Dialog_Close_Button, _configuration.closeButtonToolTipText! );\n\n _element_Dialog_Title = DomElement.create( \"div\", \"title\" );\n _element_Dialog.appendChild( _element_Dialog_Title );\n\n _element_Dialog_Description = DomElement.create( \"div\", \"description\" );\n _element_Dialog.appendChild( _element_Dialog_Description );\n\n _element_Dialog_CheckBox_Container = DomElement.create( \"div\", \"checkbox-container\" );\n _element_Dialog.appendChild( _element_Dialog_CheckBox_Container );\n\n _element_Dialog_CheckBox_Input = DomElement.createCheckBox( _element_Dialog_CheckBox_Container, _configuration.doNotShowAgainText! );\n \n _element_Dialog_CheckBox_Input.onchange = () => {\n if ( _configuration.showDoNotShowAgain ) {\n fireCustomTriggerEvent( _configuration.onDoNotShowAgainChange, _element_Dialog_CheckBox_Input.checked );\n }\n };\n\n _element_Dialog_ProgressDots = DomElement.create( \"div\", \"progress-dots\" );\n _element_Dialog.appendChild( _element_Dialog_ProgressDots );\n\n _element_Dialog_ProgressBar = DomElement.create( \"div\", \"progress-bar\" );\n _element_Dialog.appendChild( _element_Dialog_ProgressBar );\n\n _element_Dialog_ProgressBar_Percentage = DomElement.create( \"div\", \"progress-bar-percentage\" );\n _element_Dialog_ProgressBar.appendChild( _element_Dialog_ProgressBar_Percentage );\n\n _element_Dialog_ProgressBar_Percentage_Text = DomElement.create( \"p\", \"progress-bar-percentage-text\" );\n _element_Dialog_ProgressBar_Percentage.appendChild( _element_Dialog_ProgressBar_Percentage_Text );\n\n _element_Dialog_Buttons = DomElement.create( \"div\", \"buttons\" );\n _element_Dialog.appendChild( _element_Dialog_Buttons );\n\n _element_Dialog_Buttons_Back_Button = DomElement.create( \"button\", \"back\" ) as HTMLInputElement;\n _element_Dialog_Buttons_Back_Button.onclick = onDialogBack;\n _element_Dialog_Buttons.appendChild( _element_Dialog_Buttons_Back_Button );\n\n _element_Dialog_Buttons_Next_Button = DomElement.create( \"button\", \"next\" ) as HTMLInputElement;\n _element_Dialog_Buttons_Next_Button.onclick = onDialogNext;\n _element_Dialog_Buttons.appendChild( _element_Dialog_Buttons_Next_Button );\n\n makeDialogMovable();\n }\n\n function onDialogClose( showConfirmationBox: boolean = true ) : void {\n let confirmed: boolean = false;\n\n if ( Is.definedString( _configuration.closeDialogConfirmationText ) && showConfirmationBox ) {\n confirmed = confirm( _configuration.closeDialogConfirmationText );\n } else {\n confirmed = true;\n }\n\n if ( confirmed ) {\n const bindingOptions: BindingOptions = getGroupBindingOptions();\n\n if ( Is.defined( bindingOptions ) && Is.defined( bindingOptions._currentView.element ) ) {\n fireCustomTriggerEvent( bindingOptions.events!.onClose!, bindingOptions._currentView.element );\n }\n \n removeFocusClassFromLastElement( false );\n hideDisabledBackground();\n hideToolTip();\n \n _element_Dialog.style.display = \"none\";\n }\n }\n\n function onDialogBack() : void {\n if ( _groups[ _groups_Current ].position > 0 ) {\n removeFocusClassFromLastElement();\n\n _groups[ _groups_Current ].position--;\n\n showDialogAndSetPosition();\n } \n }\n\n function onDialogNext() : void {\n if ( _groups[ _groups_Current ].position === _groups[ _groups_Current ].keys.length - 1 ) {\n const bindingOptions: BindingOptions = getGroupBindingOptions();\n\n onDialogClose( false );\n fireCustomTriggerEvent( bindingOptions.events!.onFinish, bindingOptions._currentView.element );\n\n } else {\n removeFocusClassFromLastElement();\n\n _groups[ _groups_Current ].position++;\n\n showDialogAndSetPosition();\n }\n }\n\n function showDialogAndSetPosition() : void {\n const bindingOptions: BindingOptions = getGroupBindingOptions();\n\n if ( Is.defined( bindingOptions ) && Is.defined( bindingOptions._currentView.element ) ) {\n if ( bindingOptions.showDisabledBackground ) {\n showDisabledBackground();\n } else {\n hideDisabledBackground();\n }\n\n hideToolTip();\n \n _element_Dialog_Close_Button.style.display = _configuration.showCloseButton ? \"block\": \"none\";\n _configuration_ShortcutKeysEnabled = true;\n \n bindingOptions._currentView.element.className += Char.space + \"journey-js-element-focus\";\n\n if ( _configuration.scrollToElements ) {\n bindingOptions._currentView.element.scrollIntoView();\n }\n\n const lastPositionStyle: string = DomElement.getStyleValueByName( bindingOptions._currentView.element, \"position\" );\n\n if ( lastPositionStyle !== Char.empty && lastPositionStyle.toLowerCase() === \"static\" ) {\n _element_Focus_Element_PositionStyle = lastPositionStyle;\n bindingOptions._currentView.element.style.position = \"relative\";\n }\n\n DomElement.showElementBasedOnCondition( _element_Dialog_CheckBox_Container, _configuration.showDoNotShowAgain as boolean );\n DomElement.showElementBasedOnCondition( _element_Dialog_ProgressDots, _configuration.showProgressDots as boolean && _groups[ _groups_Current ].keys.length > 1 );\n DomElement.showElementBasedOnCondition( _element_Dialog_ProgressBar, _configuration.showProgressBar as boolean && _groups[ _groups_Current ].keys.length > 1 );\n DomElement.showElementBasedOnCondition( _element_Dialog_ProgressBar_Percentage_Text, _configuration.showProgressBarText as boolean );\n DomElement.showElementBasedOnCondition( _element_Dialog_Buttons, _configuration.showButtons as boolean );\n\n _element_Dialog_Buttons_Back_Button.innerHTML = _configuration.backButtonText!;\n _element_Dialog_Buttons_Back_Button.disabled = _groups[ _groups_Current ].position === 0;\n \n if ( _groups[ _groups_Current ].position >= _groups[ _groups_Current ].keys.length - 1 ) {\n _element_Dialog_Buttons_Next_Button.innerHTML = _configuration.finishButtonText!;\n } else {\n _element_Dialog_Buttons_Next_Button.innerHTML = _configuration.nextButtonText!;\n }\n\n setDialogText( bindingOptions );\n setDialogPosition( null, bindingOptions );\n buildProcessDots();\n setProgressBarPosition();\n fireCustomTriggerEvent( bindingOptions.events!.onEnter, bindingOptions._currentView.element );\n\n if ( bindingOptions.sendClick ) {\n bindingOptions._currentView.element.click();\n }\n }\n }\n\n function setDialogText( bindingOptions: BindingOptions ) : void {\n if ( Is.definedString( bindingOptions.title ) ) {\n _element_Dialog_Title.innerHTML = bindingOptions.title!;\n } else {\n _element_Dialog_Title.innerHTML = Char.empty;\n }\n\n if ( Is.definedString( bindingOptions.description ) ) {\n _element_Dialog_Description.innerHTML = bindingOptions.description!;\n } else {\n _element_Dialog_Description.innerHTML = Char.empty;\n }\n }\n\n function setDialogPosition( e: any, bindingOptions: BindingOptions ) : void {\n if ( _element_Dialog.style.display !== \"block\" ) {\n _element_Dialog.style.display = \"block\";\n\n fireCustomTriggerEvent( bindingOptions.events!.onOpen, bindingOptions._currentView.element );\n }\n\n if ( _groups[ _groups_Current ].position === 0 ) {\n fireCustomTriggerEvent( bindingOptions.events!.onStart, bindingOptions._currentView.element );\n }\n\n _element_Dialog_IsHint = bindingOptions.isHint === true;\n\n if ( bindingOptions.attach || bindingOptions.isHint ) {\n if ( bindingOptions.isHint && bindingOptions.alignHintToClickPosition ) {\n DomElement.showElementAtMousePosition( e, _element_Dialog );\n\n } else {\n const offset: Position = DomElement.getOffset( bindingOptions._currentView.element );\n let top: number = ( offset.top ) + bindingOptions._currentView.element.offsetHeight;\n let left: number = ( offset.left );\n\n if ( left + _element_Dialog.offsetWidth > window.innerWidth || bindingOptions.alignRight ) {\n left -= _element_Dialog.offsetWidth;\n left += bindingOptions._currentView.element.offsetWidth;\n }\n \n if ( top + _element_Dialog.offsetHeight > window.innerHeight || bindingOptions.alignTop ) {\n top -= ( _element_Dialog.offsetHeight + bindingOptions._currentView.element.offsetHeight );\n }\n\n _element_Dialog.style.top = top + \"px\";\n _element_Dialog.style.left = left + \"px\";\n }\n\n } else {\n const scrollPosition: Position = DomElement.getScrollPosition();\n const centerLeft: number = Math.max( 0, ( ( window.innerWidth - _element_Dialog.offsetWidth ) / 2 ) + scrollPosition.left );\n const centerTop: number = Math.max( 0, ( ( window.innerHeight - _element_Dialog.offsetHeight ) / 2 ) + scrollPosition.top );\n\n _element_Dialog.style.left = centerLeft + \"px\";\n _element_Dialog.style.top = centerTop + \"px\";\n }\n }\n\n function removeFocusClassFromLastElement( callCustomTrigger: boolean = true ) : void {\n const bindingOptions: BindingOptions = getGroupBindingOptions();\n\n if ( Is.defined( bindingOptions ) && Is.defined( bindingOptions._currentView.element ) ) {\n bindingOptions._currentView.element.className = bindingOptions._currentView.element.className.replace( Char.space + \"journey-js-element-focus\", Char.empty );\n\n if ( Is.defined( _element_Focus_Element_PositionStyle ) ) {\n bindingOptions._currentView.element.style.position = _element_Focus_Element_PositionStyle;\n }\n\n if ( callCustomTrigger ) {\n fireCustomTriggerEvent( bindingOptions.events!.onLeave, bindingOptions._currentView.element );\n }\n }\n }\n\n function buildProcessDots() : void {\n _element_Dialog_ProgressDots.innerHTML = Char.empty;\n\n if ( _configuration.showProgressDots ) {\n const keysLength: number = _groups[ _groups_Current ].keys.length;\n\n for ( let keyIndex: number = 0; keyIndex < keysLength; keyIndex++ ) {\n buildProgressDot( keyIndex, _groups[ _groups_Current ].keys[ keyIndex ] );\n }\n }\n }\n\n function buildProgressDot( keyIndex: number, order: number ) : void {\n const bindingOptions: BindingOptions = _groups[ _groups_Current ].json[ order ];\n let dot: HTMLElement;\n\n if ( keyIndex === _groups[ _groups_Current ].position ) {\n dot = DomElement.create( \"div\", \"dot-active\" );\n } else {\n \n dot = DomElement.create( \"div\", \"dot\" );\n \n dot.onclick = () => {\n removeFocusClassFromLastElement();\n\n _groups[ _groups_Current ].position = keyIndex;\n\n showDialogAndSetPosition();\n };\n }\n\n _element_Dialog_ProgressDots.appendChild( dot );\n\n if ( _configuration.showProgressDotToolTips ) {\n if ( Is.definedString( bindingOptions.tooltip ) ) {\n addToolTip( dot, bindingOptions.tooltip! );\n } else {\n addToolTip( dot, bindingOptions.title! );\n }\n }\n\n if ( _configuration.showProgressDotNumbers ) {\n dot.className += \" dot-number\";\n dot.innerHTML = ( keyIndex + 1 ).toString();\n }\n }\n\n function setProgressBarPosition() : void {\n if ( _configuration.showProgressBar ) {\n const pixelsPerStage: number = _element_Dialog_ProgressBar.offsetWidth / _groups[ _groups_Current ].keys.length;\n const width: number = ( _groups[ _groups_Current ].position + 1 ) * pixelsPerStage;\n const percentageComplete: number = Math.ceil( ( ( _groups[ _groups_Current ].position + 1 ) / _groups[ _groups_Current ].keys.length ) * 100 );\n\n _element_Dialog_ProgressBar_Percentage.style.width = width + \"px\";\n _element_Dialog_ProgressBar_Percentage_Text.innerHTML = percentageComplete + \"%\";\n }\n }\n\n\n /*\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n * Render: Dialog - Move\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n */\n\n function makeDialogMovable() : void {\n _element_Dialog_Title.onmousedown = onMoveTitleBarMouseDown;\n _element_Dialog_Title.onmouseup = onMoveTitleBarMouseUp;\n _element_Dialog_Title.oncontextmenu = onMoveTitleBarMouseUp;\n\n document.body.addEventListener( \"mousemove\", onMoveDocumentMouseMove );\n document.body.addEventListener( \"mouseleave\", onMoveDocumentMouseLeave );\n }\n\n function onMoveTitleBarMouseDown( e: MouseEvent ) : void {\n if ( !_element_Dialog_Move_IsMoving && !_element_Dialog_IsHint && _configuration.dialogMovingEnabled ) {\n _element_Dialog.className += \" journey-js-dialog-moving\";\n _element_Dialog_Move_IsMoving = true;\n _element_Dialog_Move_X = e.pageX - _element_Dialog.offsetLeft;\n _element_Dialog_Move_Y = e.pageY - _element_Dialog.offsetTop;\n _element_Dialog_Move_Original_X = _element_Dialog.offsetLeft;\n _element_Dialog_Move_Original_Y = _element_Dialog.offsetTop;\n }\n }\n\n function onMoveTitleBarMouseUp() : void {\n if ( _element_Dialog_Move_IsMoving ) {\n _element_Dialog_Move_IsMoving = false;\n _element_Dialog_Move_Original_X = 0;\n _element_Dialog_Move_Original_Y = 0;\n _element_Dialog.className = \"journey-js-dialog\";\n }\n }\n\n function onMoveDocumentMouseMove( e: MouseEvent ) : void {\n if ( _element_Dialog_Move_IsMoving ) {\n _element_Dialog.style.left = ( e.pageX - _element_Dialog_Move_X ) + \"px\";\n _element_Dialog.style.top = ( e.pageY - _element_Dialog_Move_Y ) + \"px\";\n }\n }\n\n function onMoveDocumentMouseLeave() : void {\n if ( _element_Dialog_Move_IsMoving ) {\n _element_Dialog.style.left = _element_Dialog_Move_Original_X + \"px\";\n _element_Dialog.style.top = _element_Dialog_Move_Original_Y + \"px\";\n\n _element_Dialog_Move_IsMoving = false;\n _element_Dialog_Move_Original_X = 0;\n _element_Dialog_Move_Original_Y = 0;\n _element_Dialog.className = \"journey-js-dialog\";\n }\n }\n\n\n /*\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n * Render: ToolTip\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n */\n\n function renderToolTip() : void {\n if ( !Is.defined( _element_ToolTip ) ) {\n _element_ToolTip = DomElement.create( \"div\", \"journey-js-tooltip\" );\n _element_ToolTip.style.display = \"none\";\n\n document.body.appendChild( _element_ToolTip );\n \n document.body.addEventListener( \"mousemove\", () => {\n hideToolTip();\n } );\n \n document.addEventListener( \"scroll\", () => {\n hideToolTip();\n } );\n }\n }\n\n function addToolTip( element: HTMLElement, text: string ) : void {\n if ( element !== null ) {\n element.onmousemove = ( e: MouseEvent ) => {\n showToolTip( e, text );\n };\n }\n }\n\n function showToolTip( e: any, text: string ) : void {\n DomElement.cancelBubble( e );\n hideToolTip();\n\n _element_ToolTip_Timer = setTimeout( () => {\n _element_ToolTip.innerHTML = text;\n _element_ToolTip.style.display = \"block\";\n\n DomElement.showElementAtMousePosition( e, _element_ToolTip );\n }, _configuration.tooltipDelay );\n }\n\n function hideToolTip() : void {\n if ( Is.defined( _element_ToolTip ) ) {\n if ( _element_ToolTip_Timer !== 0 ) {\n clearTimeout( _element_ToolTip_Timer );\n _element_ToolTip_Timer = 0;\n }\n \n if ( _element_ToolTip.style.display === \"block\" ) {\n _element_ToolTip.style.display = \"none\";\n }\n }\n }\n\n\n /*\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n * Rendering\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n */\n\n function getElements() : void {\n const tagTypes: string[] = _configuration.domElementTypes as string[];\n const tagTypesLength: number = tagTypes.length;\n\n for ( let tagTypeIndex: number = 0; tagTypeIndex < tagTypesLength; tagTypeIndex++ ) {\n const domElements: HTMLCollectionOf = document.getElementsByTagName( tagTypes[ tagTypeIndex ] );\n const elements: HTMLElement[] = [].slice.call( domElements );\n const elementsLength: number = elements.length;\n\n for ( let elementIndex: number = 0; elementIndex < elementsLength; elementIndex++ ) {\n if ( !getElement( elements[ elementIndex ] ) ) {\n break;\n }\n }\n }\n\n _groups[ _groups_Current ].keys.sort();\n }\n\n function getElement( element: HTMLElement ) : boolean {\n let result: boolean = true;\n\n if ( Is.defined( element ) && element.hasAttribute( Constants.JOURNEY_JS_ATTRIBUTE_NAME ) ) {\n const bindingOptionsData: string = element.getAttribute( Constants.JOURNEY_JS_ATTRIBUTE_NAME )!;\n\n if ( Is.definedString( bindingOptionsData ) ) {\n const bindingOptions: StringToJson = getObjectFromString( bindingOptionsData );\n\n if ( bindingOptions.parsed && Is.definedObject( bindingOptions.object ) ) {\n setupElement( element, buildAttributeOptions( bindingOptions.object ) );\n\n } else {\n if ( !_configuration.safeMode ) {\n console.error( _configuration.attributeNotValidErrorText!.replace( \"{{attribute_name}}\", Constants.JOURNEY_JS_ATTRIBUTE_NAME ) );\n result = false;\n }\n }\n\n } else {\n if ( !_configuration.safeMode ) {\n console.error( _configuration.attributeNotSetErrorText!.replace( \"{{attribute_name}}\", Constants.JOURNEY_JS_ATTRIBUTE_NAME ) );\n result = false;\n }\n }\n }\n\n return result;\n }\n\n function setupElement( element: HTMLElement, bindingOptions: BindingOptions ) : void {\n bindingOptions._currentView = {} as CurrentView;\n bindingOptions._currentView.element = element;\n\n if ( Is.definedNumber( bindingOptions.order ) && ( Is.definedString( bindingOptions.title ) || Is.definedString( bindingOptions.description ) ) ) {\n element.removeAttribute( Constants.JOURNEY_JS_ATTRIBUTE_NAME );\n \n if ( !bindingOptions.isHint ) {\n setupNewGroup( bindingOptions.group! );\n\n _groups[ bindingOptions.group! ].json[ bindingOptions.order! ] = bindingOptions;\n _groups[ bindingOptions.group! ].keys.push( bindingOptions.order! );\n\n fireCustomTriggerEvent( bindingOptions.events!.onAddStep, element );\n\n } else {\n renderHint( bindingOptions );\n }\n }\n }\n\n function renderHint( bindingOptions: BindingOptions ) : void {\n const positionStyle: string = DomElement.getStyleValueByName( bindingOptions._currentView.element, \"position\" );\n\n if ( positionStyle !== Char.empty && positionStyle.toLowerCase() === \"static\" ) {\n bindingOptions._currentView.element.style.position = \"relative\";\n }\n\n const hint: HTMLElement = DomElement.create( \"div\", \"journey-js-hint\" );\n bindingOptions._currentView.element.appendChild( hint );\n\n hint.onclick = ( e: MouseEvent ) => {\n DomElement.cancelBubble( e );\n\n _element_Dialog_CheckBox_Container.style.display = \"none\";\n _element_Dialog_ProgressDots.style.display = \"none\";\n _element_Dialog_ProgressBar.style.display = \"none\";\n _element_Dialog_Buttons.style.display = \"none\";\n _configuration_ShortcutKeysEnabled = false;\n\n setDialogText( bindingOptions );\n setDialogPosition( e, bindingOptions );\n\n if ( bindingOptions.removeHintWhenViewed ) {\n DomElement.clearElementsByClassName( bindingOptions._currentView.element, \"journey-js-hint\" );\n }\n };\n }\n\n\n /*\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n * Document Events\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n */\n\n function buildDocumentEvents( addEvents: boolean = true ) : void {\n const documentFunc: Function = addEvents ? document.addEventListener : document.removeEventListener;\n const windowFunc: Function = addEvents ? window.addEventListener : window.removeEventListener;\n\n if ( _configuration.shortcutKeysEnabled ) {\n documentFunc( \"keydown\", onWindowKeyDown );\n }\n\n windowFunc( \"resize\", onWindowResize );\n }\n\n function onWindowKeyDown( e: KeyboardEvent ) : void {\n if ( _public.isOpen() && _configuration.shortcutKeysEnabled ) {\n if ( e.code === KeyCode.escape ) {\n e.preventDefault();\n onDialogClose();\n } else {\n\n if ( _configuration_ShortcutKeysEnabled ) {\n if ( e.code === KeyCode.left ) {\n e.preventDefault();\n onDialogBack();\n \n } else if ( e.code === KeyCode.right ) {\n e.preventDefault();\n onDialogNext();\n \n } else if ( e.code === KeyCode.up ) {\n e.preventDefault();\n onWindowKeyCodeUp();\n \n } else if ( e.code === KeyCode.down ) {\n e.preventDefault();\n onWindowKeyCodeDown();\n }\n }\n }\n }\n }\n\n function onWindowResize() : void {\n if ( _public.isOpen() ) {\n showDialogAndSetPosition();\n }\n }\n\n function onWindowKeyCodeUp() : void {\n if ( _groups[ _groups_Current ].position !== 0 ) {\n removeFocusClassFromLastElement();\n\n _groups[ _groups_Current ].position = 0;\n \n showDialogAndSetPosition();\n }\n }\n\n function onWindowKeyCodeDown() : void {\n if ( _groups[ _groups_Current ].position !== _groups[ _groups_Current ].keys.length - 1 ) {\n removeFocusClassFromLastElement();\n\n _groups[ _groups_Current ].position = _groups[ _groups_Current ].keys.length - 1;\n \n showDialogAndSetPosition();\n }\n }\n\n\n /*\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n * Options\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n */\n\n function buildAttributeOptions( newOptions: any ) {\n let options: BindingOptions = Data.getDefaultObject( newOptions, {} as BindingOptions );\n options.order = Data.getDefaultNumber( options.order, 0 );\n options.attach = Data.getDefaultBoolean( options.attach, true );\n options.sendClick = Data.getDefaultBoolean( options.sendClick, false );\n options.alignTop = Data.getDefaultBoolean( options.alignTop, false );\n options.alignRight = Data.getDefaultBoolean( options.alignRight, false );\n options.isHint = Data.getDefaultBoolean( options.isHint, false );\n options.alignHintToClickPosition = Data.getDefaultBoolean( options.alignHintToClickPosition, false );\n options.showDisabledBackground = Data.getDefaultBoolean( options.showDisabledBackground, true );\n options.removeHintWhenViewed = Data.getDefaultBoolean( options.removeHintWhenViewed, false );\n options.group = Data.getDefaultString( options.group, _groups_Default );\n\n options = buildAttributeOptionStrings( options );\n\n return buildAttributeOptionCustomTriggers( options );\n }\n\n function buildAttributeOptionStrings( options: BindingOptions ) : BindingOptions {\n options.title = Data.getDefaultString( options.title, Char.empty );\n options.description = Data.getDefaultString( options.description, Char.empty );\n options.tooltip = Data.getDefaultString( options.tooltip, Char.empty );\n\n return options;\n }\n\n function buildAttributeOptionCustomTriggers( options: BindingOptions ) : BindingOptions {\n options.events = Data.getDefaultObject( options.events, {} as Events );\n options.events!.onEnter = Data.getDefaultFunction( options.events!.onEnter, null );\n options.events!.onLeave = Data.getDefaultFunction( options.events!.onLeave, null );\n options.events!.onClose = Data.getDefaultFunction( options.events!.onClose, null );\n options.events!.onFinish = Data.getDefaultFunction( options.events!.onFinish, null );\n options.events!.onOpen = Data.getDefaultFunction( options.events!.onOpen, null );\n options.events!.onStart = Data.getDefaultFunction( options.events!.onStart, null );\n options.events!.onAddStep = Data.getDefaultFunction( options.events!.onAddStep, null );\n options.events!.onRemoveStep = Data.getDefaultFunction( options.events!.onRemoveStep, null );\n\n return options;\n }\n\n\n /*\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n * Triggering Custom Events\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n */\n\n function fireCustomTriggerEvent( triggerFunction: any, ...args : any[] ) : void {\n if ( Is.definedFunction( triggerFunction ) ) {\n triggerFunction.apply( null, [].slice.call( args, 0 ) );\n }\n }\n\n\n /*\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n * Browser URL Parameters\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n */\n\n function getBrowserUrlParameters() : boolean {\n let show: boolean = false;\n\n if ( _configuration.browserUrlParametersEnabled ) {\n const url: string = window.location.href;\n const urlArguments: any = getBrowserUrlArguments( url );\n\n if ( Is.defined( urlArguments.sjOrderId ) ) {\n const orderId: number = parseInt( urlArguments.sjOrderId, 10 );\n\n if ( !isNaN( orderId ) && orderId <= _groups[ _groups_Current ].keys.length - 1 ) {\n _groups[ _groups_Current ].position = orderId;\n }\n }\n\n if ( Is.defined( urlArguments.sjShow ) ) {\n show = urlArguments.sjShow === \"true\";\n }\n }\n\n return show;\n }\n\n function getBrowserUrlArguments( url: string ) : any {\n const urlArguments: any = {};\n const urlDataParts: string[] = url.split( \"?\" );\n\n if ( urlDataParts.length > 1 ) {\n const parsedArgs: string[] = urlDataParts[ 1 ].split( \"&\" );\n const parsedArgsLength: number = parsedArgs.length;\n\n for ( let parsedArgsIndex: number = 0; parsedArgsIndex < parsedArgsLength; parsedArgsIndex++ ) {\n const parsedArg: string[] = parsedArgs[ parsedArgsIndex ].split( \"=\" );\n\n urlArguments[ parsedArg[ 0 ] ] = parsedArg[ 1 ];\n }\n }\n\n return urlArguments;\n }\n\n\n /*\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n * Default Parameter/Option Handling\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n */\n\n function getObjectFromString( objectString: any ) : StringToJson {\n const result: StringToJson = {\n parsed: true,\n object: null\n } as StringToJson;\n\n try {\n if ( Is.definedString( objectString ) ) {\n result.object = JSON.parse( objectString );\n }\n\n } catch ( e1: any ) {\n try {\n result.object = eval( \"(\" + objectString + \")\" );\n\n if ( Is.definedFunction( result.object ) ) {\n result.object = result.object();\n }\n \n } catch ( e2: any ) {\n if ( !_configuration.safeMode ) {\n console.error( _configuration.objectErrorText!.replace( \"{{error_1}}\", e1.message ).replace( \"{{error_2}}\", e2.message ) );\n result.parsed = false;\n }\n \n result.object = null;\n }\n }\n\n return result;\n }\n\n\n\t/*\n\t * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n\t * Public API Functions: Helpers: Managing Steps\n\t * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n\t */\n\n function resetDialogPosition() : void {\n if ( _public.isOpen() ) {\n onDialogClose( false );\n\n _groups[ _groups_Current ].position = 0;\n }\n }\n\n\n\t/*\n\t * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n\t * Public API Functions: Helpers: Configuration\n\t * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n\t */\n\n function buildDefaultConfiguration( newConfiguration: Configuration = {} ) : void {\n _configuration = Data.getDefaultObject( newConfiguration, {} as Configuration );\n _configuration.safeMode = Data.getDefaultBoolean( _configuration.safeMode, true );\n _configuration.domElementTypes = Data.getDefaultStringOrArray( _configuration.domElementTypes, [ \"*\" ] );\n _configuration.showCloseButton = Data.getDefaultBoolean( _configuration.showCloseButton, true );\n _configuration.shortcutKeysEnabled = Data.getDefaultBoolean( _configuration.shortcutKeysEnabled, true );\n _configuration.showProgressDots = Data.getDefaultBoolean( _configuration.showProgressDots, true );\n _configuration.browserUrlParametersEnabled = Data.getDefaultBoolean( _configuration.browserUrlParametersEnabled, true );\n _configuration.showProgressDotNumbers = Data.getDefaultBoolean( _configuration.showProgressDotNumbers, false );\n _configuration.showButtons = Data.getDefaultBoolean( _configuration.showButtons, true );\n _configuration.showDoNotShowAgain = Data.getDefaultBoolean( _configuration.showDoNotShowAgain, false );\n _configuration.tooltipDelay = Data.getDefaultNumber( _configuration.tooltipDelay, 750 );\n _configuration.showProgressDotToolTips = Data.getDefaultBoolean( _configuration.showProgressDotToolTips, true );\n _configuration.closeDialogOnDisabledBackgroundClick = Data.getDefaultBoolean( _configuration.closeDialogOnDisabledBackgroundClick, false );\n _configuration.showProgressBar = Data.getDefaultBoolean( _configuration.showProgressBar, false );\n _configuration.scrollToElements = Data.getDefaultBoolean( _configuration.scrollToElements, false );\n _configuration.dialogMovingEnabled = Data.getDefaultBoolean( _configuration.dialogMovingEnabled, false );\n _configuration.showProgressBarText = Data.getDefaultBoolean( _configuration.showProgressBarText, false );\n\n buildDefaultConfigurationStrings();\n buildDefaultConfigurationCustomTriggers();\n }\n\n function buildDefaultConfigurationStrings() : void {\n _configuration.backButtonText = Data.getDefaultAnyString( _configuration.backButtonText, \"Back\" );\n _configuration.nextButtonText = Data.getDefaultAnyString( _configuration.nextButtonText, \"Next\" );\n _configuration.finishButtonText = Data.getDefaultAnyString( _configuration.finishButtonText, \"Finish\" );\n _configuration.closeButtonToolTipText = Data.getDefaultAnyString( _configuration.closeButtonToolTipText, \"Close\" );\n _configuration.doNotShowAgainText = Data.getDefaultAnyString( _configuration.doNotShowAgainText, \"Do not show again\" );\n _configuration.objectErrorText = Data.getDefaultAnyString( _configuration.objectErrorText, \"Errors in object: {{error_1}}, {{error_2}}\" );\n _configuration.attributeNotValidErrorText = Data.getDefaultAnyString( _configuration.attributeNotValidErrorText, \"The attribute '{{attribute_name}}' is not a valid object.\" );\n _configuration.attributeNotSetErrorText = Data.getDefaultAnyString( _configuration.attributeNotSetErrorText, \"The attribute '{{attribute_name}}' has not been set correctly.\" );\n _configuration.closeDialogConfirmationText = Data.getDefaultAnyString( _configuration.closeDialogConfirmationText, Char.empty );\n }\n\n function buildDefaultConfigurationCustomTriggers() : void {\n _configuration.onDoNotShowAgainChange = Data.getDefaultFunction( _configuration.onDoNotShowAgainChange, null );\n }\n\n\n\t/*\n\t * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n\t * Public API Functions:\n\t * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n\t */\n\n const _public: PublicApi = {\n /*\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n * Public API Functions: Show/Hide\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n */\n\n start: function ( group: string = Char.empty ) : PublicApi {\n if ( !_public.isOpen() ) {\n _groups_Current = Data.getDefaultString( group, _groups_Default );\n \n if ( _groups.hasOwnProperty( _groups_Current ) ) {\n _groups[ _groups_Current ].position = 0;\n \n showDialogAndSetPosition();\n }\n }\n \n return _public;\n },\n\n show: function ( group: string = Char.empty ) : PublicApi {\n if ( !_public.isOpen() ) {\n _groups_Current = Data.getDefaultString( group, _groups_Current );\n \n if ( _groups.hasOwnProperty( _groups_Current ) ) {\n if ( _groups[ _groups_Current ].position === _groups[ _groups_Current ].keys.length - 1 ) {\n _groups[ _groups_Current ].position = 0;\n }\n \n showDialogAndSetPosition();\n }\n }\n \n return _public;\n },\n\n hide: function () : PublicApi {\n if ( _public.isOpen() ) {\n onDialogClose();\n }\n \n return _public;\n },\n\n isOpen: function () : boolean {\n return Is.defined( _element_Dialog ) && _element_Dialog.style.display === \"block\";\n },\n\n isComplete: function () : boolean {\n return _groups[ _groups_Current ].position >= _groups[ _groups_Current ].keys.length - 1;\n },\n\n\n /*\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n * Public API Functions: Managing Steps\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n */\n\n addDocumentSteps: function () : PublicApi {\n getElements();\n\n return _public;\n },\n\n addStep: function ( element: HTMLElement, options: BindingOptions ) : PublicApi {\n if ( Is.definedObject( element ) && Is.definedObject( options ) ) {\n setupElement( element, buildAttributeOptions( options ) );\n \n _groups[ _groups_Current ].keys.sort();\n \n resetDialogPosition();\n }\n \n return _public;\n },\n\n removeStep: function ( element: HTMLElement ) : PublicApi {\n if ( Is.definedObject( element ) ) {\n let removed: boolean = false;\n \n for ( let group in _groups ) {\n if ( _groups.hasOwnProperty( group ) ) {\n for ( let order in _groups[ group ].json ) {\n if ( _groups[ group ].json.hasOwnProperty( order ) ) {\n const bindingOptions: BindingOptions = _groups[ group ].json[ order ];\n \n if ( bindingOptions._currentView.element === element ) {\n fireCustomTriggerEvent( bindingOptions.events!.onRemoveStep, bindingOptions._currentView.element );\n \n _groups[ group ].keys.splice( _groups[ group ].keys.indexOf( bindingOptions.order! ), 1 );\n \n delete _groups[ group ].json[ bindingOptions.order! ];\n \n _groups[ group ].keys.sort();\n \n removed = true;\n break;\n }\n }\n }\n }\n }\n \n if ( !removed ) {\n DomElement.clearElementsByClassName( element, \"journey-js-hint\" );\n } else {\n resetDialogPosition();\n }\n }\n \n return _public;\n },\n\n clearSteps: function ( group: string = Char.empty ) : PublicApi {\n resetDialogPosition();\n\n for ( let groupName in _groups ) {\n if ( _groups.hasOwnProperty( groupName ) ) {\n if ( !Is.definedString( group ) || group === groupName ) {\n for ( let order in _groups[ groupName ].json ) {\n if ( _groups[ groupName ].json.hasOwnProperty( order ) ) {\n const bindingOptions: BindingOptions = _groups[ groupName ].json[ order ];\n \n fireCustomTriggerEvent( bindingOptions.events!.onRemoveStep, bindingOptions._currentView.element );\n }\n }\n }\n }\n }\n \n if ( Is.definedString( group ) ) {\n if ( _groups.hasOwnProperty( group ) ) {\n delete _groups[ group ];\n }\n \n } else {\n _groups = {} as Groups;\n }\n \n if ( !Is.definedString( group ) || group === _groups_Default ) {\n setupDefaultGroup( _groups );\n }\n \n return _public;\n },\n\n clearHints: function () : PublicApi {\n DomElement.clearElementsByClassName( document.body, \"journey-js-hint\" );\n\n return _public;\n },\n\n reverseStepOrder: function () : PublicApi {\n _groups[ _groups_Current ].keys.reverse();\n\n resetDialogPosition();\n \n return _public;\n },\n\n\n /*\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n * Public API Functions: Configuration\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n */\n\n setConfiguration: function ( newConfiguration: any ) : PublicApi {\n if ( Is.definedObject( newConfiguration ) ) {\n let configurationHasChanged: boolean = false;\n const newInternalConfiguration: any = _configuration;\n\n for ( let propertyName in newConfiguration ) {\n if ( newConfiguration.hasOwnProperty( propertyName ) && _configuration.hasOwnProperty( propertyName ) && newInternalConfiguration[ propertyName ] !== newConfiguration[ propertyName ] ) {\n newInternalConfiguration[ propertyName ] = newConfiguration[ propertyName ];\n configurationHasChanged = true;\n }\n }\n \n if ( configurationHasChanged ) {\n buildDefaultConfiguration( newInternalConfiguration );\n }\n }\n \n return _public;\n },\n\n\n /*\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n * Public API Functions: Additional Data\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n */\n\n getVersion: function (): string {\n return \"2.0.0\";\n }\n };\n\n\n /*\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n * Initialize Journey.js\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n */\n\n ( () => {\n buildDefaultConfiguration();\n\n document.addEventListener( \"DOMContentLoaded\", () => {\n setupDefaultGroup();\n renderDisabledBackground();\n renderDialog();\n renderToolTip();\n getElements();\n buildDocumentEvents();\n\n if ( getBrowserUrlParameters() ) {\n _public.show();\n }\n } );\n\n if ( !Is.defined( window.$journey ) ) {\n window.$journey = _public;\n }\n } ) ();\n} ) ();"]} \ No newline at end of file diff --git a/dist/journey.export.js b/dist/journey.export.js deleted file mode 100644 index 7c5118e..0000000 --- a/dist/journey.export.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! Journey.js v1.7.2 | (c) Bunoon 2024 | MIT License */ -var journey = {js:function() { - return window.$journey; -}}; -Object.assign(window, {journey}); -export{journey}; \ No newline at end of file diff --git a/dist/journey.export.min.js b/dist/journey.export.min.js deleted file mode 100644 index c765481..0000000 --- a/dist/journey.export.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! Journey.js v1.7.2 | (c) Bunoon 2024 | MIT License */ -var journey={js:function(){return window.$journey}};Object.assign(window,{journey});export{journey}; \ No newline at end of file diff --git a/dist/journey.js b/dist/journey.js index 86b83c5..ecbbe9f 100644 --- a/dist/journey.js +++ b/dist/journey.js @@ -1,885 +1,992 @@ -/*! Journey.js v1.7.2 | (c) Bunoon 2024 | MIT License */ -(function() { - var _parameter_Document = null, _parameter_Window = null, _parameter_Math = null, _parameter_Json = null, _public = {}, _configuration = {}, _configuration_ShortcutKeysEnabled = true, _enum_KeyCodes = {escape:27, left:37, up:38, right:39, down:40}, _string = {empty:"", space:" "}, _elements_Type = {}, _groups_Default = "default", _groups_Current = _groups_Default, _groups = {}, _element_Focus_Element_PositionStyle = null, _element_Disabled_Background = null, _element_Dialog = null, _element_Dialog_Close_Button = - null, _element_Dialog_Title = null, _element_Dialog_Description = null, _element_Dialog_CheckBox_Container = null, _element_Dialog_CheckBox_Input = null, _element_Dialog_ProgressDots = null, _element_Dialog_ProgressBar = null, _element_Dialog_ProgressBar_Percentage = null, _element_Dialog_ProgressBar_Percentage_Text = null, _element_Dialog_Buttons = null, _element_Dialog_Buttons_Back_Button = null, _element_Dialog_Buttons_Next_Button = null, _element_Dialog_IsHint = false, _element_Dialog_Move_Original_X = - 0, _element_Dialog_Move_Original_Y = 0, _element_Dialog_Move_IsMoving = false, _element_Dialog_Move_X = 0, _element_Dialog_Move_Y = 0, _element_ToolTip = null, _element_ToolTip_Timer = null, _attribute_Name_Options = "data-journey-js"; - function setupDefaultGroup(groups) { - _groups = getDefaultObject(groups, {}); - _groups[_groups_Default] = {json:{}, keys:[], position:0}; - } - function setupNewGroup(group) { - if (!_groups.hasOwnProperty(group)) { - _groups[group] = {json:{}, keys:[], position:0}; - } - } - function getGroupBindingOptions() { - return _groups[_groups_Current].json[_groups[_groups_Current].keys[_groups[_groups_Current].position]]; - } - function renderDisabledBackground() { - _element_Disabled_Background = createElement("div", "journey-js-disabled-background"); - _element_Disabled_Background.onclick = function() { - if (_configuration.closeDialogOnDisabledBackgroundClick) { - onDialogClose(); - } - }; - } - function showDisabledBackground() { - addNode(_parameter_Document.body, _element_Disabled_Background); - } - function hideDisabledBackground() { - removeNode(_parameter_Document.body, _element_Disabled_Background); - } - function renderDialog() { - _element_Dialog = createElement("div", "journey-js-dialog"); - _element_Dialog.style.display = "none"; - _parameter_Document.body.appendChild(_element_Dialog); - _element_Dialog_Close_Button = createElement("button", "close"); - _element_Dialog.appendChild(_element_Dialog_Close_Button); - _element_Dialog_Close_Button.onclick = function() { - onDialogClose(); - }; - addToolTip(_element_Dialog_Close_Button, _configuration.closeButtonToolTipText); - _element_Dialog_Title = createElement("div", "title"); - _element_Dialog.appendChild(_element_Dialog_Title); - _element_Dialog_Description = createElement("div", "description"); - _element_Dialog.appendChild(_element_Dialog_Description); - _element_Dialog_CheckBox_Container = createElement("div", "checkbox-container"); - _element_Dialog.appendChild(_element_Dialog_CheckBox_Container); - _element_Dialog_CheckBox_Input = buildCheckBox(_element_Dialog_CheckBox_Container, _configuration.doNotShowAgainText).input; - _element_Dialog_CheckBox_Input.onchange = function() { - if (_configuration.showDoNotShowAgain) { - fireCustomTrigger(_configuration.onDoNotShowAgainChange, _element_Dialog_CheckBox_Input.checked); - } - }; - _element_Dialog_ProgressDots = createElement("div", "progress-dots"); - _element_Dialog.appendChild(_element_Dialog_ProgressDots); - _element_Dialog_ProgressBar = createElement("div", "progress-bar"); - _element_Dialog.appendChild(_element_Dialog_ProgressBar); - _element_Dialog_ProgressBar_Percentage = createElement("div", "progress-bar-percentage"); - _element_Dialog_ProgressBar.appendChild(_element_Dialog_ProgressBar_Percentage); - _element_Dialog_ProgressBar_Percentage_Text = createElement("p", "progress-bar-percentage-text"); - _element_Dialog_ProgressBar_Percentage.appendChild(_element_Dialog_ProgressBar_Percentage_Text); - _element_Dialog_Buttons = createElement("div", "buttons"); - _element_Dialog.appendChild(_element_Dialog_Buttons); - _element_Dialog_Buttons_Back_Button = createElement("button", "back"); - _element_Dialog_Buttons_Back_Button.onclick = onDialogBack; - _element_Dialog_Buttons.appendChild(_element_Dialog_Buttons_Back_Button); - _element_Dialog_Buttons_Next_Button = createElement("button", "next"); - _element_Dialog_Buttons_Next_Button.onclick = onDialogNext; - _element_Dialog_Buttons.appendChild(_element_Dialog_Buttons_Next_Button); - makeDialogMovable(); - } - function onDialogClose(showConfirmationBox) { - var confirmed = false; - showConfirmationBox = getDefaultBoolean(showConfirmationBox, true); - if (isDefinedString(_configuration.closeDialogConfirmationText) && showConfirmationBox) { - confirmed = confirm(_configuration.closeDialogConfirmationText); - } else { - confirmed = true; - } - if (confirmed) { - var bindingOptions = getGroupBindingOptions(); - if (isDefined(bindingOptions) && isDefined(bindingOptions.currentView.element)) { - fireCustomTrigger(bindingOptions.events.onClose, bindingOptions.currentView.element); - } - removeFocusClassFromLastElement(false); - hideDisabledBackground(); - hideToolTip(); - _element_Dialog.style.display = "none"; - } - } - function onDialogBack() { - if (_groups[_groups_Current].position > 0) { - removeFocusClassFromLastElement(); - _groups[_groups_Current].position--; - showDialogAndSetPosition(); - } - } - function onDialogNext() { - if (_groups[_groups_Current].position === _groups[_groups_Current].keys.length - 1) { - var bindingOptions = getGroupBindingOptions(); - onDialogClose(false); - fireCustomTrigger(bindingOptions.events.onFinish, bindingOptions.currentView.element); - } else { - removeFocusClassFromLastElement(); - _groups[_groups_Current].position++; - showDialogAndSetPosition(); - } - } - function showDialogAndSetPosition() { - var bindingOptions = getGroupBindingOptions(); - if (isDefined(bindingOptions) && isDefined(bindingOptions.currentView.element)) { - if (bindingOptions.showDisabledBackground) { - showDisabledBackground(); - } else { - hideDisabledBackground(); - } - hideToolTip(); - _element_Dialog_Close_Button.style.display = _configuration.showCloseButton ? "block" : "none"; - _configuration_ShortcutKeysEnabled = true; - bindingOptions.currentView.element.className += _string.space + "journey-js-element-focus"; - if (_configuration.scrollToElements) { - bindingOptions.currentView.element.scrollIntoView(); - } - var lastPositionStyle = getStyleValueByName(bindingOptions.currentView.element, "position"); - if (lastPositionStyle !== _string.empty && lastPositionStyle.toLowerCase() === "static") { - _element_Focus_Element_PositionStyle = lastPositionStyle; - bindingOptions.currentView.element.style.position = "relative"; - } - showElementBasedOnCondition(_element_Dialog_CheckBox_Container, _configuration.showDoNotShowAgain); - showElementBasedOnCondition(_element_Dialog_ProgressDots, _configuration.showProgressDots && _groups[_groups_Current].keys.length > 1); - showElementBasedOnCondition(_element_Dialog_ProgressBar, _configuration.showProgressBar && _groups[_groups_Current].keys.length > 1); - showElementBasedOnCondition(_element_Dialog_ProgressBar_Percentage_Text, _configuration.showProgressBarText); - showElementBasedOnCondition(_element_Dialog_Buttons, _configuration.showButtons); - _element_Dialog_Buttons_Back_Button.innerHTML = _configuration.backButtonText; - _element_Dialog_Buttons_Back_Button.disabled = _groups[_groups_Current].position === 0; - if (_groups[_groups_Current].position >= _groups[_groups_Current].keys.length - 1) { - _element_Dialog_Buttons_Next_Button.innerHTML = _configuration.finishButtonText; - } else { - _element_Dialog_Buttons_Next_Button.innerHTML = _configuration.nextButtonText; - } - setDialogText(bindingOptions); - setDialogPosition(null, bindingOptions); - buildProcessDots(); - setProgressBarPosition(); - fireCustomTrigger(bindingOptions.events.onEnter, bindingOptions.currentView.element); - if (bindingOptions.sendClick) { - bindingOptions.currentView.element.click(); - } - } - } - function setDialogText(bindingOptions) { - if (isDefinedString(bindingOptions.title)) { - _element_Dialog_Title.innerHTML = bindingOptions.title; - } else { - _element_Dialog_Title.innerHTML = _string.empty; - } - if (isDefinedString(bindingOptions.description)) { - _element_Dialog_Description.innerHTML = bindingOptions.description; - } else { - _element_Dialog_Description.innerHTML = _string.empty; - } - } - function setDialogPosition(e, bindingOptions) { - if (_element_Dialog.style.display !== "block") { - _element_Dialog.style.display = "block"; - fireCustomTrigger(bindingOptions.events.onOpen, bindingOptions.currentView.element); - } - if (_groups[_groups_Current].position === 0) { - fireCustomTrigger(bindingOptions.events.onStart, bindingOptions.currentView.element); - } - _element_Dialog_IsHint = bindingOptions.isHint === true; - if (bindingOptions.attach || bindingOptions.isHint) { - if (bindingOptions.isHint && bindingOptions.alignHintToClickPosition) { - showElementAtMousePosition(e, _element_Dialog); - } else { - var offset = getOffset(bindingOptions.currentView.element), top = offset.top + bindingOptions.currentView.element.offsetHeight, left = offset.left; - if (left + _element_Dialog.offsetWidth > _parameter_Window.innerWidth || bindingOptions.alignRight) { - left -= _element_Dialog.offsetWidth; - left += bindingOptions.currentView.element.offsetWidth; - } - if (top + _element_Dialog.offsetHeight > _parameter_Window.innerHeight || bindingOptions.alignTop) { - top -= _element_Dialog.offsetHeight + bindingOptions.currentView.element.offsetHeight; - } - _element_Dialog.style.top = top + "px"; - _element_Dialog.style.left = left + "px"; - } - } else { - var scrollPosition = getScrollPosition(), centerLeft = _parameter_Math.max(0, (_parameter_Window.innerWidth - _element_Dialog.offsetWidth) / 2 + scrollPosition.left), centerTop = _parameter_Math.max(0, (_parameter_Window.innerHeight - _element_Dialog.offsetHeight) / 2 + scrollPosition.top); - _element_Dialog.style.left = centerLeft + "px"; - _element_Dialog.style.top = centerTop + "px"; - } - } - function removeFocusClassFromLastElement(callCustomTrigger) { - callCustomTrigger = isDefined(callCustomTrigger) ? callCustomTrigger : true; - var bindingOptions = getGroupBindingOptions(); - if (isDefined(bindingOptions) && isDefined(bindingOptions.currentView.element)) { - bindingOptions.currentView.element.className = bindingOptions.currentView.element.className.replace(_string.space + "journey-js-element-focus", _string.empty); - if (isDefined(_element_Focus_Element_PositionStyle)) { - bindingOptions.currentView.element.style.position = _element_Focus_Element_PositionStyle; - } - if (callCustomTrigger) { - fireCustomTrigger(bindingOptions.events.onLeave, bindingOptions.currentView.element); - } - } - } - function buildProcessDots() { - _element_Dialog_ProgressDots.innerHTML = _string.empty; - if (_configuration.showProgressDots) { - var keysLength = _groups[_groups_Current].keys.length; - for (var keyIndex = 0; keyIndex < keysLength; keyIndex++) { - buildProgressDot(keyIndex, _groups[_groups_Current].keys[keyIndex]); - } - } - } - function buildProgressDot(keyIndex, order) { - var bindingOptions = _groups[_groups_Current].json[order], dot = null; - if (keyIndex === _groups[_groups_Current].position) { - dot = createElement("div", "dot-active"); - } else { - dot = createElement("div", "dot"); - dot.onclick = function() { - removeFocusClassFromLastElement(); - _groups[_groups_Current].position = keyIndex; - showDialogAndSetPosition(); - }; - } - _element_Dialog_ProgressDots.appendChild(dot); - if (_configuration.showProgressDotToolTips) { - if (isDefinedString(bindingOptions.tooltip)) { - addToolTip(dot, bindingOptions.tooltip); - } else { - addToolTip(dot, bindingOptions.title); - } - } - if (_configuration.showProgressDotNumbers) { - dot.className += " dot-number"; - dot.innerHTML = (keyIndex + 1).toString(); - } - } - function setProgressBarPosition() { - if (_configuration.showProgressBar) { - var pixelsPerStage = _element_Dialog_ProgressBar.offsetWidth / _groups[_groups_Current].keys.length, width = (_groups[_groups_Current].position + 1) * pixelsPerStage, percentageComplete = _parameter_Math.ceil((_groups[_groups_Current].position + 1) / _groups[_groups_Current].keys.length * 100); - _element_Dialog_ProgressBar_Percentage.style.width = width + "px"; - _element_Dialog_ProgressBar_Percentage_Text.innerHTML = percentageComplete + "%"; - } - } - function makeDialogMovable() { - _element_Dialog_Title.onmousedown = onMoveTitleBarMouseDown; - _element_Dialog_Title.onmouseup = onMoveTitleBarMouseUp; - _element_Dialog_Title.oncontextmenu = onMoveTitleBarMouseUp; - _parameter_Document.body.addEventListener("mousemove", onMoveDocumentMouseMove); - _parameter_Document.body.addEventListener("mouseleave", onMoveDocumentMouseLeave); - } - function onMoveTitleBarMouseDown(e) { - if (!_element_Dialog_Move_IsMoving && !_element_Dialog_IsHint && _configuration.dialogMovingEnabled) { - _element_Dialog.className += " journey-js-dialog-moving"; - _element_Dialog_Move_IsMoving = true; - _element_Dialog_Move_X = e.pageX - _element_Dialog.offsetLeft; - _element_Dialog_Move_Y = e.pageY - _element_Dialog.offsetTop; - _element_Dialog_Move_Original_X = _element_Dialog.offsetLeft; - _element_Dialog_Move_Original_Y = _element_Dialog.offsetTop; - } - } - function onMoveTitleBarMouseUp() { - if (_element_Dialog_Move_IsMoving) { - _element_Dialog_Move_IsMoving = false; - _element_Dialog_Move_Original_X = 0; - _element_Dialog_Move_Original_Y = 0; - _element_Dialog.className = "journey-js-dialog"; - } - } - function onMoveDocumentMouseMove(e) { - if (_element_Dialog_Move_IsMoving) { - _element_Dialog.style.left = e.pageX - _element_Dialog_Move_X + "px"; - _element_Dialog.style.top = e.pageY - _element_Dialog_Move_Y + "px"; - } - } - function onMoveDocumentMouseLeave() { - if (_element_Dialog_Move_IsMoving) { - _element_Dialog.style.left = _element_Dialog_Move_Original_X + "px"; - _element_Dialog.style.top = _element_Dialog_Move_Original_Y + "px"; - _element_Dialog_Move_IsMoving = false; - _element_Dialog_Move_Original_X = 0; - _element_Dialog_Move_Original_Y = 0; - _element_Dialog.className = "journey-js-dialog"; - } - } - function renderToolTip() { - if (!isDefined(_element_ToolTip)) { - _element_ToolTip = createElement("div", "journey-js-tooltip"); - _element_ToolTip.style.display = "none"; - _parameter_Document.body.appendChild(_element_ToolTip); - _parameter_Document.body.addEventListener("mousemove", function() { - hideToolTip(); - }); - _parameter_Document.addEventListener("scroll", function() { - hideToolTip(); - }); - } - } - function addToolTip(element, text) { - if (element !== null) { - element.onmousemove = function(e) { - showToolTip(e, text); - }; - } - } - function showToolTip(e, text) { - cancelBubble(e); - hideToolTip(); - _element_ToolTip_Timer = setTimeout(function() { - _element_ToolTip.innerHTML = text; - _element_ToolTip.style.display = "block"; - showElementAtMousePosition(e, _element_ToolTip); - }, _configuration.tooltipDelay); - } - function hideToolTip() { - if (isDefined(_element_ToolTip)) { - if (isDefined(_element_ToolTip_Timer)) { - clearTimeout(_element_ToolTip_Timer); - _element_ToolTip_Timer = null; - } - if (_element_ToolTip.style.display === "block") { - _element_ToolTip.style.display = "none"; - } - } - } - function getElements() { - var tagTypes = _configuration.domElementTypes, tagTypesLength = tagTypes.length; - for (var tagTypeIndex = 0; tagTypeIndex < tagTypesLength; tagTypeIndex++) { - var domElements = _parameter_Document.getElementsByTagName(tagTypes[tagTypeIndex]), elements = [].slice.call(domElements), elementsLength = elements.length; - for (var elementIndex = 0; elementIndex < elementsLength; elementIndex++) { - if (!getElement(elements[elementIndex])) { - break; - } - } - } - _groups[_groups_Current].keys.sort(); - } - function getElement(element) { - var result = true; - if (isDefined(element) && element.hasAttribute(_attribute_Name_Options)) { - var bindingOptionsData = element.getAttribute(_attribute_Name_Options); - if (isDefinedString(bindingOptionsData)) { - var bindingOptions = getObjectFromString(bindingOptionsData); - if (bindingOptions.parsed && isDefinedObject(bindingOptions.result)) { - setupElement(element, buildAttributeOptions(bindingOptions.result)); +"use strict"; + +var Constants; + +(e => { + e.JOURNEY_JS_ATTRIBUTE_NAME = "data-journey-js"; +})(Constants || (Constants = {})); + +var Is; + +(e => { + function t(e) { + return e !== null && e !== void 0 && e !== ""; + } + e.defined = t; + function o(e) { + return t(e) && typeof e === "object"; + } + e.definedObject = o; + function n(e) { + return t(e) && typeof e === "boolean"; + } + e.definedBoolean = n; + function i(e) { + return t(e) && typeof e === "string"; + } + e.definedString = i; + function r(e) { + return t(e) && typeof e === "function"; + } + e.definedFunction = r; + function l(e) { + return t(e) && typeof e === "number"; + } + e.definedNumber = l; + function s(e) { + return o(e) && e instanceof Array; + } + e.definedArray = s; +})(Is || (Is = {})); + +var Data; + +(e => { + function t(e, t) { + return typeof e === "string" ? e : t; + } + e.getDefaultAnyString = t; + function o(e, t) { + return Is.definedString(e) ? e : t; + } + e.getDefaultString = o; + function n(e, t) { + return Is.definedBoolean(e) ? e : t; + } + e.getDefaultBoolean = n; + function i(e, t) { + return Is.definedNumber(e) ? e : t; + } + e.getDefaultNumber = i; + function r(e, t) { + return Is.definedFunction(e) ? e : t; + } + e.getDefaultFunction = r; + function l(e, t) { + return Is.definedObject(e) ? e : t; + } + e.getDefaultObject = l; + function s(e, t) { + return Is.definedArray(e) ? e : t; + } + e.getDefaultArray = s; + function a(e, t) { + let o = t; + if (Is.definedString(e)) { + const n = e.toString().split(" "); + if (n.length === 0) { + e = t; + } else { + o = n; + } } else { - if (!_configuration.safeMode) { - console.error(_configuration.attributeNotValidErrorText.replace("{{attribute_name}}", _attribute_Name_Options)); - result = false; - } - } - } else { - if (!_configuration.safeMode) { - console.error(_configuration.attributeNotSetErrorText.replace("{{attribute_name}}", _attribute_Name_Options)); - result = false; - } - } - } - return result; - } - function setupElement(element, bindingOptions) { - bindingOptions.currentView = {}; - bindingOptions.currentView.element = element; - if (isDefinedNumber(bindingOptions.order) && (isDefinedString(bindingOptions.title) || isDefinedString(bindingOptions.description))) { - element.removeAttribute(_attribute_Name_Options); - if (!bindingOptions.isHint) { - setupNewGroup(bindingOptions.group); - _groups[bindingOptions.group].json[bindingOptions.order] = bindingOptions; - _groups[bindingOptions.group].keys.push(bindingOptions.order); - fireCustomTrigger(bindingOptions.events.onAddStep, element); - } else { - renderHint(bindingOptions); - } - } - } - function renderHint(bindingOptions) { - var positionStyle = getStyleValueByName(bindingOptions.currentView.element, "position"); - if (positionStyle !== _string.empty && positionStyle.toLowerCase() === "static") { - bindingOptions.currentView.element.style.position = "relative"; - } - var hint = createElement("div", "journey-js-hint"); - bindingOptions.currentView.element.appendChild(hint); - hint.onclick = function(e) { - cancelBubble(e); - _element_Dialog_CheckBox_Container.style.display = "none"; - _element_Dialog_ProgressDots.style.display = "none"; - _element_Dialog_ProgressBar.style.display = "none"; - _element_Dialog_Buttons.style.display = "none"; - _configuration_ShortcutKeysEnabled = false; - setDialogText(bindingOptions); - setDialogPosition(e, bindingOptions); - if (bindingOptions.removeHintWhenViewed) { - clearElementsByClassName(bindingOptions.currentView.element, "journey-js-hint"); - } - }; - } - function buildDocumentEvents(addEvents) { - addEvents = isDefined(addEvents) ? addEvents : true; - var documentFunc = addEvents ? _parameter_Document.addEventListener : _parameter_Document.removeEventListener, windowFunc = addEvents ? _parameter_Window.addEventListener : _parameter_Window.removeEventListener; - if (_configuration.shortcutKeysEnabled) { - documentFunc("keydown", onWindowKeyDown); - } - windowFunc("resize", onWindowResize); - } - function onWindowKeyDown(e) { - if (_public.isOpen() && _configuration.shortcutKeysEnabled) { - if (e.keyCode === _enum_KeyCodes.escape) { + o = s(e, t); + } + return o; + } + e.getDefaultStringOrArray = a; +})(Data || (Data = {})); + +var DomElement; + +(e => { + function t(e, t = "") { + const o = e.toLowerCase(); + const n = o === "text"; + let i = n ? document.createTextNode("") : document.createElement(o); + if (Is.defined(t)) { + i.className = t; + } + return i; + } + e.create = t; + function o(e) { + const t = { + left: 0, + top: 0 + }; + while (e && !isNaN(e.offsetLeft) && !isNaN(e.offsetTop)) { + t.left += e.offsetLeft - e.scrollLeft; + t.top += e.offsetTop - e.scrollTop; + e = e.offsetParent; + } + return t; + } + e.getOffset = o; + function n() { + const e = document.documentElement; + const t = { + left: e.scrollLeft - (e.clientLeft || 0), + top: e.scrollTop - (e.clientTop || 0) + }; + return t; + } + e.getScrollPosition = n; + function i(e, t) { + let o = null; + if (document.defaultView.getComputedStyle) { + o = document.defaultView.getComputedStyle(e, null).getPropertyValue(t); + } else if (e.currentStyle) { + o = e.currentStyle[t]; + } + return o; + } + e.getStyleValueByName = i; + function r(e, t) { + try { + if (!e.contains(t)) { + e.appendChild(t); + } + } catch (e) { + console.warn(e.message); + } + } + e.addNode = r; + function l(e, t) { + try { + if (e.contains(t)) { + e.removeChild(t); + } + } catch (e) { + console.warn(e.message); + } + } + e.removeNode = l; + function s(e) { e.preventDefault(); - onDialogClose(); - } else { - if (_configuration_ShortcutKeysEnabled) { - if (e.keyCode === _enum_KeyCodes.left) { - e.preventDefault(); - onDialogBack(); - } else if (e.keyCode === _enum_KeyCodes.right) { - e.preventDefault(); - onDialogNext(); - } else if (e.keyCode === _enum_KeyCodes.up) { - e.preventDefault(); - onWindowKeyCodeUp(); - } else if (e.keyCode === _enum_KeyCodes.down) { - e.preventDefault(); - onWindowKeyCodeDown(); - } - } - } - } - } - function onWindowResize() { - if (_public.isOpen()) { - showDialogAndSetPosition(); - } - } - function onWindowKeyCodeUp() { - if (_groups[_groups_Current].position !== 0) { - removeFocusClassFromLastElement(); - _groups[_groups_Current].position = 0; - showDialogAndSetPosition(); - } - } - function onWindowKeyCodeDown() { - if (_groups[_groups_Current].position !== _groups[_groups_Current].keys.length - 1) { - removeFocusClassFromLastElement(); - _groups[_groups_Current].position = _groups[_groups_Current].keys.length - 1; - showDialogAndSetPosition(); - } - } - function buildAttributeOptions(newOptions) { - var options = !isDefinedObject(newOptions) ? {} : newOptions; - options.order = getDefaultNumber(options.order, 0); - options.attach = getDefaultBoolean(options.attach, true); - options.sendClick = getDefaultBoolean(options.sendClick, false); - options.alignTop = getDefaultBoolean(options.alignTop, false); - options.alignRight = getDefaultBoolean(options.alignRight, false); - options.isHint = getDefaultBoolean(options.isHint, false); - options.alignHintToClickPosition = getDefaultBoolean(options.alignHintToClickPosition, false); - options.showDisabledBackground = getDefaultBoolean(options.showDisabledBackground, true); - options.removeHintWhenViewed = getDefaultBoolean(options.removeHintWhenViewed, false); - options.group = getDefaultString(options.group, _groups_Default); - options = buildAttributeOptionStrings(options); - return buildAttributeOptionCustomTriggers(options); - } - function buildAttributeOptionStrings(options) { - options.title = getDefaultString(options.title, null); - options.description = getDefaultString(options.description, null); - options.tooltip = getDefaultString(options.tooltip, null); - return options; - } - function buildAttributeOptionCustomTriggers(options) { - options.events = getDefaultObject(options.events, {}); - options.events.onEnter = getDefaultFunction(options.events.onEnter, null); - options.events.onLeave = getDefaultFunction(options.events.onLeave, null); - options.events.onClose = getDefaultFunction(options.events.onClose, null); - options.events.onFinish = getDefaultFunction(options.events.onFinish, null); - options.events.onOpen = getDefaultFunction(options.events.onOpen, null); - options.events.onStart = getDefaultFunction(options.events.onStart, null); - options.events.onAddStep = getDefaultFunction(options.events.onAddStep, null); - options.events.onRemoveStep = getDefaultFunction(options.events.onRemoveStep, null); - return options; - } - function getBrowserUrlParameters() { - var show = false; - if (_configuration.browserUrlParametersEnabled) { - var url = _parameter_Window.location.href, urlArguments = getBrowserUrlArguments(url); - if (isDefined(urlArguments.sjOrderId)) { - var orderId = parseInt(urlArguments.sjOrderId, 10); - if (!isNaN(orderId) && orderId <= _groups[_groups_Current].keys.length - 1) { - _groups[_groups_Current].position = orderId; - } - } - if (isDefined(urlArguments.sjShow)) { - show = urlArguments.sjShow === "true"; - } - } - return show; - } - function getBrowserUrlArguments(url) { - var urlArguments = {}, urlDataParts = url.split("?"); - if (urlDataParts.length > 1) { - var parsedArgs = urlDataParts[1].split("&"), parsedArgsLength = parsedArgs.length; - for (var parsedArgsIndex = 0; parsedArgsIndex < parsedArgsLength; parsedArgsIndex++) { - var parsedArg = parsedArgs[parsedArgsIndex].split("="); - urlArguments[parsedArg[0]] = parsedArg[1]; - } - } - return urlArguments; - } - function isDefined(value) { - return value !== null && value !== undefined && value !== _string.empty; - } - function isDefinedObject(object) { - return isDefined(object) && typeof object === "object"; - } - function isDefinedBoolean(object) { - return isDefined(object) && typeof object === "boolean"; - } - function isDefinedString(object) { - return isDefined(object) && typeof object === "string"; - } - function isDefinedFunction(object) { - return isDefined(object) && typeof object === "function"; - } - function isDefinedNumber(object) { - return isDefined(object) && typeof object === "number"; - } - function isDefinedArray(object) { - return isDefinedObject(object) && object instanceof Array; - } - function createElement(type, className) { - var result = null, nodeType = type.toLowerCase(), isText = nodeType === "text"; - if (!_elements_Type.hasOwnProperty(nodeType)) { - _elements_Type[nodeType] = isText ? _parameter_Document.createTextNode(_string.empty) : _parameter_Document.createElement(nodeType); - } - result = _elements_Type[nodeType].cloneNode(false); - if (isDefined(className)) { - result.className = className; - } - return result; - } - function getOffset(element) { - var left = 0, top = 0; - while (element && !isNaN(element.offsetLeft) && !isNaN(element.offsetTop)) { - left += element.offsetLeft - element.scrollLeft; - top += element.offsetTop - element.scrollTop; - element = element.offsetParent; - } - return {left:left, top:top}; - } - function getScrollPosition() { - var doc = _parameter_Document.documentElement, left = (_parameter_Window.pageXOffset || doc.scrollLeft) - (doc.clientLeft || 0), top = (_parameter_Window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0); - return {left:left, top:top}; - } - function getStyleValueByName(element, stylePropertyName) { - var value = null; - if (_parameter_Window.getComputedStyle) { - value = _parameter_Document.defaultView.getComputedStyle(element, null).getPropertyValue(stylePropertyName); - } else if (element.currentStyle) { - value = element.currentStyle[stylePropertyName]; - } - return value; - } - function addNode(parent, node) { - try { - if (!parent.contains(node)) { - parent.appendChild(node); - } - } catch (e) { - console.warn(e.message); - } - } - function removeNode(parent, node) { - try { - if (parent.contains(node)) { - parent.removeChild(node); - } - } catch (e) { - console.warn(e.message); - } - } - function cancelBubble(e) { - e.preventDefault(); - e.cancelBubble = true; - } - function showElementAtMousePosition(e, element) { - var left = e.pageX, top = e.pageY, scrollPosition = getScrollPosition(); - element.style.display = "block"; - if (left + element.offsetWidth > _parameter_Window.innerWidth) { - left -= element.offsetWidth; - } else { - left++; - } - if (top + element.offsetHeight > _parameter_Window.innerHeight) { - top -= element.offsetHeight; - } else { - top++; - } - if (left < scrollPosition.left) { - left = e.pageX + 1; - } - if (top < scrollPosition.top) { - top = e.pageY + 1; - } - element.style.left = left + "px"; - element.style.top = top + "px"; - } - function showElementBasedOnCondition(element, condition) { - if (condition) { - if (element.style.display !== "block") { - element.style.display = "block"; - } - } else { - if (element.style.display !== "none") { - element.style.display = "none"; - } - } - } - function buildCheckBox(container, labelText) { - var lineContainer = createElement("div"), label = createElement("label", "checkbox"), input = createElement("input"); - container.appendChild(lineContainer); - lineContainer.appendChild(label); - label.appendChild(input); - input.type = "checkbox"; - var checkMark = createElement("span", "check-mark"), text = createElement("span", "text"); - text.innerHTML = labelText; - label.appendChild(checkMark); - label.appendChild(text); - return {input:input, label:label}; - } - function clearElementsByClassName(container, className) { - var elements = container.getElementsByClassName(className); - while (elements[0]) { - elements[0].parentNode.removeChild(elements[0]); - } - } - function fireCustomTrigger(triggerFunction) { - if (isDefinedFunction(triggerFunction)) { - triggerFunction.apply(null, [].slice.call(arguments, 1)); - } - } - function getDefaultAnyString(value, defaultValue) { - return typeof value === "string" ? value : defaultValue; - } - function getDefaultString(value, defaultValue) { - return isDefinedString(value) ? value : defaultValue; - } - function getDefaultBoolean(value, defaultValue) { - return isDefinedBoolean(value) ? value : defaultValue; - } - function getDefaultNumber(value, defaultValue) { - return isDefinedNumber(value) ? value : defaultValue; - } - function getDefaultFunction(value, defaultValue) { - return isDefinedFunction(value) ? value : defaultValue; - } - function getDefaultObject(value, defaultValue) { - return isDefinedObject(value) ? value : defaultValue; - } - function getDefaultArray(value, defaultValue) { - return isDefinedArray(value) ? value : defaultValue; - } - function getDefaultStringOrArray(value, defaultValue) { - if (isDefinedString(value)) { - value = value.split(_string.space); - if (value.length === 0) { - value = defaultValue; - } - } else { - value = getDefaultArray(value, defaultValue); - } - return value; - } - function getObjectFromString(objectString) { - var parsed = true, result = null; - try { - if (isDefinedString(objectString)) { - result = _parameter_Json.parse(objectString); - } - } catch (e1) { - try { - result = eval("(" + objectString + ")"); - if (isDefinedFunction(result)) { - result = result(); - } - } catch (e2) { - if (!_configuration.safeMode) { - console.error(_configuration.objectErrorText.replace("{{error_1}}", e1.message).replace("{{error_2}}", e2.message)); - parsed = false; - } - result = null; - } - } - return {parsed:parsed, result:result}; - } - _public.start = function(group) { - if (!_public.isOpen()) { - _groups_Current = getDefaultString(group, _groups_Default); - if (_groups.hasOwnProperty(_groups_Current)) { - _groups[_groups_Current].position = 0; - showDialogAndSetPosition(); - } - } - return _public; - }; - _public.show = function(group) { - if (!_public.isOpen()) { - _groups_Current = getDefaultString(group, _groups_Current); - if (_groups.hasOwnProperty(_groups_Current)) { + e.cancelBubble = true; + } + e.cancelBubble = s; + function a(e, t) { + let o = e.pageX; + let i = e.pageY; + const r = n(); + t.style.display = "block"; + if (o + t.offsetWidth > window.innerWidth) { + o -= t.offsetWidth; + } else { + o++; + } + if (i + t.offsetHeight > window.innerHeight) { + i -= t.offsetHeight; + } else { + i++; + } + if (o < r.left) { + o = e.pageX + 1; + } + if (i < r.top) { + i = e.pageY + 1; + } + t.style.left = o + "px"; + t.style.top = i + "px"; + } + e.showElementAtMousePosition = a; + function _(e, t) { + if (t) { + if (e.style.display !== "block") { + e.style.display = "block"; + } + } else { + if (e.style.display !== "none") { + e.style.display = "none"; + } + } + } + e.showElementBasedOnCondition = _; + function u(e, o) { + const n = t("div"); + const i = t("label", "checkbox"); + const r = t("input"); + e.appendChild(n); + n.appendChild(i); + i.appendChild(r); + r.type = "checkbox"; + const l = t("span", "check-mark"); + const s = t("span", "text"); + s.innerHTML = o; + i.appendChild(l); + i.appendChild(s); + return r; + } + e.createCheckBox = u; + function g(e, t) { + let o = e.getElementsByClassName(t); + while (o[0]) { + o[0].parentNode.removeChild(o[0]); + } + } + e.clearElementsByClassName = g; +})(DomElement || (DomElement = {})); + +(() => { + let _configuration = {}; + let _configuration_ShortcutKeysEnabled = true; + const _groups_Default = "default"; + let _groups_Current = _groups_Default; + let _groups = {}; + let _element_Focus_Element_PositionStyle = ""; + let _element_Disabled_Background; + let _element_Dialog; + let _element_Dialog_Close_Button; + let _element_Dialog_Title; + let _element_Dialog_Description; + let _element_Dialog_CheckBox_Container; + let _element_Dialog_CheckBox_Input; + let _element_Dialog_ProgressDots; + let _element_Dialog_ProgressBar; + let _element_Dialog_ProgressBar_Percentage; + let _element_Dialog_ProgressBar_Percentage_Text; + let _element_Dialog_Buttons; + let _element_Dialog_Buttons_Back_Button; + let _element_Dialog_Buttons_Next_Button; + let _element_Dialog_IsHint = false; + let _element_Dialog_Move_Original_X = 0; + let _element_Dialog_Move_Original_Y = 0; + let _element_Dialog_Move_IsMoving = false; + let _element_Dialog_Move_X = 0; + let _element_Dialog_Move_Y = 0; + let _element_ToolTip; + let _element_ToolTip_Timer = 0; + function setupDefaultGroup(e = null) { + _groups = Data.getDefaultObject(e, {}); + _groups[_groups_Default] = { + json: {}, + keys: [], + position: 0 + }; + } + function setupNewGroup(e) { + if (!_groups.hasOwnProperty(e)) { + _groups[e] = { + json: {}, + keys: [], + position: 0 + }; + } + } + function getGroupBindingOptions() { + return _groups[_groups_Current].json[_groups[_groups_Current].keys[_groups[_groups_Current].position]]; + } + function renderDisabledBackground() { + _element_Disabled_Background = DomElement.create("div", "journey-js-disabled-background"); + _element_Disabled_Background.onclick = () => { + if (_configuration.closeDialogOnDisabledBackgroundClick) { + onDialogClose(); + } + }; + } + function showDisabledBackground() { + DomElement.addNode(document.body, _element_Disabled_Background); + } + function hideDisabledBackground() { + DomElement.removeNode(document.body, _element_Disabled_Background); + } + function renderDialog() { + _element_Dialog = DomElement.create("div", "journey-js-dialog"); + _element_Dialog.style.display = "none"; + document.body.appendChild(_element_Dialog); + _element_Dialog_Close_Button = DomElement.create("button", "close"); + _element_Dialog.appendChild(_element_Dialog_Close_Button); + _element_Dialog_Close_Button.onclick = () => { + onDialogClose(); + }; + addToolTip(_element_Dialog_Close_Button, _configuration.closeButtonToolTipText); + _element_Dialog_Title = DomElement.create("div", "title"); + _element_Dialog.appendChild(_element_Dialog_Title); + _element_Dialog_Description = DomElement.create("div", "description"); + _element_Dialog.appendChild(_element_Dialog_Description); + _element_Dialog_CheckBox_Container = DomElement.create("div", "checkbox-container"); + _element_Dialog.appendChild(_element_Dialog_CheckBox_Container); + _element_Dialog_CheckBox_Input = DomElement.createCheckBox(_element_Dialog_CheckBox_Container, _configuration.doNotShowAgainText); + _element_Dialog_CheckBox_Input.onchange = () => { + if (_configuration.showDoNotShowAgain) { + fireCustomTriggerEvent(_configuration.onDoNotShowAgainChange, _element_Dialog_CheckBox_Input.checked); + } + }; + _element_Dialog_ProgressDots = DomElement.create("div", "progress-dots"); + _element_Dialog.appendChild(_element_Dialog_ProgressDots); + _element_Dialog_ProgressBar = DomElement.create("div", "progress-bar"); + _element_Dialog.appendChild(_element_Dialog_ProgressBar); + _element_Dialog_ProgressBar_Percentage = DomElement.create("div", "progress-bar-percentage"); + _element_Dialog_ProgressBar.appendChild(_element_Dialog_ProgressBar_Percentage); + _element_Dialog_ProgressBar_Percentage_Text = DomElement.create("p", "progress-bar-percentage-text"); + _element_Dialog_ProgressBar_Percentage.appendChild(_element_Dialog_ProgressBar_Percentage_Text); + _element_Dialog_Buttons = DomElement.create("div", "buttons"); + _element_Dialog.appendChild(_element_Dialog_Buttons); + _element_Dialog_Buttons_Back_Button = DomElement.create("button", "back"); + _element_Dialog_Buttons_Back_Button.onclick = onDialogBack; + _element_Dialog_Buttons.appendChild(_element_Dialog_Buttons_Back_Button); + _element_Dialog_Buttons_Next_Button = DomElement.create("button", "next"); + _element_Dialog_Buttons_Next_Button.onclick = onDialogNext; + _element_Dialog_Buttons.appendChild(_element_Dialog_Buttons_Next_Button); + makeDialogMovable(); + } + function onDialogClose(e = true) { + let t = false; + if (Is.definedString(_configuration.closeDialogConfirmationText) && e) { + t = confirm(_configuration.closeDialogConfirmationText); + } else { + t = true; + } + if (t) { + const e = getGroupBindingOptions(); + if (Is.defined(e) && Is.defined(e._currentView.element)) { + fireCustomTriggerEvent(e.events.onClose, e._currentView.element); + } + removeFocusClassFromLastElement(false); + hideDisabledBackground(); + hideToolTip(); + _element_Dialog.style.display = "none"; + } + } + function onDialogBack() { + if (_groups[_groups_Current].position > 0) { + removeFocusClassFromLastElement(); + _groups[_groups_Current].position--; + showDialogAndSetPosition(); + } + } + function onDialogNext() { if (_groups[_groups_Current].position === _groups[_groups_Current].keys.length - 1) { - _groups[_groups_Current].position = 0; - } - showDialogAndSetPosition(); - } - } - return _public; - }; - _public.hide = function() { - if (_public.isOpen()) { - onDialogClose(); - } - return _public; - }; - _public.isOpen = function() { - return isDefined(_element_Dialog) && _element_Dialog.style.display === "block"; - }; - _public.isComplete = function() { - return _groups[_groups_Current].position >= _groups[_groups_Current].keys.length - 1; - }; - _public.addDocumentSteps = function() { - getElements(); - return _public; - }; - _public.addStep = function(element, options) { - if (isDefinedObject(element) && isDefinedObject(options)) { - setupElement(element, buildAttributeOptions(options)); - _groups[_groups_Current].keys.sort(); - resetDialogPosition(); - } - return _public; - }; - _public.removeStep = function(element) { - if (isDefinedObject(element)) { - var removed = false; - for (var group in _groups) { - if (_groups.hasOwnProperty(group)) { - for (var order in _groups[group].json) { - if (_groups[group].json.hasOwnProperty(order)) { - var bindingOptions = _groups[group].json[order]; - if (bindingOptions.currentView.element === element) { - fireCustomTrigger(bindingOptions.events.onRemoveStep, bindingOptions.currentView.element); - _groups[group].keys.splice(_groups[group].keys.indexOf(bindingOptions.order), 1); - delete _groups[group].json[bindingOptions.order]; - _groups[group].keys.sort(); - removed = true; - break; - } - } - } - } - } - if (!removed) { - clearElementsByClassName(element, "journey-js-hint"); - } else { - resetDialogPosition(); - } - } - return _public; - }; - _public.clearSteps = function(group) { - resetDialogPosition(); - for (var groupName in _groups) { - if (_groups.hasOwnProperty(groupName)) { - if (!isDefinedString(group) || group === groupName) { - for (var order in _groups[groupName].json) { - if (_groups[groupName].json.hasOwnProperty(order)) { - var bindingOptions = _groups[groupName].json[order]; - fireCustomTrigger(bindingOptions.events.onRemoveStep, bindingOptions.currentView.element); - } - } - } - } - } - if (isDefinedString(group)) { - if (_groups.hasOwnProperty(group)) { - delete _groups[group]; - } - } else { - _groups = {}; - } - if (!isDefinedString(group) || group === _groups_Default) { - setupDefaultGroup(_groups); - } - return _public; - }; - _public.clearHints = function() { - clearElementsByClassName(_parameter_Document.body, "journey-js-hint"); - return _public; - }; - _public.reverseStepOrder = function() { - _groups[_groups_Current].keys.reverse(); - resetDialogPosition(); - return _public; - }; - function resetDialogPosition() { - if (_public.isOpen()) { - onDialogClose(false); - _groups[_groups_Current].position = 0; - } - } - _public.setConfiguration = function(newConfiguration) { - if (isDefinedObject(newConfiguration)) { - var configurationHasChanged = false; - for (var propertyName in newConfiguration) { - if (newConfiguration.hasOwnProperty(propertyName) && _configuration.hasOwnProperty(propertyName) && _configuration[propertyName] !== newConfiguration[propertyName]) { - _configuration[propertyName] = newConfiguration[propertyName]; - configurationHasChanged = true; - } - } - if (configurationHasChanged) { - buildDefaultConfiguration(_configuration); - } - } - return _public; - }; - function buildDefaultConfiguration(newConfiguration) { - _configuration = getDefaultObject(newConfiguration, {}); - _configuration.safeMode = getDefaultBoolean(_configuration.safeMode, true); - _configuration.domElementTypes = getDefaultStringOrArray(_configuration.domElementTypes, ["*"]); - _configuration.showCloseButton = getDefaultBoolean(_configuration.showCloseButton, true); - _configuration.shortcutKeysEnabled = getDefaultBoolean(_configuration.shortcutKeysEnabled, true); - _configuration.showProgressDots = getDefaultBoolean(_configuration.showProgressDots, true); - _configuration.browserUrlParametersEnabled = getDefaultBoolean(_configuration.browserUrlParametersEnabled, true); - _configuration.showProgressDotNumbers = getDefaultBoolean(_configuration.showProgressDotNumbers, false); - _configuration.showButtons = getDefaultBoolean(_configuration.showButtons, true); - _configuration.showDoNotShowAgain = getDefaultBoolean(_configuration.showDoNotShowAgain, false); - _configuration.tooltipDelay = getDefaultNumber(_configuration.tooltipDelay, 750); - _configuration.showProgressDotToolTips = getDefaultBoolean(_configuration.showProgressDotToolTips, true); - _configuration.closeDialogOnDisabledBackgroundClick = getDefaultBoolean(_configuration.closeDialogOnDisabledBackgroundClick, false); - _configuration.showProgressBar = getDefaultBoolean(_configuration.showProgressBar, false); - _configuration.scrollToElements = getDefaultBoolean(_configuration.scrollToElements, false); - _configuration.dialogMovingEnabled = getDefaultBoolean(_configuration.dialogMovingEnabled, false); - _configuration.showProgressBarText = getDefaultBoolean(_configuration.showProgressBarText, false); - buildDefaultConfigurationStrings(); - buildDefaultConfigurationCustomTriggers(); - } - function buildDefaultConfigurationStrings() { - _configuration.backButtonText = getDefaultAnyString(_configuration.backButtonText, "Back"); - _configuration.nextButtonText = getDefaultAnyString(_configuration.nextButtonText, "Next"); - _configuration.finishButtonText = getDefaultAnyString(_configuration.finishButtonText, "Finish"); - _configuration.closeButtonToolTipText = getDefaultAnyString(_configuration.closeButtonToolTipText, "Close"); - _configuration.doNotShowAgainText = getDefaultAnyString(_configuration.doNotShowAgainText, "Do not show again"); - _configuration.objectErrorText = getDefaultAnyString(_configuration.objectErrorText, "Errors in object: {{error_1}}, {{error_2}}"); - _configuration.attributeNotValidErrorText = getDefaultAnyString(_configuration.attributeNotValidErrorText, "The attribute '{{attribute_name}}' is not a valid object."); - _configuration.attributeNotSetErrorText = getDefaultAnyString(_configuration.attributeNotSetErrorText, "The attribute '{{attribute_name}}' has not been set correctly."); - _configuration.closeDialogConfirmationText = getDefaultAnyString(_configuration.closeDialogConfirmationText, null); - } - function buildDefaultConfigurationCustomTriggers() { - _configuration.onDoNotShowAgainChange = getDefaultFunction(_configuration.onDoNotShowAgainChange, null); - } - _public.getVersion = function() { - return "1.7.2"; - }; - (function(documentObject, windowObject, mathObject, jsonObject) { - _parameter_Document = documentObject; - _parameter_Window = windowObject; - _parameter_Math = mathObject; - _parameter_Json = jsonObject; - buildDefaultConfiguration(); - _parameter_Document.addEventListener("DOMContentLoaded", function() { - setupDefaultGroup(); - renderDisabledBackground(); - renderDialog(); - renderToolTip(); - getElements(); - buildDocumentEvents(); - if (getBrowserUrlParameters()) { - _public.show(); - } - }); - if (!isDefined(_parameter_Window.$journey)) { - _parameter_Window.$journey = _public; - } - })(document, window, Math, JSON); -})(); \ No newline at end of file + const e = getGroupBindingOptions(); + onDialogClose(false); + fireCustomTriggerEvent(e.events.onFinish, e._currentView.element); + } else { + removeFocusClassFromLastElement(); + _groups[_groups_Current].position++; + showDialogAndSetPosition(); + } + } + function showDialogAndSetPosition() { + const e = getGroupBindingOptions(); + if (Is.defined(e) && Is.defined(e._currentView.element)) { + if (e.showDisabledBackground) { + showDisabledBackground(); + } else { + hideDisabledBackground(); + } + hideToolTip(); + _element_Dialog_Close_Button.style.display = _configuration.showCloseButton ? "block" : "none"; + _configuration_ShortcutKeysEnabled = true; + e._currentView.element.className += " " + "journey-js-element-focus"; + if (_configuration.scrollToElements) { + e._currentView.element.scrollIntoView(); + } + const t = DomElement.getStyleValueByName(e._currentView.element, "position"); + if (t !== "" && t.toLowerCase() === "static") { + _element_Focus_Element_PositionStyle = t; + e._currentView.element.style.position = "relative"; + } + DomElement.showElementBasedOnCondition(_element_Dialog_CheckBox_Container, _configuration.showDoNotShowAgain); + DomElement.showElementBasedOnCondition(_element_Dialog_ProgressDots, _configuration.showProgressDots && _groups[_groups_Current].keys.length > 1); + DomElement.showElementBasedOnCondition(_element_Dialog_ProgressBar, _configuration.showProgressBar && _groups[_groups_Current].keys.length > 1); + DomElement.showElementBasedOnCondition(_element_Dialog_ProgressBar_Percentage_Text, _configuration.showProgressBarText); + DomElement.showElementBasedOnCondition(_element_Dialog_Buttons, _configuration.showButtons); + _element_Dialog_Buttons_Back_Button.innerHTML = _configuration.backButtonText; + _element_Dialog_Buttons_Back_Button.disabled = _groups[_groups_Current].position === 0; + if (_groups[_groups_Current].position >= _groups[_groups_Current].keys.length - 1) { + _element_Dialog_Buttons_Next_Button.innerHTML = _configuration.finishButtonText; + } else { + _element_Dialog_Buttons_Next_Button.innerHTML = _configuration.nextButtonText; + } + setDialogText(e); + setDialogPosition(null, e); + buildProcessDots(); + setProgressBarPosition(); + fireCustomTriggerEvent(e.events.onEnter, e._currentView.element); + if (e.sendClick) { + e._currentView.element.click(); + } + } + } + function setDialogText(e) { + if (Is.definedString(e.title)) { + _element_Dialog_Title.innerHTML = e.title; + } else { + _element_Dialog_Title.innerHTML = ""; + } + if (Is.definedString(e.description)) { + _element_Dialog_Description.innerHTML = e.description; + } else { + _element_Dialog_Description.innerHTML = ""; + } + } + function setDialogPosition(e, t) { + if (_element_Dialog.style.display !== "block") { + _element_Dialog.style.display = "block"; + fireCustomTriggerEvent(t.events.onOpen, t._currentView.element); + } + if (_groups[_groups_Current].position === 0) { + fireCustomTriggerEvent(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); + } 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; + } + if (o + _element_Dialog.offsetHeight > window.innerHeight || t.alignTop) { + o -= _element_Dialog.offsetHeight + t._currentView.element.offsetHeight; + } + _element_Dialog.style.top = o + "px"; + _element_Dialog.style.left = n + "px"; + } + } else { + const e = DomElement.getScrollPosition(); + const t = Math.max(0, (window.innerWidth - _element_Dialog.offsetWidth) / 2 + e.left); + const o = Math.max(0, (window.innerHeight - _element_Dialog.offsetHeight) / 2 + e.top); + _element_Dialog.style.left = t + "px"; + _element_Dialog.style.top = o + "px"; + } + } + function removeFocusClassFromLastElement(e = true) { + const t = getGroupBindingOptions(); + if (Is.defined(t) && Is.defined(t._currentView.element)) { + t._currentView.element.className = t._currentView.element.className.replace(" " + "journey-js-element-focus", ""); + if (Is.defined(_element_Focus_Element_PositionStyle)) { + t._currentView.element.style.position = _element_Focus_Element_PositionStyle; + } + if (e) { + fireCustomTriggerEvent(t.events.onLeave, t._currentView.element); + } + } + } + function buildProcessDots() { + _element_Dialog_ProgressDots.innerHTML = ""; + if (_configuration.showProgressDots) { + const e = _groups[_groups_Current].keys.length; + for (let t = 0; t < e; t++) { + buildProgressDot(t, _groups[_groups_Current].keys[t]); + } + } + } + function buildProgressDot(e, t) { + const o = _groups[_groups_Current].json[t]; + let n; + if (e === _groups[_groups_Current].position) { + n = DomElement.create("div", "dot-active"); + } else { + n = DomElement.create("div", "dot"); + n.onclick = () => { + removeFocusClassFromLastElement(); + _groups[_groups_Current].position = e; + showDialogAndSetPosition(); + }; + } + _element_Dialog_ProgressDots.appendChild(n); + if (_configuration.showProgressDotToolTips) { + if (Is.definedString(o.tooltip)) { + addToolTip(n, o.tooltip); + } else { + addToolTip(n, o.title); + } + } + if (_configuration.showProgressDotNumbers) { + n.className += " dot-number"; + n.innerHTML = (e + 1).toString(); + } + } + function setProgressBarPosition() { + if (_configuration.showProgressBar) { + const e = _element_Dialog_ProgressBar.offsetWidth / _groups[_groups_Current].keys.length; + const t = (_groups[_groups_Current].position + 1) * e; + const o = Math.ceil((_groups[_groups_Current].position + 1) / _groups[_groups_Current].keys.length * 100); + _element_Dialog_ProgressBar_Percentage.style.width = t + "px"; + _element_Dialog_ProgressBar_Percentage_Text.innerHTML = o + "%"; + } + } + function makeDialogMovable() { + _element_Dialog_Title.onmousedown = onMoveTitleBarMouseDown; + _element_Dialog_Title.onmouseup = onMoveTitleBarMouseUp; + _element_Dialog_Title.oncontextmenu = onMoveTitleBarMouseUp; + document.body.addEventListener("mousemove", onMoveDocumentMouseMove); + document.body.addEventListener("mouseleave", onMoveDocumentMouseLeave); + } + function onMoveTitleBarMouseDown(e) { + if (!_element_Dialog_Move_IsMoving && !_element_Dialog_IsHint && _configuration.dialogMovingEnabled) { + _element_Dialog.className += " journey-js-dialog-moving"; + _element_Dialog_Move_IsMoving = true; + _element_Dialog_Move_X = e.pageX - _element_Dialog.offsetLeft; + _element_Dialog_Move_Y = e.pageY - _element_Dialog.offsetTop; + _element_Dialog_Move_Original_X = _element_Dialog.offsetLeft; + _element_Dialog_Move_Original_Y = _element_Dialog.offsetTop; + } + } + function onMoveTitleBarMouseUp() { + if (_element_Dialog_Move_IsMoving) { + _element_Dialog_Move_IsMoving = false; + _element_Dialog_Move_Original_X = 0; + _element_Dialog_Move_Original_Y = 0; + _element_Dialog.className = "journey-js-dialog"; + } + } + function onMoveDocumentMouseMove(e) { + if (_element_Dialog_Move_IsMoving) { + _element_Dialog.style.left = e.pageX - _element_Dialog_Move_X + "px"; + _element_Dialog.style.top = e.pageY - _element_Dialog_Move_Y + "px"; + } + } + function onMoveDocumentMouseLeave() { + if (_element_Dialog_Move_IsMoving) { + _element_Dialog.style.left = _element_Dialog_Move_Original_X + "px"; + _element_Dialog.style.top = _element_Dialog_Move_Original_Y + "px"; + _element_Dialog_Move_IsMoving = false; + _element_Dialog_Move_Original_X = 0; + _element_Dialog_Move_Original_Y = 0; + _element_Dialog.className = "journey-js-dialog"; + } + } + function renderToolTip() { + if (!Is.defined(_element_ToolTip)) { + _element_ToolTip = DomElement.create("div", "journey-js-tooltip"); + _element_ToolTip.style.display = "none"; + document.body.appendChild(_element_ToolTip); + document.body.addEventListener("mousemove", (() => { + hideToolTip(); + })); + document.addEventListener("scroll", (() => { + hideToolTip(); + })); + } + } + function addToolTip(e, t) { + if (e !== null) { + e.onmousemove = e => { + showToolTip(e, t); + }; + } + } + function showToolTip(e, t) { + DomElement.cancelBubble(e); + hideToolTip(); + _element_ToolTip_Timer = setTimeout((() => { + _element_ToolTip.innerHTML = t; + _element_ToolTip.style.display = "block"; + DomElement.showElementAtMousePosition(e, _element_ToolTip); + }), _configuration.tooltipDelay); + } + function hideToolTip() { + if (Is.defined(_element_ToolTip)) { + if (_element_ToolTip_Timer !== 0) { + clearTimeout(_element_ToolTip_Timer); + _element_ToolTip_Timer = 0; + } + if (_element_ToolTip.style.display === "block") { + _element_ToolTip.style.display = "none"; + } + } + } + function getElements() { + const e = _configuration.domElementTypes; + const t = e.length; + for (let o = 0; o < t; o++) { + const t = document.getElementsByTagName(e[o]); + const n = [].slice.call(t); + const i = n.length; + for (let e = 0; e < i; e++) { + if (!getElement(n[e])) { + break; + } + } + } + _groups[_groups_Current].keys.sort(); + } + function getElement(e) { + let t = true; + if (Is.defined(e) && e.hasAttribute(Constants.JOURNEY_JS_ATTRIBUTE_NAME)) { + const o = e.getAttribute(Constants.JOURNEY_JS_ATTRIBUTE_NAME); + if (Is.definedString(o)) { + const n = getObjectFromString(o); + if (n.parsed && Is.definedObject(n.object)) { + setupElement(e, buildAttributeOptions(n.object)); + } else { + if (!_configuration.safeMode) { + console.error(_configuration.attributeNotValidErrorText.replace("{{attribute_name}}", Constants.JOURNEY_JS_ATTRIBUTE_NAME)); + t = false; + } + } + } else { + if (!_configuration.safeMode) { + console.error(_configuration.attributeNotSetErrorText.replace("{{attribute_name}}", Constants.JOURNEY_JS_ATTRIBUTE_NAME)); + t = false; + } + } + } + return t; + } + function setupElement(e, t) { + t._currentView = {}; + t._currentView.element = e; + if (Is.definedNumber(t.order) && (Is.definedString(t.title) || Is.definedString(t.description))) { + e.removeAttribute(Constants.JOURNEY_JS_ATTRIBUTE_NAME); + if (!t.isHint) { + setupNewGroup(t.group); + _groups[t.group].json[t.order] = t; + _groups[t.group].keys.push(t.order); + fireCustomTriggerEvent(t.events.onAddStep, e); + } else { + renderHint(t); + } + } + } + function renderHint(e) { + const t = DomElement.getStyleValueByName(e._currentView.element, "position"); + if (t !== "" && t.toLowerCase() === "static") { + e._currentView.element.style.position = "relative"; + } + const o = DomElement.create("div", "journey-js-hint"); + e._currentView.element.appendChild(o); + o.onclick = t => { + DomElement.cancelBubble(t); + _element_Dialog_CheckBox_Container.style.display = "none"; + _element_Dialog_ProgressDots.style.display = "none"; + _element_Dialog_ProgressBar.style.display = "none"; + _element_Dialog_Buttons.style.display = "none"; + _configuration_ShortcutKeysEnabled = false; + setDialogText(e); + setDialogPosition(t, e); + if (e.removeHintWhenViewed) { + DomElement.clearElementsByClassName(e._currentView.element, "journey-js-hint"); + } + }; + } + function buildDocumentEvents(e = true) { + const t = e ? document.addEventListener : document.removeEventListener; + const o = e ? window.addEventListener : window.removeEventListener; + if (_configuration.shortcutKeysEnabled) { + t("keydown", onWindowKeyDown); + } + o("resize", onWindowResize); + } + function onWindowKeyDown(e) { + if (_public.isOpen() && _configuration.shortcutKeysEnabled) { + if (e.code === "Escape") { + e.preventDefault(); + onDialogClose(); + } else { + if (_configuration_ShortcutKeysEnabled) { + if (e.code === "ArrowLeft") { + e.preventDefault(); + onDialogBack(); + } else if (e.code === "ArrowRight") { + e.preventDefault(); + onDialogNext(); + } else if (e.code === "ArrowUp") { + e.preventDefault(); + onWindowKeyCodeUp(); + } else if (e.code === "ArrowDown") { + e.preventDefault(); + onWindowKeyCodeDown(); + } + } + } + } + } + function onWindowResize() { + if (_public.isOpen()) { + showDialogAndSetPosition(); + } + } + function onWindowKeyCodeUp() { + if (_groups[_groups_Current].position !== 0) { + removeFocusClassFromLastElement(); + _groups[_groups_Current].position = 0; + showDialogAndSetPosition(); + } + } + function onWindowKeyCodeDown() { + if (_groups[_groups_Current].position !== _groups[_groups_Current].keys.length - 1) { + removeFocusClassFromLastElement(); + _groups[_groups_Current].position = _groups[_groups_Current].keys.length - 1; + showDialogAndSetPosition(); + } + } + function buildAttributeOptions(e) { + let t = Data.getDefaultObject(e, {}); + t.order = Data.getDefaultNumber(t.order, 0); + t.attach = Data.getDefaultBoolean(t.attach, true); + t.sendClick = Data.getDefaultBoolean(t.sendClick, false); + t.alignTop = Data.getDefaultBoolean(t.alignTop, false); + t.alignRight = Data.getDefaultBoolean(t.alignRight, false); + t.isHint = Data.getDefaultBoolean(t.isHint, false); + t.alignHintToClickPosition = Data.getDefaultBoolean(t.alignHintToClickPosition, false); + t.showDisabledBackground = Data.getDefaultBoolean(t.showDisabledBackground, true); + t.removeHintWhenViewed = Data.getDefaultBoolean(t.removeHintWhenViewed, false); + t.group = Data.getDefaultString(t.group, _groups_Default); + t = buildAttributeOptionStrings(t); + return buildAttributeOptionCustomTriggers(t); + } + function buildAttributeOptionStrings(e) { + e.title = Data.getDefaultString(e.title, ""); + e.description = Data.getDefaultString(e.description, ""); + e.tooltip = Data.getDefaultString(e.tooltip, ""); + return e; + } + function buildAttributeOptionCustomTriggers(e) { + e.events = Data.getDefaultObject(e.events, {}); + e.events.onEnter = Data.getDefaultFunction(e.events.onEnter, null); + e.events.onLeave = Data.getDefaultFunction(e.events.onLeave, null); + e.events.onClose = Data.getDefaultFunction(e.events.onClose, null); + e.events.onFinish = Data.getDefaultFunction(e.events.onFinish, null); + e.events.onOpen = Data.getDefaultFunction(e.events.onOpen, null); + e.events.onStart = Data.getDefaultFunction(e.events.onStart, null); + e.events.onAddStep = Data.getDefaultFunction(e.events.onAddStep, null); + e.events.onRemoveStep = Data.getDefaultFunction(e.events.onRemoveStep, null); + return e; + } + function fireCustomTriggerEvent(e, ...t) { + if (Is.definedFunction(e)) { + e.apply(null, [].slice.call(t, 0)); + } + } + function getBrowserUrlParameters() { + let e = false; + if (_configuration.browserUrlParametersEnabled) { + const t = window.location.href; + const o = getBrowserUrlArguments(t); + if (Is.defined(o.sjOrderId)) { + const e = parseInt(o.sjOrderId, 10); + if (!isNaN(e) && e <= _groups[_groups_Current].keys.length - 1) { + _groups[_groups_Current].position = e; + } + } + if (Is.defined(o.sjShow)) { + e = o.sjShow === "true"; + } + } + return e; + } + function getBrowserUrlArguments(e) { + const t = {}; + const o = e.split("?"); + if (o.length > 1) { + const e = o[1].split("&"); + const n = e.length; + for (let o = 0; o < n; o++) { + const n = e[o].split("="); + t[n[0]] = n[1]; + } + } + return t; + } + function getObjectFromString(objectString) { + const result = { + parsed: true, + object: null + }; + try { + if (Is.definedString(objectString)) { + result.object = JSON.parse(objectString); + } + } catch (e1) { + try { + result.object = eval("(" + objectString + ")"); + if (Is.definedFunction(result.object)) { + result.object = result.object(); + } + } catch (e) { + if (!_configuration.safeMode) { + console.error(_configuration.objectErrorText.replace("{{error_1}}", e1.message).replace("{{error_2}}", e.message)); + result.parsed = false; + } + result.object = null; + } + } + return result; + } + function resetDialogPosition() { + if (_public.isOpen()) { + onDialogClose(false); + _groups[_groups_Current].position = 0; + } + } + function buildDefaultConfiguration(e = {}) { + _configuration = Data.getDefaultObject(e, {}); + _configuration.safeMode = Data.getDefaultBoolean(_configuration.safeMode, true); + _configuration.domElementTypes = Data.getDefaultStringOrArray(_configuration.domElementTypes, [ "*" ]); + _configuration.showCloseButton = Data.getDefaultBoolean(_configuration.showCloseButton, true); + _configuration.shortcutKeysEnabled = Data.getDefaultBoolean(_configuration.shortcutKeysEnabled, true); + _configuration.showProgressDots = Data.getDefaultBoolean(_configuration.showProgressDots, true); + _configuration.browserUrlParametersEnabled = Data.getDefaultBoolean(_configuration.browserUrlParametersEnabled, true); + _configuration.showProgressDotNumbers = Data.getDefaultBoolean(_configuration.showProgressDotNumbers, false); + _configuration.showButtons = Data.getDefaultBoolean(_configuration.showButtons, true); + _configuration.showDoNotShowAgain = Data.getDefaultBoolean(_configuration.showDoNotShowAgain, false); + _configuration.tooltipDelay = Data.getDefaultNumber(_configuration.tooltipDelay, 750); + _configuration.showProgressDotToolTips = Data.getDefaultBoolean(_configuration.showProgressDotToolTips, true); + _configuration.closeDialogOnDisabledBackgroundClick = Data.getDefaultBoolean(_configuration.closeDialogOnDisabledBackgroundClick, false); + _configuration.showProgressBar = Data.getDefaultBoolean(_configuration.showProgressBar, false); + _configuration.scrollToElements = Data.getDefaultBoolean(_configuration.scrollToElements, false); + _configuration.dialogMovingEnabled = Data.getDefaultBoolean(_configuration.dialogMovingEnabled, false); + _configuration.showProgressBarText = Data.getDefaultBoolean(_configuration.showProgressBarText, false); + buildDefaultConfigurationStrings(); + buildDefaultConfigurationCustomTriggers(); + } + function buildDefaultConfigurationStrings() { + _configuration.backButtonText = Data.getDefaultAnyString(_configuration.backButtonText, "Back"); + _configuration.nextButtonText = Data.getDefaultAnyString(_configuration.nextButtonText, "Next"); + _configuration.finishButtonText = Data.getDefaultAnyString(_configuration.finishButtonText, "Finish"); + _configuration.closeButtonToolTipText = Data.getDefaultAnyString(_configuration.closeButtonToolTipText, "Close"); + _configuration.doNotShowAgainText = Data.getDefaultAnyString(_configuration.doNotShowAgainText, "Do not show again"); + _configuration.objectErrorText = Data.getDefaultAnyString(_configuration.objectErrorText, "Errors in object: {{error_1}}, {{error_2}}"); + _configuration.attributeNotValidErrorText = Data.getDefaultAnyString(_configuration.attributeNotValidErrorText, "The attribute '{{attribute_name}}' is not a valid object."); + _configuration.attributeNotSetErrorText = Data.getDefaultAnyString(_configuration.attributeNotSetErrorText, "The attribute '{{attribute_name}}' has not been set correctly."); + _configuration.closeDialogConfirmationText = Data.getDefaultAnyString(_configuration.closeDialogConfirmationText, ""); + } + function buildDefaultConfigurationCustomTriggers() { + _configuration.onDoNotShowAgainChange = Data.getDefaultFunction(_configuration.onDoNotShowAgainChange, null); + } + const _public = { + start: function(e = "") { + if (!_public.isOpen()) { + _groups_Current = Data.getDefaultString(e, _groups_Default); + if (_groups.hasOwnProperty(_groups_Current)) { + _groups[_groups_Current].position = 0; + showDialogAndSetPosition(); + } + } + return _public; + }, + show: function(e = "") { + if (!_public.isOpen()) { + _groups_Current = Data.getDefaultString(e, _groups_Current); + if (_groups.hasOwnProperty(_groups_Current)) { + if (_groups[_groups_Current].position === _groups[_groups_Current].keys.length - 1) { + _groups[_groups_Current].position = 0; + } + showDialogAndSetPosition(); + } + } + return _public; + }, + hide: function() { + if (_public.isOpen()) { + onDialogClose(); + } + return _public; + }, + isOpen: function() { + return Is.defined(_element_Dialog) && _element_Dialog.style.display === "block"; + }, + isComplete: function() { + return _groups[_groups_Current].position >= _groups[_groups_Current].keys.length - 1; + }, + addDocumentSteps: function() { + getElements(); + return _public; + }, + addStep: function(e, t) { + if (Is.definedObject(e) && Is.definedObject(t)) { + setupElement(e, buildAttributeOptions(t)); + _groups[_groups_Current].keys.sort(); + resetDialogPosition(); + } + return _public; + }, + removeStep: function(e) { + if (Is.definedObject(e)) { + let t = false; + for (let o in _groups) { + if (_groups.hasOwnProperty(o)) { + for (let n in _groups[o].json) { + if (_groups[o].json.hasOwnProperty(n)) { + const i = _groups[o].json[n]; + if (i._currentView.element === e) { + fireCustomTriggerEvent(i.events.onRemoveStep, i._currentView.element); + _groups[o].keys.splice(_groups[o].keys.indexOf(i.order), 1); + delete _groups[o].json[i.order]; + _groups[o].keys.sort(); + t = true; + break; + } + } + } + } + } + if (!t) { + DomElement.clearElementsByClassName(e, "journey-js-hint"); + } else { + resetDialogPosition(); + } + } + return _public; + }, + clearSteps: function(e = "") { + resetDialogPosition(); + for (let t in _groups) { + if (_groups.hasOwnProperty(t)) { + if (!Is.definedString(e) || e === t) { + for (let e in _groups[t].json) { + if (_groups[t].json.hasOwnProperty(e)) { + const o = _groups[t].json[e]; + fireCustomTriggerEvent(o.events.onRemoveStep, o._currentView.element); + } + } + } + } + } + if (Is.definedString(e)) { + if (_groups.hasOwnProperty(e)) { + delete _groups[e]; + } + } else { + _groups = {}; + } + if (!Is.definedString(e) || e === _groups_Default) { + setupDefaultGroup(_groups); + } + return _public; + }, + clearHints: function() { + DomElement.clearElementsByClassName(document.body, "journey-js-hint"); + return _public; + }, + reverseStepOrder: function() { + _groups[_groups_Current].keys.reverse(); + resetDialogPosition(); + return _public; + }, + setConfiguration: function(e) { + if (Is.definedObject(e)) { + let t = false; + const o = _configuration; + for (let n in e) { + if (e.hasOwnProperty(n) && _configuration.hasOwnProperty(n) && o[n] !== e[n]) { + o[n] = e[n]; + t = true; + } + } + if (t) { + buildDefaultConfiguration(o); + } + } + return _public; + }, + getVersion: function() { + return "2.0.0"; + } + }; + (() => { + buildDefaultConfiguration(); + document.addEventListener("DOMContentLoaded", (() => { + setupDefaultGroup(); + renderDisabledBackground(); + renderDialog(); + renderToolTip(); + getElements(); + buildDocumentEvents(); + if (getBrowserUrlParameters()) { + _public.show(); + } + })); + if (!Is.defined(window.$journey)) { + window.$journey = _public; + } + })(); +})();//# sourceMappingURL=journey.js.map \ No newline at end of file diff --git a/dist/journey.js.css b/dist/journey.js.css index 18a68c5..d179e88 100644 --- a/dist/journey.js.css +++ b/dist/journey.js.css @@ -1,5 +1,5 @@ /* - * Journey.js Library v1.7.2 + * Journey.js Library v2.0.0 * * Copyright 2024 Bunoon * Released under the MIT License @@ -452,4 +452,6 @@ div.journey-js-tooltip { 100% { opacity: 1; } -}/*# sourceMappingURL=journey.js.css.map */ \ No newline at end of file +} + +/*# sourceMappingURL=journey.js.css.map */ diff --git a/dist/journey.js.map b/dist/journey.js.map new file mode 100644 index 0000000..f83e5cf --- /dev/null +++ b/dist/journey.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../src/ts/constant.ts","../src/ts/is.ts","../src/ts/data.ts","../src/ts/dom.ts","../src/journey.ts"],"names":["Constants","Is","Data","result","DomElement"],"mappings":";;;AAaO,IAAU;AAAA,CAAV,CAAUA,eAAV;AACI,EAAMA,WAAA,4BAA4B;AAAA,GAD5B;;;ACGV,IAAU;AAAA,CAAV,CAAUC,QAAV;AACI,WAAS,QAAS,OAAuB;AAC5C,WAAO,UAAU,QAAQ,UAAU,UAAa;AAAA,EACpD;AAFO,EAAAA,IAAS;AAIT,WAAS,cAAe,QAAwB;AACnD,WAAO,QAAS,MAAO,KAAK,OAAO,WAAW;AAAA,EAClD;AAFO,EAAAA,IAAS;AAIT,WAAS,eAAgB,QAAwB;AACpD,WAAO,QAAS,MAAO,KAAK,OAAO,WAAW;AAAA,EAClD;AAFO,EAAAA,IAAS;AAIT,WAAS,cAAe,QAAwB;AACnD,WAAO,QAAS,MAAO,KAAK,OAAO,WAAW;AAAA,EAClD;AAFO,EAAAA,IAAS;AAIT,WAAS,gBAAiB,QAAwB;AACrD,WAAO,QAAS,MAAO,KAAK,OAAO,WAAW;AAAA,EAClD;AAFO,EAAAA,IAAS;AAIT,WAAS,cAAe,QAAwB;AACnD,WAAO,QAAS,MAAO,KAAK,OAAO,WAAW;AAAA,EAClD;AAFO,EAAAA,IAAS;AAIT,WAAS,aAAc,QAAwB;AAClD,WAAO,cAAe,MAAO,KAAK,kBAAkB;AAAA,EACxD;AAFO,EAAAA,IAAS;AAAA,GAzBH;;;ACCV,IAAU;AAAA,CAAV,CAAUC,UAAV;AACI,WAAS,oBAAqB,OAAY,cAAgC;AAC7E,WAAO,OAAO,UAAU,WAAW,QAAQ;AAAA,EAC/C;AAFO,EAAAA,MAAS;AAIT,WAAS,iBAAkB,OAAY,cAAgC;AAC1E,WAAO,GAAG,cAAe,KAAM,IAAI,Q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,IACX;AAAA,EACJ;AASA,GAAE,MAAM;AACJ,8BAA0B;AAE1B,aAAS,iBAAkB,oBAAoB,MAAM;AACjD,wBAAkB;AAClB,+BAAyB;AACzB,mBAAa;AACb,oBAAc;AACd,kBAAY;AACZ,0BAAoB;AAEpB,UAAK,wBAAwB,GAAI;AAC7B,gBAAQ,KAAK;AAAA,MACjB;AAAA,IACJ,CAAE;AAEF,QAAK,CAAC,GAAG,QAAS,OAAO,QAAS,GAAI;AAClC,aAAO,WAAW;AAAA,IACtB;AAAA,EACJ,GAAK;AACT,GAAK","sourcesContent":["/**\n * Journey.js\n * \n * A lightweight, easy-to-use JavaScript library to create interactive, customizable, accessible guided tours across your websites or web apps!\n * \n * @file journey.js\n * @version v2.0.0\n * @author Bunoon\n * @license MIT License\n * @copyright Bunoon 2024\n */\n\n\nexport namespace Constants {\n export const JOURNEY_JS_ATTRIBUTE_NAME = \"data-journey-js\";\n}","/**\n * Journey.js\n * \n * A lightweight, easy-to-use JavaScript library to create interactive, customizable, accessible guided tours across your websites or web apps!\n * \n * @file journey.js\n * @version v2.0.0\n * @author Bunoon\n * @license MIT License\n * @copyright Bunoon 2024\n */\n\n\nimport { Char } from \"./enum\";\n\n\nexport namespace Is {\n export function defined( value: any ) : boolean {\n return value !== null && value !== undefined && value !== Char.empty;\n }\n\n export function definedObject( object: any ) : boolean {\n return defined( object ) && typeof object === \"object\";\n }\n\n export function definedBoolean( object: any ) : boolean {\n return defined( object ) && typeof object === \"boolean\";\n }\n\n export function definedString( object: any ) : boolean {\n return defined( object ) && typeof object === \"string\";\n }\n\n export function definedFunction( object: any ) : boolean {\n return defined( object ) && typeof object === \"function\";\n }\n\n export function definedNumber( object: any ) : boolean {\n return defined( object ) && typeof object === \"number\";\n }\n\n export function definedArray( object: any ) : boolean {\n return definedObject( object ) && object instanceof Array;\n }\n}","/**\n * Journey.js\n * \n * A lightweight, easy-to-use JavaScript library to create interactive, customizable, accessible guided tours across your websites or web apps!\n * \n * @file journey.js\n * @version v2.0.0\n * @author Bunoon\n * @license MIT License\n * @copyright Bunoon 2024\n */\n\n\nimport { Char } from \"./enum\";\nimport { Is } from \"./is\";\n\n\nexport namespace Data {\n export function getDefaultAnyString( value: any, defaultValue: string ) : string {\n return typeof value === \"string\" ? value : defaultValue;\n }\n\n export function getDefaultString( value: any, defaultValue: string ) : string {\n return Is.definedString( value ) ? value : defaultValue;\n }\n\n export function getDefaultBoolean( value: any, defaultValue: boolean ) : boolean {\n return Is.definedBoolean( value ) ? value : defaultValue;\n }\n\n export function getDefaultNumber( value: any, defaultValue: number ) : number {\n return Is.definedNumber( value ) ? value : defaultValue;\n }\n\n export function getDefaultFunction( value: any, defaultValue: any ) : any {\n return Is.definedFunction( value ) ? value : defaultValue;\n }\n\n export function getDefaultObject( value: any, defaultValue: any ) : any {\n return Is.definedObject( value ) ? value : defaultValue;\n }\n\n export function getDefaultArray( value: any, defaultValue: any[] ) : any[] {\n return Is.definedArray( value ) ? value : defaultValue;\n }\n\n export function getDefaultStringOrArray( value: any, defaultValue: any[] ) : any[] {\n let result: any[] = defaultValue;\n\n if ( Is.definedString( value ) ) {\n const values: string[] = value.toString().split( Char.space );\n\n if ( values.length === 0 ) {\n value = defaultValue;\n } else {\n result = values;\n }\n\n } else {\n result = getDefaultArray( value, defaultValue );\n }\n\n return result;\n }\n}","/**\n * Journey.js\n * \n * A lightweight, easy-to-use JavaScript library to create interactive, customizable, accessible guided tours across your websites or web apps!\n * \n * @file journey.js\n * @version v2.0.0\n * @author Bunoon\n * @license MIT License\n * @copyright Bunoon 2024\n */\n\n\nimport { Char } from \"./enum\";\nimport { Is } from \"./is\";\nimport { type Position } from \"./type\";\n\n\nexport namespace DomElement {\n export function create( type: string, className: string = Char.empty ) : HTMLElement {\n const nodeType: string = type.toLowerCase();\n const isText: boolean = nodeType === \"text\";\n\n let result: any = isText ? document.createTextNode( Char.empty ) : document.createElement( nodeType );\n\n if ( Is.defined( className ) ) {\n result.className = className;\n }\n\n return result;\n }\n\n export function getOffset( element: HTMLElement ) : Position {\n const result: Position = {\n left: 0,\n top: 0\n } as Position;\n\n while ( element && !isNaN( element.offsetLeft ) && !isNaN( element.offsetTop ) ) {\n result.left += element.offsetLeft - element.scrollLeft;\n result.top += element.offsetTop - element.scrollTop;\n\n element = element.offsetParent as HTMLElement;\n }\n\n return result;\n }\n\n export function getScrollPosition() : Position {\n const documentElement: HTMLElement = document.documentElement;\n\n const result: Position = {\n left: documentElement.scrollLeft - ( documentElement.clientLeft || 0 ),\n top: documentElement.scrollTop - ( documentElement.clientTop || 0 )\n } as Position;\n\n return result;\n }\n\n export function getStyleValueByName( element: any, stylePropertyName: string ) : any {\n let value: any = null;\n \n if ( document.defaultView!.getComputedStyle! ) {\n value = document.defaultView!.getComputedStyle( element, null ).getPropertyValue( stylePropertyName ); \n } else if ( element.currentStyle ) {\n value = element.currentStyle[ stylePropertyName ];\n } \n\n return value;\n }\n\n export function addNode( parent: HTMLElement, node: HTMLElement ) : void {\n try {\n if ( !parent.contains( node ) ) {\n parent.appendChild( node );\n }\n } catch ( e: any ) {\n console.warn( e.message );\n }\n }\n\n export function removeNode( parent: HTMLElement, node: HTMLElement ) : void {\n try {\n if ( parent.contains( node ) ) {\n parent.removeChild( node );\n }\n } catch ( e: any ) {\n console.warn( e.message );\n }\n }\n\n export function cancelBubble( e: any ) : void {\n e.preventDefault();\n e.cancelBubble = true;\n }\n\n export function showElementAtMousePosition( e: MouseEvent, element: HTMLElement ) : void {\n let left: number = e.pageX;\n let top: number = e.pageY;\n const scrollPosition: Position = getScrollPosition();\n\n element.style.display = \"block\";\n\n if ( left + element.offsetWidth > window.innerWidth ) {\n left -= element.offsetWidth;\n } else {\n left++;\n }\n\n if ( top + element.offsetHeight > window.innerHeight ) {\n top -= element.offsetHeight;\n } else {\n top++;\n }\n\n if ( left < scrollPosition.left ) {\n left = e.pageX + 1;\n }\n\n if ( top < scrollPosition.top ) {\n top = e.pageY + 1;\n }\n \n element.style.left = left + \"px\";\n element.style.top = top + \"px\";\n }\n\n export function showElementBasedOnCondition( element: HTMLElement, condition: boolean ) : void {\n if ( condition ) {\n if ( element.style.display !== \"block\" ) {\n element.style.display = \"block\";\n }\n \n } else {\n if ( element.style.display !== \"none\" ) {\n element.style.display = \"none\";\n }\n }\n }\n\n export function createCheckBox( container: HTMLElement, labelText: string ) : HTMLInputElement {\n const lineContainer: HTMLElement = create( \"div\" );\n const label: HTMLElement = create( \"label\", \"checkbox\" );\n const input: HTMLInputElement = create( \"input\" ) as HTMLInputElement;\n\n container.appendChild( lineContainer );\n lineContainer.appendChild( label );\n label.appendChild( input );\n\n input.type = \"checkbox\";\n\n const checkMark: HTMLElement = create( \"span\", \"check-mark\" );\n const text: HTMLElement = create( \"span\", \"text\" );\n\n text.innerHTML = labelText;\n \n label.appendChild( checkMark );\n label.appendChild( text );\n\n return input;\n }\n\n export function clearElementsByClassName( container: HTMLElement, className: string ) : void {\n let elements: HTMLCollectionOf = container.getElementsByClassName( className );\n\n while ( elements[ 0 ] ) {\n elements[ 0 ].parentNode!.removeChild( elements[ 0 ] );\n }\n }\n}","/**\n * Journey.js\n * \n * A lightweight, easy-to-use JavaScript library to create interactive, customizable, accessible guided tours across your websites or web apps!\n * \n * @file journey.js\n * @version v2.0.0\n * @author Bunoon\n * @license MIT License\n * @copyright Bunoon 2024\n */\n\n\nimport {\n type Configuration,\n type BindingOptions,\n type Events, \n type CurrentView, \n type Position} from \"./ts/type\";\n\nimport { Char, KeyCode } from \"./ts/enum\";\nimport { Constants } from \"./ts/constant\";\nimport { PublicApi } from \"./ts/api\";\nimport { Is } from \"./ts/is\";\nimport { Data } from \"./ts/data\";\nimport { DomElement } from \"./ts/dom\";\n\n\ntype StringToJson = {\n parsed: boolean;\n object: any;\n};\n\ntype Groups = Record;\n keys: number[];\n position: number;\n}>;\n\n\n( () => {\n // Variables: Configuration\n let _configuration: Configuration = {} as Configuration;\n\n // Variables: Configuration (overrides)\n let _configuration_ShortcutKeysEnabled: boolean = true;\n\n // Variables: Groups\n const _groups_Default: string = \"default\";\n let _groups_Current: string = _groups_Default;\n let _groups: Groups = {} as Groups;\n\n // Variables: Focus Element\n let _element_Focus_Element_PositionStyle: string = Char.empty;\n\n // Variables: Disabled Background\n let _element_Disabled_Background: HTMLElement;\n\n // Variables: Dialog\n let _element_Dialog: HTMLElement;\n let _element_Dialog_Close_Button: HTMLElement;\n let _element_Dialog_Title: HTMLElement;\n let _element_Dialog_Description: HTMLElement;\n let _element_Dialog_CheckBox_Container: HTMLElement;\n let _element_Dialog_CheckBox_Input: HTMLInputElement;\n let _element_Dialog_ProgressDots: HTMLElement;\n let _element_Dialog_ProgressBar: HTMLElement;\n let _element_Dialog_ProgressBar_Percentage: HTMLElement;\n let _element_Dialog_ProgressBar_Percentage_Text: HTMLElement;\n let _element_Dialog_Buttons: HTMLElement;\n let _element_Dialog_Buttons_Back_Button: HTMLInputElement;\n let _element_Dialog_Buttons_Next_Button: HTMLInputElement;\n let _element_Dialog_IsHint: boolean = false;\n\n // Variables: Dialog - Move\n let _element_Dialog_Move_Original_X: number = 0;\n let _element_Dialog_Move_Original_Y: number = 0;\n let _element_Dialog_Move_IsMoving: boolean = false;\n let _element_Dialog_Move_X: number = 0;\n let _element_Dialog_Move_Y: number = 0;\n\n // Variables: Dialog\n let _element_ToolTip: HTMLElement;\n let _element_ToolTip_Timer: number = 0;\n\n\n /*\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n * Groups\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n */\n\n function setupDefaultGroup( groups: any = null ) : void {\n _groups = Data.getDefaultObject( groups, {} as Groups );\n\n _groups[ _groups_Default ] = {\n json: {} as BindingOptions,\n keys: [],\n position: 0\n };\n }\n\n function setupNewGroup( group: string ) : void {\n if ( !_groups.hasOwnProperty( group ) ) {\n _groups[ group ] = {\n json: {} as BindingOptions,\n keys: [],\n position: 0\n };\n }\n }\n\n function getGroupBindingOptions() : BindingOptions {\n return _groups[ _groups_Current ].json[ _groups[ _groups_Current ].keys[ _groups[ _groups_Current ].position ] ];\n }\n\n\n /*\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n * Disabled Background\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n */\n\n function renderDisabledBackground() : void {\n _element_Disabled_Background = DomElement.create( \"div\", \"journey-js-disabled-background\" );\n\n _element_Disabled_Background.onclick = () => {\n if ( _configuration.closeDialogOnDisabledBackgroundClick ) {\n onDialogClose();\n }\n };\n }\n\n function showDisabledBackground() : void {\n DomElement.addNode( document.body, _element_Disabled_Background );\n }\n\n function hideDisabledBackground() : void {\n DomElement.removeNode( document.body, _element_Disabled_Background );\n }\n\n\n /*\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n * Render: Dialog\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n */\n\n function renderDialog() : void {\n _element_Dialog = DomElement.create( \"div\", \"journey-js-dialog\" );\n _element_Dialog.style.display = \"none\";\n document.body.appendChild( _element_Dialog );\n\n _element_Dialog_Close_Button = DomElement.create( \"button\", \"close\" );\n _element_Dialog.appendChild( _element_Dialog_Close_Button );\n\n _element_Dialog_Close_Button.onclick = () => {\n onDialogClose();\n };\n\n addToolTip( _element_Dialog_Close_Button, _configuration.closeButtonToolTipText! );\n\n _element_Dialog_Title = DomElement.create( \"div\", \"title\" );\n _element_Dialog.appendChild( _element_Dialog_Title );\n\n _element_Dialog_Description = DomElement.create( \"div\", \"description\" );\n _element_Dialog.appendChild( _element_Dialog_Description );\n\n _element_Dialog_CheckBox_Container = DomElement.create( \"div\", \"checkbox-container\" );\n _element_Dialog.appendChild( _element_Dialog_CheckBox_Container );\n\n _element_Dialog_CheckBox_Input = DomElement.createCheckBox( _element_Dialog_CheckBox_Container, _configuration.doNotShowAgainText! );\n \n _element_Dialog_CheckBox_Input.onchange = () => {\n if ( _configuration.showDoNotShowAgain ) {\n fireCustomTriggerEvent( _configuration.onDoNotShowAgainChange, _element_Dialog_CheckBox_Input.checked );\n }\n };\n\n _element_Dialog_ProgressDots = DomElement.create( \"div\", \"progress-dots\" );\n _element_Dialog.appendChild( _element_Dialog_ProgressDots );\n\n _element_Dialog_ProgressBar = DomElement.create( \"div\", \"progress-bar\" );\n _element_Dialog.appendChild( _element_Dialog_ProgressBar );\n\n _element_Dialog_ProgressBar_Percentage = DomElement.create( \"div\", \"progress-bar-percentage\" );\n _element_Dialog_ProgressBar.appendChild( _element_Dialog_ProgressBar_Percentage );\n\n _element_Dialog_ProgressBar_Percentage_Text = DomElement.create( \"p\", \"progress-bar-percentage-text\" );\n _element_Dialog_ProgressBar_Percentage.appendChild( _element_Dialog_ProgressBar_Percentage_Text );\n\n _element_Dialog_Buttons = DomElement.create( \"div\", \"buttons\" );\n _element_Dialog.appendChild( _element_Dialog_Buttons );\n\n _element_Dialog_Buttons_Back_Button = DomElement.create( \"button\", \"back\" ) as HTMLInputElement;\n _element_Dialog_Buttons_Back_Button.onclick = onDialogBack;\n _element_Dialog_Buttons.appendChild( _element_Dialog_Buttons_Back_Button );\n\n _element_Dialog_Buttons_Next_Button = DomElement.create( \"button\", \"next\" ) as HTMLInputElement;\n _element_Dialog_Buttons_Next_Button.onclick = onDialogNext;\n _element_Dialog_Buttons.appendChild( _element_Dialog_Buttons_Next_Button );\n\n makeDialogMovable();\n }\n\n function onDialogClose( showConfirmationBox: boolean = true ) : void {\n let confirmed: boolean = false;\n\n if ( Is.definedString( _configuration.closeDialogConfirmationText ) && showConfirmationBox ) {\n confirmed = confirm( _configuration.closeDialogConfirmationText );\n } else {\n confirmed = true;\n }\n\n if ( confirmed ) {\n const bindingOptions: BindingOptions = getGroupBindingOptions();\n\n if ( Is.defined( bindingOptions ) && Is.defined( bindingOptions._currentView.element ) ) {\n fireCustomTriggerEvent( bindingOptions.events!.onClose!, bindingOptions._currentView.element );\n }\n \n removeFocusClassFromLastElement( false );\n hideDisabledBackground();\n hideToolTip();\n \n _element_Dialog.style.display = \"none\";\n }\n }\n\n function onDialogBack() : void {\n if ( _groups[ _groups_Current ].position > 0 ) {\n removeFocusClassFromLastElement();\n\n _groups[ _groups_Current ].position--;\n\n showDialogAndSetPosition();\n } \n }\n\n function onDialogNext() : void {\n if ( _groups[ _groups_Current ].position === _groups[ _groups_Current ].keys.length - 1 ) {\n const bindingOptions: BindingOptions = getGroupBindingOptions();\n\n onDialogClose( false );\n fireCustomTriggerEvent( bindingOptions.events!.onFinish, bindingOptions._currentView.element );\n\n } else {\n removeFocusClassFromLastElement();\n\n _groups[ _groups_Current ].position++;\n\n showDialogAndSetPosition();\n }\n }\n\n function showDialogAndSetPosition() : void {\n const bindingOptions: BindingOptions = getGroupBindingOptions();\n\n if ( Is.defined( bindingOptions ) && Is.defined( bindingOptions._currentView.element ) ) {\n if ( bindingOptions.showDisabledBackground ) {\n showDisabledBackground();\n } else {\n hideDisabledBackground();\n }\n\n hideToolTip();\n \n _element_Dialog_Close_Button.style.display = _configuration.showCloseButton ? \"block\": \"none\";\n _configuration_ShortcutKeysEnabled = true;\n \n bindingOptions._currentView.element.className += Char.space + \"journey-js-element-focus\";\n\n if ( _configuration.scrollToElements ) {\n bindingOptions._currentView.element.scrollIntoView();\n }\n\n const lastPositionStyle: string = DomElement.getStyleValueByName( bindingOptions._currentView.element, \"position\" );\n\n if ( lastPositionStyle !== Char.empty && lastPositionStyle.toLowerCase() === \"static\" ) {\n _element_Focus_Element_PositionStyle = lastPositionStyle;\n bindingOptions._currentView.element.style.position = \"relative\";\n }\n\n DomElement.showElementBasedOnCondition( _element_Dialog_CheckBox_Container, _configuration.showDoNotShowAgain as boolean );\n DomElement.showElementBasedOnCondition( _element_Dialog_ProgressDots, _configuration.showProgressDots as boolean && _groups[ _groups_Current ].keys.length > 1 );\n DomElement.showElementBasedOnCondition( _element_Dialog_ProgressBar, _configuration.showProgressBar as boolean && _groups[ _groups_Current ].keys.length > 1 );\n DomElement.showElementBasedOnCondition( _element_Dialog_ProgressBar_Percentage_Text, _configuration.showProgressBarText as boolean );\n DomElement.showElementBasedOnCondition( _element_Dialog_Buttons, _configuration.showButtons as boolean );\n\n _element_Dialog_Buttons_Back_Button.innerHTML = _configuration.backButtonText!;\n _element_Dialog_Buttons_Back_Button.disabled = _groups[ _groups_Current ].position === 0;\n \n if ( _groups[ _groups_Current ].position >= _groups[ _groups_Current ].keys.length - 1 ) {\n _element_Dialog_Buttons_Next_Button.innerHTML = _configuration.finishButtonText!;\n } else {\n _element_Dialog_Buttons_Next_Button.innerHTML = _configuration.nextButtonText!;\n }\n\n setDialogText( bindingOptions );\n setDialogPosition( null, bindingOptions );\n buildProcessDots();\n setProgressBarPosition();\n fireCustomTriggerEvent( bindingOptions.events!.onEnter, bindingOptions._currentView.element );\n\n if ( bindingOptions.sendClick ) {\n bindingOptions._currentView.element.click();\n }\n }\n }\n\n function setDialogText( bindingOptions: BindingOptions ) : void {\n if ( Is.definedString( bindingOptions.title ) ) {\n _element_Dialog_Title.innerHTML = bindingOptions.title!;\n } else {\n _element_Dialog_Title.innerHTML = Char.empty;\n }\n\n if ( Is.definedString( bindingOptions.description ) ) {\n _element_Dialog_Description.innerHTML = bindingOptions.description!;\n } else {\n _element_Dialog_Description.innerHTML = Char.empty;\n }\n }\n\n function setDialogPosition( e: any, bindingOptions: BindingOptions ) : void {\n if ( _element_Dialog.style.display !== \"block\" ) {\n _element_Dialog.style.display = \"block\";\n\n fireCustomTriggerEvent( bindingOptions.events!.onOpen, bindingOptions._currentView.element );\n }\n\n if ( _groups[ _groups_Current ].position === 0 ) {\n fireCustomTriggerEvent( bindingOptions.events!.onStart, bindingOptions._currentView.element );\n }\n\n _element_Dialog_IsHint = bindingOptions.isHint === true;\n\n if ( bindingOptions.attach || bindingOptions.isHint ) {\n if ( bindingOptions.isHint && bindingOptions.alignHintToClickPosition ) {\n DomElement.showElementAtMousePosition( e, _element_Dialog );\n\n } else {\n const offset: Position = DomElement.getOffset( bindingOptions._currentView.element );\n let top: number = ( offset.top ) + bindingOptions._currentView.element.offsetHeight;\n let left: number = ( offset.left );\n\n if ( left + _element_Dialog.offsetWidth > window.innerWidth || bindingOptions.alignRight ) {\n left -= _element_Dialog.offsetWidth;\n left += bindingOptions._currentView.element.offsetWidth;\n }\n \n if ( top + _element_Dialog.offsetHeight > window.innerHeight || bindingOptions.alignTop ) {\n top -= ( _element_Dialog.offsetHeight + bindingOptions._currentView.element.offsetHeight );\n }\n\n _element_Dialog.style.top = top + \"px\";\n _element_Dialog.style.left = left + \"px\";\n }\n\n } else {\n const scrollPosition: Position = DomElement.getScrollPosition();\n const centerLeft: number = Math.max( 0, ( ( window.innerWidth - _element_Dialog.offsetWidth ) / 2 ) + scrollPosition.left );\n const centerTop: number = Math.max( 0, ( ( window.innerHeight - _element_Dialog.offsetHeight ) / 2 ) + scrollPosition.top );\n\n _element_Dialog.style.left = centerLeft + \"px\";\n _element_Dialog.style.top = centerTop + \"px\";\n }\n }\n\n function removeFocusClassFromLastElement( callCustomTrigger: boolean = true ) : void {\n const bindingOptions: BindingOptions = getGroupBindingOptions();\n\n if ( Is.defined( bindingOptions ) && Is.defined( bindingOptions._currentView.element ) ) {\n bindingOptions._currentView.element.className = bindingOptions._currentView.element.className.replace( Char.space + \"journey-js-element-focus\", Char.empty );\n\n if ( Is.defined( _element_Focus_Element_PositionStyle ) ) {\n bindingOptions._currentView.element.style.position = _element_Focus_Element_PositionStyle;\n }\n\n if ( callCustomTrigger ) {\n fireCustomTriggerEvent( bindingOptions.events!.onLeave, bindingOptions._currentView.element );\n }\n }\n }\n\n function buildProcessDots() : void {\n _element_Dialog_ProgressDots.innerHTML = Char.empty;\n\n if ( _configuration.showProgressDots ) {\n const keysLength: number = _groups[ _groups_Current ].keys.length;\n\n for ( let keyIndex: number = 0; keyIndex < keysLength; keyIndex++ ) {\n buildProgressDot( keyIndex, _groups[ _groups_Current ].keys[ keyIndex ] );\n }\n }\n }\n\n function buildProgressDot( keyIndex: number, order: number ) : void {\n const bindingOptions: BindingOptions = _groups[ _groups_Current ].json[ order ];\n let dot: HTMLElement;\n\n if ( keyIndex === _groups[ _groups_Current ].position ) {\n dot = DomElement.create( \"div\", \"dot-active\" );\n } else {\n \n dot = DomElement.create( \"div\", \"dot\" );\n \n dot.onclick = () => {\n removeFocusClassFromLastElement();\n\n _groups[ _groups_Current ].position = keyIndex;\n\n showDialogAndSetPosition();\n };\n }\n\n _element_Dialog_ProgressDots.appendChild( dot );\n\n if ( _configuration.showProgressDotToolTips ) {\n if ( Is.definedString( bindingOptions.tooltip ) ) {\n addToolTip( dot, bindingOptions.tooltip! );\n } else {\n addToolTip( dot, bindingOptions.title! );\n }\n }\n\n if ( _configuration.showProgressDotNumbers ) {\n dot.className += \" dot-number\";\n dot.innerHTML = ( keyIndex + 1 ).toString();\n }\n }\n\n function setProgressBarPosition() : void {\n if ( _configuration.showProgressBar ) {\n const pixelsPerStage: number = _element_Dialog_ProgressBar.offsetWidth / _groups[ _groups_Current ].keys.length;\n const width: number = ( _groups[ _groups_Current ].position + 1 ) * pixelsPerStage;\n const percentageComplete: number = Math.ceil( ( ( _groups[ _groups_Current ].position + 1 ) / _groups[ _groups_Current ].keys.length ) * 100 );\n\n _element_Dialog_ProgressBar_Percentage.style.width = width + \"px\";\n _element_Dialog_ProgressBar_Percentage_Text.innerHTML = percentageComplete + \"%\";\n }\n }\n\n\n /*\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n * Render: Dialog - Move\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n */\n\n function makeDialogMovable() : void {\n _element_Dialog_Title.onmousedown = onMoveTitleBarMouseDown;\n _element_Dialog_Title.onmouseup = onMoveTitleBarMouseUp;\n _element_Dialog_Title.oncontextmenu = onMoveTitleBarMouseUp;\n\n document.body.addEventListener( \"mousemove\", onMoveDocumentMouseMove );\n document.body.addEventListener( \"mouseleave\", onMoveDocumentMouseLeave );\n }\n\n function onMoveTitleBarMouseDown( e: MouseEvent ) : void {\n if ( !_element_Dialog_Move_IsMoving && !_element_Dialog_IsHint && _configuration.dialogMovingEnabled ) {\n _element_Dialog.className += \" journey-js-dialog-moving\";\n _element_Dialog_Move_IsMoving = true;\n _element_Dialog_Move_X = e.pageX - _element_Dialog.offsetLeft;\n _element_Dialog_Move_Y = e.pageY - _element_Dialog.offsetTop;\n _element_Dialog_Move_Original_X = _element_Dialog.offsetLeft;\n _element_Dialog_Move_Original_Y = _element_Dialog.offsetTop;\n }\n }\n\n function onMoveTitleBarMouseUp() : void {\n if ( _element_Dialog_Move_IsMoving ) {\n _element_Dialog_Move_IsMoving = false;\n _element_Dialog_Move_Original_X = 0;\n _element_Dialog_Move_Original_Y = 0;\n _element_Dialog.className = \"journey-js-dialog\";\n }\n }\n\n function onMoveDocumentMouseMove( e: MouseEvent ) : void {\n if ( _element_Dialog_Move_IsMoving ) {\n _element_Dialog.style.left = ( e.pageX - _element_Dialog_Move_X ) + \"px\";\n _element_Dialog.style.top = ( e.pageY - _element_Dialog_Move_Y ) + \"px\";\n }\n }\n\n function onMoveDocumentMouseLeave() : void {\n if ( _element_Dialog_Move_IsMoving ) {\n _element_Dialog.style.left = _element_Dialog_Move_Original_X + \"px\";\n _element_Dialog.style.top = _element_Dialog_Move_Original_Y + \"px\";\n\n _element_Dialog_Move_IsMoving = false;\n _element_Dialog_Move_Original_X = 0;\n _element_Dialog_Move_Original_Y = 0;\n _element_Dialog.className = \"journey-js-dialog\";\n }\n }\n\n\n /*\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n * Render: ToolTip\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n */\n\n function renderToolTip() : void {\n if ( !Is.defined( _element_ToolTip ) ) {\n _element_ToolTip = DomElement.create( \"div\", \"journey-js-tooltip\" );\n _element_ToolTip.style.display = \"none\";\n\n document.body.appendChild( _element_ToolTip );\n \n document.body.addEventListener( \"mousemove\", () => {\n hideToolTip();\n } );\n \n document.addEventListener( \"scroll\", () => {\n hideToolTip();\n } );\n }\n }\n\n function addToolTip( element: HTMLElement, text: string ) : void {\n if ( element !== null ) {\n element.onmousemove = ( e: MouseEvent ) => {\n showToolTip( e, text );\n };\n }\n }\n\n function showToolTip( e: any, text: string ) : void {\n DomElement.cancelBubble( e );\n hideToolTip();\n\n _element_ToolTip_Timer = setTimeout( () => {\n _element_ToolTip.innerHTML = text;\n _element_ToolTip.style.display = \"block\";\n\n DomElement.showElementAtMousePosition( e, _element_ToolTip );\n }, _configuration.tooltipDelay );\n }\n\n function hideToolTip() : void {\n if ( Is.defined( _element_ToolTip ) ) {\n if ( _element_ToolTip_Timer !== 0 ) {\n clearTimeout( _element_ToolTip_Timer );\n _element_ToolTip_Timer = 0;\n }\n \n if ( _element_ToolTip.style.display === \"block\" ) {\n _element_ToolTip.style.display = \"none\";\n }\n }\n }\n\n\n /*\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n * Rendering\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n */\n\n function getElements() : void {\n const tagTypes: string[] = _configuration.domElementTypes as string[];\n const tagTypesLength: number = tagTypes.length;\n\n for ( let tagTypeIndex: number = 0; tagTypeIndex < tagTypesLength; tagTypeIndex++ ) {\n const domElements: HTMLCollectionOf = document.getElementsByTagName( tagTypes[ tagTypeIndex ] );\n const elements: HTMLElement[] = [].slice.call( domElements );\n const elementsLength: number = elements.length;\n\n for ( let elementIndex: number = 0; elementIndex < elementsLength; elementIndex++ ) {\n if ( !getElement( elements[ elementIndex ] ) ) {\n break;\n }\n }\n }\n\n _groups[ _groups_Current ].keys.sort();\n }\n\n function getElement( element: HTMLElement ) : boolean {\n let result: boolean = true;\n\n if ( Is.defined( element ) && element.hasAttribute( Constants.JOURNEY_JS_ATTRIBUTE_NAME ) ) {\n const bindingOptionsData: string = element.getAttribute( Constants.JOURNEY_JS_ATTRIBUTE_NAME )!;\n\n if ( Is.definedString( bindingOptionsData ) ) {\n const bindingOptions: StringToJson = getObjectFromString( bindingOptionsData );\n\n if ( bindingOptions.parsed && Is.definedObject( bindingOptions.object ) ) {\n setupElement( element, buildAttributeOptions( bindingOptions.object ) );\n\n } else {\n if ( !_configuration.safeMode ) {\n console.error( _configuration.attributeNotValidErrorText!.replace( \"{{attribute_name}}\", Constants.JOURNEY_JS_ATTRIBUTE_NAME ) );\n result = false;\n }\n }\n\n } else {\n if ( !_configuration.safeMode ) {\n console.error( _configuration.attributeNotSetErrorText!.replace( \"{{attribute_name}}\", Constants.JOURNEY_JS_ATTRIBUTE_NAME ) );\n result = false;\n }\n }\n }\n\n return result;\n }\n\n function setupElement( element: HTMLElement, bindingOptions: BindingOptions ) : void {\n bindingOptions._currentView = {} as CurrentView;\n bindingOptions._currentView.element = element;\n\n if ( Is.definedNumber( bindingOptions.order ) && ( Is.definedString( bindingOptions.title ) || Is.definedString( bindingOptions.description ) ) ) {\n element.removeAttribute( Constants.JOURNEY_JS_ATTRIBUTE_NAME );\n \n if ( !bindingOptions.isHint ) {\n setupNewGroup( bindingOptions.group! );\n\n _groups[ bindingOptions.group! ].json[ bindingOptions.order! ] = bindingOptions;\n _groups[ bindingOptions.group! ].keys.push( bindingOptions.order! );\n\n fireCustomTriggerEvent( bindingOptions.events!.onAddStep, element );\n\n } else {\n renderHint( bindingOptions );\n }\n }\n }\n\n function renderHint( bindingOptions: BindingOptions ) : void {\n const positionStyle: string = DomElement.getStyleValueByName( bindingOptions._currentView.element, \"position\" );\n\n if ( positionStyle !== Char.empty && positionStyle.toLowerCase() === \"static\" ) {\n bindingOptions._currentView.element.style.position = \"relative\";\n }\n\n const hint: HTMLElement = DomElement.create( \"div\", \"journey-js-hint\" );\n bindingOptions._currentView.element.appendChild( hint );\n\n hint.onclick = ( e: MouseEvent ) => {\n DomElement.cancelBubble( e );\n\n _element_Dialog_CheckBox_Container.style.display = \"none\";\n _element_Dialog_ProgressDots.style.display = \"none\";\n _element_Dialog_ProgressBar.style.display = \"none\";\n _element_Dialog_Buttons.style.display = \"none\";\n _configuration_ShortcutKeysEnabled = false;\n\n setDialogText( bindingOptions );\n setDialogPosition( e, bindingOptions );\n\n if ( bindingOptions.removeHintWhenViewed ) {\n DomElement.clearElementsByClassName( bindingOptions._currentView.element, \"journey-js-hint\" );\n }\n };\n }\n\n\n /*\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n * Document Events\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n */\n\n function buildDocumentEvents( addEvents: boolean = true ) : void {\n const documentFunc: Function = addEvents ? document.addEventListener : document.removeEventListener;\n const windowFunc: Function = addEvents ? window.addEventListener : window.removeEventListener;\n\n if ( _configuration.shortcutKeysEnabled ) {\n documentFunc( \"keydown\", onWindowKeyDown );\n }\n\n windowFunc( \"resize\", onWindowResize );\n }\n\n function onWindowKeyDown( e: KeyboardEvent ) : void {\n if ( _public.isOpen() && _configuration.shortcutKeysEnabled ) {\n if ( e.code === KeyCode.escape ) {\n e.preventDefault();\n onDialogClose();\n } else {\n\n if ( _configuration_ShortcutKeysEnabled ) {\n if ( e.code === KeyCode.left ) {\n e.preventDefault();\n onDialogBack();\n \n } else if ( e.code === KeyCode.right ) {\n e.preventDefault();\n onDialogNext();\n \n } else if ( e.code === KeyCode.up ) {\n e.preventDefault();\n onWindowKeyCodeUp();\n \n } else if ( e.code === KeyCode.down ) {\n e.preventDefault();\n onWindowKeyCodeDown();\n }\n }\n }\n }\n }\n\n function onWindowResize() : void {\n if ( _public.isOpen() ) {\n showDialogAndSetPosition();\n }\n }\n\n function onWindowKeyCodeUp() : void {\n if ( _groups[ _groups_Current ].position !== 0 ) {\n removeFocusClassFromLastElement();\n\n _groups[ _groups_Current ].position = 0;\n \n showDialogAndSetPosition();\n }\n }\n\n function onWindowKeyCodeDown() : void {\n if ( _groups[ _groups_Current ].position !== _groups[ _groups_Current ].keys.length - 1 ) {\n removeFocusClassFromLastElement();\n\n _groups[ _groups_Current ].position = _groups[ _groups_Current ].keys.length - 1;\n \n showDialogAndSetPosition();\n }\n }\n\n\n /*\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n * Options\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n */\n\n function buildAttributeOptions( newOptions: any ) {\n let options: BindingOptions = Data.getDefaultObject( newOptions, {} as BindingOptions );\n options.order = Data.getDefaultNumber( options.order, 0 );\n options.attach = Data.getDefaultBoolean( options.attach, true );\n options.sendClick = Data.getDefaultBoolean( options.sendClick, false );\n options.alignTop = Data.getDefaultBoolean( options.alignTop, false );\n options.alignRight = Data.getDefaultBoolean( options.alignRight, false );\n options.isHint = Data.getDefaultBoolean( options.isHint, false );\n options.alignHintToClickPosition = Data.getDefaultBoolean( options.alignHintToClickPosition, false );\n options.showDisabledBackground = Data.getDefaultBoolean( options.showDisabledBackground, true );\n options.removeHintWhenViewed = Data.getDefaultBoolean( options.removeHintWhenViewed, false );\n options.group = Data.getDefaultString( options.group, _groups_Default );\n\n options = buildAttributeOptionStrings( options );\n\n return buildAttributeOptionCustomTriggers( options );\n }\n\n function buildAttributeOptionStrings( options: BindingOptions ) : BindingOptions {\n options.title = Data.getDefaultString( options.title, Char.empty );\n options.description = Data.getDefaultString( options.description, Char.empty );\n options.tooltip = Data.getDefaultString( options.tooltip, Char.empty );\n\n return options;\n }\n\n function buildAttributeOptionCustomTriggers( options: BindingOptions ) : BindingOptions {\n options.events = Data.getDefaultObject( options.events, {} as Events );\n options.events!.onEnter = Data.getDefaultFunction( options.events!.onEnter, null );\n options.events!.onLeave = Data.getDefaultFunction( options.events!.onLeave, null );\n options.events!.onClose = Data.getDefaultFunction( options.events!.onClose, null );\n options.events!.onFinish = Data.getDefaultFunction( options.events!.onFinish, null );\n options.events!.onOpen = Data.getDefaultFunction( options.events!.onOpen, null );\n options.events!.onStart = Data.getDefaultFunction( options.events!.onStart, null );\n options.events!.onAddStep = Data.getDefaultFunction( options.events!.onAddStep, null );\n options.events!.onRemoveStep = Data.getDefaultFunction( options.events!.onRemoveStep, null );\n\n return options;\n }\n\n\n /*\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n * Triggering Custom Events\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n */\n\n function fireCustomTriggerEvent( triggerFunction: any, ...args : any[] ) : void {\n if ( Is.definedFunction( triggerFunction ) ) {\n triggerFunction.apply( null, [].slice.call( args, 0 ) );\n }\n }\n\n\n /*\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n * Browser URL Parameters\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n */\n\n function getBrowserUrlParameters() : boolean {\n let show: boolean = false;\n\n if ( _configuration.browserUrlParametersEnabled ) {\n const url: string = window.location.href;\n const urlArguments: any = getBrowserUrlArguments( url );\n\n if ( Is.defined( urlArguments.sjOrderId ) ) {\n const orderId: number = parseInt( urlArguments.sjOrderId, 10 );\n\n if ( !isNaN( orderId ) && orderId <= _groups[ _groups_Current ].keys.length - 1 ) {\n _groups[ _groups_Current ].position = orderId;\n }\n }\n\n if ( Is.defined( urlArguments.sjShow ) ) {\n show = urlArguments.sjShow === \"true\";\n }\n }\n\n return show;\n }\n\n function getBrowserUrlArguments( url: string ) : any {\n const urlArguments: any = {};\n const urlDataParts: string[] = url.split( \"?\" );\n\n if ( urlDataParts.length > 1 ) {\n const parsedArgs: string[] = urlDataParts[ 1 ].split( \"&\" );\n const parsedArgsLength: number = parsedArgs.length;\n\n for ( let parsedArgsIndex: number = 0; parsedArgsIndex < parsedArgsLength; parsedArgsIndex++ ) {\n const parsedArg: string[] = parsedArgs[ parsedArgsIndex ].split( \"=\" );\n\n urlArguments[ parsedArg[ 0 ] ] = parsedArg[ 1 ];\n }\n }\n\n return urlArguments;\n }\n\n\n /*\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n * Default Parameter/Option Handling\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n */\n\n function getObjectFromString( objectString: any ) : StringToJson {\n const result: StringToJson = {\n parsed: true,\n object: null\n } as StringToJson;\n\n try {\n if ( Is.definedString( objectString ) ) {\n result.object = JSON.parse( objectString );\n }\n\n } catch ( e1: any ) {\n try {\n result.object = eval( \"(\" + objectString + \")\" );\n\n if ( Is.definedFunction( result.object ) ) {\n result.object = result.object();\n }\n \n } catch ( e2: any ) {\n if ( !_configuration.safeMode ) {\n console.error( _configuration.objectErrorText!.replace( \"{{error_1}}\", e1.message ).replace( \"{{error_2}}\", e2.message ) );\n result.parsed = false;\n }\n \n result.object = null;\n }\n }\n\n return result;\n }\n\n\n\t/*\n\t * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n\t * Public API Functions: Helpers: Managing Steps\n\t * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n\t */\n\n function resetDialogPosition() : void {\n if ( _public.isOpen() ) {\n onDialogClose( false );\n\n _groups[ _groups_Current ].position = 0;\n }\n }\n\n\n\t/*\n\t * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n\t * Public API Functions: Helpers: Configuration\n\t * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n\t */\n\n function buildDefaultConfiguration( newConfiguration: Configuration = {} ) : void {\n _configuration = Data.getDefaultObject( newConfiguration, {} as Configuration );\n _configuration.safeMode = Data.getDefaultBoolean( _configuration.safeMode, true );\n _configuration.domElementTypes = Data.getDefaultStringOrArray( _configuration.domElementTypes, [ \"*\" ] );\n _configuration.showCloseButton = Data.getDefaultBoolean( _configuration.showCloseButton, true );\n _configuration.shortcutKeysEnabled = Data.getDefaultBoolean( _configuration.shortcutKeysEnabled, true );\n _configuration.showProgressDots = Data.getDefaultBoolean( _configuration.showProgressDots, true );\n _configuration.browserUrlParametersEnabled = Data.getDefaultBoolean( _configuration.browserUrlParametersEnabled, true );\n _configuration.showProgressDotNumbers = Data.getDefaultBoolean( _configuration.showProgressDotNumbers, false );\n _configuration.showButtons = Data.getDefaultBoolean( _configuration.showButtons, true );\n _configuration.showDoNotShowAgain = Data.getDefaultBoolean( _configuration.showDoNotShowAgain, false );\n _configuration.tooltipDelay = Data.getDefaultNumber( _configuration.tooltipDelay, 750 );\n _configuration.showProgressDotToolTips = Data.getDefaultBoolean( _configuration.showProgressDotToolTips, true );\n _configuration.closeDialogOnDisabledBackgroundClick = Data.getDefaultBoolean( _configuration.closeDialogOnDisabledBackgroundClick, false );\n _configuration.showProgressBar = Data.getDefaultBoolean( _configuration.showProgressBar, false );\n _configuration.scrollToElements = Data.getDefaultBoolean( _configuration.scrollToElements, false );\n _configuration.dialogMovingEnabled = Data.getDefaultBoolean( _configuration.dialogMovingEnabled, false );\n _configuration.showProgressBarText = Data.getDefaultBoolean( _configuration.showProgressBarText, false );\n\n buildDefaultConfigurationStrings();\n buildDefaultConfigurationCustomTriggers();\n }\n\n function buildDefaultConfigurationStrings() : void {\n _configuration.backButtonText = Data.getDefaultAnyString( _configuration.backButtonText, \"Back\" );\n _configuration.nextButtonText = Data.getDefaultAnyString( _configuration.nextButtonText, \"Next\" );\n _configuration.finishButtonText = Data.getDefaultAnyString( _configuration.finishButtonText, \"Finish\" );\n _configuration.closeButtonToolTipText = Data.getDefaultAnyString( _configuration.closeButtonToolTipText, \"Close\" );\n _configuration.doNotShowAgainText = Data.getDefaultAnyString( _configuration.doNotShowAgainText, \"Do not show again\" );\n _configuration.objectErrorText = Data.getDefaultAnyString( _configuration.objectErrorText, \"Errors in object: {{error_1}}, {{error_2}}\" );\n _configuration.attributeNotValidErrorText = Data.getDefaultAnyString( _configuration.attributeNotValidErrorText, \"The attribute '{{attribute_name}}' is not a valid object.\" );\n _configuration.attributeNotSetErrorText = Data.getDefaultAnyString( _configuration.attributeNotSetErrorText, \"The attribute '{{attribute_name}}' has not been set correctly.\" );\n _configuration.closeDialogConfirmationText = Data.getDefaultAnyString( _configuration.closeDialogConfirmationText, Char.empty );\n }\n\n function buildDefaultConfigurationCustomTriggers() : void {\n _configuration.onDoNotShowAgainChange = Data.getDefaultFunction( _configuration.onDoNotShowAgainChange, null );\n }\n\n\n\t/*\n\t * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n\t * Public API Functions:\n\t * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n\t */\n\n const _public: PublicApi = {\n /*\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n * Public API Functions: Show/Hide\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n */\n\n start: function ( group: string = Char.empty ) : PublicApi {\n if ( !_public.isOpen() ) {\n _groups_Current = Data.getDefaultString( group, _groups_Default );\n \n if ( _groups.hasOwnProperty( _groups_Current ) ) {\n _groups[ _groups_Current ].position = 0;\n \n showDialogAndSetPosition();\n }\n }\n \n return _public;\n },\n\n show: function ( group: string = Char.empty ) : PublicApi {\n if ( !_public.isOpen() ) {\n _groups_Current = Data.getDefaultString( group, _groups_Current );\n \n if ( _groups.hasOwnProperty( _groups_Current ) ) {\n if ( _groups[ _groups_Current ].position === _groups[ _groups_Current ].keys.length - 1 ) {\n _groups[ _groups_Current ].position = 0;\n }\n \n showDialogAndSetPosition();\n }\n }\n \n return _public;\n },\n\n hide: function () : PublicApi {\n if ( _public.isOpen() ) {\n onDialogClose();\n }\n \n return _public;\n },\n\n isOpen: function () : boolean {\n return Is.defined( _element_Dialog ) && _element_Dialog.style.display === \"block\";\n },\n\n isComplete: function () : boolean {\n return _groups[ _groups_Current ].position >= _groups[ _groups_Current ].keys.length - 1;\n },\n\n\n /*\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n * Public API Functions: Managing Steps\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n */\n\n addDocumentSteps: function () : PublicApi {\n getElements();\n\n return _public;\n },\n\n addStep: function ( element: HTMLElement, options: BindingOptions ) : PublicApi {\n if ( Is.definedObject( element ) && Is.definedObject( options ) ) {\n setupElement( element, buildAttributeOptions( options ) );\n \n _groups[ _groups_Current ].keys.sort();\n \n resetDialogPosition();\n }\n \n return _public;\n },\n\n removeStep: function ( element: HTMLElement ) : PublicApi {\n if ( Is.definedObject( element ) ) {\n let removed: boolean = false;\n \n for ( let group in _groups ) {\n if ( _groups.hasOwnProperty( group ) ) {\n for ( let order in _groups[ group ].json ) {\n if ( _groups[ group ].json.hasOwnProperty( order ) ) {\n const bindingOptions: BindingOptions = _groups[ group ].json[ order ];\n \n if ( bindingOptions._currentView.element === element ) {\n fireCustomTriggerEvent( bindingOptions.events!.onRemoveStep, bindingOptions._currentView.element );\n \n _groups[ group ].keys.splice( _groups[ group ].keys.indexOf( bindingOptions.order! ), 1 );\n \n delete _groups[ group ].json[ bindingOptions.order! ];\n \n _groups[ group ].keys.sort();\n \n removed = true;\n break;\n }\n }\n }\n }\n }\n \n if ( !removed ) {\n DomElement.clearElementsByClassName( element, \"journey-js-hint\" );\n } else {\n resetDialogPosition();\n }\n }\n \n return _public;\n },\n\n clearSteps: function ( group: string = Char.empty ) : PublicApi {\n resetDialogPosition();\n\n for ( let groupName in _groups ) {\n if ( _groups.hasOwnProperty( groupName ) ) {\n if ( !Is.definedString( group ) || group === groupName ) {\n for ( let order in _groups[ groupName ].json ) {\n if ( _groups[ groupName ].json.hasOwnProperty( order ) ) {\n const bindingOptions: BindingOptions = _groups[ groupName ].json[ order ];\n \n fireCustomTriggerEvent( bindingOptions.events!.onRemoveStep, bindingOptions._currentView.element );\n }\n }\n }\n }\n }\n \n if ( Is.definedString( group ) ) {\n if ( _groups.hasOwnProperty( group ) ) {\n delete _groups[ group ];\n }\n \n } else {\n _groups = {} as Groups;\n }\n \n if ( !Is.definedString( group ) || group === _groups_Default ) {\n setupDefaultGroup( _groups );\n }\n \n return _public;\n },\n\n clearHints: function () : PublicApi {\n DomElement.clearElementsByClassName( document.body, \"journey-js-hint\" );\n\n return _public;\n },\n\n reverseStepOrder: function () : PublicApi {\n _groups[ _groups_Current ].keys.reverse();\n\n resetDialogPosition();\n \n return _public;\n },\n\n\n /*\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n * Public API Functions: Configuration\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n */\n\n setConfiguration: function ( newConfiguration: any ) : PublicApi {\n if ( Is.definedObject( newConfiguration ) ) {\n let configurationHasChanged: boolean = false;\n const newInternalConfiguration: any = _configuration;\n\n for ( let propertyName in newConfiguration ) {\n if ( newConfiguration.hasOwnProperty( propertyName ) && _configuration.hasOwnProperty( propertyName ) && newInternalConfiguration[ propertyName ] !== newConfiguration[ propertyName ] ) {\n newInternalConfiguration[ propertyName ] = newConfiguration[ propertyName ];\n configurationHasChanged = true;\n }\n }\n \n if ( configurationHasChanged ) {\n buildDefaultConfiguration( newInternalConfiguration );\n }\n }\n \n return _public;\n },\n\n\n /*\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n * Public API Functions: Additional Data\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n */\n\n getVersion: function (): string {\n return \"2.0.0\";\n }\n };\n\n\n /*\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n * Initialize Journey.js\n * ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n */\n\n ( () => {\n buildDefaultConfiguration();\n\n document.addEventListener( \"DOMContentLoaded\", () => {\n setupDefaultGroup();\n renderDisabledBackground();\n renderDialog();\n renderToolTip();\n getElements();\n buildDocumentEvents();\n\n if ( getBrowserUrlParameters() ) {\n _public.show();\n }\n } );\n\n if ( !Is.defined( window.$journey ) ) {\n window.$journey = _public;\n }\n } ) ();\n} ) ();"]} \ No newline at end of file diff --git a/dist/journey.js.min.css b/dist/journey.js.min.css index 63cdc74..3fe7e2e 100644 --- a/dist/journey.js.min.css +++ b/dist/journey.js.min.css @@ -1,2 +1 @@ -/*! Journey.js v1.7.2 | (c) Bunoon 2024 | MIT License */ -:root{--journey-js-default-font:system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--journey-js-text-bold-weight:100;--journey-js-title-bold-weight:700;--journey-js-tooltip-bold-weight:300;--journey-js-color-black:#3b3a3a;--journey-js-color-white:#F5F5F5;--journey-js-color-gray:#AAAAAA;--journey-js-color-hint:rgba( 170, 170, 170, 0.5 );--journey-js-dialog-background-color:#002244;--journey-js-dialog-text-color:var(--journey-js-color-white);--journey-js-dialog-border-color:#72A0C1;--journey-js-dialog-button-background-color:#002D62;--journey-js-dialog-button-border-color:#3457D5;--journey-js-dialog-button-text-color:var(--journey-js-color-white);--journey-js-dialog-button-hover-background-color:#007FFF;--journey-js-dialog-button-hover-border-color:var(--journey-js-dialog-button-border-color);--journey-js-dialog-button-hover-text-color:var(--journey-js-dialog-button-text-color);--journey-js-dialog-button-active-background-color:#00b7ff;--journey-js-dialog-button-active-border-color:var(--journey-js-dialog-button-border-color);--journey-js-dialog-button-active-text-color:var(--journey-js-dialog-button-text-color);--journey-js-dialog-button-disabled-background-color:var(--journey-js-dialog-background-color);--journey-js-dialog-close-button-background-color:var(--journey-js-dialog-button-background-color);--journey-js-dialog-close-button-border-color:var(--journey-js-dialog-button-border-color);--journey-js-dialog-close-button-size:1.1rem;--journey-js-dialog-close-button-x-color:var(--journey-js-color-white);--journey-js-dialog-close-button-hover-background-color:var(--journey-js-dialog-button-hover-background-color);--journey-js-dialog-close-button-hover-x-color:var(--journey-js-dialog-close-button-x-color);--journey-js-dialog-close-button-hover-border-color:var(--journey-js-dialog-close-button-border-color);--journey-js-dialog-close-button-active-background-color:var(--journey-js-dialog-button-active-background-color);--journey-js-dialog-close-button-active-x-color:var(--journey-js-dialog-close-button-x-color);--journey-js-dialog-close-button-active-border-color:var(--journey-js-dialog-close-button-border-color);--journey-js-checkbox-background-color-checked:var(--journey-js-dialog-button-border-color);--journey-js-checkbox-background-color:var(--journey-js-dialog-button-background-color);--journey-js-checkbox-border-color-checked:var(--journey-js-checkbox-background-color-checked);--journey-js-checkbox-border-color:var(--journey-js-dialog-button-border-color);--journey-js-checkbox-border-hover-color:var(--journey-js-dialog-button-hover-background-color);--journey-js-tooltip-background-color:var(--journey-js-dialog-background-color);--journey-js-tooltip-border-color:var(--journey-js-dialog-border-color);--journey-js-tooltip-text-color:var(--journey-js-color-white);--journey-js-border-control-radius:0.25rem;--journey-js-border-radius:0.5rem;--journey-js-border-size:0.5px;--journey-js-spacing:10px;--journey-js-spacing-font-size:0.85rem;--journey-js-transition:all .3s;--journey-js-animation-length:0.5s}div.journey-js-dialog{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;cursor:default;box-sizing:border-box;line-height:normal;font-family:var(--journey-js-default-font);position:absolute;display:none;border-radius:var(--journey-js-border-radius);background-color:var(--journey-js-dialog-background-color);color:var(--journey-js-dialog-text-color);border:var(--journey-js-border-size) solid var(--journey-js-dialog-border-color);padding:var(--journey-js-spacing);font-size:var(--journey-js-spacing-font-size);z-index:1001;width:300px;height:auto;transition:var(--journey-js-transition);transition-property:top,left}div.journey-js-dialog *{box-sizing:border-box;line-height:normal}div.journey-js-dialog *::before,div.journey-js-dialog *::after{box-sizing:border-box;line-height:normal}div.journey-js-dialog div:first-of-type{padding-right:calc(var(--journey-js-dialog-close-button-size) + var(--journey-js-spacing))}div.journey-js-dialog div.title{font-size:large;font-weight:var(--journey-js-title-bold-weight);margin-bottom:var(--journey-js-spacing)}div.journey-js-dialog div.description{font-weight:var(--journey-js-text-bold-weight)}div.journey-js-dialog-moving{transition:none!important;transition-property:none!important}div.journey-js-dialog button.close{position:absolute;top:var(--journey-js-spacing);right:var(--journey-js-spacing);width:var(--journey-js-dialog-close-button-size);height:var(--journey-js-dialog-close-button-size);border-radius:.25rem;padding:0;background-color:var(--journey-js-dialog-close-button-background-color);border:var(--journey-js-border-size) solid var(--journey-js-dialog-close-button-border-color);transition:var(--journey-js-transition)}div.journey-js-dialog button.close::before,div.journey-js-dialog button.close::after{content:"";width:2px;height:100%;background:var(--journey-js-dialog-close-button-x-color);display:block;transform:rotate(45deg) translateX(0);position:absolute;left:calc(50% - 0.5px);top:0}div.journey-js-dialog button.close::after{transform:rotate(-45deg) translateX(0)}div.journey-js-dialog button.close:active{border:var(--journey-js-border-size) solid var(--journey-js-dialog-close-button-active-border-color)!important;background-color:var(--journey-js-dialog-close-button-active-background-color)!important}div.journey-js-dialog button.close:active::before,div.journey-js-dialog button.close:active::after{background:var(--journey-js-dialog-close-button-active-x-color)!important}div.journey-js-dialog button.close:hover{cursor:pointer;border:var(--journey-js-border-size) solid var(--journey-js-dialog-close-button-hover-border-color);background-color:var(--journey-js-dialog-close-button-hover-background-color)}div.journey-js-dialog button.close:hover::before,div.journey-js-dialog button.close:hover::after{background:var(--journey-js-dialog-close-button-hover-x-color)}div.journey-js-dialog div.progress-dots{margin-top:var(--journey-js-spacing);margin-bottom:var(--journey-js-spacing);text-align:center}div.journey-js-dialog div.progress-dots div.dot,div.journey-js-dialog div.progress-dots div.dot-active{margin:2.5px;display:inline-block;padding:0!important}div.journey-js-dialog div.progress-dots div.dot{border-radius:50%;height:10px;width:10px;background-color:var(--journey-js-dialog-button-background-color);border:var(--journey-js-border-size) solid var(--journey-js-dialog-button-border-color);transition:var(--journey-js-transition)}div.journey-js-dialog div.progress-dots div.dot:active{background-color:var(--journey-js-dialog-button-active-background-color)!important;border:var(--journey-js-border-size) solid var(--journey-js-dialog-button-active-border-color)!important;color:var(--journey-js-color-white)!important}div.journey-js-dialog div.progress-dots div.dot:hover{cursor:pointer;background-color:var(--journey-js-dialog-button-hover-background-color);border:var(--journey-js-border-size) solid var(--journey-js-dialog-button-hover-border-color);color:var(--journey-js-color-white)!important}div.journey-js-dialog div.progress-dots div.dot-number{height:25px!important;width:25px!important;padding:3px;display:inline-flex;justify-content:center;align-content:center;flex-direction:column;font-size:.8rem;border-radius:50%!important;color:var(--journey-js-color-gray)!important}div.journey-js-dialog div.progress-dots div.dot-active{position:relative;transition:var(--journey-js-transition);transition-property:width;border-radius:10px;height:10px;width:20px;background-color:var(--journey-js-dialog-button-border-color);border:var(--journey-js-border-size) solid var(--journey-js-dialog-button-border-color);color:var(--journey-js-color-white)!important}div.journey-js-dialog div.progress-dots div.dot-active::after{content:"";position:absolute;width:15px;height:1px;background-color:var(--journey-js-dialog-button-border-color);bottom:-5px;left:50%;transform:translate(-50%)}div.journey-js-dialog div.progress-bar{border-radius:var(--journey-js-border-radius);margin-top:var(--journey-js-spacing);margin-bottom:var(--journey-js-spacing);background-color:var(--journey-js-dialog-button-background-color);border:var(--journey-js-border-size) solid var(--journey-js-dialog-button-border-color);text-wrap:nowrap;overflow:hidden}div.journey-js-dialog div.progress-bar div.progress-bar-percentage{min-height:10px;background-color:var(--journey-js-dialog-button-border-color);transition:var(--journey-js-transition);transition-property:width;text-align:center;padding:0!important;margin:0!important}div.journey-js-dialog div.progress-bar div.progress-bar-percentage p.progress-bar-percentage-text{padding:calc(var(--journey-js-spacing) / 2)!important;font-size:smaller;margin:0!important;color:var(--journey-js-color-white)}div.journey-js-dialog div.checkbox-container{margin-top:var(--journey-js-spacing);margin-bottom:var(--journey-js-spacing)}div.journey-js-dialog div.checkbox-container label.checkbox{display:inline-block;position:relative;padding-left:25px;color:var(--journey-js-color-white)}div.journey-js-dialog div.checkbox-container label.checkbox input{display:none!important}div.journey-js-dialog div.checkbox-container label.checkbox input:checked~span.check-mark{background-color:var(--journey-js-checkbox-background-color-checked);border:var(--journey-js-border-size) solid var(--journey-js-checkbox-border-color-checked)}div.journey-js-dialog div.checkbox-container label.checkbox input:checked~span.check-mark::before{display:block}div.journey-js-dialog div.checkbox-container label.checkbox input:disabled~span.check-mark,div.journey-js-dialog div.checkbox-container label.checkbox input:disabled~span.text{opacity:.5}div.journey-js-dialog div.checkbox-container label.checkbox input:disabled~span.check-mark{border:var(--journey-js-border-size) solid var(--journey-js-color-black)!important}div.journey-js-dialog div.checkbox-container label.checkbox span.check-mark{position:absolute;top:.5px;left:0;height:15px;width:15px;background-color:var(--journey-js-checkbox-background-color);border-radius:var(--journey-js-border-control-radius);border:var(--journey-js-border-size) solid var(--journey-js-checkbox-border-color);transition:var(--journey-js-transition)}div.journey-js-dialog div.checkbox-container label.checkbox span.check-mark::before{content:"";transform:rotate(45deg);position:absolute;display:none;left:4px;top:.5px;width:6px;height:11px;border:solid var(--journey-js-color-white);border-width:0 2.5px 2.5px 0}div.journey-js-dialog div.checkbox-container label.checkbox:hover span.check-mark{border:var(--journey-js-border-size) solid var(--journey-js-checkbox-border-hover-color)}div.journey-js-dialog div.buttons{margin-top:calc(var(--journey-js-spacing) * 2);text-align:right;border-top:var(--journey-js-border-size) dotted var(--journey-js-dialog-button-border-color);padding-top:var(--journey-js-spacing)}div.journey-js-dialog div.buttons button:first-child{margin-left:0!important}div.journey-js-dialog div.buttons button.back,div.journey-js-dialog div.buttons button.next{border-radius:var(--journey-js-border-radius);background-color:var(--journey-js-dialog-button-background-color);color:var(--journey-js-dialog-button-text-color);border:var(--journey-js-border-size) solid var(--journey-js-dialog-button-border-color);min-width:100px;padding:var(--journey-js-spacing);transition:var(--journey-js-transition);outline:none;margin-left:var(--journey-js-spacing)}div.journey-js-dialog div.buttons button.back:not([disabled]):active,div.journey-js-dialog div.buttons button.next:not([disabled]):active{background-color:var(--journey-js-dialog-button-active-background-color)!important;color:var(--journey-js-dialog-button-active-text-color)!important;border:var(--journey-js-border-size) solid var(--journey-js-dialog-button-active-border-color)!important}div.journey-js-dialog div.buttons button.back:not([disabled]):hover,div.journey-js-dialog div.buttons button.next:not([disabled]):hover{cursor:pointer;background-color:var(--journey-js-dialog-button-hover-background-color);color:var(--journey-js-dialog-button-hover-text-color);border:var(--journey-js-border-size) solid var(--journey-js-dialog-button-hover-border-color)}div.journey-js-dialog div.buttons button.back:disabled,div.journey-js-dialog div.buttons button.next:disabled{background-color:var(--journey-js-dialog-button-disabled-background-color)!important;color:var(--journey-js-color-gray)}div.journey-js-dialog div.buttons button.back{float:left}div.journey-js-dialog div.buttons button.next{font-weight:var(--journey-js-title-bold-weight);float:right}div.journey-js-hint{position:absolute;width:15px;height:15px;border-radius:50%;background-color:var(--journey-js-color-gray);right:-7.5px;top:-7.5px;animation:journey-js-hint-effect 2s infinite;cursor:pointer}@keyframes journey-js-hint-effect{0%{box-shadow:0 0 0 0 var(--journey-js-color-hint)}70%{box-shadow:0 0 0 10px var(--journey-js-color-hint)}100%{box-shadow:0 0 0 0 var(--journey-js-color-hint)}}div.journey-js-disabled-background{z-index:1000;position:fixed;background-color:#000;background-color:rgb(0 0 0 / .5);top:0;left:0;height:100%;width:100%}.journey-js-element-focus{z-index:1001!important}div.journey-js-tooltip{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;cursor:default;box-sizing:border-box;line-height:normal;font-family:var(--journey-js-default-font);animation:fade-in-animation var(--journey-js-animation-length);position:absolute;background-color:var(--journey-js-tooltip-background-color);border:var(--journey-js-border-size) solid var(--journey-js-tooltip-border-color);color:var(--journey-js-tooltip-text-color);border-radius:var(--journey-js-border-radius);z-index:2000;max-width:300px;padding:var(--journey-js-spacing);font-size:var(--journey-js-spacing-font-size);font-weight:var(--journey-js-tooltip-bold-weight);display:none}@keyframes fade-in-animation{0%{opacity:0}100%{opacity:1}} \ No newline at end of file +:root{--journey-js-default-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--journey-js-text-bold-weight: 100;--journey-js-title-bold-weight: 700;--journey-js-tooltip-bold-weight: 300;--journey-js-color-black: #3b3a3a;--journey-js-color-white: #F5F5F5;--journey-js-color-gray: #AAAAAA;--journey-js-color-hint: rgba( 170, 170, 170, 0.5 );--journey-js-dialog-background-color: #002244;--journey-js-dialog-text-color: var(--journey-js-color-white);--journey-js-dialog-border-color: #72A0C1;--journey-js-dialog-button-background-color: #002D62;--journey-js-dialog-button-border-color: #3457D5;--journey-js-dialog-button-text-color: var(--journey-js-color-white);--journey-js-dialog-button-hover-background-color: #007FFF;--journey-js-dialog-button-hover-border-color: var(--journey-js-dialog-button-border-color);--journey-js-dialog-button-hover-text-color: var(--journey-js-dialog-button-text-color);--journey-js-dialog-button-active-background-color: #00b7ff;--journey-js-dialog-button-active-border-color: var(--journey-js-dialog-button-border-color);--journey-js-dialog-button-active-text-color: var(--journey-js-dialog-button-text-color);--journey-js-dialog-button-disabled-background-color: var(--journey-js-dialog-background-color);--journey-js-dialog-close-button-background-color: var(--journey-js-dialog-button-background-color);--journey-js-dialog-close-button-border-color: var(--journey-js-dialog-button-border-color);--journey-js-dialog-close-button-size: 1.1rem;--journey-js-dialog-close-button-x-color: var(--journey-js-color-white);--journey-js-dialog-close-button-hover-background-color: var(--journey-js-dialog-button-hover-background-color);--journey-js-dialog-close-button-hover-x-color: var(--journey-js-dialog-close-button-x-color);--journey-js-dialog-close-button-hover-border-color: var(--journey-js-dialog-close-button-border-color);--journey-js-dialog-close-button-active-background-color: var(--journey-js-dialog-button-active-background-color);--journey-js-dialog-close-button-active-x-color: var(--journey-js-dialog-close-button-x-color);--journey-js-dialog-close-button-active-border-color: var(--journey-js-dialog-close-button-border-color);--journey-js-checkbox-background-color-checked: var(--journey-js-dialog-button-border-color);--journey-js-checkbox-background-color: var(--journey-js-dialog-button-background-color);--journey-js-checkbox-border-color-checked: var(--journey-js-checkbox-background-color-checked);--journey-js-checkbox-border-color: var(--journey-js-dialog-button-border-color);--journey-js-checkbox-border-hover-color: var(--journey-js-dialog-button-hover-background-color);--journey-js-tooltip-background-color: var(--journey-js-dialog-background-color);--journey-js-tooltip-border-color: var(--journey-js-dialog-border-color);--journey-js-tooltip-text-color: var(--journey-js-color-white);--journey-js-border-control-radius: 0.25rem;--journey-js-border-radius: 0.5rem;--journey-js-border-size: 0.5px;--journey-js-spacing: 10px;--journey-js-spacing-font-size: 0.85rem;--journey-js-transition: all .3s;--journey-js-animation-length: 0.5s}div.journey-js-dialog{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;cursor:default;box-sizing:border-box;line-height:normal;font-family:var(--journey-js-default-font);position:absolute;display:none;border-radius:var(--journey-js-border-radius);background-color:var(--journey-js-dialog-background-color);color:var(--journey-js-dialog-text-color);border:var(--journey-js-border-size) solid var(--journey-js-dialog-border-color);padding:var(--journey-js-spacing);font-size:var(--journey-js-spacing-font-size);z-index:1001;width:300px;height:auto;transition:var(--journey-js-transition);transition-property:top,left}div.journey-js-dialog *{box-sizing:border-box;line-height:normal}div.journey-js-dialog *::before,div.journey-js-dialog *::after{box-sizing:border-box;line-height:normal}div.journey-js-dialog div:first-of-type{padding-right:calc(var(--journey-js-dialog-close-button-size) + var(--journey-js-spacing))}div.journey-js-dialog div.title{font-size:large;font-weight:var(--journey-js-title-bold-weight);margin-bottom:var(--journey-js-spacing)}div.journey-js-dialog div.description{font-weight:var(--journey-js-text-bold-weight)}div.journey-js-dialog-moving{transition:none !important;transition-property:none !important}div.journey-js-dialog button.close{position:absolute;top:var(--journey-js-spacing);right:var(--journey-js-spacing);width:var(--journey-js-dialog-close-button-size);height:var(--journey-js-dialog-close-button-size);border-radius:.25rem;padding:0;background-color:var(--journey-js-dialog-close-button-background-color);border:var(--journey-js-border-size) solid var(--journey-js-dialog-close-button-border-color);transition:var(--journey-js-transition)}div.journey-js-dialog button.close::before,div.journey-js-dialog button.close::after{content:"";width:2px;height:100%;background:var(--journey-js-dialog-close-button-x-color);display:block;transform:rotate(45deg) translateX(0px);position:absolute;left:calc(50% - .5px);top:0}div.journey-js-dialog button.close::after{transform:rotate(-45deg) translateX(0px)}div.journey-js-dialog button.close:active{border:var(--journey-js-border-size) solid var(--journey-js-dialog-close-button-active-border-color) !important;background-color:var(--journey-js-dialog-close-button-active-background-color) !important}div.journey-js-dialog button.close:active::before,div.journey-js-dialog button.close:active::after{background:var(--journey-js-dialog-close-button-active-x-color) !important}div.journey-js-dialog button.close:hover{cursor:pointer;border:var(--journey-js-border-size) solid var(--journey-js-dialog-close-button-hover-border-color);background-color:var(--journey-js-dialog-close-button-hover-background-color)}div.journey-js-dialog button.close:hover::before,div.journey-js-dialog button.close:hover::after{background:var(--journey-js-dialog-close-button-hover-x-color)}div.journey-js-dialog div.progress-dots{margin-top:var(--journey-js-spacing);margin-bottom:var(--journey-js-spacing);text-align:center}div.journey-js-dialog div.progress-dots div.dot,div.journey-js-dialog div.progress-dots div.dot-active{margin:2.5px;display:inline-block;padding:0 !important}div.journey-js-dialog div.progress-dots div.dot{border-radius:50%;height:10px;width:10px;background-color:var(--journey-js-dialog-button-background-color);border:var(--journey-js-border-size) solid var(--journey-js-dialog-button-border-color);transition:var(--journey-js-transition)}div.journey-js-dialog div.progress-dots div.dot:active{background-color:var(--journey-js-dialog-button-active-background-color) !important;border:var(--journey-js-border-size) solid var(--journey-js-dialog-button-active-border-color) !important;color:var(--journey-js-color-white) !important}div.journey-js-dialog div.progress-dots div.dot:hover{cursor:pointer;background-color:var(--journey-js-dialog-button-hover-background-color);border:var(--journey-js-border-size) solid var(--journey-js-dialog-button-hover-border-color);color:var(--journey-js-color-white) !important}div.journey-js-dialog div.progress-dots div.dot-number{height:25px !important;width:25px !important;padding:3px;display:inline-flex;justify-content:center;align-content:center;flex-direction:column;font-size:.8rem;border-radius:50% !important;color:var(--journey-js-color-gray) !important}div.journey-js-dialog div.progress-dots div.dot-active{position:relative;transition:var(--journey-js-transition);transition-property:width;border-radius:10px;height:10px;width:20px;background-color:var(--journey-js-dialog-button-border-color);border:var(--journey-js-border-size) solid var(--journey-js-dialog-button-border-color);color:var(--journey-js-color-white) !important}div.journey-js-dialog div.progress-dots div.dot-active::after{content:"";position:absolute;width:15px;height:1px;background-color:var(--journey-js-dialog-button-border-color);bottom:-5px;left:50%;transform:translate(-50%)}div.journey-js-dialog div.progress-bar{border-radius:var(--journey-js-border-radius);margin-top:var(--journey-js-spacing);margin-bottom:var(--journey-js-spacing);background-color:var(--journey-js-dialog-button-background-color);border:var(--journey-js-border-size) solid var(--journey-js-dialog-button-border-color);text-wrap:nowrap;overflow:hidden}div.journey-js-dialog div.progress-bar div.progress-bar-percentage{min-height:10px;background-color:var(--journey-js-dialog-button-border-color);transition:var(--journey-js-transition);transition-property:width;text-align:center;padding:0 !important;margin:0 !important}div.journey-js-dialog div.progress-bar div.progress-bar-percentage p.progress-bar-percentage-text{padding:calc(var(--journey-js-spacing)/2) !important;font-size:smaller;margin:0 !important;color:var(--journey-js-color-white)}div.journey-js-dialog div.checkbox-container{margin-top:var(--journey-js-spacing);margin-bottom:var(--journey-js-spacing)}div.journey-js-dialog div.checkbox-container label.checkbox{display:inline-block;position:relative;padding-left:25px;color:var(--journey-js-color-white)}div.journey-js-dialog div.checkbox-container label.checkbox input{display:none !important}div.journey-js-dialog div.checkbox-container label.checkbox input:checked~span.check-mark{background-color:var(--journey-js-checkbox-background-color-checked);border:var(--journey-js-border-size) solid var(--journey-js-checkbox-border-color-checked)}div.journey-js-dialog div.checkbox-container label.checkbox input:checked~span.check-mark::before{display:block}div.journey-js-dialog div.checkbox-container label.checkbox input:disabled~span.check-mark,div.journey-js-dialog div.checkbox-container label.checkbox input:disabled~span.text{opacity:.5}div.journey-js-dialog div.checkbox-container label.checkbox input:disabled~span.check-mark{border:var(--journey-js-border-size) solid var(--journey-js-color-black) !important}div.journey-js-dialog div.checkbox-container label.checkbox span.check-mark{position:absolute;top:.5px;left:0;height:15px;width:15px;background-color:var(--journey-js-checkbox-background-color);border-radius:var(--journey-js-border-control-radius);border:var(--journey-js-border-size) solid var(--journey-js-checkbox-border-color);transition:var(--journey-js-transition)}div.journey-js-dialog div.checkbox-container label.checkbox span.check-mark::before{content:"";transform:rotate(45deg);position:absolute;display:none;left:4px;top:.5px;width:6px;height:11px;border:solid var(--journey-js-color-white);border-width:0 2.5px 2.5px 0}div.journey-js-dialog div.checkbox-container label.checkbox:hover span.check-mark{border:var(--journey-js-border-size) solid var(--journey-js-checkbox-border-hover-color)}div.journey-js-dialog div.buttons{margin-top:calc(var(--journey-js-spacing)*2);text-align:right;border-top:var(--journey-js-border-size) dotted var(--journey-js-dialog-button-border-color);padding-top:var(--journey-js-spacing)}div.journey-js-dialog div.buttons button:first-child{margin-left:0 !important}div.journey-js-dialog div.buttons button.back,div.journey-js-dialog div.buttons button.next{border-radius:var(--journey-js-border-radius);background-color:var(--journey-js-dialog-button-background-color);color:var(--journey-js-dialog-button-text-color);border:var(--journey-js-border-size) solid var(--journey-js-dialog-button-border-color);min-width:100px;padding:var(--journey-js-spacing);transition:var(--journey-js-transition);outline:none;margin-left:var(--journey-js-spacing)}div.journey-js-dialog div.buttons button.back:not([disabled]):active,div.journey-js-dialog div.buttons button.next:not([disabled]):active{background-color:var(--journey-js-dialog-button-active-background-color) !important;color:var(--journey-js-dialog-button-active-text-color) !important;border:var(--journey-js-border-size) solid var(--journey-js-dialog-button-active-border-color) !important}div.journey-js-dialog div.buttons button.back:not([disabled]):hover,div.journey-js-dialog div.buttons button.next:not([disabled]):hover{cursor:pointer;background-color:var(--journey-js-dialog-button-hover-background-color);color:var(--journey-js-dialog-button-hover-text-color);border:var(--journey-js-border-size) solid var(--journey-js-dialog-button-hover-border-color)}div.journey-js-dialog div.buttons button.back:disabled,div.journey-js-dialog div.buttons button.next:disabled{background-color:var(--journey-js-dialog-button-disabled-background-color) !important;color:var(--journey-js-color-gray)}div.journey-js-dialog div.buttons button.back{float:left}div.journey-js-dialog div.buttons button.next{font-weight:var(--journey-js-title-bold-weight);float:right}div.journey-js-hint{position:absolute;width:15px;height:15px;border-radius:50%;background-color:var(--journey-js-color-gray);right:-7.5px;top:-7.5px;animation:journey-js-hint-effect 2s infinite;cursor:pointer}@keyframes journey-js-hint-effect{0%{box-shadow:0 0 0 0 var(--journey-js-color-hint)}70%{box-shadow:0 0 0 10px var(--journey-js-color-hint)}100%{box-shadow:0 0 0 0 var(--journey-js-color-hint)}}div.journey-js-disabled-background{z-index:1000;position:fixed;background-color:#000;background-color:rgba(0,0,0,.5);top:0;left:0;height:100%;width:100%}.journey-js-element-focus{z-index:1001 !important}div.journey-js-tooltip{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;cursor:default;box-sizing:border-box;line-height:normal;font-family:var(--journey-js-default-font);animation:fade-in-animation var(--journey-js-animation-length);position:absolute;background-color:var(--journey-js-tooltip-background-color);border:var(--journey-js-border-size) solid var(--journey-js-tooltip-border-color);color:var(--journey-js-tooltip-text-color);border-radius:var(--journey-js-border-radius);z-index:2000;max-width:300px;padding:var(--journey-js-spacing);font-size:var(--journey-js-spacing-font-size);font-weight:var(--journey-js-tooltip-bold-weight);display:none}@keyframes fade-in-animation{0%{opacity:0}100%{opacity:1}} diff --git a/dist/journey.min.js b/dist/journey.min.js index f19b594..470a58c 100644 --- a/dist/journey.min.js +++ b/dist/journey.min.js @@ -1,29 +1 @@ -/*! Journey.js v1.7.2 | (c) Bunoon 2024 | MIT License */ -(function(){function oa(a){e=ea(a,{});e["default"]={json:{},keys:[],position:0}}function U(){return e[f].json[e[f].keys[e[f].position]]}function Ia(){M=p("div","journey-js-disabled-background");M.onclick=function(){d.closeDialogOnDisabledBackgroundClick&&G()}}function Ja(){g=p("div","journey-js-dialog");g.style.display="none";q.body.appendChild(g);N=p("button","close");g.appendChild(N);N.onclick=function(){G()};fa(N,d.closeButtonToolTipText);E=p("div","title");g.appendChild(E);V=p("div", -"description");g.appendChild(V);O=p("div","checkbox-container");g.appendChild(O);ha=Ka(O,d.doNotShowAgainText).input;ha.onchange=function(){d.showDoNotShowAgain&&w(d.onDoNotShowAgainChange,ha.checked)};H=p("div","progress-dots");g.appendChild(H);I=p("div","progress-bar");g.appendChild(I);W=p("div","progress-bar-percentage");I.appendChild(W);X=p("p","progress-bar-percentage-text");W.appendChild(X);J=p("div","buttons");g.appendChild(J);P=p("button","back");P.onclick=pa;J.appendChild(P);Y=p("button", -"next");Y.onclick=qa;J.appendChild(Y);E.onmousedown=La;E.onmouseup=ra;E.oncontextmenu=ra;q.body.addEventListener("mousemove",Ma);q.body.addEventListener("mouseleave",Na)}function G(a){a=m(a,!0);if(u(d.closeDialogConfirmationText)&&a?confirm(d.closeDialogConfirmationText):1)a=U(),n(a)&&n(a.currentView.element)&&w(a.events.onClose,a.currentView.element),K(!1),sa(q.body,M),Q(),g.style.display="none"}function pa(){0=e[f].keys.length-1?d.finishButtonText:d.nextButtonText;ua(a);va(null,a);H.innerHTML=v.empty;if(d.showProgressDots)for(b=e[f].keys.length,c=0;cr.innerWidth||b.alignRight)a-=g.offsetWidth,a+=b.currentView.element.offsetWidth;if(c+g.offsetHeight>r.innerHeight||b.alignTop)c-=g.offsetHeight+b.currentView.element.offsetHeight; -g.style.top=c+"px";g.style.left=a+"px"}else a=ya(),b=Z.max(0,(r.innerWidth-g.offsetWidth)/2+a.left),a=Z.max(0,(r.innerHeight-g.offsetHeight)/2+a.top),g.style.left=b+"px",g.style.top=a+"px"}function K(a){a=n(a)?a:!0;var b=U();n(b)&&n(b.currentView.element)&&(b.currentView.element.className=b.currentView.element.className.replace(v.space+"journey-js-element-focus",v.empty),n(ja)&&(b.currentView.element.style.position=ja),a&&w(b.events.onLeave,b.currentView.element))}function Oa(a,b){b=e[f].json[b]; -var c=null;a===e[f].position?c=p("div","dot-active"):(c=p("div","dot"),c.onclick=function(){K();e[f].position=a;B()});H.appendChild(c);d.showProgressDotToolTips&&(u(b.tooltip)?fa(c,b.tooltip):fa(c,b.title));d.showProgressDotNumbers&&(c.className+=" dot-number",c.innerHTML=(a+1).toString())}function La(a){F||wa||!d.dialogMovingEnabled||(g.className+=" journey-js-dialog-moving",F=!0,za=a.pageX-g.offsetLeft,Aa=a.pageY-g.offsetTop,aa=g.offsetLeft,ba=g.offsetTop)}function ra(){F&&(F=!1,ba=aa=0,g.className= -"journey-js-dialog")}function Ma(a){F&&(g.style.left=a.pageX-za+"px",g.style.top=a.pageY-Aa+"px")}function Na(){F&&(g.style.left=aa+"px",g.style.top=ba+"px",F=!1,ba=aa=0,g.className="journey-js-dialog")}function Pa(){n(x)||(x=p("div","journey-js-tooltip"),x.style.display="none",q.body.appendChild(x),q.body.addEventListener("mousemove",function(){Q()}),q.addEventListener("scroll",function(){Q()}))}function fa(a,b){null!==a&&(a.onmousemove=function(c){Qa(c,b)})}function Qa(a,b){Ba(a);Q();ca=setTimeout(function(){x.innerHTML= -b;x.style.display="block";xa(a,x)},d.tooltipDelay)}function Q(){n(x)&&(n(ca)&&(clearTimeout(ca),ca=null),"block"===x.style.display&&(x.style.display="none"))}function Ca(){for(var a=d.domElementTypes,b=a.length,c=0;cr.innerWidth?c-=b.offsetWidth:c++;h+b.offsetHeight>r.innerHeight?h-=b.offsetHeight:h++;c=e[f].keys.length-1};k.addDocumentSteps=function(){Ca();return k};k.addStep=function(a,b){D(a)&&D(b)&&(Da(a,Ea(b)),e[f].keys.sort(),da());return k};k.removeStep=function(a){if(D(a)){var b=!1,c;for(c in e)if(e.hasOwnProperty(c))for(var h in e[c].json)if(e[c].json.hasOwnProperty(h)){var l=e[c].json[h];if(l.currentView.element===a){w(l.events.onRemoveStep,l.currentView.element);e[c].keys.splice(e[c].keys.indexOf(l.order),1);delete e[c].json[l.order];e[c].keys.sort();b= -!0;break}}b?da():la(a,"journey-js-hint")}return k};k.clearSteps=function(a){da();for(var b in e)if(e.hasOwnProperty(b)&&(!u(a)||a===b))for(var c in e[b].json)if(e[b].json.hasOwnProperty(c)){var h=e[b].json[c];w(h.events.onRemoveStep,h.currentView.element)}u(a)?e.hasOwnProperty(a)&&delete e[a]:e={};u(a)&&"default"!==a||oa(e);return k};k.clearHints=function(){la(q.body,"journey-js-hint");return k};k.reverseStepOrder=function(){e[f].keys.reverse();da();return k};k.setConfiguration=function(a){if(D(a)){var b= -!1,c;for(c in a)a.hasOwnProperty(c)&&d.hasOwnProperty(c)&&d[c]!==a[c]&&(d[c]=a[c],b=!0);b&&Ga(d)}return k};k.getVersion=function(){return"1.7.2"};(function(a,b,c,h){q=a;r=b;Z=c;Fa=h;Ga();q.addEventListener("DOMContentLoaded",function(){oa();Ia();Ja();Pa();Ca();var l=void 0,C=(l=n(l)?l:!0)?q.addEventListener:q.removeEventListener;l=l?r.addEventListener:r.removeEventListener;d.shortcutKeysEnabled&&C("keydown",Ta);l("resize",Ua);C=!1;if(d.browserUrlParametersEnabled){l={};var t=r.location.href.split("?"); -if(1{function t(e){return null!=e&&""!==e}function o(e){return t(e)&&"object"==typeof e}e.defined=t,e.definedObject=o,e.definedBoolean=function(e){return t(e)&&"boolean"==typeof e},e.definedString=function(e){return t(e)&&"string"==typeof e},e.definedFunction=function(e){return t(e)&&"function"==typeof e},e.definedNumber=function(e){return t(e)&&"number"==typeof e},e.definedArray=function(e){return o(e)&&e instanceof Array}})(Is||(Is={})),(e=>{function t(e,t){return Is.definedArray(e)?e:t}e.getDefaultAnyString=function(e,t){return"string"==typeof e?e:t},e.getDefaultString=function(e,t){return Is.definedString(e)?e:t},e.getDefaultBoolean=function(e,t){return Is.definedBoolean(e)?e:t},e.getDefaultNumber=function(e,t){return Is.definedNumber(e)?e:t},e.getDefaultFunction=function(e,t){return Is.definedFunction(e)?e:t},e.getDefaultObject=function(e,t){return Is.definedObject(e)?e:t},e.getDefaultArray=t,e.getDefaultStringOrArray=function(e,o){let n=o;if(Is.definedString(e)){const t=e.toString().split(" ");0===t.length?e=o:n=t}else n=t(e,o);return n}})(Data||(Data={})),(e=>{function t(e,t=""){const o=e.toLowerCase();let n="text"===o?document.createTextNode(""):document.createElement(o);return Is.defined(t)&&(n.className=t),n}function o(){const e=document.documentElement;return{left:e.scrollLeft-(e.clientLeft||0),top:e.scrollTop-(e.clientTop||0)}}e.create=t,e.getOffset=function(e){const t={left:0,top:0};for(;e&&!isNaN(e.offsetLeft)&&!isNaN(e.offsetTop);)t.left+=e.offsetLeft-e.scrollLeft,t.top+=e.offsetTop-e.scrollTop,e=e.offsetParent;return t},e.getScrollPosition=o,e.getStyleValueByName=function(e,t){let o=null;return document.defaultView.getComputedStyle?o=document.defaultView.getComputedStyle(e,null).getPropertyValue(t):e.currentStyle&&(o=e.currentStyle[t]),o},e.addNode=function(e,t){try{e.contains(t)||e.appendChild(t)}catch(e){console.warn(e.message)}},e.removeNode=function(e,t){try{e.contains(t)&&e.removeChild(t)}catch(e){console.warn(e.message)}},e.cancelBubble=function(e){e.preventDefault(),e.cancelBubble=!0},e.showElementAtMousePosition=function(e,t){let n=e.pageX,i=e.pageY;const r=o();t.style.display="block",n+t.offsetWidth>window.innerWidth?n-=t.offsetWidth:n++,i+t.offsetHeight>window.innerHeight?i-=t.offsetHeight:i++,n{let _configuration={},_configuration_ShortcutKeysEnabled=!0;const _groups_Default="default";let _groups_Current=_groups_Default,_groups={},_element_Focus_Element_PositionStyle="",_element_Disabled_Background,_element_Dialog,_element_Dialog_Close_Button,_element_Dialog_Title,_element_Dialog_Description,_element_Dialog_CheckBox_Container,_element_Dialog_CheckBox_Input,_element_Dialog_ProgressDots,_element_Dialog_ProgressBar,_element_Dialog_ProgressBar_Percentage,_element_Dialog_ProgressBar_Percentage_Text,_element_Dialog_Buttons,_element_Dialog_Buttons_Back_Button,_element_Dialog_Buttons_Next_Button,_element_Dialog_IsHint=!1,_element_Dialog_Move_Original_X=0,_element_Dialog_Move_Original_Y=0,_element_Dialog_Move_IsMoving=!1,_element_Dialog_Move_X=0,_element_Dialog_Move_Y=0,_element_ToolTip,_element_ToolTip_Timer=0;function setupDefaultGroup(e=null){_groups=Data.getDefaultObject(e,{}),_groups[_groups_Default]={json:{},keys:[],position:0}}function setupNewGroup(e){_groups.hasOwnProperty(e)||(_groups[e]={json:{},keys:[],position:0})}function getGroupBindingOptions(){return _groups[_groups_Current].json[_groups[_groups_Current].keys[_groups[_groups_Current].position]]}function renderDisabledBackground(){_element_Disabled_Background=DomElement.create("div","journey-js-disabled-background"),_element_Disabled_Background.onclick=()=>{_configuration.closeDialogOnDisabledBackgroundClick&&onDialogClose()}}function showDisabledBackground(){DomElement.addNode(document.body,_element_Disabled_Background)}function hideDisabledBackground(){DomElement.removeNode(document.body,_element_Disabled_Background)}function renderDialog(){_element_Dialog=DomElement.create("div","journey-js-dialog"),_element_Dialog.style.display="none",document.body.appendChild(_element_Dialog),_element_Dialog_Close_Button=DomElement.create("button","close"),_element_Dialog.appendChild(_element_Dialog_Close_Button),_element_Dialog_Close_Button.onclick=()=>{onDialogClose()},addToolTip(_element_Dialog_Close_Button,_configuration.closeButtonToolTipText),_element_Dialog_Title=DomElement.create("div","title"),_element_Dialog.appendChild(_element_Dialog_Title),_element_Dialog_Description=DomElement.create("div","description"),_element_Dialog.appendChild(_element_Dialog_Description),_element_Dialog_CheckBox_Container=DomElement.create("div","checkbox-container"),_element_Dialog.appendChild(_element_Dialog_CheckBox_Container),_element_Dialog_CheckBox_Input=DomElement.createCheckBox(_element_Dialog_CheckBox_Container,_configuration.doNotShowAgainText),_element_Dialog_CheckBox_Input.onchange=()=>{_configuration.showDoNotShowAgain&&fireCustomTriggerEvent(_configuration.onDoNotShowAgainChange,_element_Dialog_CheckBox_Input.checked)},_element_Dialog_ProgressDots=DomElement.create("div","progress-dots"),_element_Dialog.appendChild(_element_Dialog_ProgressDots),_element_Dialog_ProgressBar=DomElement.create("div","progress-bar"),_element_Dialog.appendChild(_element_Dialog_ProgressBar),_element_Dialog_ProgressBar_Percentage=DomElement.create("div","progress-bar-percentage"),_element_Dialog_ProgressBar.appendChild(_element_Dialog_ProgressBar_Percentage),_element_Dialog_ProgressBar_Percentage_Text=DomElement.create("p","progress-bar-percentage-text"),_element_Dialog_ProgressBar_Percentage.appendChild(_element_Dialog_ProgressBar_Percentage_Text),_element_Dialog_Buttons=DomElement.create("div","buttons"),_element_Dialog.appendChild(_element_Dialog_Buttons),_element_Dialog_Buttons_Back_Button=DomElement.create("button","back"),_element_Dialog_Buttons_Back_Button.onclick=onDialogBack,_element_Dialog_Buttons.appendChild(_element_Dialog_Buttons_Back_Button),_element_Dialog_Buttons_Next_Button=DomElement.create("button","next"),_element_Dialog_Buttons_Next_Button.onclick=onDialogNext,_element_Dialog_Buttons.appendChild(_element_Dialog_Buttons_Next_Button),makeDialogMovable()}function onDialogClose(e=!0){let t=!1;if(t=!Is.definedString(_configuration.closeDialogConfirmationText)||!e||confirm(_configuration.closeDialogConfirmationText),t){const e=getGroupBindingOptions();Is.defined(e)&&Is.defined(e._currentView.element)&&fireCustomTriggerEvent(e.events.onClose,e._currentView.element),removeFocusClassFromLastElement(!1),hideDisabledBackground(),hideToolTip(),_element_Dialog.style.display="none"}}function onDialogBack(){_groups[_groups_Current].position>0&&(removeFocusClassFromLastElement(),_groups[_groups_Current].position--,showDialogAndSetPosition())}function onDialogNext(){if(_groups[_groups_Current].position===_groups[_groups_Current].keys.length-1){const e=getGroupBindingOptions();onDialogClose(!1),fireCustomTriggerEvent(e.events.onFinish,e._currentView.element)}else removeFocusClassFromLastElement(),_groups[_groups_Current].position++,showDialogAndSetPosition()}function showDialogAndSetPosition(){const e=getGroupBindingOptions();if(Is.defined(e)&&Is.defined(e._currentView.element)){e.showDisabledBackground?showDisabledBackground():hideDisabledBackground(),hideToolTip(),_element_Dialog_Close_Button.style.display=_configuration.showCloseButton?"block":"none",_configuration_ShortcutKeysEnabled=!0,e._currentView.element.className+=" journey-js-element-focus",_configuration.scrollToElements&&e._currentView.element.scrollIntoView();const t=DomElement.getStyleValueByName(e._currentView.element,"position");""!==t&&"static"===t.toLowerCase()&&(_element_Focus_Element_PositionStyle=t,e._currentView.element.style.position="relative"),DomElement.showElementBasedOnCondition(_element_Dialog_CheckBox_Container,_configuration.showDoNotShowAgain),DomElement.showElementBasedOnCondition(_element_Dialog_ProgressDots,_configuration.showProgressDots&&_groups[_groups_Current].keys.length>1),DomElement.showElementBasedOnCondition(_element_Dialog_ProgressBar,_configuration.showProgressBar&&_groups[_groups_Current].keys.length>1),DomElement.showElementBasedOnCondition(_element_Dialog_ProgressBar_Percentage_Text,_configuration.showProgressBarText),DomElement.showElementBasedOnCondition(_element_Dialog_Buttons,_configuration.showButtons),_element_Dialog_Buttons_Back_Button.innerHTML=_configuration.backButtonText,_element_Dialog_Buttons_Back_Button.disabled=0===_groups[_groups_Current].position,_groups[_groups_Current].position>=_groups[_groups_Current].keys.length-1?_element_Dialog_Buttons_Next_Button.innerHTML=_configuration.finishButtonText:_element_Dialog_Buttons_Next_Button.innerHTML=_configuration.nextButtonText,setDialogText(e),setDialogPosition(null,e),buildProcessDots(),setProgressBarPosition(),fireCustomTriggerEvent(e.events.onEnter,e._currentView.element),e.sendClick&&e._currentView.element.click()}}function setDialogText(e){Is.definedString(e.title)?_element_Dialog_Title.innerHTML=e.title:_element_Dialog_Title.innerHTML="",Is.definedString(e.description)?_element_Dialog_Description.innerHTML=e.description:_element_Dialog_Description.innerHTML=""}function setDialogPosition(e,t){if("block"!==_element_Dialog.style.display&&(_element_Dialog.style.display="block",fireCustomTriggerEvent(t.events.onOpen,t._currentView.element)),0===_groups[_groups_Current].position&&fireCustomTriggerEvent(t.events.onStart,t._currentView.element),_element_Dialog_IsHint=!0===t.isHint,t.attach||t.isHint)if(t.isHint&&t.alignHintToClickPosition)DomElement.showElementAtMousePosition(e,_element_Dialog);else{const e=DomElement.getOffset(t._currentView.element);let o=e.top+t._currentView.element.offsetHeight,n=e.left;(n+_element_Dialog.offsetWidth>window.innerWidth||t.alignRight)&&(n-=_element_Dialog.offsetWidth,n+=t._currentView.element.offsetWidth),(o+_element_Dialog.offsetHeight>window.innerHeight||t.alignTop)&&(o-=_element_Dialog.offsetHeight+t._currentView.element.offsetHeight),_element_Dialog.style.top=o+"px",_element_Dialog.style.left=n+"px"}else{const e=DomElement.getScrollPosition(),t=Math.max(0,(window.innerWidth-_element_Dialog.offsetWidth)/2+e.left),o=Math.max(0,(window.innerHeight-_element_Dialog.offsetHeight)/2+e.top);_element_Dialog.style.left=t+"px",_element_Dialog.style.top=o+"px"}}function removeFocusClassFromLastElement(e=!0){const t=getGroupBindingOptions();Is.defined(t)&&Is.defined(t._currentView.element)&&(t._currentView.element.className=t._currentView.element.className.replace(" journey-js-element-focus",""),Is.defined(_element_Focus_Element_PositionStyle)&&(t._currentView.element.style.position=_element_Focus_Element_PositionStyle),e&&fireCustomTriggerEvent(t.events.onLeave,t._currentView.element))}function buildProcessDots(){if(_element_Dialog_ProgressDots.innerHTML="",_configuration.showProgressDots){const e=_groups[_groups_Current].keys.length;for(let t=0;t{removeFocusClassFromLastElement(),_groups[_groups_Current].position=e,showDialogAndSetPosition()}),_element_Dialog_ProgressDots.appendChild(n),_configuration.showProgressDotToolTips&&(Is.definedString(o.tooltip)?addToolTip(n,o.tooltip):addToolTip(n,o.title)),_configuration.showProgressDotNumbers&&(n.className+=" dot-number",n.innerHTML=(e+1).toString())}function setProgressBarPosition(){if(_configuration.showProgressBar){const e=_element_Dialog_ProgressBar.offsetWidth/_groups[_groups_Current].keys.length,t=(_groups[_groups_Current].position+1)*e,o=Math.ceil((_groups[_groups_Current].position+1)/_groups[_groups_Current].keys.length*100);_element_Dialog_ProgressBar_Percentage.style.width=t+"px",_element_Dialog_ProgressBar_Percentage_Text.innerHTML=o+"%"}}function makeDialogMovable(){_element_Dialog_Title.onmousedown=onMoveTitleBarMouseDown,_element_Dialog_Title.onmouseup=onMoveTitleBarMouseUp,_element_Dialog_Title.oncontextmenu=onMoveTitleBarMouseUp,document.body.addEventListener("mousemove",onMoveDocumentMouseMove),document.body.addEventListener("mouseleave",onMoveDocumentMouseLeave)}function onMoveTitleBarMouseDown(e){_element_Dialog_Move_IsMoving||_element_Dialog_IsHint||!_configuration.dialogMovingEnabled||(_element_Dialog.className+=" journey-js-dialog-moving",_element_Dialog_Move_IsMoving=!0,_element_Dialog_Move_X=e.pageX-_element_Dialog.offsetLeft,_element_Dialog_Move_Y=e.pageY-_element_Dialog.offsetTop,_element_Dialog_Move_Original_X=_element_Dialog.offsetLeft,_element_Dialog_Move_Original_Y=_element_Dialog.offsetTop)}function onMoveTitleBarMouseUp(){_element_Dialog_Move_IsMoving&&(_element_Dialog_Move_IsMoving=!1,_element_Dialog_Move_Original_X=0,_element_Dialog_Move_Original_Y=0,_element_Dialog.className="journey-js-dialog")}function onMoveDocumentMouseMove(e){_element_Dialog_Move_IsMoving&&(_element_Dialog.style.left=e.pageX-_element_Dialog_Move_X+"px",_element_Dialog.style.top=e.pageY-_element_Dialog_Move_Y+"px")}function onMoveDocumentMouseLeave(){_element_Dialog_Move_IsMoving&&(_element_Dialog.style.left=_element_Dialog_Move_Original_X+"px",_element_Dialog.style.top=_element_Dialog_Move_Original_Y+"px",_element_Dialog_Move_IsMoving=!1,_element_Dialog_Move_Original_X=0,_element_Dialog_Move_Original_Y=0,_element_Dialog.className="journey-js-dialog")}function renderToolTip(){Is.defined(_element_ToolTip)||(_element_ToolTip=DomElement.create("div","journey-js-tooltip"),_element_ToolTip.style.display="none",document.body.appendChild(_element_ToolTip),document.body.addEventListener("mousemove",(()=>{hideToolTip()})),document.addEventListener("scroll",(()=>{hideToolTip()})))}function addToolTip(e,t){null!==e&&(e.onmousemove=e=>{showToolTip(e,t)})}function showToolTip(e,t){DomElement.cancelBubble(e),hideToolTip(),_element_ToolTip_Timer=setTimeout((()=>{_element_ToolTip.innerHTML=t,_element_ToolTip.style.display="block",DomElement.showElementAtMousePosition(e,_element_ToolTip)}),_configuration.tooltipDelay)}function hideToolTip(){Is.defined(_element_ToolTip)&&(0!==_element_ToolTip_Timer&&(clearTimeout(_element_ToolTip_Timer),_element_ToolTip_Timer=0),"block"===_element_ToolTip.style.display&&(_element_ToolTip.style.display="none"))}function getElements(){const e=_configuration.domElementTypes,t=e.length;for(let o=0;o{DomElement.cancelBubble(t),_element_Dialog_CheckBox_Container.style.display="none",_element_Dialog_ProgressDots.style.display="none",_element_Dialog_ProgressBar.style.display="none",_element_Dialog_Buttons.style.display="none",_configuration_ShortcutKeysEnabled=!1,setDialogText(e),setDialogPosition(t,e),e.removeHintWhenViewed&&DomElement.clearElementsByClassName(e._currentView.element,"journey-js-hint")}}function buildDocumentEvents(e=!0){const t=e?document.addEventListener:document.removeEventListener,o=e?window.addEventListener:window.removeEventListener;_configuration.shortcutKeysEnabled&&t("keydown",onWindowKeyDown),o("resize",onWindowResize)}function onWindowKeyDown(e){_public.isOpen()&&_configuration.shortcutKeysEnabled&&("Escape"===e.code?(e.preventDefault(),onDialogClose()):_configuration_ShortcutKeysEnabled&&("ArrowLeft"===e.code?(e.preventDefault(),onDialogBack()):"ArrowRight"===e.code?(e.preventDefault(),onDialogNext()):"ArrowUp"===e.code?(e.preventDefault(),onWindowKeyCodeUp()):"ArrowDown"===e.code&&(e.preventDefault(),onWindowKeyCodeDown())))}function onWindowResize(){_public.isOpen()&&showDialogAndSetPosition()}function onWindowKeyCodeUp(){0!==_groups[_groups_Current].position&&(removeFocusClassFromLastElement(),_groups[_groups_Current].position=0,showDialogAndSetPosition())}function onWindowKeyCodeDown(){_groups[_groups_Current].position!==_groups[_groups_Current].keys.length-1&&(removeFocusClassFromLastElement(),_groups[_groups_Current].position=_groups[_groups_Current].keys.length-1,showDialogAndSetPosition())}function buildAttributeOptions(e){let t=Data.getDefaultObject(e,{});return t.order=Data.getDefaultNumber(t.order,0),t.attach=Data.getDefaultBoolean(t.attach,!0),t.sendClick=Data.getDefaultBoolean(t.sendClick,!1),t.alignTop=Data.getDefaultBoolean(t.alignTop,!1),t.alignRight=Data.getDefaultBoolean(t.alignRight,!1),t.isHint=Data.getDefaultBoolean(t.isHint,!1),t.alignHintToClickPosition=Data.getDefaultBoolean(t.alignHintToClickPosition,!1),t.showDisabledBackground=Data.getDefaultBoolean(t.showDisabledBackground,!0),t.removeHintWhenViewed=Data.getDefaultBoolean(t.removeHintWhenViewed,!1),t.group=Data.getDefaultString(t.group,_groups_Default),t=buildAttributeOptionStrings(t),buildAttributeOptionCustomTriggers(t)}function buildAttributeOptionStrings(e){return e.title=Data.getDefaultString(e.title,""),e.description=Data.getDefaultString(e.description,""),e.tooltip=Data.getDefaultString(e.tooltip,""),e}function buildAttributeOptionCustomTriggers(e){return e.events=Data.getDefaultObject(e.events,{}),e.events.onEnter=Data.getDefaultFunction(e.events.onEnter,null),e.events.onLeave=Data.getDefaultFunction(e.events.onLeave,null),e.events.onClose=Data.getDefaultFunction(e.events.onClose,null),e.events.onFinish=Data.getDefaultFunction(e.events.onFinish,null),e.events.onOpen=Data.getDefaultFunction(e.events.onOpen,null),e.events.onStart=Data.getDefaultFunction(e.events.onStart,null),e.events.onAddStep=Data.getDefaultFunction(e.events.onAddStep,null),e.events.onRemoveStep=Data.getDefaultFunction(e.events.onRemoveStep,null),e}function fireCustomTriggerEvent(e,...t){Is.definedFunction(e)&&e.apply(null,[].slice.call(t,0))}function getBrowserUrlParameters(){let e=!1;if(_configuration.browserUrlParametersEnabled){const t=getBrowserUrlArguments(window.location.href);if(Is.defined(t.sjOrderId)){const e=parseInt(t.sjOrderId,10);!isNaN(e)&&e<=_groups[_groups_Current].keys.length-1&&(_groups[_groups_Current].position=e)}Is.defined(t.sjShow)&&(e="true"===t.sjShow)}return e}function getBrowserUrlArguments(e){const t={},o=e.split("?");if(o.length>1){const e=o[1].split("&"),n=e.length;for(let o=0;o=_groups[_groups_Current].keys.length-1},addDocumentSteps:function(){return getElements(),_public},addStep:function(e,t){return Is.definedObject(e)&&Is.definedObject(t)&&(setupElement(e,buildAttributeOptions(t)),_groups[_groups_Current].keys.sort(),resetDialogPosition()),_public},removeStep:function(e){if(Is.definedObject(e)){let t=!1;for(let o in _groups)if(_groups.hasOwnProperty(o))for(let n in _groups[o].json)if(_groups[o].json.hasOwnProperty(n)){const i=_groups[o].json[n];if(i._currentView.element===e){fireCustomTriggerEvent(i.events.onRemoveStep,i._currentView.element),_groups[o].keys.splice(_groups[o].keys.indexOf(i.order),1),delete _groups[o].json[i.order],_groups[o].keys.sort(),t=!0;break}}t?resetDialogPosition():DomElement.clearElementsByClassName(e,"journey-js-hint")}return _public},clearSteps:function(e=""){resetDialogPosition();for(let t in _groups)if(_groups.hasOwnProperty(t)&&(!Is.definedString(e)||e===t))for(let e in _groups[t].json)if(_groups[t].json.hasOwnProperty(e)){const o=_groups[t].json[e];fireCustomTriggerEvent(o.events.onRemoveStep,o._currentView.element)}return Is.definedString(e)?_groups.hasOwnProperty(e)&&delete _groups[e]:_groups={},Is.definedString(e)&&e!==_groups_Default||setupDefaultGroup(_groups),_public},clearHints:function(){return DomElement.clearElementsByClassName(document.body,"journey-js-hint"),_public},reverseStepOrder:function(){return _groups[_groups_Current].keys.reverse(),resetDialogPosition(),_public},setConfiguration:function(e){if(Is.definedObject(e)){let t=!1;const o=_configuration;for(let n in e)e.hasOwnProperty(n)&&_configuration.hasOwnProperty(n)&&o[n]!==e[n]&&(o[n]=e[n],t=!0);t&&buildDefaultConfiguration(o)}return _public},getVersion:function(){return"2.0.0"}};buildDefaultConfiguration(),document.addEventListener("DOMContentLoaded",(()=>{setupDefaultGroup(),renderDisabledBackground(),renderDialog(),renderToolTip(),getElements(),buildDocumentEvents(),getBrowserUrlParameters()&&_public.show()})),Is.defined(window.$journey)||(window.$journey=_public)})(); \ No newline at end of file diff --git a/dist/translations/journey.translations.af.js b/dist/translations/journey.translations.af.js index ee5c4dc..bb17ab2 100644 --- a/dist/translations/journey.translations.af.js +++ b/dist/translations/journey.translations.af.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Afrikaans | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Afrikaans | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "Terug", "nextButtonText": "Volgende", diff --git a/dist/translations/journey.translations.ar.js b/dist/translations/journey.translations.ar.js index 74c16ca..b68aab4 100644 --- a/dist/translations/journey.translations.ar.js +++ b/dist/translations/journey.translations.ar.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Arabic | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Arabic | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "خلف", "nextButtonText": "التالي", diff --git a/dist/translations/journey.translations.be.js b/dist/translations/journey.translations.be.js index 467f6f9..8fe631d 100644 --- a/dist/translations/journey.translations.be.js +++ b/dist/translations/journey.translations.be.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Belarusian | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Belarusian | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "Назад", "nextButtonText": "Далей", diff --git a/dist/translations/journey.translations.bg.js b/dist/translations/journey.translations.bg.js index 24f1951..a10210d 100644 --- a/dist/translations/journey.translations.bg.js +++ b/dist/translations/journey.translations.bg.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Bulgarian | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Bulgarian | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "обратно", "nextButtonText": "Следващия", diff --git a/dist/translations/journey.translations.bn.js b/dist/translations/journey.translations.bn.js index 2efbf8d..937caf5 100644 --- a/dist/translations/journey.translations.bn.js +++ b/dist/translations/journey.translations.bn.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Bengali | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Bengali | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "পেছনে", "nextButtonText": "পরবর্তী", diff --git a/dist/translations/journey.translations.ca.js b/dist/translations/journey.translations.ca.js index ea0a8b2..d80b589 100644 --- a/dist/translations/journey.translations.ca.js +++ b/dist/translations/journey.translations.ca.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Catalan | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Catalan | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "esquena", "nextButtonText": "Pròxim", diff --git a/dist/translations/journey.translations.da.js b/dist/translations/journey.translations.da.js index 4effb0b..52da394 100644 --- a/dist/translations/journey.translations.da.js +++ b/dist/translations/journey.translations.da.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Danish | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Danish | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "Tilbage", "nextButtonText": "Næste", diff --git a/dist/translations/journey.translations.de.js b/dist/translations/journey.translations.de.js index 5d6e9b6..cda66d7 100644 --- a/dist/translations/journey.translations.de.js +++ b/dist/translations/journey.translations.de.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - German | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - German | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "Zurück", "nextButtonText": "Nächste", diff --git a/dist/translations/journey.translations.el.js b/dist/translations/journey.translations.el.js index 45f922d..d439caa 100644 --- a/dist/translations/journey.translations.el.js +++ b/dist/translations/journey.translations.el.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Greek | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Greek | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "Πίσω", "nextButtonText": "Επόμενο", diff --git a/dist/translations/journey.translations.en.js b/dist/translations/journey.translations.en.js index d6e1096..3477d3a 100644 --- a/dist/translations/journey.translations.en.js +++ b/dist/translations/journey.translations.en.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - English | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - English | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "Back", "nextButtonText": "Next", diff --git a/dist/translations/journey.translations.eo.js b/dist/translations/journey.translations.eo.js index 772e124..0949b15 100644 --- a/dist/translations/journey.translations.eo.js +++ b/dist/translations/journey.translations.eo.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Esperanto | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Esperanto | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "Reen", "nextButtonText": "Poste", diff --git a/dist/translations/journey.translations.es.js b/dist/translations/journey.translations.es.js index 04fb7cd..dca45ea 100644 --- a/dist/translations/journey.translations.es.js +++ b/dist/translations/journey.translations.es.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Spanish | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Spanish | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "Atrás", "nextButtonText": "Próximo", diff --git a/dist/translations/journey.translations.et.js b/dist/translations/journey.translations.et.js index 2393cb7..1917cf6 100644 --- a/dist/translations/journey.translations.et.js +++ b/dist/translations/journey.translations.et.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Estonian | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Estonian | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "tagasi", "nextButtonText": "Edasi", diff --git a/dist/translations/journey.translations.fa.js b/dist/translations/journey.translations.fa.js index 6ea273a..d788f9b 100644 --- a/dist/translations/journey.translations.fa.js +++ b/dist/translations/journey.translations.fa.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Farsi | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Farsi | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "بازگشت", "nextButtonText": "بعد", diff --git a/dist/translations/journey.translations.fi.js b/dist/translations/journey.translations.fi.js index 2db7e18..8bd76bc 100644 --- a/dist/translations/journey.translations.fi.js +++ b/dist/translations/journey.translations.fi.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Finnish | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Finnish | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "Takaisin", "nextButtonText": "Seuraava", diff --git a/dist/translations/journey.translations.fr.js b/dist/translations/journey.translations.fr.js index c631220..4f276f9 100644 --- a/dist/translations/journey.translations.fr.js +++ b/dist/translations/journey.translations.fr.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - French | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - French | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "Dos", "nextButtonText": "Suivant", diff --git a/dist/translations/journey.translations.fy.js b/dist/translations/journey.translations.fy.js index e612297..2472dc7 100644 --- a/dist/translations/journey.translations.fy.js +++ b/dist/translations/journey.translations.fy.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Frisian | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Frisian | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "Efter", "nextButtonText": "Folgjende", diff --git a/dist/translations/journey.translations.ga.js b/dist/translations/journey.translations.ga.js index be8b230..fccab55 100644 --- a/dist/translations/journey.translations.ga.js +++ b/dist/translations/journey.translations.ga.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Irish | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Irish | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "Ar ais", "nextButtonText": "Ar aghaidh", diff --git a/dist/translations/journey.translations.gl.js b/dist/translations/journey.translations.gl.js index 28a379b..7bfd4aa 100644 --- a/dist/translations/journey.translations.gl.js +++ b/dist/translations/journey.translations.gl.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Galician | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Galician | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "De volta", "nextButtonText": "A continuación", diff --git a/dist/translations/journey.translations.he.js b/dist/translations/journey.translations.he.js index ed4be93..08c06dc 100644 --- a/dist/translations/journey.translations.he.js +++ b/dist/translations/journey.translations.he.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Hebrew | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Hebrew | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "חזור", "nextButtonText": "הַבָּא", diff --git a/dist/translations/journey.translations.hi.js b/dist/translations/journey.translations.hi.js index b36b9d9..d80cae1 100644 --- a/dist/translations/journey.translations.hi.js +++ b/dist/translations/journey.translations.hi.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Hindi | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Hindi | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "पीछे", "nextButtonText": "अगला", diff --git a/dist/translations/journey.translations.hu.js b/dist/translations/journey.translations.hu.js index 5f54d2e..9c32497 100644 --- a/dist/translations/journey.translations.hu.js +++ b/dist/translations/journey.translations.hu.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Hungarian | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Hungarian | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "Vissza", "nextButtonText": "Következő", diff --git a/dist/translations/journey.translations.hy.js b/dist/translations/journey.translations.hy.js index 4789a0e..1230cd7 100644 --- a/dist/translations/journey.translations.hy.js +++ b/dist/translations/journey.translations.hy.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Armenian | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Armenian | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "Ետ", "nextButtonText": "Հաջորդը", diff --git a/dist/translations/journey.translations.id.js b/dist/translations/journey.translations.id.js index a778878..bd9e548 100644 --- a/dist/translations/journey.translations.id.js +++ b/dist/translations/journey.translations.id.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Indonesian | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Indonesian | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "Kembali", "nextButtonText": "Berikutnya", diff --git a/dist/translations/journey.translations.is.js b/dist/translations/journey.translations.is.js index 76d8fb3..22886f2 100644 --- a/dist/translations/journey.translations.is.js +++ b/dist/translations/journey.translations.is.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Icelandic | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Icelandic | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "Til baka", "nextButtonText": "Næst", diff --git a/dist/translations/journey.translations.it.js b/dist/translations/journey.translations.it.js index daa3cef..40c724e 100644 --- a/dist/translations/journey.translations.it.js +++ b/dist/translations/journey.translations.it.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Italian | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Italian | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "Indietro", "nextButtonText": "Prossimo", diff --git a/dist/translations/journey.translations.ja.js b/dist/translations/journey.translations.ja.js index d9a39f7..646b214 100644 --- a/dist/translations/journey.translations.ja.js +++ b/dist/translations/journey.translations.ja.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Japanese | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Japanese | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "戻る", "nextButtonText": "次", diff --git a/dist/translations/journey.translations.ka.js b/dist/translations/journey.translations.ka.js index 6bd4d45..0575366 100644 --- a/dist/translations/journey.translations.ka.js +++ b/dist/translations/journey.translations.ka.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Georgian | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Georgian | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "უკან", "nextButtonText": "შემდეგი", diff --git a/dist/translations/journey.translations.ko.js b/dist/translations/journey.translations.ko.js index 1784773..f347c30 100644 --- a/dist/translations/journey.translations.ko.js +++ b/dist/translations/journey.translations.ko.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Korean | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Korean | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "뒤쪽에", "nextButtonText": "다음", diff --git a/dist/translations/journey.translations.lb.js b/dist/translations/journey.translations.lb.js index e6058c0..6a43a76 100644 --- a/dist/translations/journey.translations.lb.js +++ b/dist/translations/journey.translations.lb.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Luxembourgish | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Luxembourgish | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "Zréck", "nextButtonText": "Nächst", diff --git a/dist/translations/journey.translations.lt.js b/dist/translations/journey.translations.lt.js index 5923dd8..1f5cbf4 100644 --- a/dist/translations/journey.translations.lt.js +++ b/dist/translations/journey.translations.lt.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Lithuanian | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Lithuanian | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "Atgal", "nextButtonText": "Kitas", diff --git a/dist/translations/journey.translations.lv.js b/dist/translations/journey.translations.lv.js index 0b3c5cc..d5cf2e4 100644 --- a/dist/translations/journey.translations.lv.js +++ b/dist/translations/journey.translations.lv.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Latvian | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Latvian | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "Atpakaļ", "nextButtonText": "Nākamais", diff --git a/dist/translations/journey.translations.ms.js b/dist/translations/journey.translations.ms.js index 103fb07..7f1a872 100644 --- a/dist/translations/journey.translations.ms.js +++ b/dist/translations/journey.translations.ms.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Malay | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Malay | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "belakang", "nextButtonText": "Seterusnya", diff --git a/dist/translations/journey.translations.ne.js b/dist/translations/journey.translations.ne.js index 95e20fb..31aeb52 100644 --- a/dist/translations/journey.translations.ne.js +++ b/dist/translations/journey.translations.ne.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Nepali | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Nepali | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "पछाडि", "nextButtonText": "अर्को", diff --git a/dist/translations/journey.translations.nl.js b/dist/translations/journey.translations.nl.js index 04ac9cd..d6b98d1 100644 --- a/dist/translations/journey.translations.nl.js +++ b/dist/translations/journey.translations.nl.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Dutch | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Dutch | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "Rug", "nextButtonText": "Volgende", diff --git a/dist/translations/journey.translations.no.js b/dist/translations/journey.translations.no.js index 040acaf..ca4034c 100644 --- a/dist/translations/journey.translations.no.js +++ b/dist/translations/journey.translations.no.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Norwegian | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Norwegian | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "Tilbake", "nextButtonText": "Neste", diff --git a/dist/translations/journey.translations.pl.js b/dist/translations/journey.translations.pl.js index 83d1b6c..2c3586f 100644 --- a/dist/translations/journey.translations.pl.js +++ b/dist/translations/journey.translations.pl.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Portuguese | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Portuguese | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "Z powrotem", "nextButtonText": "Następny", diff --git a/dist/translations/journey.translations.pt.js b/dist/translations/journey.translations.pt.js index ab01728..c3653dd 100644 --- a/dist/translations/journey.translations.pt.js +++ b/dist/translations/journey.translations.pt.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Polish | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Polish | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "Voltar", "nextButtonText": "Próximo", diff --git a/dist/translations/journey.translations.ro.js b/dist/translations/journey.translations.ro.js index 4093dd4..e853098 100644 --- a/dist/translations/journey.translations.ro.js +++ b/dist/translations/journey.translations.ro.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Romanian | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Romanian | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "Înapoi", "nextButtonText": "Următorul", diff --git a/dist/translations/journey.translations.si.js b/dist/translations/journey.translations.si.js index c950504..18ee46a 100644 --- a/dist/translations/journey.translations.si.js +++ b/dist/translations/journey.translations.si.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Sinhalese | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Sinhalese | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "ආපසු", "nextButtonText": "ඊළඟ", diff --git a/dist/translations/journey.translations.sk.js b/dist/translations/journey.translations.sk.js index 689d251..234e050 100644 --- a/dist/translations/journey.translations.sk.js +++ b/dist/translations/journey.translations.sk.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Slovak | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Slovak | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "späť", "nextButtonText": "Ďalšie", diff --git a/dist/translations/journey.translations.sl.js b/dist/translations/journey.translations.sl.js index 3ddba64..71065c7 100644 --- a/dist/translations/journey.translations.sl.js +++ b/dist/translations/journey.translations.sl.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Slovenian | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Slovenian | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "Nazaj", "nextButtonText": "Naslednji", diff --git a/dist/translations/journey.translations.sv.js b/dist/translations/journey.translations.sv.js index d58d046..066fc07 100644 --- a/dist/translations/journey.translations.sv.js +++ b/dist/translations/journey.translations.sv.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Swedish | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Swedish | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "Tillbaka", "nextButtonText": "Nästa", diff --git a/dist/translations/journey.translations.ta.js b/dist/translations/journey.translations.ta.js index 182be67..d11db80 100644 --- a/dist/translations/journey.translations.ta.js +++ b/dist/translations/journey.translations.ta.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Tamil | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Tamil | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "மீண்டும்", "nextButtonText": "அடுத்தது", diff --git a/dist/translations/journey.translations.te.js b/dist/translations/journey.translations.te.js index 2e6c7df..f6e7bec 100644 --- a/dist/translations/journey.translations.te.js +++ b/dist/translations/journey.translations.te.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Telugu | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Telugu | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "వెనుకకు", "nextButtonText": "తరువాత", diff --git a/dist/translations/journey.translations.th.js b/dist/translations/journey.translations.th.js index 3993f51..dac6571 100644 --- a/dist/translations/journey.translations.th.js +++ b/dist/translations/journey.translations.th.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Thai | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Thai | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "กลับ", "nextButtonText": "ต่อไป", diff --git a/dist/translations/journey.translations.tl.js b/dist/translations/journey.translations.tl.js index 058e4fb..9c2a4db 100644 --- a/dist/translations/journey.translations.tl.js +++ b/dist/translations/journey.translations.tl.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Tagalog | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Tagalog | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "Bumalik", "nextButtonText": "Susunod", diff --git a/dist/translations/journey.translations.tr.js b/dist/translations/journey.translations.tr.js index 7952c5b..515b5d4 100644 --- a/dist/translations/journey.translations.tr.js +++ b/dist/translations/journey.translations.tr.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Turkish | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Turkish | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "Geri", "nextButtonText": "Sonraki", diff --git a/dist/translations/journey.translations.uk.js b/dist/translations/journey.translations.uk.js index 9e1ac62..3b6bae2 100644 --- a/dist/translations/journey.translations.uk.js +++ b/dist/translations/journey.translations.uk.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Ukrainian | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Ukrainian | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "Назад", "nextButtonText": "Далі", diff --git a/dist/translations/journey.translations.zh-tw.js b/dist/translations/journey.translations.zh-tw.js index e4332e3..293e2d3 100644 --- a/dist/translations/journey.translations.zh-tw.js +++ b/dist/translations/journey.translations.zh-tw.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Taiwanese | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Taiwanese | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "後退", "nextButtonText": "下一個", diff --git a/dist/translations/journey.translations.zh.js b/dist/translations/journey.translations.zh.js index 04dba6d..979083e 100644 --- a/dist/translations/journey.translations.zh.js +++ b/dist/translations/journey.translations.zh.js @@ -1,4 +1,4 @@ -/*! Journey.js v1.7.2 - Chinese (simplified) | (c) Bunoon 2024 | MIT License */ +/*! Journey.js v2.0.0 - Chinese (simplified) | (c) Bunoon 2024 | MIT License */ $journey.setConfiguration( { "backButtonText": "后退", "nextButtonText": "下一个", diff --git a/journey.js.nuspec b/journey.js.nuspec index 708d44c..85ebdd1 100644 --- a/journey.js.nuspec +++ b/journey.js.nuspec @@ -2,7 +2,7 @@ jJourney.js - 1.7.2 + 2.0.0 Journey.js A lightweight, easy-to-use JavaScript library to create interactive, customizable, accessible guided tours across your websites or web apps! William Troup @@ -10,11 +10,11 @@ README_NUGET.md MIT - javascript css html5 Journey.js walk-through guide steps + typescript javascript css html5 Journey.js walk-through guide steps guided-tour docs\images\icon.png William Troup - + \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..60e184d --- /dev/null +++ b/package-lock.json @@ -0,0 +1,2559 @@ +{ + "name": "jjourney.js", + "version": "2.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "jjourney.js", + "version": "2.0.0", + "license": "MIT", + "devDependencies": { + "@swc/core": "^1.6.6", + "sass": "^1.77.6", + "terser": "^5.31.1", + "tsup": "^8.1.0", + "typescript": "^5.5.3" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/source-map": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", + "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.0.tgz", + "integrity": "sha512-Tya6xypR10giZV1XzxmH5wr25VcZSncG0pZIjfePT0OVBvqNEurzValetGNarVrGiq66EBVAFn15iYX4w6FKgQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.18.0.tgz", + "integrity": "sha512-avCea0RAP03lTsDhEyfy+hpfr85KfyTctMADqHVhLAF3MlIkq83CP8UfAHUssgXTYd+6er6PaAhx/QGv4L1EiA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.18.0.tgz", + "integrity": "sha512-IWfdwU7KDSm07Ty0PuA/W2JYoZ4iTj3TUQjkVsO/6U+4I1jN5lcR71ZEvRh52sDOERdnNhhHU57UITXz5jC1/w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.18.0.tgz", + "integrity": "sha512-n2LMsUz7Ynu7DoQrSQkBf8iNrjOGyPLrdSg802vk6XT3FtsgX6JbE8IHRvposskFm9SNxzkLYGSq9QdpLYpRNA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.18.0.tgz", + "integrity": "sha512-C/zbRYRXFjWvz9Z4haRxcTdnkPt1BtCkz+7RtBSuNmKzMzp3ZxdM28Mpccn6pt28/UWUCTXa+b0Mx1k3g6NOMA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.18.0.tgz", + "integrity": "sha512-l3m9ewPgjQSXrUMHg93vt0hYCGnrMOcUpTz6FLtbwljo2HluS4zTXFy2571YQbisTnfTKPZ01u/ukJdQTLGh9A==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.18.0.tgz", + "integrity": "sha512-rJ5D47d8WD7J+7STKdCUAgmQk49xuFrRi9pZkWoRD1UeSMakbcepWXPF8ycChBoAqs1pb2wzvbY6Q33WmN2ftw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.18.0.tgz", + "integrity": "sha512-be6Yx37b24ZwxQ+wOQXXLZqpq4jTckJhtGlWGZs68TgdKXJgw54lUUoFYrg6Zs/kjzAQwEwYbp8JxZVzZLRepQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.18.0.tgz", + "integrity": "sha512-hNVMQK+qrA9Todu9+wqrXOHxFiD5YmdEi3paj6vP02Kx1hjd2LLYR2eaN7DsEshg09+9uzWi2W18MJDlG0cxJA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.18.0.tgz", + "integrity": "sha512-ROCM7i+m1NfdrsmvwSzoxp9HFtmKGHEqu5NNDiZWQtXLA8S5HBCkVvKAxJ8U+CVctHwV2Gb5VUaK7UAkzhDjlg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.18.0.tgz", + "integrity": "sha512-0UyyRHyDN42QL+NbqevXIIUnKA47A+45WyasO+y2bGJ1mhQrfrtXUpTxCOrfxCR4esV3/RLYyucGVPiUsO8xjg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.18.0.tgz", + "integrity": "sha512-xuglR2rBVHA5UsI8h8UbX4VJ470PtGCf5Vpswh7p2ukaqBGFTnsfzxUBetoWBWymHMxbIG0Cmx7Y9qDZzr648w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.18.0.tgz", + "integrity": "sha512-LKaqQL9osY/ir2geuLVvRRs+utWUNilzdE90TpyoX0eNqPzWjRm14oMEE+YLve4k/NAqCdPkGYDaDF5Sw+xBfg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.18.0.tgz", + "integrity": "sha512-7J6TkZQFGo9qBKH0pk2cEVSRhJbL6MtfWxth7Y5YmZs57Pi+4x6c2dStAUvaQkHQLnEQv1jzBUW43GvZW8OFqA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.18.0.tgz", + "integrity": "sha512-Txjh+IxBPbkUB9+SXZMpv+b/vnTEtFyfWZgJ6iyCmt2tdx0OF5WhFowLmnh8ENGNpfUlUZkdI//4IEmhwPieNg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.0.tgz", + "integrity": "sha512-UOo5FdvOL0+eIVTgS4tIdbW+TtnBLWg1YBCcU2KWM7nuNwRz9bksDX1bekJJCpu25N1DVWaCwnT39dVQxzqS8g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@swc/core": { + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.6.7.tgz", + "integrity": "sha512-BBzORL9qWz5hZqAZ83yn+WNaD54RH5eludjqIOboolFOK/Pw+2l00/H77H4CEBJnzCIBQszsyqtITmrn4evp0g==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "@swc/counter": "^0.1.3", + "@swc/types": "^0.1.9" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/swc" + }, + "optionalDependencies": { + "@swc/core-darwin-arm64": "1.6.7", + "@swc/core-darwin-x64": "1.6.7", + "@swc/core-linux-arm-gnueabihf": "1.6.7", + "@swc/core-linux-arm64-gnu": "1.6.7", + "@swc/core-linux-arm64-musl": "1.6.7", + "@swc/core-linux-x64-gnu": "1.6.7", + "@swc/core-linux-x64-musl": "1.6.7", + "@swc/core-win32-arm64-msvc": "1.6.7", + "@swc/core-win32-ia32-msvc": "1.6.7", + "@swc/core-win32-x64-msvc": "1.6.7" + }, + "peerDependencies": { + "@swc/helpers": "*" + }, + "peerDependenciesMeta": { + "@swc/helpers": { + "optional": true + } + } + }, + "node_modules/@swc/core-darwin-arm64": { + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.6.7.tgz", + "integrity": "sha512-sNb+ghP2OhZyUjS7E5Mf3PqSvoXJ5gY6GBaH2qp8WQxx9VL7ozC4HVo6vkeFJBN5cmYqUCLnhrM3HU4W+7yMSA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-darwin-x64": { + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.6.7.tgz", + "integrity": "sha512-LQwYm/ATYN5fYSYVPMfComPiFo5i8jh75h1ASvNWhXtS+/+k1dq1zXTJWZRuojd5NXgW3bb6mJtJ2evwYIgYbA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm-gnueabihf": { + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.6.7.tgz", + "integrity": "sha512-kEDzVhNci38LX3kdY99t68P2CDf+2QFDk5LawVamXH0iN5DRAO/+wjOhxL8KOHa6wQVqKEt5WrhD+Rrvk/34Yw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm64-gnu": { + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.6.7.tgz", + "integrity": "sha512-SyOBUGfl31xLGpIJ/Jd6GKHtkfZyHBXSwFlK7FmPN//MBQLtTBm4ZaWTnWnGo4aRsJwQdXWDKPyqlMBtnIl1nQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm64-musl": { + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.6.7.tgz", + "integrity": "sha512-1fOAXkDFbRfItEdMZPxT3du1QWYhgToa4YsnqTujjE8EqJW8K27hIcHRIkVuzp7PNhq8nLBg0JpJM4g27EWD7g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-x64-gnu": { + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.6.7.tgz", + "integrity": "sha512-Gp7uCwPsNO5ATxbyvfTyeNCHUGD9oA+xKMm43G1tWCy+l07gLqWMKp7DIr3L3qPD05TfAVo3OuiOn2abpzOFbw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-x64-musl": { + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.6.7.tgz", + "integrity": "sha512-QeruGBZJ15tadqEMQ77ixT/CYGk20MtlS8wmvJiV+Wsb8gPW5LgCjtupzcLLnoQzDG54JGNCeeZ0l/T8NYsOvA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-arm64-msvc": { + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.6.7.tgz", + "integrity": "sha512-ouRqgSnT95lTCiU/6kJRNS5b1o+p8I/V9jxtL21WUj/JOVhsFmBErqQ0MZyCu514noWiR5BIqOrZXR8C1Knx6Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-ia32-msvc": { + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.6.7.tgz", + "integrity": "sha512-eZAP/EmJ0IcfgAx6B4/SpSjq3aT8gr0ooktfMqw/w0/5lnNrbMl2v+2kvxcneNcF7bp8VNcYZnoHlsP+LvmVbA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-x64-msvc": { + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.6.7.tgz", + "integrity": "sha512-QOdE+7GQg1UQPS6p0KxzJOh/8GLbJ5zI1vqKArCCB0unFqUfKIjYb2TaH0geEBy3w9qtXxe3ZW6hzxtZSS9lDg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/counter": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz", + "integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/@swc/types": { + "version": "0.1.9", + "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.9.tgz", + "integrity": "sha512-qKnCno++jzcJ4lM4NTfYifm1EFSCeIfKiAHAfkENZAV5Kl9PjJIyd2yeeVv6c/2CckuLyv2NmRC5pv6pm2WQBg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@swc/counter": "^0.1.3" + } + }, + "node_modules/@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true, + "license": "MIT" + }, + "node_modules/acorn": { + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true, + "license": "MIT" + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/bundle-require": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/bundle-require/-/bundle-require-4.2.1.tgz", + "integrity": "sha512-7Q/6vkyYAwOmQNRw75x+4yRtZCZJXUDmHHlFdkiV0wgv/reNjtJwpu1jPJ0w2kbEpIM0uoKI3S4/f39dU7AjSA==", + "dev": true, + "license": "MIT", + "dependencies": { + "load-tsconfig": "^0.2.3" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "peerDependencies": { + "esbuild": ">=0.17" + } + }, + "node_modules/cac": { + "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true, + "license": "MIT" + }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "license": "MIT" + }, + "node_modules/esbuild": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", + "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" + } + }, + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/foreground-child": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz", + "integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==", + "dev": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/foreground-child/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "10.4.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.2.tgz", + "integrity": "sha512-GwMlUF6PkPo3Gk21UxkCohOv0PLcIXVtKyLlpEI28R/cO/4eNOdmLk3CMW1wROV/WR/EsZOWAfBbBOqYvs88/w==", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/ignore": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/immutable": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.6.tgz", + "integrity": "sha512-Ju0+lEMyzMVZarkTn/gqRpdqd5dOPaz1mCZ0SH3JV6iFw81PldE/PEB1hWVEA288HPt4WXW8O7AWxB10M+03QQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/jackspeak": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.0.tgz", + "integrity": "sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/joycon": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz", + "integrity": "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/lilconfig": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.2.tgz", + "integrity": "sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true, + "license": "MIT" + }, + "node_modules/load-tsconfig": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/load-tsconfig/-/load-tsconfig-0.2.5.tgz", + "integrity": "sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "node_modules/lodash.sortby": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", + "integrity": "sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==", + "dev": true, + "license": "MIT" + }, + "node_modules/lru-cache": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.3.0.tgz", + "integrity": "sha512-CQl19J/g+Hbjbv4Y3mFNNXFEL/5t/KCg8POCuUqd4rMKjGG+j1ybER83hxV58zL+dFI1PTkt3GNFSHRt+d8qEQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": "14 || >=16.14" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true, + "license": "MIT" + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", + "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", + "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pirates": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/postcss-load-config": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.2.tgz", + "integrity": "sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "lilconfig": "^3.0.0", + "yaml": "^2.3.4" + }, + "engines": { + "node": ">= 14" + }, + "peerDependencies": { + "postcss": ">=8.0.9", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "postcss": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rollup": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.18.0.tgz", + "integrity": "sha512-QmJz14PX3rzbJCN1SG4Xe/bAAX2a6NpCP8ab2vfu2GiUr8AQcr2nCV/oEO3yneFarB67zk8ShlIyWb2LGTb3Sg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.5" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.18.0", + "@rollup/rollup-android-arm64": "4.18.0", + "@rollup/rollup-darwin-arm64": "4.18.0", + "@rollup/rollup-darwin-x64": "4.18.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.18.0", + "@rollup/rollup-linux-arm-musleabihf": "4.18.0", + "@rollup/rollup-linux-arm64-gnu": "4.18.0", + "@rollup/rollup-linux-arm64-musl": "4.18.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.18.0", + "@rollup/rollup-linux-riscv64-gnu": "4.18.0", + "@rollup/rollup-linux-s390x-gnu": "4.18.0", + "@rollup/rollup-linux-x64-gnu": "4.18.0", + "@rollup/rollup-linux-x64-musl": "4.18.0", + "@rollup/rollup-win32-arm64-msvc": "4.18.0", + "@rollup/rollup-win32-ia32-msvc": "4.18.0", + "@rollup/rollup-win32-x64-msvc": "4.18.0", + "fsevents": "~2.3.2" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/sass": { + "version": "1.77.6", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.77.6.tgz", + "integrity": "sha512-ByXE1oLD79GVq9Ht1PeHWCPMPB8XHpBuz1r85oByKHjZY6qV6rWnQovQzXJXuQ/XyE1Oj3iPk3lo28uzaRA2/Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "chokidar": ">=3.0.0 <4.0.0", + "immutable": "^4.0.0", + "source-map-js": ">=0.6.2 <2.0.0" + }, + "bin": { + "sass": "sass.js" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-js": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/sucrase": { + "version": "3.35.0", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz", + "integrity": "sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.2", + "commander": "^4.0.0", + "glob": "^10.3.10", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.1", + "ts-interface-checker": "^0.1.9" + }, + "bin": { + "sucrase": "bin/sucrase", + "sucrase-node": "bin/sucrase-node" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/sucrase/node_modules/commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/terser": { + "version": "5.31.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.31.1.tgz", + "integrity": "sha512-37upzU1+viGvuFtBo9NPufCb9dwM0+l9hMxYyWfBA+fbwrPqNJAhbZ6W47bBFnZHKHTUBnMvi87434qq+qnxOg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.8.2", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "any-promise": "^1.0.0" + } + }, + "node_modules/thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "thenify": ">= 3.1.0 < 4" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/tr46": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", + "integrity": "sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==", + "dev": true, + "license": "MIT", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "license": "MIT", + "bin": { + "tree-kill": "cli.js" + } + }, + "node_modules/ts-interface-checker": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", + "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/tsup": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/tsup/-/tsup-8.1.0.tgz", + "integrity": "sha512-UFdfCAXukax+U6KzeTNO2kAARHcWxmKsnvSPXUcfA1D+kU05XDccCrkffCQpFaWDsZfV0jMyTsxU39VfCp6EOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "bundle-require": "^4.0.0", + "cac": "^6.7.12", + "chokidar": "^3.5.1", + "debug": "^4.3.1", + "esbuild": "^0.21.4", + "execa": "^5.0.0", + "globby": "^11.0.3", + "joycon": "^3.0.1", + "postcss-load-config": "^4.0.1", + "resolve-from": "^5.0.0", + "rollup": "^4.0.2", + "source-map": "0.8.0-beta.0", + "sucrase": "^3.20.3", + "tree-kill": "^1.2.2" + }, + "bin": { + "tsup": "dist/cli-default.js", + "tsup-node": "dist/cli-node.js" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@microsoft/api-extractor": "^7.36.0", + "@swc/core": "^1", + "postcss": "^8.4.12", + "typescript": ">=4.5.0" + }, + "peerDependenciesMeta": { + "@microsoft/api-extractor": { + "optional": true + }, + "@swc/core": { + "optional": true + }, + "postcss": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, + "node_modules/tsup/node_modules/source-map": { + "version": "0.8.0-beta.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.8.0-beta.0.tgz", + "integrity": "sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "whatwg-url": "^7.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/typescript": { + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.3.tgz", + "integrity": "sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/webidl-conversions": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", + "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/whatwg-url": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz", + "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", + "dev": true, + "license": "MIT", + "dependencies": { + "lodash.sortby": "^4.7.0", + "tr46": "^1.0.1", + "webidl-conversions": "^4.0.2" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yaml": { + "version": "2.4.5", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.5.tgz", + "integrity": "sha512-aBx2bnqDzVOyNKfsysjA2ms5ZlnjSAW2eG3/L5G/CSujfjLJTJsEw1bGw8kCf04KodQWk1pxlGnZ56CRxiawmg==", + "dev": true, + "license": "ISC", + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14" + } + } + } +} diff --git a/package.json b/package.json index 1da9999..01afe44 100644 --- a/package.json +++ b/package.json @@ -2,24 +2,46 @@ "name": "jjourney.js", "title": "Journey.js", "description": "A lightweight, easy-to-use JavaScript library to create interactive, customizable, accessible guided tours across your websites or web apps!", - "version": "1.7.2", - "main": "dist/journey.js", + "version": "2.0.0", "homepage": "https://www.william-troup.com/journey-js/", "author": { "name": "Bunoon" }, + "license": "MIT", "repository": { "type": "git", "url": "https://github.com/williamtroup/Journey.js" }, "keywords": [ + "typescript", "javascript", "css", "html5", - "Journey.js" + "Journey.js", + "walk-through", + "guided-tour", + "tour", + "steps" ], "bugs": { "url": "https://github.com/williamtroup/Journey.js/issues" }, - "license": "MIT" -} \ No newline at end of file + "main": "dist/journey.js", + "types": "dist/journey.d.ts", + "scripts": { + "build": "tsup --config tsup.build.config.ts && tsup --config tsup.build.esm.config.ts && sass src/journey.js.scss dist/journey.js.css", + "build-minimized": "tsup --config tsup.build.min.config.ts && sass src/journey.js.scss dist/journey.js.min.css --style=compressed --no-source-map", + "build-typescript": "tsup --config tsup.build.config.ts", + "build-typescript-esm": "tsup --config tsup.build.esm.config.ts", + "build-typescript-minimized": "tsup --config tsup.build.min.config.ts", + "build-sass": "sass src/journey.js.scss dist/journey.js.css", + "build-sass-minimized": "sass src/journey.js.scss dist/journey.js.min.css --style=compressed --no-source-map" + }, + "devDependencies": { + "@swc/core": "^1.6.6", + "sass": "^1.77.6", + "terser": "^5.31.1", + "tsup": "^8.1.0", + "typescript": "^5.5.3" + } +} diff --git a/src/journey.js b/src/journey.js deleted file mode 100644 index fae30d2..0000000 --- a/src/journey.js +++ /dev/null @@ -1,1556 +0,0 @@ -/** - * Journey.js - * - * A lightweight, easy-to-use JavaScript library to create interactive, customizable, accessible guided tours across your websites or web apps! - * - * @file journey.js - * @version v1.7.2 - * @author Bunoon - * @license MIT License - * @copyright Bunoon 2024 - */ - - -( function() { - "use strict"; - - var // Variables: Constructor Parameters - _parameter_Document = null, - _parameter_Window = null, - _parameter_Math = null, - _parameter_Json = null, - - // Variables: Public Scope - _public = {}, - - // Variables: Configuration - _configuration = {}, - - // Variables: Configuration (overrides) - _configuration_ShortcutKeysEnabled = true, - - // Variables: Enums - _enum_KeyCodes = { - escape: 27, - left: 37, - up: 38, - right: 39, - down: 40 - }, - - // Variables: Strings - _string = { - empty: "", - space: " " - }, - - // Variables: Elements - _elements_Type = {}, - - // Variables: Groups - _groups_Default = "default", - _groups_Current = _groups_Default, - _groups = {}, - - // Variables: Focus Element - _element_Focus_Element_PositionStyle = null, - - // Variables: Disabled Background - _element_Disabled_Background = null, - - // Variables: Dialog - _element_Dialog = null, - _element_Dialog_Close_Button = null, - _element_Dialog_Title = null, - _element_Dialog_Description = null, - _element_Dialog_CheckBox_Container = null, - _element_Dialog_CheckBox_Input = null, - _element_Dialog_ProgressDots = null, - _element_Dialog_ProgressBar = null, - _element_Dialog_ProgressBar_Percentage = null, - _element_Dialog_ProgressBar_Percentage_Text = null, - _element_Dialog_Buttons = null, - _element_Dialog_Buttons_Back_Button = null, - _element_Dialog_Buttons_Next_Button = null, - _element_Dialog_IsHint = false, - - // Variables: Dialog - Move - _element_Dialog_Move_Original_X = 0, - _element_Dialog_Move_Original_Y = 0, - _element_Dialog_Move_IsMoving = false, - _element_Dialog_Move_X = 0, - _element_Dialog_Move_Y = 0, - - // Variables: Dialog - _element_ToolTip = null, - _element_ToolTip_Timer = null, - - // Variables: Attribute Names - _attribute_Name_Options = "data-journey-js"; - - - /* - * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - * Groups - * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - */ - - function setupDefaultGroup( groups ) { - _groups = getDefaultObject( groups, {} ); - - _groups[ _groups_Default ] = { - json: {}, - keys: [], - position: 0 - }; - } - - function setupNewGroup( group ) { - if ( !_groups.hasOwnProperty( group ) ) { - _groups[ group ] = { - json: {}, - keys: [], - position: 0 - }; - } - } - - function getGroupBindingOptions() { - return _groups[ _groups_Current ].json[ _groups[ _groups_Current ].keys[ _groups[ _groups_Current ].position ] ]; - } - - - /* - * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - * Disabled Background - * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - */ - - function renderDisabledBackground() { - _element_Disabled_Background = createElement( "div", "journey-js-disabled-background" ); - - _element_Disabled_Background.onclick = function() { - if ( _configuration.closeDialogOnDisabledBackgroundClick ) { - onDialogClose(); - } - }; - } - - function showDisabledBackground() { - addNode( _parameter_Document.body, _element_Disabled_Background ); - } - - function hideDisabledBackground() { - removeNode( _parameter_Document.body, _element_Disabled_Background ); - } - - - /* - * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - * Render: Dialog - * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - */ - - function renderDialog() { - _element_Dialog = createElement( "div", "journey-js-dialog" ); - _element_Dialog.style.display = "none"; - _parameter_Document.body.appendChild( _element_Dialog ); - - _element_Dialog_Close_Button = createElement( "button", "close" ); - _element_Dialog.appendChild( _element_Dialog_Close_Button ); - - _element_Dialog_Close_Button.onclick = function() { - onDialogClose(); - }; - - addToolTip( _element_Dialog_Close_Button, _configuration.closeButtonToolTipText ); - - _element_Dialog_Title = createElement( "div", "title" ); - _element_Dialog.appendChild( _element_Dialog_Title ); - - _element_Dialog_Description = createElement( "div", "description" ); - _element_Dialog.appendChild( _element_Dialog_Description ); - - _element_Dialog_CheckBox_Container = createElement( "div", "checkbox-container" ); - _element_Dialog.appendChild( _element_Dialog_CheckBox_Container ); - - _element_Dialog_CheckBox_Input = buildCheckBox( _element_Dialog_CheckBox_Container, _configuration.doNotShowAgainText ).input; - - _element_Dialog_CheckBox_Input.onchange = function() { - if ( _configuration.showDoNotShowAgain ) { - fireCustomTrigger( _configuration.onDoNotShowAgainChange, _element_Dialog_CheckBox_Input.checked ); - } - }; - - _element_Dialog_ProgressDots = createElement( "div", "progress-dots" ); - _element_Dialog.appendChild( _element_Dialog_ProgressDots ); - - _element_Dialog_ProgressBar = createElement( "div", "progress-bar" ); - _element_Dialog.appendChild( _element_Dialog_ProgressBar ); - - _element_Dialog_ProgressBar_Percentage = createElement( "div", "progress-bar-percentage" ); - _element_Dialog_ProgressBar.appendChild( _element_Dialog_ProgressBar_Percentage ); - - _element_Dialog_ProgressBar_Percentage_Text = createElement( "p", "progress-bar-percentage-text" ); - _element_Dialog_ProgressBar_Percentage.appendChild( _element_Dialog_ProgressBar_Percentage_Text ); - - _element_Dialog_Buttons = createElement( "div", "buttons" ); - _element_Dialog.appendChild( _element_Dialog_Buttons ); - - _element_Dialog_Buttons_Back_Button = createElement( "button", "back" ); - _element_Dialog_Buttons_Back_Button.onclick = onDialogBack; - _element_Dialog_Buttons.appendChild( _element_Dialog_Buttons_Back_Button ); - - _element_Dialog_Buttons_Next_Button = createElement( "button", "next" ); - _element_Dialog_Buttons_Next_Button.onclick = onDialogNext; - _element_Dialog_Buttons.appendChild( _element_Dialog_Buttons_Next_Button ); - - makeDialogMovable(); - } - - function onDialogClose( showConfirmationBox ) { - var confirmed = false; - - showConfirmationBox = getDefaultBoolean( showConfirmationBox, true ); - - if ( isDefinedString( _configuration.closeDialogConfirmationText ) && showConfirmationBox ) { - confirmed = confirm( _configuration.closeDialogConfirmationText ); - } else { - confirmed = true; - } - - if ( confirmed ) { - var bindingOptions = getGroupBindingOptions(); - - if ( isDefined( bindingOptions ) && isDefined( bindingOptions.currentView.element ) ) { - fireCustomTrigger( bindingOptions.events.onClose, bindingOptions.currentView.element ); - } - - removeFocusClassFromLastElement( false ); - hideDisabledBackground(); - hideToolTip(); - - _element_Dialog.style.display = "none"; - } - } - - function onDialogBack() { - if ( _groups[ _groups_Current ].position > 0 ) { - removeFocusClassFromLastElement(); - - _groups[ _groups_Current ].position--; - - showDialogAndSetPosition(); - } - } - - function onDialogNext() { - if ( _groups[ _groups_Current ].position === _groups[ _groups_Current ].keys.length - 1 ) { - var bindingOptions = getGroupBindingOptions(); - - onDialogClose( false ); - fireCustomTrigger( bindingOptions.events.onFinish, bindingOptions.currentView.element ); - - } else { - removeFocusClassFromLastElement(); - - _groups[ _groups_Current ].position++; - - showDialogAndSetPosition(); - } - } - - function showDialogAndSetPosition() { - var bindingOptions = getGroupBindingOptions(); - - if ( isDefined( bindingOptions ) && isDefined( bindingOptions.currentView.element ) ) { - if ( bindingOptions.showDisabledBackground ) { - showDisabledBackground(); - } else { - hideDisabledBackground(); - } - - hideToolTip(); - - _element_Dialog_Close_Button.style.display = _configuration.showCloseButton ? "block": "none"; - _configuration_ShortcutKeysEnabled = true; - - bindingOptions.currentView.element.className += _string.space + "journey-js-element-focus"; - - if ( _configuration.scrollToElements ) { - bindingOptions.currentView.element.scrollIntoView(); - } - - var lastPositionStyle = getStyleValueByName( bindingOptions.currentView.element, "position" ); - - if ( lastPositionStyle !== _string.empty && lastPositionStyle.toLowerCase() === "static" ) { - _element_Focus_Element_PositionStyle = lastPositionStyle; - bindingOptions.currentView.element.style.position = "relative"; - } - - showElementBasedOnCondition( _element_Dialog_CheckBox_Container, _configuration.showDoNotShowAgain ); - showElementBasedOnCondition( _element_Dialog_ProgressDots, _configuration.showProgressDots && _groups[ _groups_Current ].keys.length > 1 ); - showElementBasedOnCondition( _element_Dialog_ProgressBar, _configuration.showProgressBar && _groups[ _groups_Current ].keys.length > 1 ); - showElementBasedOnCondition( _element_Dialog_ProgressBar_Percentage_Text, _configuration.showProgressBarText ); - showElementBasedOnCondition( _element_Dialog_Buttons, _configuration.showButtons ); - - _element_Dialog_Buttons_Back_Button.innerHTML = _configuration.backButtonText; - _element_Dialog_Buttons_Back_Button.disabled = _groups[ _groups_Current ].position === 0; - - if ( _groups[ _groups_Current ].position >= _groups[ _groups_Current ].keys.length - 1 ) { - _element_Dialog_Buttons_Next_Button.innerHTML = _configuration.finishButtonText; - } else { - _element_Dialog_Buttons_Next_Button.innerHTML = _configuration.nextButtonText; - } - - setDialogText( bindingOptions ); - setDialogPosition( null, bindingOptions ); - buildProcessDots(); - setProgressBarPosition(); - fireCustomTrigger( bindingOptions.events.onEnter, bindingOptions.currentView.element ); - - if ( bindingOptions.sendClick ) { - bindingOptions.currentView.element.click(); - } - } - } - - function setDialogText( bindingOptions ) { - if ( isDefinedString( bindingOptions.title ) ) { - _element_Dialog_Title.innerHTML = bindingOptions.title; - } else { - _element_Dialog_Title.innerHTML = _string.empty; - } - - if ( isDefinedString( bindingOptions.description ) ) { - _element_Dialog_Description.innerHTML = bindingOptions.description; - } else { - _element_Dialog_Description.innerHTML = _string.empty; - } - } - - function setDialogPosition( e, bindingOptions ) { - if ( _element_Dialog.style.display !== "block" ) { - _element_Dialog.style.display = "block"; - - fireCustomTrigger( bindingOptions.events.onOpen, bindingOptions.currentView.element ); - } - - if ( _groups[ _groups_Current ].position === 0 ) { - fireCustomTrigger( bindingOptions.events.onStart, bindingOptions.currentView.element ); - } - - _element_Dialog_IsHint = bindingOptions.isHint === true; - - if ( bindingOptions.attach || bindingOptions.isHint ) { - if ( bindingOptions.isHint && bindingOptions.alignHintToClickPosition ) { - showElementAtMousePosition( e, _element_Dialog ); - - } else { - var offset = getOffset( bindingOptions.currentView.element ), - top = ( offset.top ) + bindingOptions.currentView.element.offsetHeight, - left = ( offset.left ); - - if ( left + _element_Dialog.offsetWidth > _parameter_Window.innerWidth || bindingOptions.alignRight ) { - left -= _element_Dialog.offsetWidth; - left += bindingOptions.currentView.element.offsetWidth; - } - - if ( top + _element_Dialog.offsetHeight > _parameter_Window.innerHeight || bindingOptions.alignTop ) { - top -= ( _element_Dialog.offsetHeight + bindingOptions.currentView.element.offsetHeight ); - } - - _element_Dialog.style.top = top + "px"; - _element_Dialog.style.left = left + "px"; - } - - } else { - var scrollPosition = getScrollPosition(), - centerLeft = _parameter_Math.max( 0, ( ( _parameter_Window.innerWidth - _element_Dialog.offsetWidth ) / 2 ) + scrollPosition.left ), - centerTop = _parameter_Math.max( 0, ( ( _parameter_Window.innerHeight - _element_Dialog.offsetHeight ) / 2 ) + scrollPosition.top ); - - _element_Dialog.style.left = centerLeft + "px"; - _element_Dialog.style.top = centerTop + "px"; - } - } - - function removeFocusClassFromLastElement( callCustomTrigger ) { - callCustomTrigger = isDefined( callCustomTrigger ) ? callCustomTrigger : true; - - var bindingOptions = getGroupBindingOptions(); - - if ( isDefined( bindingOptions ) && isDefined( bindingOptions.currentView.element ) ) { - bindingOptions.currentView.element.className = bindingOptions.currentView.element.className.replace( _string.space + "journey-js-element-focus", _string.empty ); - - if ( isDefined( _element_Focus_Element_PositionStyle ) ) { - bindingOptions.currentView.element.style.position = _element_Focus_Element_PositionStyle; - } - - if ( callCustomTrigger ) { - fireCustomTrigger( bindingOptions.events.onLeave, bindingOptions.currentView.element ); - } - } - } - - function buildProcessDots() { - _element_Dialog_ProgressDots.innerHTML = _string.empty; - - if ( _configuration.showProgressDots ) { - var keysLength = _groups[ _groups_Current ].keys.length; - - for ( var keyIndex = 0; keyIndex < keysLength; keyIndex++ ) { - buildProgressDot( keyIndex, _groups[ _groups_Current ].keys[ keyIndex ] ); - } - } - } - - function buildProgressDot( keyIndex, order ) { - var bindingOptions = _groups[ _groups_Current ].json[ order ], - dot = null; - - if ( keyIndex === _groups[ _groups_Current ].position ) { - dot = createElement( "div", "dot-active" ); - } else { - - dot = createElement( "div", "dot" ); - - dot.onclick = function() { - removeFocusClassFromLastElement(); - - _groups[ _groups_Current ].position = keyIndex; - - showDialogAndSetPosition(); - }; - } - - _element_Dialog_ProgressDots.appendChild( dot ); - - if ( _configuration.showProgressDotToolTips ) { - if ( isDefinedString( bindingOptions.tooltip ) ) { - addToolTip( dot, bindingOptions.tooltip ); - } else { - addToolTip( dot, bindingOptions.title ); - } - } - - if ( _configuration.showProgressDotNumbers ) { - dot.className += " dot-number"; - dot.innerHTML = ( keyIndex + 1 ).toString(); - } - } - - function setProgressBarPosition() { - if ( _configuration.showProgressBar ) { - var pixelsPerStage = _element_Dialog_ProgressBar.offsetWidth / _groups[ _groups_Current ].keys.length, - width = ( _groups[ _groups_Current ].position + 1 ) * pixelsPerStage, - percentageComplete = _parameter_Math.ceil( ( ( _groups[ _groups_Current ].position + 1 ) / _groups[ _groups_Current ].keys.length ) * 100 ); - - _element_Dialog_ProgressBar_Percentage.style.width = width + "px"; - _element_Dialog_ProgressBar_Percentage_Text.innerHTML = percentageComplete + "%"; - } - } - - - /* - * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - * Render: Dialog - Move - * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - */ - - function makeDialogMovable() { - _element_Dialog_Title.onmousedown = onMoveTitleBarMouseDown; - _element_Dialog_Title.onmouseup = onMoveTitleBarMouseUp; - _element_Dialog_Title.oncontextmenu = onMoveTitleBarMouseUp; - - _parameter_Document.body.addEventListener( "mousemove", onMoveDocumentMouseMove ); - _parameter_Document.body.addEventListener( "mouseleave", onMoveDocumentMouseLeave ); - } - - function onMoveTitleBarMouseDown( e ) { - if ( !_element_Dialog_Move_IsMoving && !_element_Dialog_IsHint && _configuration.dialogMovingEnabled ) { - _element_Dialog.className += " journey-js-dialog-moving"; - _element_Dialog_Move_IsMoving = true; - _element_Dialog_Move_X = e.pageX - _element_Dialog.offsetLeft; - _element_Dialog_Move_Y = e.pageY - _element_Dialog.offsetTop; - _element_Dialog_Move_Original_X = _element_Dialog.offsetLeft; - _element_Dialog_Move_Original_Y = _element_Dialog.offsetTop; - } - } - - function onMoveTitleBarMouseUp() { - if ( _element_Dialog_Move_IsMoving ) { - _element_Dialog_Move_IsMoving = false; - _element_Dialog_Move_Original_X = 0; - _element_Dialog_Move_Original_Y = 0; - _element_Dialog.className = "journey-js-dialog"; - } - } - - function onMoveDocumentMouseMove( e ) { - if ( _element_Dialog_Move_IsMoving ) { - _element_Dialog.style.left = ( e.pageX - _element_Dialog_Move_X ) + "px"; - _element_Dialog.style.top = ( e.pageY - _element_Dialog_Move_Y ) + "px"; - } - } - - function onMoveDocumentMouseLeave() { - if ( _element_Dialog_Move_IsMoving ) { - _element_Dialog.style.left = _element_Dialog_Move_Original_X + "px"; - _element_Dialog.style.top = _element_Dialog_Move_Original_Y + "px"; - - _element_Dialog_Move_IsMoving = false; - _element_Dialog_Move_Original_X = 0; - _element_Dialog_Move_Original_Y = 0; - _element_Dialog.className = "journey-js-dialog"; - } - } - - - /* - * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - * Render: ToolTip - * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - */ - - function renderToolTip() { - if ( !isDefined( _element_ToolTip ) ) { - _element_ToolTip = createElement( "div", "journey-js-tooltip" ); - _element_ToolTip.style.display = "none"; - - _parameter_Document.body.appendChild( _element_ToolTip ); - - _parameter_Document.body.addEventListener( "mousemove", function() { - hideToolTip(); - } ); - - _parameter_Document.addEventListener( "scroll", function() { - hideToolTip(); - } ); - } - } - - function addToolTip( element, text ) { - if ( element !== null ) { - element.onmousemove = function( e ) { - showToolTip( e, text ); - }; - } - } - - function showToolTip( e, text ) { - cancelBubble( e ); - hideToolTip(); - - _element_ToolTip_Timer = setTimeout( function() { - _element_ToolTip.innerHTML = text; - _element_ToolTip.style.display = "block"; - - showElementAtMousePosition( e, _element_ToolTip ); - }, _configuration.tooltipDelay ); - } - - function hideToolTip() { - if ( isDefined( _element_ToolTip ) ) { - if ( isDefined( _element_ToolTip_Timer ) ) { - clearTimeout( _element_ToolTip_Timer ); - _element_ToolTip_Timer = null; - } - - if ( _element_ToolTip.style.display === "block" ) { - _element_ToolTip.style.display = "none"; - } - } - } - - - /* - * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - * Rendering - * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - */ - - function getElements() { - var tagTypes = _configuration.domElementTypes, - tagTypesLength = tagTypes.length; - - for ( var tagTypeIndex = 0; tagTypeIndex < tagTypesLength; tagTypeIndex++ ) { - var domElements = _parameter_Document.getElementsByTagName( tagTypes[ tagTypeIndex ] ), - elements = [].slice.call( domElements ), - elementsLength = elements.length; - - for ( var elementIndex = 0; elementIndex < elementsLength; elementIndex++ ) { - if ( !getElement( elements[ elementIndex ] ) ) { - break; - } - } - } - - _groups[ _groups_Current ].keys.sort(); - } - - function getElement( element ) { - var result = true; - - if ( isDefined( element ) && element.hasAttribute( _attribute_Name_Options ) ) { - var bindingOptionsData = element.getAttribute( _attribute_Name_Options ); - - if ( isDefinedString( bindingOptionsData ) ) { - var bindingOptions = getObjectFromString( bindingOptionsData ); - - if ( bindingOptions.parsed && isDefinedObject( bindingOptions.result ) ) { - setupElement( element, buildAttributeOptions( bindingOptions.result ) ); - - } else { - if ( !_configuration.safeMode ) { - console.error( _configuration.attributeNotValidErrorText.replace( "{{attribute_name}}", _attribute_Name_Options ) ); - result = false; - } - } - - } else { - if ( !_configuration.safeMode ) { - console.error( _configuration.attributeNotSetErrorText.replace( "{{attribute_name}}", _attribute_Name_Options ) ); - result = false; - } - } - } - - return result; - } - - function setupElement( element, bindingOptions ) { - bindingOptions.currentView = {}; - bindingOptions.currentView.element = element; - - if ( isDefinedNumber( bindingOptions.order ) && ( isDefinedString( bindingOptions.title ) || isDefinedString( bindingOptions.description ) ) ) { - element.removeAttribute( _attribute_Name_Options ); - - if ( !bindingOptions.isHint ) { - setupNewGroup( bindingOptions.group ); - - _groups[ bindingOptions.group ].json[ bindingOptions.order ] = bindingOptions; - _groups[ bindingOptions.group ].keys.push( bindingOptions.order ); - - fireCustomTrigger( bindingOptions.events.onAddStep, element ); - - } else { - renderHint( bindingOptions ); - } - } - } - - function renderHint( bindingOptions ) { - var positionStyle = getStyleValueByName( bindingOptions.currentView.element, "position" ); - - if ( positionStyle !== _string.empty && positionStyle.toLowerCase() === "static" ) { - bindingOptions.currentView.element.style.position = "relative"; - } - - var hint = createElement( "div", "journey-js-hint" ); - bindingOptions.currentView.element.appendChild( hint ); - - hint.onclick = function( e ) { - cancelBubble( e ); - - _element_Dialog_CheckBox_Container.style.display = "none"; - _element_Dialog_ProgressDots.style.display = "none"; - _element_Dialog_ProgressBar.style.display = "none"; - _element_Dialog_Buttons.style.display = "none"; - _configuration_ShortcutKeysEnabled = false; - - setDialogText( bindingOptions ); - setDialogPosition( e, bindingOptions ); - - if ( bindingOptions.removeHintWhenViewed ) { - clearElementsByClassName( bindingOptions.currentView.element, "journey-js-hint" ); - } - }; - } - - - /* - * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - * Document Events - * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - */ - - function buildDocumentEvents( addEvents ) { - addEvents = isDefined( addEvents ) ? addEvents : true; - - var documentFunc = addEvents ? _parameter_Document.addEventListener : _parameter_Document.removeEventListener, - windowFunc = addEvents ? _parameter_Window.addEventListener : _parameter_Window.removeEventListener; - - if ( _configuration.shortcutKeysEnabled ) { - documentFunc( "keydown", onWindowKeyDown ); - } - - windowFunc( "resize", onWindowResize ); - } - - function onWindowKeyDown( e ) { - if ( _public.isOpen() && _configuration.shortcutKeysEnabled ) { - if ( e.keyCode === _enum_KeyCodes.escape ) { - e.preventDefault(); - onDialogClose(); - } else { - - if ( _configuration_ShortcutKeysEnabled ) { - if ( e.keyCode === _enum_KeyCodes.left ) { - e.preventDefault(); - onDialogBack(); - - } else if ( e.keyCode === _enum_KeyCodes.right ) { - e.preventDefault(); - onDialogNext(); - - } else if ( e.keyCode === _enum_KeyCodes.up ) { - e.preventDefault(); - onWindowKeyCodeUp(); - - } else if ( e.keyCode === _enum_KeyCodes.down ) { - e.preventDefault(); - onWindowKeyCodeDown(); - } - } - } - } - } - - function onWindowResize() { - if ( _public.isOpen() ) { - showDialogAndSetPosition(); - } - } - - function onWindowKeyCodeUp() { - if ( _groups[ _groups_Current ].position !== 0 ) { - removeFocusClassFromLastElement(); - - _groups[ _groups_Current ].position = 0; - - showDialogAndSetPosition(); - } - } - - function onWindowKeyCodeDown() { - if ( _groups[ _groups_Current ].position !== _groups[ _groups_Current ].keys.length - 1 ) { - removeFocusClassFromLastElement(); - - _groups[ _groups_Current ].position = _groups[ _groups_Current ].keys.length - 1; - - showDialogAndSetPosition(); - } - } - - - /* - * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - * Options - * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - */ - - function buildAttributeOptions( newOptions ) { - var options = !isDefinedObject( newOptions ) ? {} : newOptions; - options.order = getDefaultNumber( options.order, 0 ); - options.attach = getDefaultBoolean( options.attach, true ); - options.sendClick = getDefaultBoolean( options.sendClick, false ); - options.alignTop = getDefaultBoolean( options.alignTop, false ); - options.alignRight = getDefaultBoolean( options.alignRight, false ); - options.isHint = getDefaultBoolean( options.isHint, false ); - options.alignHintToClickPosition = getDefaultBoolean( options.alignHintToClickPosition, false ); - options.showDisabledBackground = getDefaultBoolean( options.showDisabledBackground, true ); - options.removeHintWhenViewed = getDefaultBoolean( options.removeHintWhenViewed, false ); - options.group = getDefaultString( options.group, _groups_Default ); - - options = buildAttributeOptionStrings( options ); - - return buildAttributeOptionCustomTriggers( options ); - } - - function buildAttributeOptionStrings( options ) { - options.title = getDefaultString( options.title, null ); - options.description = getDefaultString( options.description, null ); - options.tooltip = getDefaultString( options.tooltip, null ); - - return options; - } - - function buildAttributeOptionCustomTriggers( options ) { - options.events = getDefaultObject( options.events, {} ); - options.events.onEnter = getDefaultFunction( options.events.onEnter, null ); - options.events.onLeave = getDefaultFunction( options.events.onLeave, null ); - options.events.onClose = getDefaultFunction( options.events.onClose, null ); - options.events.onFinish = getDefaultFunction( options.events.onFinish, null ); - options.events.onOpen = getDefaultFunction( options.events.onOpen, null ); - options.events.onStart = getDefaultFunction( options.events.onStart, null ); - options.events.onAddStep = getDefaultFunction( options.events.onAddStep, null ); - options.events.onRemoveStep = getDefaultFunction( options.events.onRemoveStep, null ); - - return options; - } - - - /* - * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - * Browser URL Parameters - * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - */ - - function getBrowserUrlParameters() { - var show = false; - - if ( _configuration.browserUrlParametersEnabled ) { - var url = _parameter_Window.location.href, - urlArguments = getBrowserUrlArguments( url ); - - if ( isDefined( urlArguments.sjOrderId ) ) { - var orderId = parseInt( urlArguments.sjOrderId, 10 ); - - if ( !isNaN( orderId ) && orderId <= _groups[ _groups_Current ].keys.length - 1 ) { - _groups[ _groups_Current ].position = orderId; - } - } - - if ( isDefined( urlArguments.sjShow ) ) { - show = urlArguments.sjShow === "true"; - } - } - - return show; - } - - function getBrowserUrlArguments( url ) { - var urlArguments = {}, - urlDataParts = url.split( "?" ); - - if ( urlDataParts.length > 1 ) { - var parsedArgs = urlDataParts[ 1 ].split( "&" ), - parsedArgsLength = parsedArgs.length; - - for ( var parsedArgsIndex = 0; parsedArgsIndex < parsedArgsLength; parsedArgsIndex++ ) { - var parsedArg = parsedArgs[ parsedArgsIndex ].split( "=" ); - - urlArguments[ parsedArg[ 0 ] ] = parsedArg[ 1 ]; - } - } - - return urlArguments; - } - - - /* - * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - * Validation - * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - */ - - function isDefined( value ) { - return value !== null && value !== undefined && value !== _string.empty; - } - - function isDefinedObject( object ) { - return isDefined( object ) && typeof object === "object"; - } - - function isDefinedBoolean( object ) { - return isDefined( object ) && typeof object === "boolean"; - } - - function isDefinedString( object ) { - return isDefined( object ) && typeof object === "string"; - } - - function isDefinedFunction( object ) { - return isDefined( object ) && typeof object === "function"; - } - - function isDefinedNumber( object ) { - return isDefined( object ) && typeof object === "number"; - } - - function isDefinedArray( object ) { - return isDefinedObject( object ) && object instanceof Array; - } - - - /* - * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - * Element Handling - * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - */ - - function createElement( type, className ) { - var result = null, - nodeType = type.toLowerCase(), - isText = nodeType === "text"; - - if ( !_elements_Type.hasOwnProperty( nodeType ) ) { - _elements_Type[ nodeType ] = isText ? _parameter_Document.createTextNode( _string.empty ) : _parameter_Document.createElement( nodeType ); - } - - result = _elements_Type[ nodeType ].cloneNode( false ); - - if ( isDefined( className ) ) { - result.className = className; - } - - return result; - } - - function getOffset( element ) { - var left = 0, - top = 0; - - while ( element && !isNaN( element.offsetLeft ) && !isNaN( element.offsetTop ) ) { - left += element.offsetLeft - element.scrollLeft; - top += element.offsetTop - element.scrollTop; - - element = element.offsetParent; - } - - return { - left: left, - top: top - }; - } - - function getScrollPosition() { - var doc = _parameter_Document.documentElement, - left = ( _parameter_Window.pageXOffset || doc.scrollLeft ) - ( doc.clientLeft || 0 ), - top = ( _parameter_Window.pageYOffset || doc.scrollTop ) - ( doc.clientTop || 0 ); - - return { - left: left, - top: top - }; - } - - function getStyleValueByName( element, stylePropertyName ) { - var value = null; - - if ( _parameter_Window.getComputedStyle ) { - value = _parameter_Document.defaultView.getComputedStyle( element, null ).getPropertyValue( stylePropertyName ); - } - else if ( element.currentStyle ) { - value = element.currentStyle[ stylePropertyName ]; - } - - return value; - } - - function addNode( parent, node ) { - try { - if ( !parent.contains( node ) ) { - parent.appendChild( node ); - } - } catch ( e ) { - console.warn( e.message ); - } - } - - function removeNode( parent, node ) { - try { - if ( parent.contains( node ) ) { - parent.removeChild( node ); - } - } catch ( e ) { - console.warn( e.message ); - } - } - - function cancelBubble( e ) { - e.preventDefault(); - e.cancelBubble = true; - } - - function showElementAtMousePosition( e, element ) { - var left = e.pageX, - top = e.pageY, - scrollPosition = getScrollPosition(); - - element.style.display = "block"; - - if ( left + element.offsetWidth > _parameter_Window.innerWidth ) { - left -= element.offsetWidth; - } else { - left++; - } - - if ( top + element.offsetHeight > _parameter_Window.innerHeight ) { - top -= element.offsetHeight; - } else { - top++; - } - - if ( left < scrollPosition.left ) { - left = e.pageX + 1; - } - - if ( top < scrollPosition.top ) { - top = e.pageY + 1; - } - - element.style.left = left + "px"; - element.style.top = top + "px"; - } - - function showElementBasedOnCondition( element, condition ) { - if ( condition ) { - if ( element.style.display !== "block" ) { - element.style.display = "block"; - } - - } else { - if ( element.style.display !== "none" ) { - element.style.display = "none"; - } - } - } - - function buildCheckBox( container, labelText ) { - var lineContainer = createElement( "div" ), - label = createElement( "label", "checkbox" ), - input = createElement( "input" ); - - container.appendChild( lineContainer ); - lineContainer.appendChild( label ); - label.appendChild( input ); - - input.type = "checkbox"; - - var checkMark = createElement( "span", "check-mark" ), - text = createElement( "span", "text" ); - - text.innerHTML = labelText; - - label.appendChild( checkMark ); - label.appendChild( text ); - - return { - input: input, - label: label - }; - } - - function clearElementsByClassName( container, className ) { - var elements = container.getElementsByClassName( className ); - - while ( elements[ 0 ] ) { - elements[ 0 ].parentNode.removeChild( elements[ 0 ] ); - } - } - - - /* - * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - * Triggering Custom Events - * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - */ - - function fireCustomTrigger( triggerFunction ) { - if ( isDefinedFunction( triggerFunction ) ) { - triggerFunction.apply( null, [].slice.call( arguments, 1 ) ); - } - } - - - /* - * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - * Default Parameter/Option Handling - * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - */ - - function getDefaultAnyString( value, defaultValue ) { - return typeof value === "string" ? value : defaultValue; - } - - function getDefaultString( value, defaultValue ) { - return isDefinedString( value ) ? value : defaultValue; - } - - function getDefaultBoolean( value, defaultValue ) { - return isDefinedBoolean( value ) ? value : defaultValue; - } - - function getDefaultNumber( value, defaultValue ) { - return isDefinedNumber( value ) ? value : defaultValue; - } - - function getDefaultFunction( value, defaultValue ) { - return isDefinedFunction( value ) ? value : defaultValue; - } - - function getDefaultObject( value, defaultValue ) { - return isDefinedObject( value ) ? value : defaultValue; - } - - function getDefaultArray( value, defaultValue ) { - return isDefinedArray( value ) ? value : defaultValue; - } - - function getDefaultStringOrArray( value, defaultValue ) { - if ( isDefinedString( value ) ) { - value = value.split( _string.space ); - - if ( value.length === 0 ) { - value = defaultValue; - } - - } else { - value = getDefaultArray( value, defaultValue ); - } - - return value; - } - - function getObjectFromString( objectString ) { - var parsed = true, - result = null; - - try { - if ( isDefinedString( objectString ) ) { - result = _parameter_Json.parse( objectString ); - } - - } catch ( e1 ) { - - try { - result = eval( "(" + objectString + ")" ); - - if ( isDefinedFunction( result ) ) { - result = result(); - } - - } catch ( e2 ) { - if ( !_configuration.safeMode ) { - console.error( _configuration.objectErrorText.replace( "{{error_1}}", e1.message ).replace( "{{error_2}}", e2.message ) ); - parsed = false; - } - - result = null; - } - } - - return { - parsed: parsed, - result: result - }; - } - - - /* - * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - * Public Functions: Show/Hide - * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - */ - - /** - * start(). - * - * Starts the Journey from the beginning. - * - * @public - * @fires onStart - * - * @param {string} [group] States the group of steps you want to start the journey for (defaults to "default"). - * - * @returns {Object} The Journey.js class instance. - */ - _public.start = function( group ) { - if ( !_public.isOpen() ) { - _groups_Current = getDefaultString( group, _groups_Default ); - - if ( _groups.hasOwnProperty( _groups_Current ) ) { - _groups[ _groups_Current ].position = 0; - - showDialogAndSetPosition(); - } - } - - return _public; - }; - - /** - * show(). - * - * Shows the Journey.js dialog for the element in the last known position (defaults to the start). - * - * @public - * @fires onOpen - * - * @param {string} [group] States the group of steps you want to show the dialog for (defaults to the last group used). - * - * @returns {Object} The Journey.js class instance. - */ - _public.show = function( group ) { - if ( !_public.isOpen() ) { - _groups_Current = getDefaultString( group, _groups_Current ); - - if ( _groups.hasOwnProperty( _groups_Current ) ) { - if ( _groups[ _groups_Current ].position === _groups[ _groups_Current ].keys.length - 1 ) { - _groups[ _groups_Current ].position = 0; - } - - showDialogAndSetPosition(); - } - } - - return _public; - }; - - /** - * hide(). - * - * Hides the Journey.js dialog. - * - * @public - * @fires onClose - * - * @returns {Object} The Journey.js class instance. - */ - _public.hide = function() { - if ( _public.isOpen() ) { - onDialogClose(); - } - - return _public; - }; - - /** - * isOpen(). - * - * Returns a flag that states if the dialog is opened. - * - * @public - * - * @returns {boolean} The flag that states if the dialog is open. - */ - _public.isOpen = function() { - return isDefined( _element_Dialog ) && _element_Dialog.style.display === "block"; - }; - - /** - * isComplete(). - * - * Returns a flag that states if the full journey has been completed. - * - * @public - * - * @returns {boolean} The flag that states if the full journey has been completed. - */ - _public.isComplete = function() { - return _groups[ _groups_Current ].position >= _groups[ _groups_Current ].keys.length - 1; - }; - - - /* - * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - * Public Functions: Managing Steps - * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - */ - - /** - * addDocumentSteps(). - * - * Finds all new elements that contain the binding attribute and adds them as new steps. - * - * @public - * @fires onAddStep - * - * @returns {Object} The Journey.js class instance. - */ - _public.addDocumentSteps = function() { - getElements(); - - return _public; - }; - - /** - * addStep(). - * - * Adds a new step to the journey for a specific element. - * - * @public - * @fires onAddStep - * - * @param {Object} element The element that should be added to the journey. - * @param {Object} options The options to use for this step in the journey (refer to "Binding Options" documentation for properties). - * - * @returns {Object} The Journey.js class instance. - */ - _public.addStep = function( element, options ) { - if ( isDefinedObject( element ) && isDefinedObject( options ) ) { - setupElement( element, buildAttributeOptions( options ) ); - - _groups[ _groups_Current ].keys.sort(); - - resetDialogPosition(); - } - - return _public; - }; - - /** - * removeStep(). - * - * Removes a step from the journey, or a hint. - * - * @public - * @fires onRemoveStep - * - * @param {Object} element The element that should be removed. - * - * @returns {Object} The Journey.js class instance. - */ - _public.removeStep = function( element ) { - if ( isDefinedObject( element ) ) { - var removed = false; - - for ( var group in _groups ) { - if ( _groups.hasOwnProperty( group ) ) { - for ( var order in _groups[ group ].json ) { - if ( _groups[ group ].json.hasOwnProperty( order ) ) { - var bindingOptions = _groups[ group ].json[ order ]; - - if ( bindingOptions.currentView.element === element ) { - fireCustomTrigger( bindingOptions.events.onRemoveStep, bindingOptions.currentView.element ); - - _groups[ group ].keys.splice( _groups[ group ].keys.indexOf( bindingOptions.order ), 1 ); - - delete _groups[ group ].json[ bindingOptions.order ]; - - _groups[ group ].keys.sort(); - - removed = true; - break; - } - } - } - } - } - - if ( !removed ) { - clearElementsByClassName( element, "journey-js-hint" ); - } else { - resetDialogPosition(); - } - } - - return _public; - }; - - /** - * clearSteps(). - * - * Removes all the steps from the journey. - * - * @public - * @fires onRemoveStep - * - * @param {string} [group] States the group of steps you want to remove (defaults to all groups). - * - * @returns {Object} The Journey.js class instance. - */ - _public.clearSteps = function( group ) { - resetDialogPosition(); - - for ( var groupName in _groups ) { - if ( _groups.hasOwnProperty( groupName ) ) { - if ( !isDefinedString( group ) || group === groupName ) { - for ( var order in _groups[ groupName ].json ) { - if ( _groups[ groupName ].json.hasOwnProperty( order ) ) { - var bindingOptions = _groups[ groupName ].json[ order ]; - - fireCustomTrigger( bindingOptions.events.onRemoveStep, bindingOptions.currentView.element ); - } - } - } - } - } - - if ( isDefinedString( group ) ) { - if ( _groups.hasOwnProperty( group ) ) { - delete _groups[ group ]; - } - - } else { - _groups = {}; - } - - if ( !isDefinedString( group ) || group === _groups_Default ) { - setupDefaultGroup( _groups ); - } - - return _public; - }; - - /** - * clearHints(). - * - * Removes all the hints. - * - * @public - * - * @returns {Object} The Journey.js class instance. - */ - _public.clearHints = function() { - clearElementsByClassName( _parameter_Document.body, "journey-js-hint" ); - - return _public; - }; - - /** - * reverseStepOrder(). - * - * Reverses the order the steps in the journey should in. - * - * @public - * - * @returns {Object} The Journey.js class instance. - */ - _public.reverseStepOrder = function() { - _groups[ _groups_Current ].keys.reverse(); - - resetDialogPosition(); - - return _public; - }; - - function resetDialogPosition() { - if ( _public.isOpen() ) { - onDialogClose( false ); - - _groups[ _groups_Current ].position = 0; - } - } - - - /* - * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - * Public Functions: Configuration - * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - */ - - /** - * setConfiguration(). - * - * Sets the specific configuration options that should be used. - * - * @public - * - * @param {Object} newConfiguration All the configuration options that should be set (refer to "Configuration Options" documentation for properties). - * - * @returns {Object} The Journey.js class instance. - */ - _public.setConfiguration = function( newConfiguration ) { - if ( isDefinedObject( newConfiguration ) ) { - var configurationHasChanged = false; - - for ( var propertyName in newConfiguration ) { - if ( newConfiguration.hasOwnProperty( propertyName ) && _configuration.hasOwnProperty( propertyName ) && _configuration[ propertyName ] !== newConfiguration[ propertyName ] ) { - _configuration[ propertyName ] = newConfiguration[ propertyName ]; - configurationHasChanged = true; - } - } - - if ( configurationHasChanged ) { - buildDefaultConfiguration( _configuration ); - } - } - - return _public; - }; - - function buildDefaultConfiguration( newConfiguration ) { - _configuration = getDefaultObject( newConfiguration, {} ); - _configuration.safeMode = getDefaultBoolean( _configuration.safeMode, true ); - _configuration.domElementTypes = getDefaultStringOrArray( _configuration.domElementTypes, [ "*" ] ); - _configuration.showCloseButton = getDefaultBoolean( _configuration.showCloseButton, true ); - _configuration.shortcutKeysEnabled = getDefaultBoolean( _configuration.shortcutKeysEnabled, true ); - _configuration.showProgressDots = getDefaultBoolean( _configuration.showProgressDots, true ); - _configuration.browserUrlParametersEnabled = getDefaultBoolean( _configuration.browserUrlParametersEnabled, true ); - _configuration.showProgressDotNumbers = getDefaultBoolean( _configuration.showProgressDotNumbers, false ); - _configuration.showButtons = getDefaultBoolean( _configuration.showButtons, true ); - _configuration.showDoNotShowAgain = getDefaultBoolean( _configuration.showDoNotShowAgain, false ); - _configuration.tooltipDelay = getDefaultNumber( _configuration.tooltipDelay, 750 ); - _configuration.showProgressDotToolTips = getDefaultBoolean( _configuration.showProgressDotToolTips, true ); - _configuration.closeDialogOnDisabledBackgroundClick = getDefaultBoolean( _configuration.closeDialogOnDisabledBackgroundClick, false ); - _configuration.showProgressBar = getDefaultBoolean( _configuration.showProgressBar, false ); - _configuration.scrollToElements = getDefaultBoolean( _configuration.scrollToElements, false ); - _configuration.dialogMovingEnabled = getDefaultBoolean( _configuration.dialogMovingEnabled, false ); - _configuration.showProgressBarText = getDefaultBoolean( _configuration.showProgressBarText, false ); - - buildDefaultConfigurationStrings(); - buildDefaultConfigurationCustomTriggers(); - } - - function buildDefaultConfigurationStrings() { - _configuration.backButtonText = getDefaultAnyString( _configuration.backButtonText, "Back" ); - _configuration.nextButtonText = getDefaultAnyString( _configuration.nextButtonText, "Next" ); - _configuration.finishButtonText = getDefaultAnyString( _configuration.finishButtonText, "Finish" ); - _configuration.closeButtonToolTipText = getDefaultAnyString( _configuration.closeButtonToolTipText, "Close" ); - _configuration.doNotShowAgainText = getDefaultAnyString( _configuration.doNotShowAgainText, "Do not show again" ); - _configuration.objectErrorText = getDefaultAnyString( _configuration.objectErrorText, "Errors in object: {{error_1}}, {{error_2}}" ); - _configuration.attributeNotValidErrorText = getDefaultAnyString( _configuration.attributeNotValidErrorText, "The attribute '{{attribute_name}}' is not a valid object." ); - _configuration.attributeNotSetErrorText = getDefaultAnyString( _configuration.attributeNotSetErrorText, "The attribute '{{attribute_name}}' has not been set correctly." ); - _configuration.closeDialogConfirmationText = getDefaultAnyString( _configuration.closeDialogConfirmationText, null ); - } - - function buildDefaultConfigurationCustomTriggers() { - _configuration.onDoNotShowAgainChange = getDefaultFunction( _configuration.onDoNotShowAgainChange, null ); - } - - - /* - * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - * Public Functions: Additional Data - * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - */ - - /** - * getVersion(). - * - * Returns the version of Journey.js. - * - * @public - * - * @returns {string} The version number. - */ - _public.getVersion = function() { - return "1.7.2"; - }; - - - /* - * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - * Initialize Journey.js - * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - */ - - ( function ( documentObject, windowObject, mathObject, jsonObject ) { - _parameter_Document = documentObject; - _parameter_Window = windowObject; - _parameter_Math = mathObject; - _parameter_Json = jsonObject; - - buildDefaultConfiguration(); - - _parameter_Document.addEventListener( "DOMContentLoaded", function() { - setupDefaultGroup(); - renderDisabledBackground(); - renderDialog(); - renderToolTip(); - getElements(); - buildDocumentEvents(); - - if ( getBrowserUrlParameters() ) { - _public.show(); - } - } ); - - if ( !isDefined( _parameter_Window.$journey ) ) { - _parameter_Window.$journey = _public; - } - - } ) ( document, window, Math, JSON ); -} )(); \ No newline at end of file diff --git a/src/journey.js.scss b/src/journey.js.scss index 37c2c81..4aa68f0 100644 --- a/src/journey.js.scss +++ b/src/journey.js.scss @@ -1,5 +1,5 @@ /* - * Journey.js Library v1.7.2 + * Journey.js Library v2.0.0 * * Copyright 2024 Bunoon * Released under the MIT License diff --git a/src/journey.ts b/src/journey.ts new file mode 100644 index 0000000..70f5517 --- /dev/null +++ b/src/journey.ts @@ -0,0 +1,1177 @@ +/** + * Journey.js + * + * A lightweight, easy-to-use JavaScript library to create interactive, customizable, accessible guided tours across your websites or web apps! + * + * @file journey.js + * @version v2.0.0 + * @author Bunoon + * @license MIT License + * @copyright Bunoon 2024 + */ + + +import { + type Configuration, + type BindingOptions, + type Events, + type CurrentView, + type Position} from "./ts/type"; + +import { Char, KeyCode } from "./ts/enum"; +import { Constants } from "./ts/constant"; +import { PublicApi } from "./ts/api"; +import { Is } from "./ts/is"; +import { Data } from "./ts/data"; +import { DomElement } from "./ts/dom"; + + +type StringToJson = { + parsed: boolean; + object: any; +}; + +type Groups = Record; + keys: number[]; + position: number; +}>; + + +( () => { + // Variables: Configuration + let _configuration: Configuration = {} as Configuration; + + // Variables: Configuration (overrides) + let _configuration_ShortcutKeysEnabled: boolean = true; + + // Variables: Groups + const _groups_Default: string = "default"; + let _groups_Current: string = _groups_Default; + let _groups: Groups = {} as Groups; + + // Variables: Focus Element + let _element_Focus_Element_PositionStyle: string = Char.empty; + + // Variables: Disabled Background + let _element_Disabled_Background: HTMLElement; + + // Variables: Dialog + let _element_Dialog: HTMLElement; + let _element_Dialog_Close_Button: HTMLElement; + let _element_Dialog_Title: HTMLElement; + let _element_Dialog_Description: HTMLElement; + let _element_Dialog_CheckBox_Container: HTMLElement; + let _element_Dialog_CheckBox_Input: HTMLInputElement; + let _element_Dialog_ProgressDots: HTMLElement; + let _element_Dialog_ProgressBar: HTMLElement; + let _element_Dialog_ProgressBar_Percentage: HTMLElement; + let _element_Dialog_ProgressBar_Percentage_Text: HTMLElement; + let _element_Dialog_Buttons: HTMLElement; + let _element_Dialog_Buttons_Back_Button: HTMLInputElement; + let _element_Dialog_Buttons_Next_Button: HTMLInputElement; + let _element_Dialog_IsHint: boolean = false; + + // Variables: Dialog - Move + let _element_Dialog_Move_Original_X: number = 0; + let _element_Dialog_Move_Original_Y: number = 0; + let _element_Dialog_Move_IsMoving: boolean = false; + let _element_Dialog_Move_X: number = 0; + let _element_Dialog_Move_Y: number = 0; + + // Variables: Dialog + let _element_ToolTip: HTMLElement; + let _element_ToolTip_Timer: number = 0; + + + /* + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + * Groups + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + */ + + function setupDefaultGroup( groups: any = null ) : void { + _groups = Data.getDefaultObject( groups, {} as Groups ); + + _groups[ _groups_Default ] = { + json: {} as BindingOptions, + keys: [], + position: 0 + }; + } + + function setupNewGroup( group: string ) : void { + if ( !_groups.hasOwnProperty( group ) ) { + _groups[ group ] = { + json: {} as BindingOptions, + keys: [], + position: 0 + }; + } + } + + function getGroupBindingOptions() : BindingOptions { + return _groups[ _groups_Current ].json[ _groups[ _groups_Current ].keys[ _groups[ _groups_Current ].position ] ]; + } + + + /* + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + * Disabled Background + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + */ + + function renderDisabledBackground() : void { + _element_Disabled_Background = DomElement.create( "div", "journey-js-disabled-background" ); + + _element_Disabled_Background.onclick = () => { + if ( _configuration.closeDialogOnDisabledBackgroundClick ) { + onDialogClose(); + } + }; + } + + function showDisabledBackground() : void { + DomElement.addNode( document.body, _element_Disabled_Background ); + } + + function hideDisabledBackground() : void { + DomElement.removeNode( document.body, _element_Disabled_Background ); + } + + + /* + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + * Render: Dialog + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + */ + + function renderDialog() : void { + _element_Dialog = DomElement.create( "div", "journey-js-dialog" ); + _element_Dialog.style.display = "none"; + document.body.appendChild( _element_Dialog ); + + _element_Dialog_Close_Button = DomElement.create( "button", "close" ); + _element_Dialog.appendChild( _element_Dialog_Close_Button ); + + _element_Dialog_Close_Button.onclick = () => { + onDialogClose(); + }; + + addToolTip( _element_Dialog_Close_Button, _configuration.closeButtonToolTipText! ); + + _element_Dialog_Title = DomElement.create( "div", "title" ); + _element_Dialog.appendChild( _element_Dialog_Title ); + + _element_Dialog_Description = DomElement.create( "div", "description" ); + _element_Dialog.appendChild( _element_Dialog_Description ); + + _element_Dialog_CheckBox_Container = DomElement.create( "div", "checkbox-container" ); + _element_Dialog.appendChild( _element_Dialog_CheckBox_Container ); + + _element_Dialog_CheckBox_Input = DomElement.createCheckBox( _element_Dialog_CheckBox_Container, _configuration.doNotShowAgainText! ); + + _element_Dialog_CheckBox_Input.onchange = () => { + if ( _configuration.showDoNotShowAgain ) { + fireCustomTriggerEvent( _configuration.onDoNotShowAgainChange, _element_Dialog_CheckBox_Input.checked ); + } + }; + + _element_Dialog_ProgressDots = DomElement.create( "div", "progress-dots" ); + _element_Dialog.appendChild( _element_Dialog_ProgressDots ); + + _element_Dialog_ProgressBar = DomElement.create( "div", "progress-bar" ); + _element_Dialog.appendChild( _element_Dialog_ProgressBar ); + + _element_Dialog_ProgressBar_Percentage = DomElement.create( "div", "progress-bar-percentage" ); + _element_Dialog_ProgressBar.appendChild( _element_Dialog_ProgressBar_Percentage ); + + _element_Dialog_ProgressBar_Percentage_Text = DomElement.create( "p", "progress-bar-percentage-text" ); + _element_Dialog_ProgressBar_Percentage.appendChild( _element_Dialog_ProgressBar_Percentage_Text ); + + _element_Dialog_Buttons = DomElement.create( "div", "buttons" ); + _element_Dialog.appendChild( _element_Dialog_Buttons ); + + _element_Dialog_Buttons_Back_Button = DomElement.create( "button", "back" ) as HTMLInputElement; + _element_Dialog_Buttons_Back_Button.onclick = onDialogBack; + _element_Dialog_Buttons.appendChild( _element_Dialog_Buttons_Back_Button ); + + _element_Dialog_Buttons_Next_Button = DomElement.create( "button", "next" ) as HTMLInputElement; + _element_Dialog_Buttons_Next_Button.onclick = onDialogNext; + _element_Dialog_Buttons.appendChild( _element_Dialog_Buttons_Next_Button ); + + makeDialogMovable(); + } + + function onDialogClose( showConfirmationBox: boolean = true ) : void { + let confirmed: boolean = false; + + if ( Is.definedString( _configuration.closeDialogConfirmationText ) && showConfirmationBox ) { + confirmed = confirm( _configuration.closeDialogConfirmationText ); + } else { + confirmed = true; + } + + if ( confirmed ) { + const bindingOptions: BindingOptions = getGroupBindingOptions(); + + if ( Is.defined( bindingOptions ) && Is.defined( bindingOptions._currentView.element ) ) { + fireCustomTriggerEvent( bindingOptions.events!.onClose!, bindingOptions._currentView.element ); + } + + removeFocusClassFromLastElement( false ); + hideDisabledBackground(); + hideToolTip(); + + _element_Dialog.style.display = "none"; + } + } + + function onDialogBack() : void { + if ( _groups[ _groups_Current ].position > 0 ) { + removeFocusClassFromLastElement(); + + _groups[ _groups_Current ].position--; + + showDialogAndSetPosition(); + } + } + + function onDialogNext() : void { + if ( _groups[ _groups_Current ].position === _groups[ _groups_Current ].keys.length - 1 ) { + const bindingOptions: BindingOptions = getGroupBindingOptions(); + + onDialogClose( false ); + fireCustomTriggerEvent( bindingOptions.events!.onFinish, bindingOptions._currentView.element ); + + } else { + removeFocusClassFromLastElement(); + + _groups[ _groups_Current ].position++; + + showDialogAndSetPosition(); + } + } + + function showDialogAndSetPosition() : void { + const bindingOptions: BindingOptions = getGroupBindingOptions(); + + if ( Is.defined( bindingOptions ) && Is.defined( bindingOptions._currentView.element ) ) { + if ( bindingOptions.showDisabledBackground ) { + showDisabledBackground(); + } else { + hideDisabledBackground(); + } + + hideToolTip(); + + _element_Dialog_Close_Button.style.display = _configuration.showCloseButton ? "block": "none"; + _configuration_ShortcutKeysEnabled = true; + + bindingOptions._currentView.element.className += Char.space + "journey-js-element-focus"; + + if ( _configuration.scrollToElements ) { + bindingOptions._currentView.element.scrollIntoView(); + } + + const lastPositionStyle: string = DomElement.getStyleValueByName( bindingOptions._currentView.element, "position" ); + + if ( lastPositionStyle !== Char.empty && lastPositionStyle.toLowerCase() === "static" ) { + _element_Focus_Element_PositionStyle = lastPositionStyle; + bindingOptions._currentView.element.style.position = "relative"; + } + + DomElement.showElementBasedOnCondition( _element_Dialog_CheckBox_Container, _configuration.showDoNotShowAgain as boolean ); + DomElement.showElementBasedOnCondition( _element_Dialog_ProgressDots, _configuration.showProgressDots as boolean && _groups[ _groups_Current ].keys.length > 1 ); + DomElement.showElementBasedOnCondition( _element_Dialog_ProgressBar, _configuration.showProgressBar as boolean && _groups[ _groups_Current ].keys.length > 1 ); + DomElement.showElementBasedOnCondition( _element_Dialog_ProgressBar_Percentage_Text, _configuration.showProgressBarText as boolean ); + DomElement.showElementBasedOnCondition( _element_Dialog_Buttons, _configuration.showButtons as boolean ); + + _element_Dialog_Buttons_Back_Button.innerHTML = _configuration.backButtonText!; + _element_Dialog_Buttons_Back_Button.disabled = _groups[ _groups_Current ].position === 0; + + if ( _groups[ _groups_Current ].position >= _groups[ _groups_Current ].keys.length - 1 ) { + _element_Dialog_Buttons_Next_Button.innerHTML = _configuration.finishButtonText!; + } else { + _element_Dialog_Buttons_Next_Button.innerHTML = _configuration.nextButtonText!; + } + + setDialogText( bindingOptions ); + setDialogPosition( null, bindingOptions ); + buildProcessDots(); + setProgressBarPosition(); + fireCustomTriggerEvent( bindingOptions.events!.onEnter, bindingOptions._currentView.element ); + + if ( bindingOptions.sendClick ) { + bindingOptions._currentView.element.click(); + } + } + } + + function setDialogText( bindingOptions: BindingOptions ) : void { + if ( Is.definedString( bindingOptions.title ) ) { + _element_Dialog_Title.innerHTML = bindingOptions.title!; + } else { + _element_Dialog_Title.innerHTML = Char.empty; + } + + if ( Is.definedString( bindingOptions.description ) ) { + _element_Dialog_Description.innerHTML = bindingOptions.description!; + } else { + _element_Dialog_Description.innerHTML = Char.empty; + } + } + + function setDialogPosition( e: any, bindingOptions: BindingOptions ) : void { + if ( _element_Dialog.style.display !== "block" ) { + _element_Dialog.style.display = "block"; + + fireCustomTriggerEvent( bindingOptions.events!.onOpen, bindingOptions._currentView.element ); + } + + if ( _groups[ _groups_Current ].position === 0 ) { + fireCustomTriggerEvent( bindingOptions.events!.onStart, bindingOptions._currentView.element ); + } + + _element_Dialog_IsHint = bindingOptions.isHint === true; + + if ( bindingOptions.attach || bindingOptions.isHint ) { + if ( bindingOptions.isHint && bindingOptions.alignHintToClickPosition ) { + DomElement.showElementAtMousePosition( e, _element_Dialog ); + + } else { + const offset: Position = DomElement.getOffset( bindingOptions._currentView.element ); + let top: number = ( offset.top ) + bindingOptions._currentView.element.offsetHeight; + let left: number = ( offset.left ); + + if ( left + _element_Dialog.offsetWidth > window.innerWidth || bindingOptions.alignRight ) { + left -= _element_Dialog.offsetWidth; + left += bindingOptions._currentView.element.offsetWidth; + } + + if ( top + _element_Dialog.offsetHeight > window.innerHeight || bindingOptions.alignTop ) { + top -= ( _element_Dialog.offsetHeight + bindingOptions._currentView.element.offsetHeight ); + } + + _element_Dialog.style.top = top + "px"; + _element_Dialog.style.left = left + "px"; + } + + } else { + const scrollPosition: Position = DomElement.getScrollPosition(); + const centerLeft: number = Math.max( 0, ( ( window.innerWidth - _element_Dialog.offsetWidth ) / 2 ) + scrollPosition.left ); + const centerTop: number = Math.max( 0, ( ( window.innerHeight - _element_Dialog.offsetHeight ) / 2 ) + scrollPosition.top ); + + _element_Dialog.style.left = centerLeft + "px"; + _element_Dialog.style.top = centerTop + "px"; + } + } + + function removeFocusClassFromLastElement( callCustomTrigger: boolean = true ) : void { + const bindingOptions: BindingOptions = getGroupBindingOptions(); + + if ( Is.defined( bindingOptions ) && Is.defined( bindingOptions._currentView.element ) ) { + bindingOptions._currentView.element.className = bindingOptions._currentView.element.className.replace( Char.space + "journey-js-element-focus", Char.empty ); + + if ( Is.defined( _element_Focus_Element_PositionStyle ) ) { + bindingOptions._currentView.element.style.position = _element_Focus_Element_PositionStyle; + } + + if ( callCustomTrigger ) { + fireCustomTriggerEvent( bindingOptions.events!.onLeave, bindingOptions._currentView.element ); + } + } + } + + function buildProcessDots() : void { + _element_Dialog_ProgressDots.innerHTML = Char.empty; + + if ( _configuration.showProgressDots ) { + const keysLength: number = _groups[ _groups_Current ].keys.length; + + for ( let keyIndex: number = 0; keyIndex < keysLength; keyIndex++ ) { + buildProgressDot( keyIndex, _groups[ _groups_Current ].keys[ keyIndex ] ); + } + } + } + + function buildProgressDot( keyIndex: number, order: number ) : void { + const bindingOptions: BindingOptions = _groups[ _groups_Current ].json[ order ]; + let dot: HTMLElement; + + if ( keyIndex === _groups[ _groups_Current ].position ) { + dot = DomElement.create( "div", "dot-active" ); + } else { + + dot = DomElement.create( "div", "dot" ); + + dot.onclick = () => { + removeFocusClassFromLastElement(); + + _groups[ _groups_Current ].position = keyIndex; + + showDialogAndSetPosition(); + }; + } + + _element_Dialog_ProgressDots.appendChild( dot ); + + if ( _configuration.showProgressDotToolTips ) { + if ( Is.definedString( bindingOptions.tooltip ) ) { + addToolTip( dot, bindingOptions.tooltip! ); + } else { + addToolTip( dot, bindingOptions.title! ); + } + } + + if ( _configuration.showProgressDotNumbers ) { + dot.className += " dot-number"; + dot.innerHTML = ( keyIndex + 1 ).toString(); + } + } + + function setProgressBarPosition() : void { + if ( _configuration.showProgressBar ) { + const pixelsPerStage: number = _element_Dialog_ProgressBar.offsetWidth / _groups[ _groups_Current ].keys.length; + const width: number = ( _groups[ _groups_Current ].position + 1 ) * pixelsPerStage; + const percentageComplete: number = Math.ceil( ( ( _groups[ _groups_Current ].position + 1 ) / _groups[ _groups_Current ].keys.length ) * 100 ); + + _element_Dialog_ProgressBar_Percentage.style.width = width + "px"; + _element_Dialog_ProgressBar_Percentage_Text.innerHTML = percentageComplete + "%"; + } + } + + + /* + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + * Render: Dialog - Move + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + */ + + function makeDialogMovable() : void { + _element_Dialog_Title.onmousedown = onMoveTitleBarMouseDown; + _element_Dialog_Title.onmouseup = onMoveTitleBarMouseUp; + _element_Dialog_Title.oncontextmenu = onMoveTitleBarMouseUp; + + document.body.addEventListener( "mousemove", onMoveDocumentMouseMove ); + document.body.addEventListener( "mouseleave", onMoveDocumentMouseLeave ); + } + + function onMoveTitleBarMouseDown( e: MouseEvent ) : void { + if ( !_element_Dialog_Move_IsMoving && !_element_Dialog_IsHint && _configuration.dialogMovingEnabled ) { + _element_Dialog.className += " journey-js-dialog-moving"; + _element_Dialog_Move_IsMoving = true; + _element_Dialog_Move_X = e.pageX - _element_Dialog.offsetLeft; + _element_Dialog_Move_Y = e.pageY - _element_Dialog.offsetTop; + _element_Dialog_Move_Original_X = _element_Dialog.offsetLeft; + _element_Dialog_Move_Original_Y = _element_Dialog.offsetTop; + } + } + + function onMoveTitleBarMouseUp() : void { + if ( _element_Dialog_Move_IsMoving ) { + _element_Dialog_Move_IsMoving = false; + _element_Dialog_Move_Original_X = 0; + _element_Dialog_Move_Original_Y = 0; + _element_Dialog.className = "journey-js-dialog"; + } + } + + function onMoveDocumentMouseMove( e: MouseEvent ) : void { + if ( _element_Dialog_Move_IsMoving ) { + _element_Dialog.style.left = ( e.pageX - _element_Dialog_Move_X ) + "px"; + _element_Dialog.style.top = ( e.pageY - _element_Dialog_Move_Y ) + "px"; + } + } + + function onMoveDocumentMouseLeave() : void { + if ( _element_Dialog_Move_IsMoving ) { + _element_Dialog.style.left = _element_Dialog_Move_Original_X + "px"; + _element_Dialog.style.top = _element_Dialog_Move_Original_Y + "px"; + + _element_Dialog_Move_IsMoving = false; + _element_Dialog_Move_Original_X = 0; + _element_Dialog_Move_Original_Y = 0; + _element_Dialog.className = "journey-js-dialog"; + } + } + + + /* + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + * Render: ToolTip + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + */ + + function renderToolTip() : void { + if ( !Is.defined( _element_ToolTip ) ) { + _element_ToolTip = DomElement.create( "div", "journey-js-tooltip" ); + _element_ToolTip.style.display = "none"; + + document.body.appendChild( _element_ToolTip ); + + document.body.addEventListener( "mousemove", () => { + hideToolTip(); + } ); + + document.addEventListener( "scroll", () => { + hideToolTip(); + } ); + } + } + + function addToolTip( element: HTMLElement, text: string ) : void { + if ( element !== null ) { + element.onmousemove = ( e: MouseEvent ) => { + showToolTip( e, text ); + }; + } + } + + function showToolTip( e: any, text: string ) : void { + DomElement.cancelBubble( e ); + hideToolTip(); + + _element_ToolTip_Timer = setTimeout( () => { + _element_ToolTip.innerHTML = text; + _element_ToolTip.style.display = "block"; + + DomElement.showElementAtMousePosition( e, _element_ToolTip ); + }, _configuration.tooltipDelay ); + } + + function hideToolTip() : void { + if ( Is.defined( _element_ToolTip ) ) { + if ( _element_ToolTip_Timer !== 0 ) { + clearTimeout( _element_ToolTip_Timer ); + _element_ToolTip_Timer = 0; + } + + if ( _element_ToolTip.style.display === "block" ) { + _element_ToolTip.style.display = "none"; + } + } + } + + + /* + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + * Rendering + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + */ + + function getElements() : void { + const tagTypes: string[] = _configuration.domElementTypes as string[]; + const tagTypesLength: number = tagTypes.length; + + for ( let tagTypeIndex: number = 0; tagTypeIndex < tagTypesLength; tagTypeIndex++ ) { + const domElements: HTMLCollectionOf = document.getElementsByTagName( tagTypes[ tagTypeIndex ] ); + const elements: HTMLElement[] = [].slice.call( domElements ); + const elementsLength: number = elements.length; + + for ( let elementIndex: number = 0; elementIndex < elementsLength; elementIndex++ ) { + if ( !getElement( elements[ elementIndex ] ) ) { + break; + } + } + } + + _groups[ _groups_Current ].keys.sort(); + } + + function getElement( element: HTMLElement ) : boolean { + let result: boolean = true; + + if ( Is.defined( element ) && element.hasAttribute( Constants.JOURNEY_JS_ATTRIBUTE_NAME ) ) { + const bindingOptionsData: string = element.getAttribute( Constants.JOURNEY_JS_ATTRIBUTE_NAME )!; + + if ( Is.definedString( bindingOptionsData ) ) { + const bindingOptions: StringToJson = getObjectFromString( bindingOptionsData ); + + if ( bindingOptions.parsed && Is.definedObject( bindingOptions.object ) ) { + setupElement( element, buildAttributeOptions( bindingOptions.object ) ); + + } else { + if ( !_configuration.safeMode ) { + console.error( _configuration.attributeNotValidErrorText!.replace( "{{attribute_name}}", Constants.JOURNEY_JS_ATTRIBUTE_NAME ) ); + result = false; + } + } + + } else { + if ( !_configuration.safeMode ) { + console.error( _configuration.attributeNotSetErrorText!.replace( "{{attribute_name}}", Constants.JOURNEY_JS_ATTRIBUTE_NAME ) ); + result = false; + } + } + } + + return result; + } + + function setupElement( element: HTMLElement, bindingOptions: BindingOptions ) : void { + bindingOptions._currentView = {} as CurrentView; + bindingOptions._currentView.element = element; + + if ( Is.definedNumber( bindingOptions.order ) && ( Is.definedString( bindingOptions.title ) || Is.definedString( bindingOptions.description ) ) ) { + element.removeAttribute( Constants.JOURNEY_JS_ATTRIBUTE_NAME ); + + if ( !bindingOptions.isHint ) { + setupNewGroup( bindingOptions.group! ); + + _groups[ bindingOptions.group! ].json[ bindingOptions.order! ] = bindingOptions; + _groups[ bindingOptions.group! ].keys.push( bindingOptions.order! ); + + fireCustomTriggerEvent( bindingOptions.events!.onAddStep, element ); + + } else { + renderHint( bindingOptions ); + } + } + } + + function renderHint( bindingOptions: BindingOptions ) : void { + const positionStyle: string = DomElement.getStyleValueByName( bindingOptions._currentView.element, "position" ); + + if ( positionStyle !== Char.empty && positionStyle.toLowerCase() === "static" ) { + bindingOptions._currentView.element.style.position = "relative"; + } + + const hint: HTMLElement = DomElement.create( "div", "journey-js-hint" ); + bindingOptions._currentView.element.appendChild( hint ); + + hint.onclick = ( e: MouseEvent ) => { + DomElement.cancelBubble( e ); + + _element_Dialog_CheckBox_Container.style.display = "none"; + _element_Dialog_ProgressDots.style.display = "none"; + _element_Dialog_ProgressBar.style.display = "none"; + _element_Dialog_Buttons.style.display = "none"; + _configuration_ShortcutKeysEnabled = false; + + setDialogText( bindingOptions ); + setDialogPosition( e, bindingOptions ); + + if ( bindingOptions.removeHintWhenViewed ) { + DomElement.clearElementsByClassName( bindingOptions._currentView.element, "journey-js-hint" ); + } + }; + } + + + /* + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + * Document Events + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + */ + + function buildDocumentEvents( addEvents: boolean = true ) : void { + const documentFunc: Function = addEvents ? document.addEventListener : document.removeEventListener; + const windowFunc: Function = addEvents ? window.addEventListener : window.removeEventListener; + + if ( _configuration.shortcutKeysEnabled ) { + documentFunc( "keydown", onWindowKeyDown ); + } + + windowFunc( "resize", onWindowResize ); + } + + function onWindowKeyDown( e: KeyboardEvent ) : void { + if ( _public.isOpen() && _configuration.shortcutKeysEnabled ) { + if ( e.code === KeyCode.escape ) { + e.preventDefault(); + onDialogClose(); + } else { + + if ( _configuration_ShortcutKeysEnabled ) { + if ( e.code === KeyCode.left ) { + e.preventDefault(); + onDialogBack(); + + } else if ( e.code === KeyCode.right ) { + e.preventDefault(); + onDialogNext(); + + } else if ( e.code === KeyCode.up ) { + e.preventDefault(); + onWindowKeyCodeUp(); + + } else if ( e.code === KeyCode.down ) { + e.preventDefault(); + onWindowKeyCodeDown(); + } + } + } + } + } + + function onWindowResize() : void { + if ( _public.isOpen() ) { + showDialogAndSetPosition(); + } + } + + function onWindowKeyCodeUp() : void { + if ( _groups[ _groups_Current ].position !== 0 ) { + removeFocusClassFromLastElement(); + + _groups[ _groups_Current ].position = 0; + + showDialogAndSetPosition(); + } + } + + function onWindowKeyCodeDown() : void { + if ( _groups[ _groups_Current ].position !== _groups[ _groups_Current ].keys.length - 1 ) { + removeFocusClassFromLastElement(); + + _groups[ _groups_Current ].position = _groups[ _groups_Current ].keys.length - 1; + + showDialogAndSetPosition(); + } + } + + + /* + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + * Options + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + */ + + function buildAttributeOptions( newOptions: any ) { + let options: BindingOptions = Data.getDefaultObject( newOptions, {} as BindingOptions ); + options.order = Data.getDefaultNumber( options.order, 0 ); + options.attach = Data.getDefaultBoolean( options.attach, true ); + options.sendClick = Data.getDefaultBoolean( options.sendClick, false ); + options.alignTop = Data.getDefaultBoolean( options.alignTop, false ); + options.alignRight = Data.getDefaultBoolean( options.alignRight, false ); + options.isHint = Data.getDefaultBoolean( options.isHint, false ); + options.alignHintToClickPosition = Data.getDefaultBoolean( options.alignHintToClickPosition, false ); + options.showDisabledBackground = Data.getDefaultBoolean( options.showDisabledBackground, true ); + options.removeHintWhenViewed = Data.getDefaultBoolean( options.removeHintWhenViewed, false ); + options.group = Data.getDefaultString( options.group, _groups_Default ); + + options = buildAttributeOptionStrings( options ); + + return buildAttributeOptionCustomTriggers( options ); + } + + function buildAttributeOptionStrings( options: BindingOptions ) : BindingOptions { + options.title = Data.getDefaultString( options.title, Char.empty ); + options.description = Data.getDefaultString( options.description, Char.empty ); + options.tooltip = Data.getDefaultString( options.tooltip, Char.empty ); + + return options; + } + + function buildAttributeOptionCustomTriggers( options: BindingOptions ) : BindingOptions { + options.events = Data.getDefaultObject( options.events, {} as Events ); + options.events!.onEnter = Data.getDefaultFunction( options.events!.onEnter, null ); + options.events!.onLeave = Data.getDefaultFunction( options.events!.onLeave, null ); + options.events!.onClose = Data.getDefaultFunction( options.events!.onClose, null ); + options.events!.onFinish = Data.getDefaultFunction( options.events!.onFinish, null ); + options.events!.onOpen = Data.getDefaultFunction( options.events!.onOpen, null ); + options.events!.onStart = Data.getDefaultFunction( options.events!.onStart, null ); + options.events!.onAddStep = Data.getDefaultFunction( options.events!.onAddStep, null ); + options.events!.onRemoveStep = Data.getDefaultFunction( options.events!.onRemoveStep, null ); + + return options; + } + + + /* + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + * Triggering Custom Events + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + */ + + function fireCustomTriggerEvent( triggerFunction: any, ...args : any[] ) : void { + if ( Is.definedFunction( triggerFunction ) ) { + triggerFunction.apply( null, [].slice.call( args, 0 ) ); + } + } + + + /* + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + * Browser URL Parameters + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + */ + + function getBrowserUrlParameters() : boolean { + let show: boolean = false; + + if ( _configuration.browserUrlParametersEnabled ) { + const url: string = window.location.href; + const urlArguments: any = getBrowserUrlArguments( url ); + + if ( Is.defined( urlArguments.sjOrderId ) ) { + const orderId: number = parseInt( urlArguments.sjOrderId, 10 ); + + if ( !isNaN( orderId ) && orderId <= _groups[ _groups_Current ].keys.length - 1 ) { + _groups[ _groups_Current ].position = orderId; + } + } + + if ( Is.defined( urlArguments.sjShow ) ) { + show = urlArguments.sjShow === "true"; + } + } + + return show; + } + + function getBrowserUrlArguments( url: string ) : any { + const urlArguments: any = {}; + const urlDataParts: string[] = url.split( "?" ); + + if ( urlDataParts.length > 1 ) { + const parsedArgs: string[] = urlDataParts[ 1 ].split( "&" ); + const parsedArgsLength: number = parsedArgs.length; + + for ( let parsedArgsIndex: number = 0; parsedArgsIndex < parsedArgsLength; parsedArgsIndex++ ) { + const parsedArg: string[] = parsedArgs[ parsedArgsIndex ].split( "=" ); + + urlArguments[ parsedArg[ 0 ] ] = parsedArg[ 1 ]; + } + } + + return urlArguments; + } + + + /* + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + * Default Parameter/Option Handling + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + */ + + function getObjectFromString( objectString: any ) : StringToJson { + const result: StringToJson = { + parsed: true, + object: null + } as StringToJson; + + try { + if ( Is.definedString( objectString ) ) { + result.object = JSON.parse( objectString ); + } + + } catch ( e1: any ) { + try { + result.object = eval( "(" + objectString + ")" ); + + if ( Is.definedFunction( result.object ) ) { + result.object = result.object(); + } + + } catch ( e2: any ) { + if ( !_configuration.safeMode ) { + console.error( _configuration.objectErrorText!.replace( "{{error_1}}", e1.message ).replace( "{{error_2}}", e2.message ) ); + result.parsed = false; + } + + result.object = null; + } + } + + return result; + } + + + /* + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + * Public API Functions: Helpers: Managing Steps + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + */ + + function resetDialogPosition() : void { + if ( _public.isOpen() ) { + onDialogClose( false ); + + _groups[ _groups_Current ].position = 0; + } + } + + + /* + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + * Public API Functions: Helpers: Configuration + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + */ + + function buildDefaultConfiguration( newConfiguration: Configuration = {} ) : void { + _configuration = Data.getDefaultObject( newConfiguration, {} as Configuration ); + _configuration.safeMode = Data.getDefaultBoolean( _configuration.safeMode, true ); + _configuration.domElementTypes = Data.getDefaultStringOrArray( _configuration.domElementTypes, [ "*" ] ); + _configuration.showCloseButton = Data.getDefaultBoolean( _configuration.showCloseButton, true ); + _configuration.shortcutKeysEnabled = Data.getDefaultBoolean( _configuration.shortcutKeysEnabled, true ); + _configuration.showProgressDots = Data.getDefaultBoolean( _configuration.showProgressDots, true ); + _configuration.browserUrlParametersEnabled = Data.getDefaultBoolean( _configuration.browserUrlParametersEnabled, true ); + _configuration.showProgressDotNumbers = Data.getDefaultBoolean( _configuration.showProgressDotNumbers, false ); + _configuration.showButtons = Data.getDefaultBoolean( _configuration.showButtons, true ); + _configuration.showDoNotShowAgain = Data.getDefaultBoolean( _configuration.showDoNotShowAgain, false ); + _configuration.tooltipDelay = Data.getDefaultNumber( _configuration.tooltipDelay, 750 ); + _configuration.showProgressDotToolTips = Data.getDefaultBoolean( _configuration.showProgressDotToolTips, true ); + _configuration.closeDialogOnDisabledBackgroundClick = Data.getDefaultBoolean( _configuration.closeDialogOnDisabledBackgroundClick, false ); + _configuration.showProgressBar = Data.getDefaultBoolean( _configuration.showProgressBar, false ); + _configuration.scrollToElements = Data.getDefaultBoolean( _configuration.scrollToElements, false ); + _configuration.dialogMovingEnabled = Data.getDefaultBoolean( _configuration.dialogMovingEnabled, false ); + _configuration.showProgressBarText = Data.getDefaultBoolean( _configuration.showProgressBarText, false ); + + buildDefaultConfigurationStrings(); + buildDefaultConfigurationCustomTriggers(); + } + + function buildDefaultConfigurationStrings() : void { + _configuration.backButtonText = Data.getDefaultAnyString( _configuration.backButtonText, "Back" ); + _configuration.nextButtonText = Data.getDefaultAnyString( _configuration.nextButtonText, "Next" ); + _configuration.finishButtonText = Data.getDefaultAnyString( _configuration.finishButtonText, "Finish" ); + _configuration.closeButtonToolTipText = Data.getDefaultAnyString( _configuration.closeButtonToolTipText, "Close" ); + _configuration.doNotShowAgainText = Data.getDefaultAnyString( _configuration.doNotShowAgainText, "Do not show again" ); + _configuration.objectErrorText = Data.getDefaultAnyString( _configuration.objectErrorText, "Errors in object: {{error_1}}, {{error_2}}" ); + _configuration.attributeNotValidErrorText = Data.getDefaultAnyString( _configuration.attributeNotValidErrorText, "The attribute '{{attribute_name}}' is not a valid object." ); + _configuration.attributeNotSetErrorText = Data.getDefaultAnyString( _configuration.attributeNotSetErrorText, "The attribute '{{attribute_name}}' has not been set correctly." ); + _configuration.closeDialogConfirmationText = Data.getDefaultAnyString( _configuration.closeDialogConfirmationText, Char.empty ); + } + + function buildDefaultConfigurationCustomTriggers() : void { + _configuration.onDoNotShowAgainChange = Data.getDefaultFunction( _configuration.onDoNotShowAgainChange, null ); + } + + + /* + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + * Public API Functions: + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + */ + + const _public: PublicApi = { + /* + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + * Public API Functions: Show/Hide + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + */ + + start: function ( group: string = Char.empty ) : PublicApi { + if ( !_public.isOpen() ) { + _groups_Current = Data.getDefaultString( group, _groups_Default ); + + if ( _groups.hasOwnProperty( _groups_Current ) ) { + _groups[ _groups_Current ].position = 0; + + showDialogAndSetPosition(); + } + } + + return _public; + }, + + show: function ( group: string = Char.empty ) : PublicApi { + if ( !_public.isOpen() ) { + _groups_Current = Data.getDefaultString( group, _groups_Current ); + + if ( _groups.hasOwnProperty( _groups_Current ) ) { + if ( _groups[ _groups_Current ].position === _groups[ _groups_Current ].keys.length - 1 ) { + _groups[ _groups_Current ].position = 0; + } + + showDialogAndSetPosition(); + } + } + + return _public; + }, + + hide: function () : PublicApi { + if ( _public.isOpen() ) { + onDialogClose(); + } + + return _public; + }, + + isOpen: function () : boolean { + return Is.defined( _element_Dialog ) && _element_Dialog.style.display === "block"; + }, + + isComplete: function () : boolean { + return _groups[ _groups_Current ].position >= _groups[ _groups_Current ].keys.length - 1; + }, + + + /* + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + * Public API Functions: Managing Steps + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + */ + + addDocumentSteps: function () : PublicApi { + getElements(); + + return _public; + }, + + addStep: function ( element: HTMLElement, options: BindingOptions ) : PublicApi { + if ( Is.definedObject( element ) && Is.definedObject( options ) ) { + setupElement( element, buildAttributeOptions( options ) ); + + _groups[ _groups_Current ].keys.sort(); + + resetDialogPosition(); + } + + return _public; + }, + + removeStep: function ( element: HTMLElement ) : PublicApi { + if ( Is.definedObject( element ) ) { + let removed: boolean = false; + + for ( let group in _groups ) { + if ( _groups.hasOwnProperty( group ) ) { + for ( let order in _groups[ group ].json ) { + if ( _groups[ group ].json.hasOwnProperty( order ) ) { + const bindingOptions: BindingOptions = _groups[ group ].json[ order ]; + + if ( bindingOptions._currentView.element === element ) { + fireCustomTriggerEvent( bindingOptions.events!.onRemoveStep, bindingOptions._currentView.element ); + + _groups[ group ].keys.splice( _groups[ group ].keys.indexOf( bindingOptions.order! ), 1 ); + + delete _groups[ group ].json[ bindingOptions.order! ]; + + _groups[ group ].keys.sort(); + + removed = true; + break; + } + } + } + } + } + + if ( !removed ) { + DomElement.clearElementsByClassName( element, "journey-js-hint" ); + } else { + resetDialogPosition(); + } + } + + return _public; + }, + + clearSteps: function ( group: string = Char.empty ) : PublicApi { + resetDialogPosition(); + + for ( let groupName in _groups ) { + if ( _groups.hasOwnProperty( groupName ) ) { + if ( !Is.definedString( group ) || group === groupName ) { + for ( let order in _groups[ groupName ].json ) { + if ( _groups[ groupName ].json.hasOwnProperty( order ) ) { + const bindingOptions: BindingOptions = _groups[ groupName ].json[ order ]; + + fireCustomTriggerEvent( bindingOptions.events!.onRemoveStep, bindingOptions._currentView.element ); + } + } + } + } + } + + if ( Is.definedString( group ) ) { + if ( _groups.hasOwnProperty( group ) ) { + delete _groups[ group ]; + } + + } else { + _groups = {} as Groups; + } + + if ( !Is.definedString( group ) || group === _groups_Default ) { + setupDefaultGroup( _groups ); + } + + return _public; + }, + + clearHints: function () : PublicApi { + DomElement.clearElementsByClassName( document.body, "journey-js-hint" ); + + return _public; + }, + + reverseStepOrder: function () : PublicApi { + _groups[ _groups_Current ].keys.reverse(); + + resetDialogPosition(); + + return _public; + }, + + + /* + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + * Public API Functions: Configuration + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + */ + + setConfiguration: function ( newConfiguration: any ) : PublicApi { + if ( Is.definedObject( newConfiguration ) ) { + let configurationHasChanged: boolean = false; + const newInternalConfiguration: any = _configuration; + + for ( let propertyName in newConfiguration ) { + if ( newConfiguration.hasOwnProperty( propertyName ) && _configuration.hasOwnProperty( propertyName ) && newInternalConfiguration[ propertyName ] !== newConfiguration[ propertyName ] ) { + newInternalConfiguration[ propertyName ] = newConfiguration[ propertyName ]; + configurationHasChanged = true; + } + } + + if ( configurationHasChanged ) { + buildDefaultConfiguration( newInternalConfiguration ); + } + } + + return _public; + }, + + + /* + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + * Public API Functions: Additional Data + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + */ + + getVersion: function (): string { + return "2.0.0"; + } + }; + + + /* + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + * Initialize Journey.js + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + */ + + ( () => { + buildDefaultConfiguration(); + + document.addEventListener( "DOMContentLoaded", () => { + setupDefaultGroup(); + renderDisabledBackground(); + renderDialog(); + renderToolTip(); + getElements(); + buildDocumentEvents(); + + if ( getBrowserUrlParameters() ) { + _public.show(); + } + } ); + + if ( !Is.defined( window.$journey ) ) { + window.$journey = _public; + } + } ) (); +} ) (); \ No newline at end of file diff --git a/src/ts/api.ts b/src/ts/api.ts new file mode 100644 index 0000000..70ef6ae --- /dev/null +++ b/src/ts/api.ts @@ -0,0 +1,213 @@ +/** + * Journey.js + * + * A lightweight, easy-to-use JavaScript library to create interactive, customizable, accessible guided tours across your websites or web apps! + * + * @file journey.js + * @version v2.0.0 + * @author Bunoon + * @license MIT License + * @copyright Bunoon 2024 + */ + + +import { type Configuration, type BindingOptions } from "./type"; + + +export type PublicApi = { + /* + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + * Public API Functions: Show/Hide + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + */ + + /** + * start(). + * + * Starts the Journey from the beginning. + * + * @public + * @fires onStart + * + * @param {string} [group] States the group of steps you want to start the journey for (defaults to "default"). + * + * @returns {PublicApi} The Journey.js class instance. + */ + start: ( group?: string ) => PublicApi; + + /** + * show(). + * + * Shows the Journey.js dialog for the element in the last known position (defaults to the start). + * + * @public + * @fires onOpen + * + * @param {string} [group] States the group of steps you want to show the dialog for (defaults to the last group used). + * + * @returns {PublicApi} The Journey.js class instance. + */ + show: ( group?: string ) => PublicApi; + + /** + * hide(). + * + * Hides the Journey.js dialog. + * + * @public + * @fires onClose + * + * @returns {PublicApi} The Journey.js class instance. + */ + hide: () => PublicApi; + + /** + * isOpen(). + * + * Returns a flag that states if the dialog is opened. + * + * @public + * + * @returns {boolean} The flag that states if the dialog is open. + */ + isOpen: () => boolean; + + /** + * isComplete(). + * + * Returns a flag that states if the full journey has been completed. + * + * @public + * + * @returns {boolean} The flag that states if the full journey has been completed. + */ + isComplete: () => boolean; + + + /* + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + * Public API Functions: Managing Steps + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + */ + + /** + * addDocumentSteps(). + * + * Finds all new elements that contain the binding attribute and adds them as new steps. + * + * @public + * @fires onAddStep + * + * @returns {PublicApi} The Journey.js class instance. + */ + addDocumentSteps: () => PublicApi; + + /** + * addStep(). + * + * Adds a new step to the journey for a specific element. + * + * @public + * @fires onAddStep + * + * @param {Object} element The element that should be added to the journey. + * @param {Object} options The options to use for this step in the journey (refer to "Binding Options" documentation for properties). + * + * @returns {PublicApi} The Journey.js class instance. + */ + addStep: ( element: HTMLElement, options: BindingOptions ) => PublicApi; + + /** + * removeStep(). + * + * Removes a step from the journey, or a hint. + * + * @public + * @fires onRemoveStep + * + * @param {Object} element The element that should be removed. + * + * @returns {PublicApi} The Journey.js class instance. + */ + removeStep: ( element: HTMLElement ) => PublicApi; + + /** + * clearSteps(). + * + * Removes all the steps from the journey. + * + * @public + * @fires onRemoveStep + * + * @param {string} [group] States the group of steps you want to remove (defaults to all groups). + * + * @returns {PublicApi} The Journey.js class instance. + */ + clearSteps: ( group?: string ) => PublicApi; + + /** + * clearHints(). + * + * Removes all the hints. + * + * @public + * + * @returns {PublicApi} The Journey.js class instance. + */ + clearHints: () => PublicApi; + + /** + * reverseStepOrder(). + * + * Reverses the order the steps in the journey should in. + * + * @public + * + * @returns {PublicApi} The Journey.js class instance. + */ + reverseStepOrder: () => PublicApi; + + + /* + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + * Public API Functions: Configuration + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + */ + + /** + * setConfiguration(). + * + * Sets the specific configuration options that should be used. + * + * @public + * + * @param {Object} newConfiguration All the configuration options that should be set (refer to "Configuration Options" documentation for properties). + * + * @returns {PublicApi} The Journey.js class instance. + */ + setConfiguration: ( newConfiguration: Configuration ) => PublicApi; + + + /* + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + * Public API Functions: Additional Data + * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + */ + + /** + * getVersion(). + * + * Returns the version of Journey.js. + * + * @public + * + * @returns {string} The version number. + */ + getVersion: () => string; +}; + +declare global { + interface Window { + $journey: PublicApi; + } +} \ No newline at end of file diff --git a/src/journey.export.js b/src/ts/constant.ts similarity index 63% rename from src/journey.export.js rename to src/ts/constant.ts index 82e1a24..6e94cb2 100644 --- a/src/journey.export.js +++ b/src/ts/constant.ts @@ -4,18 +4,13 @@ * A lightweight, easy-to-use JavaScript library to create interactive, customizable, accessible guided tours across your websites or web apps! * * @file journey.js - * @version v1.7.2 + * @version v2.0.0 * @author Bunoon * @license MIT License * @copyright Bunoon 2024 */ -var journey = { - js: function() { - return window.$journey; - } -}; -Object.assign( window, { journey } ); - -export { journey }; \ No newline at end of file +export namespace Constants { + export const JOURNEY_JS_ATTRIBUTE_NAME = "data-journey-js"; +} \ No newline at end of file diff --git a/src/ts/data.ts b/src/ts/data.ts new file mode 100644 index 0000000..91e1094 --- /dev/null +++ b/src/ts/data.ts @@ -0,0 +1,65 @@ +/** + * Journey.js + * + * A lightweight, easy-to-use JavaScript library to create interactive, customizable, accessible guided tours across your websites or web apps! + * + * @file journey.js + * @version v2.0.0 + * @author Bunoon + * @license MIT License + * @copyright Bunoon 2024 + */ + + +import { Char } from "./enum"; +import { Is } from "./is"; + + +export namespace Data { + export function getDefaultAnyString( value: any, defaultValue: string ) : string { + return typeof value === "string" ? value : defaultValue; + } + + export function getDefaultString( value: any, defaultValue: string ) : string { + return Is.definedString( value ) ? value : defaultValue; + } + + export function getDefaultBoolean( value: any, defaultValue: boolean ) : boolean { + return Is.definedBoolean( value ) ? value : defaultValue; + } + + export function getDefaultNumber( value: any, defaultValue: number ) : number { + return Is.definedNumber( value ) ? value : defaultValue; + } + + export function getDefaultFunction( value: any, defaultValue: any ) : any { + return Is.definedFunction( value ) ? value : defaultValue; + } + + export function getDefaultObject( value: any, defaultValue: any ) : any { + return Is.definedObject( value ) ? value : defaultValue; + } + + export function getDefaultArray( value: any, defaultValue: any[] ) : any[] { + return Is.definedArray( value ) ? value : defaultValue; + } + + export function getDefaultStringOrArray( value: any, defaultValue: any[] ) : any[] { + let result: any[] = defaultValue; + + if ( Is.definedString( value ) ) { + const values: string[] = value.toString().split( Char.space ); + + if ( values.length === 0 ) { + value = defaultValue; + } else { + result = values; + } + + } else { + result = getDefaultArray( value, defaultValue ); + } + + return result; + } +} \ No newline at end of file diff --git a/src/ts/dom.ts b/src/ts/dom.ts new file mode 100644 index 0000000..689e6b6 --- /dev/null +++ b/src/ts/dom.ts @@ -0,0 +1,170 @@ +/** + * Journey.js + * + * A lightweight, easy-to-use JavaScript library to create interactive, customizable, accessible guided tours across your websites or web apps! + * + * @file journey.js + * @version v2.0.0 + * @author Bunoon + * @license MIT License + * @copyright Bunoon 2024 + */ + + +import { Char } from "./enum"; +import { Is } from "./is"; +import { type Position } from "./type"; + + +export namespace DomElement { + export function create( type: string, className: string = Char.empty ) : HTMLElement { + const nodeType: string = type.toLowerCase(); + const isText: boolean = nodeType === "text"; + + let result: any = isText ? document.createTextNode( Char.empty ) : document.createElement( nodeType ); + + if ( Is.defined( className ) ) { + result.className = className; + } + + return result; + } + + export function getOffset( element: HTMLElement ) : Position { + const result: Position = { + left: 0, + top: 0 + } as Position; + + while ( element && !isNaN( element.offsetLeft ) && !isNaN( element.offsetTop ) ) { + result.left += element.offsetLeft - element.scrollLeft; + result.top += element.offsetTop - element.scrollTop; + + element = element.offsetParent as HTMLElement; + } + + return result; + } + + export function getScrollPosition() : Position { + const documentElement: HTMLElement = document.documentElement; + + const result: Position = { + left: documentElement.scrollLeft - ( documentElement.clientLeft || 0 ), + top: documentElement.scrollTop - ( documentElement.clientTop || 0 ) + } as Position; + + return result; + } + + export function getStyleValueByName( element: any, stylePropertyName: string ) : any { + let value: any = null; + + if ( document.defaultView!.getComputedStyle! ) { + value = document.defaultView!.getComputedStyle( element, null ).getPropertyValue( stylePropertyName ); + } else if ( element.currentStyle ) { + value = element.currentStyle[ stylePropertyName ]; + } + + return value; + } + + export function addNode( parent: HTMLElement, node: HTMLElement ) : void { + try { + if ( !parent.contains( node ) ) { + parent.appendChild( node ); + } + } catch ( e: any ) { + console.warn( e.message ); + } + } + + export function removeNode( parent: HTMLElement, node: HTMLElement ) : void { + try { + if ( parent.contains( node ) ) { + parent.removeChild( node ); + } + } catch ( e: any ) { + console.warn( e.message ); + } + } + + export function cancelBubble( e: any ) : void { + e.preventDefault(); + e.cancelBubble = true; + } + + export function showElementAtMousePosition( e: MouseEvent, element: HTMLElement ) : void { + let left: number = e.pageX; + let top: number = e.pageY; + const scrollPosition: Position = getScrollPosition(); + + element.style.display = "block"; + + if ( left + element.offsetWidth > window.innerWidth ) { + left -= element.offsetWidth; + } else { + left++; + } + + if ( top + element.offsetHeight > window.innerHeight ) { + top -= element.offsetHeight; + } else { + top++; + } + + if ( left < scrollPosition.left ) { + left = e.pageX + 1; + } + + if ( top < scrollPosition.top ) { + top = e.pageY + 1; + } + + element.style.left = left + "px"; + element.style.top = top + "px"; + } + + export function showElementBasedOnCondition( element: HTMLElement, condition: boolean ) : void { + if ( condition ) { + if ( element.style.display !== "block" ) { + element.style.display = "block"; + } + + } else { + if ( element.style.display !== "none" ) { + element.style.display = "none"; + } + } + } + + export function createCheckBox( container: HTMLElement, labelText: string ) : HTMLInputElement { + const lineContainer: HTMLElement = create( "div" ); + const label: HTMLElement = create( "label", "checkbox" ); + const input: HTMLInputElement = create( "input" ) as HTMLInputElement; + + container.appendChild( lineContainer ); + lineContainer.appendChild( label ); + label.appendChild( input ); + + input.type = "checkbox"; + + const checkMark: HTMLElement = create( "span", "check-mark" ); + const text: HTMLElement = create( "span", "text" ); + + text.innerHTML = labelText; + + label.appendChild( checkMark ); + label.appendChild( text ); + + return input; + } + + export function clearElementsByClassName( container: HTMLElement, className: string ) : void { + let elements: HTMLCollectionOf = container.getElementsByClassName( className ); + + while ( elements[ 0 ] ) { + elements[ 0 ].parentNode!.removeChild( elements[ 0 ] ); + } + } +} \ No newline at end of file diff --git a/src/ts/enum.ts b/src/ts/enum.ts new file mode 100644 index 0000000..cf5a117 --- /dev/null +++ b/src/ts/enum.ts @@ -0,0 +1,25 @@ +/** + * Journey.js + * + * A lightweight, easy-to-use JavaScript library to create interactive, customizable, accessible guided tours across your websites or web apps! + * + * @file journey.js + * @version v2.0.0 + * @author Bunoon + * @license MIT License + * @copyright Bunoon 2024 + */ + + +export const enum Char { + empty = "", + space = " ", +} + +export const enum KeyCode { + escape = "Escape", + left = "ArrowLeft", + up = "ArrowUp", + right = "ArrowRight", + down = "ArrowDown", +} \ No newline at end of file diff --git a/src/ts/is.ts b/src/ts/is.ts new file mode 100644 index 0000000..d59e62f --- /dev/null +++ b/src/ts/is.ts @@ -0,0 +1,45 @@ +/** + * Journey.js + * + * A lightweight, easy-to-use JavaScript library to create interactive, customizable, accessible guided tours across your websites or web apps! + * + * @file journey.js + * @version v2.0.0 + * @author Bunoon + * @license MIT License + * @copyright Bunoon 2024 + */ + + +import { Char } from "./enum"; + + +export namespace Is { + export function defined( value: any ) : boolean { + return value !== null && value !== undefined && value !== Char.empty; + } + + export function definedObject( object: any ) : boolean { + return defined( object ) && typeof object === "object"; + } + + export function definedBoolean( object: any ) : boolean { + return defined( object ) && typeof object === "boolean"; + } + + export function definedString( object: any ) : boolean { + return defined( object ) && typeof object === "string"; + } + + export function definedFunction( object: any ) : boolean { + return defined( object ) && typeof object === "function"; + } + + export function definedNumber( object: any ) : boolean { + return defined( object ) && typeof object === "number"; + } + + export function definedArray( object: any ) : boolean { + return definedObject( object ) && object instanceof Array; + } +} \ No newline at end of file diff --git a/src/ts/type.ts b/src/ts/type.ts new file mode 100644 index 0000000..ed54804 --- /dev/null +++ b/src/ts/type.ts @@ -0,0 +1,79 @@ +/** + * Journey.js + * + * A lightweight, easy-to-use JavaScript library to create interactive, customizable, accessible guided tours across your websites or web apps! + * + * @file journey.js + * @version v2.0.0 + * @author Bunoon + * @license MIT License + * @copyright Bunoon 2024 + */ + + +export type Position = { + left: number; + top: number; +}; + +export type Configuration = { + safeMode?: boolean; + domElementTypes?: string[] | string; + showCloseButton?: boolean; + shortcutKeysEnabled?: boolean; + showProgressDots?: boolean; + browserUrlParametersEnabled?: boolean; + showProgressDotNumbers?: boolean; + showButtons?: boolean; + showDoNotShowAgain?: boolean; + tooltipDelay?: number; + showProgressDotToolTips?: boolean; + closeDialogOnDisabledBackgroundClick?: boolean; + showProgressBar?: boolean; + scrollToElements?: boolean; + dialogMovingEnabled?: boolean; + showProgressBarText?: boolean; + backButtonText?: string; + nextButtonText?: string; + finishButtonText?: string; + closeButtonToolTipText?: string; + doNotShowAgainText?: string; + objectErrorText?: string; + attributeNotValidErrorText?: string; + attributeNotSetErrorText?: string; + closeDialogConfirmationText?: string; + onDoNotShowAgainChange?: ( flag: boolean ) => void; +}; + +export type BindingOptions = { + _currentView: CurrentView; + order?: number; + attach?: boolean; + sendClick: boolean; + alignTop: boolean; + alignRight: boolean; + isHint: boolean; + alignHintToClickPosition: boolean; + showDisabledBackground: boolean; + removeHintWhenViewed: boolean; + group?: string; + title?: string; + description?: string; + tooltip?: string; + events?: Events; +}; + +export type CurrentView = { + element: HTMLElement; +}; + +export type Events = { + onEnter?: ( element: HTMLElement ) => void; + onLeave?: ( element: HTMLElement ) => void; + onClose?: ( element: HTMLElement ) => void; + onFinish?: ( element: HTMLElement ) => void; + onOpen?: ( element: HTMLElement ) => void; + onStart?: ( element: HTMLElement ) => void; + onAddStep?: ( element: HTMLElement ) => void; + onRemoveStep?: ( element: HTMLElement ) => void; +}; \ No newline at end of file diff --git a/test/dist/journey.js.basic.html b/test/dist/journey.js.basic.html deleted file mode 100644 index e36af5e..0000000 --- a/test/dist/journey.js.basic.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - Journey.js - Basic - - - - - - -
-

Journey.js - Basic

-

This is a basic example of how to use Journey.js to guide you through a website.

-
- -
- - - - - -
-
- -

Show/Hide:

- -
- - - - \ No newline at end of file diff --git a/test/dist/journey.js.bootstrap.html b/test/dist/journey.js.bootstrap.html deleted file mode 100644 index d47a8af..0000000 --- a/test/dist/journey.js.bootstrap.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - Journey.js - Bootstrap - - - - - - - -
-

Journey.js - Bootstrap

-

This is a basic example of how to use Journey.js to guide you through a website, alongside Bootstrap.

-
- -
-

Journey Step Buttons:

- - - - - -
- -

Journey Step Buttons (in a separate journey group):

- - - -
- -
-

Show/Hide:

- - - - - - -
- -

Manage Steps:

- - - - - - -
- -

Configuration:

- -
- -

Additional Data:

- -
- - - - \ No newline at end of file diff --git a/test/dist/journey.js.close-confirmation.html b/test/dist/journey.js.close-confirmation.html deleted file mode 100644 index af908ad..0000000 --- a/test/dist/journey.js.close-confirmation.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - Journey.js - Close Confirmation - - - - - - -
-

Journey.js - Close Confirmation

-

This is a basic example of how to use Journey.js to guide you through a website, with a close confirmation message used.

-
- -
- - - - - -
-
- -

Show/Hide:

- -
- - - - \ No newline at end of file diff --git a/test/dist/journey.js.min.html b/test/dist/journey.js.min.html deleted file mode 100644 index 439821e..0000000 --- a/test/dist/journey.js.min.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - Journey.js - Minimized - - - - - - -
-

Journey.js - Minimized

-

This is a basic example of how to use Journey.js to guide you through a website.

-
- -
- - - - - -
- - - - \ No newline at end of file diff --git a/test/dist/journey.js.no-steps.html b/test/dist/journey.js.no-steps.html deleted file mode 100644 index 19ab19a..0000000 --- a/test/dist/journey.js.no-steps.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - Journey.js - No Steps - - - - - - -
-

Journey.js - No Steps

-

This is a basic example of how to use Journey.js to guide you through a website, but with no steps currently available.

-
- -
- - - - - -
-
- -

Show/Hide:

- -
- - - - \ No newline at end of file diff --git a/test/dist/journey.js.translations.html b/test/dist/journey.js.translations.html deleted file mode 100644 index 0d2317e..0000000 --- a/test/dist/journey.js.translations.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - Journey.js - Translations - - - - - - - -
-

Journey.js - Translations

-

This is a basic example of how to use Journey.js to guide you through a website using translations.

-
- -
- - - - - -
-
- -

Show/Hide:

- -
- - - - \ No newline at end of file diff --git a/test/journey.js.basic.html b/test/journey.js.basic.html new file mode 100644 index 0000000..337ae9f --- /dev/null +++ b/test/journey.js.basic.html @@ -0,0 +1,36 @@ + + + + + + Journey.js - Basic + + + + + + +
+

Journey.js - Basic

+

This is a basic example of how to use Journey.js to guide you through a website.

+
+ +
+ + + + + +
+
+ +

Show:

+ +
+ + + + \ No newline at end of file diff --git a/test/src/journey.js.bootstrap.html b/test/journey.js.bootstrap.html similarity index 97% rename from test/src/journey.js.bootstrap.html rename to test/journey.js.bootstrap.html index d3bdae8..74fd917 100644 --- a/test/src/journey.js.bootstrap.html +++ b/test/journey.js.bootstrap.html @@ -4,10 +4,10 @@ Journey.js - Bootstrap - - + + - + diff --git a/test/journey.js.close-confirmation.html b/test/journey.js.close-confirmation.html new file mode 100644 index 0000000..752763b --- /dev/null +++ b/test/journey.js.close-confirmation.html @@ -0,0 +1,41 @@ + + + + + + Journey.js - Close Confirmation + + + + + + +
+

Journey.js - Close Confirmation

+

This is a basic example of how to use Journey.js to guide you through a website, with a close confirmation message used.

+
+ +
+ + + + + +
+
+ +

Show:

+ +
+ + + + \ No newline at end of file diff --git a/test/journey.js.min.html b/test/journey.js.min.html new file mode 100644 index 0000000..0e29da3 --- /dev/null +++ b/test/journey.js.min.html @@ -0,0 +1,36 @@ + + + + + + Journey.js - Minimized + + + + + + +
+

Journey.js - Minimized

+

This is a basic example of how to use Journey.js to guide you through a website.

+
+ +
+ + + + + +
+
+ +

Show:

+ +
+ + + + \ No newline at end of file diff --git a/test/src/journey.js.no-steps.html b/test/journey.js.no-steps.html similarity index 55% rename from test/src/journey.js.no-steps.html rename to test/journey.js.no-steps.html index f40b7a7..c010205 100644 --- a/test/src/journey.js.no-steps.html +++ b/test/journey.js.no-steps.html @@ -4,9 +4,9 @@ Journey.js - No Steps - - - + + + @@ -16,15 +16,15 @@

Journey.js - No Steps

- - - - - + + + + +

-

Show/Hide:

+

Show:

diff --git a/test/journey.js.translations.html b/test/journey.js.translations.html new file mode 100644 index 0000000..b7bb2a2 --- /dev/null +++ b/test/journey.js.translations.html @@ -0,0 +1,37 @@ + + + + + + Journey.js - Translations + + + + + + + +
+

Journey.js - Translations

+

This is a basic example of how to use Journey.js to guide you through a website using translations.

+
+ +
+ + + + + +
+
+ +

Show:

+ +
+ + + + \ No newline at end of file diff --git a/test/src/journey.js.basic.html b/test/src/journey.js.basic.html deleted file mode 100644 index 4b01e89..0000000 --- a/test/src/journey.js.basic.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - Journey.js - Basic - - - - - - -
-

Journey.js - Basic

-

This is a basic example of how to use Journey.js to guide you through a website.

-
- -
- - - - - -
-
- -

Show/Hide:

- -
- - - - \ No newline at end of file diff --git a/test/src/journey.js.close-confirmation.html b/test/src/journey.js.close-confirmation.html deleted file mode 100644 index 7b5753b..0000000 --- a/test/src/journey.js.close-confirmation.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - Journey.js - Close Confirmation - - - - - - -
-

Journey.js - Close Confirmation

-

This is a basic example of how to use Journey.js to guide you through a website, with a close confirmation message used.

-
- -
- - - - - -
-
- -

Show/Hide:

- -
- - - - \ No newline at end of file diff --git a/test/src/journey.js.translations.html b/test/src/journey.js.translations.html deleted file mode 100644 index 9a9e305..0000000 --- a/test/src/journey.js.translations.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - Journey.js - Translations - - - - - - - -
-

Journey.js - Translations

-

This is a basic example of how to use Journey.js to guide you through a website using translations..

-
- -
- - - - - -
-
- -

Show/Hide:

- -
- - - - \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..363f865 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "target": "ES2016", + "module": "ESNext", + "moduleResolution": "node", + "declaration": true, + "outDir": "./build", + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "skipLibCheck": true, + "removeComments": true, + "sourceMap": true, + "strict": true + }, + "include": [ + "src/**/*.ts" + ], + "exclude": [ + "node_modules", + "dist", + "**/*.test.ts" + ] +} \ No newline at end of file diff --git a/tsup.build.config.ts b/tsup.build.config.ts new file mode 100644 index 0000000..5b6e1d4 --- /dev/null +++ b/tsup.build.config.ts @@ -0,0 +1,28 @@ +import { defineConfig } from "tsup"; + + +export default defineConfig( [ + { + entry: [ + "src/journey.ts" + ], + platform: "neutral", + format: [ + "cjs" + ], + outDir: "./dist", + dts: true, + splitting: false, + sourcemap: true, + clean: false, + minify: "terser", + terserOptions: { + compress: false, + sourceMap: true, + format: { + beautify: true, + comments: false + } + } + } +] ); \ No newline at end of file diff --git a/tsup.build.esm.config.ts b/tsup.build.esm.config.ts new file mode 100644 index 0000000..e850b81 --- /dev/null +++ b/tsup.build.esm.config.ts @@ -0,0 +1,33 @@ +import { defineConfig } from "tsup"; + + +export default defineConfig( [ + { + entry: [ + "src/journey.ts" + ], + platform: "neutral", + outExtension({ format }) { + return { + js: `.${format}.js`, + }; + }, + format: [ + "esm" + ], + outDir: "./dist", + dts: true, + splitting: false, + sourcemap: true, + clean: false, + minify: "terser", + terserOptions: { + compress: false, + sourceMap: true, + format: { + beautify: true, + comments: false + } + } + } +] ); \ No newline at end of file diff --git a/tsup.build.min.config.ts b/tsup.build.min.config.ts new file mode 100644 index 0000000..d5f0f30 --- /dev/null +++ b/tsup.build.min.config.ts @@ -0,0 +1,33 @@ +import { defineConfig } from "tsup"; + + +export default defineConfig( [ + { + entry: [ + "src/journey.ts" + ], + outExtension({ }) { + return { + js: ".min.js", + }; + }, + platform: "neutral", + format: [ + "cjs" + ], + outDir: "./dist", + dts: false, + splitting: false, + sourcemap: false, + clean: false, + minify: "terser", + terserOptions: { + compress: true, + sourceMap: false, + format: { + comments: false, + shorthand: true + } + } + } +] ); \ No newline at end of file