@dimanoid/ngx-dm-tour
Version:
1 lines • 90 kB
Source Map (JSON)
{"version":3,"file":"dimanoid-ngx-dm-tour.umd.js","sources":["../../../node_modules/tslib/tslib.es6.js","ng://@dimanoid/ngx-dm-tour/lib/models/dm-tour-config.ts","ng://@dimanoid/ngx-dm-tour/lib/models/dm-tour-section.ts","ng://@dimanoid/ngx-dm-tour/lib/models/dm-tour-control.ts","ng://@dimanoid/ngx-dm-tour/lib/utils/coercions.ts","ng://@dimanoid/ngx-dm-tour/lib/utils/logs.ts","ng://@dimanoid/ngx-dm-tour/lib/utils/elems.ts","ng://@dimanoid/ngx-dm-tour/lib/dm-tour.styles.ts","ng://@dimanoid/ngx-dm-tour/lib/dm-tour.service.ts","ng://@dimanoid/ngx-dm-tour/lib/dm-tour.directive.ts","ng://@dimanoid/ngx-dm-tour/lib/dm-tour.module.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","import { InjectionToken } from '@angular/core';\n\nexport type DmTourShapeType = 'auto' | 'circle' | 'square';\n\nexport interface IDmTourConfig {\n rootPath?: string;\n loadIndexOnStart?: boolean;\n loaderHtml?: string;\n defaultShape?: DmTourShapeType;\n customCssClass?: string;\n debug?: number;\n}\n\nexport class DmTourConfig implements IDmTourConfig {\n rootPath = 'assets/help';\n loadIndexOnStart = true;\n loaderHtml = `\n <span style=\"color: steelblue;\n text-shadow: 0 0 10px white, 0 0 10px white, 0 0 20px white, 0 0 20px white, 0 0 30px white, 0 0 30px white;\n margin: 0;\n position: absolute;\n top: 50%;\n left: 50%;\n font-weight: bold;\n font-size: 30px;\n transform: translate(-50%, -50%);\"\n >\n Loading...\n </span>\n `;\n defaultShape: DmTourShapeType = 'auto';\n customCssClass: string;\n debug: number = 0;\n\n constructor(json?: IDmTourConfig) {\n this.apply(json);\n }\n\n apply(json?: IDmTourConfig): DmTourConfig {\n if (json) {\n for (const fn of Object.keys(json)) {\n if (json[fn] !== undefined) {\n this[fn] = json[fn];\n }\n }\n }\n return this;\n }\n}\n\nexport const DM_TOUR_CONF = new InjectionToken<IDmTourConfig>('ngx-dm-tour-config');\n","export interface DmTourSection {\n id: string;\n title: string;\n html?: string;\n controlsLoaded?: boolean;\n}\n","export interface DmTourControl {\n id: string;\n children?: DmTourControl[];\n text?: string;\n el?: Element | string;\n shape?: 'circle' | 'square';\n pos?: 'auto'\n | 'top-left' | 'top' | 'top-right'\n | 'bottom-left' | 'bottom' | 'bottom-right'\n | 'left-top' | 'left' | 'left-bottom'\n | 'right-top' | 'right' | 'right-bottom';\n}\n","function _isNumberValue(value: any): boolean {\n return !isNaN(parseFloat(value as any)) && !isNaN(Number(value));\n}\n\nfunction coerceCssPixelValue(value: any): string {\n if (value == null) {\n return '';\n }\n return typeof value === 'string' ? value : `${value}px`;\n}\n\nexport function toBoolean(value: boolean | string): boolean {\n return value != null && `${value}` !== 'false';\n}\n\nexport function toNumber(value: number | string): number;\nexport function toNumber<D>(value: number | string, fallback: D): number | D;\nexport function toNumber(value: number | string, fallbackValue: number = 0): number {\n return _isNumberValue(value) ? Number(value) : fallbackValue;\n}\n\nexport function toCssPixel(value: number | string): string {\n return coerceCssPixelValue(value);\n}\n\nfunction propDecoratorFactory<T, D>(name: string, fallback: (v: T) => D): (target: any, propName: string) => void {\n function propDecorator(target: any, propName: string): void {\n const privatePropName = `$$__${propName}`;\n\n if (Object.prototype.hasOwnProperty.call(target, privatePropName)) {\n console.warn(`The prop \"${privatePropName}\" is already exist, it will be overrided by ${name} decorator.`);\n }\n\n Object.defineProperty(target, privatePropName, {\n configurable: true,\n writable: true\n });\n\n Object.defineProperty(target, propName, {\n get(): string {\n return this[privatePropName];\n },\n set(value: T): void {\n this[privatePropName] = fallback(value);\n }\n });\n }\n\n return propDecorator;\n}\n\nexport function InputBoolean(): any {\n return propDecoratorFactory('InputBoolean', toBoolean);\n}\n\nexport function InputCssPixel(): any {\n return propDecoratorFactory('InputCssPixel', toCssPixel);\n}\n\nexport function InputNumber(): any {\n return propDecoratorFactory('InputNumber', toNumber);\n}\n","// tslint:disable: no-console\nexport const _D = console.debug;\nexport const _L = console.log;\nexport const _I = console.info;\nexport const _W = console.warn;\nexport const _E = console.error;\nexport const _tS = console.time;\nexport const _tL = (console as any).timeLog ? (console as any).timeLog : console.log;\nexport const _tE = console.timeEnd;\n","export function isElemVisible(elem: HTMLElement): boolean {\n if (!(!!elem && !!(elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length))) {\n return false;\n }\n const { top, left, height, width } = elem.getBoundingClientRect();\n let el: any = elem.parentNode;\n do {\n const rect = el.getBoundingClientRect();\n if (rect.height > 0 && rect.width > 0) {\n if (\n (top <= rect.bottom === false)\n || ((top + height) <= rect.top)\n || (left <= rect.right === false)\n || ((left + width) <= rect.left)\n ) {\n return false;\n }\n }\n el = el.parentNode;\n } while (el != document.body);\n return top <= document.documentElement.clientHeight && left <= document.documentElement.clientWidth;\n}\n","export const GLOBAL_STYLES = `\n #ngxDmTourRoot,\n #ngxDmTourLoading,\n #ngxDmTourBackdrop,\n #ngxDmTourDialogContainer {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n overflow: hidden;\n }\n #ngxDmTourLoading {\n background-color: transparent;\n transition: background-color .5s;\n }\n #ngxDmTourBackdrop {\n opacity: 0;\n transition: opacity .5s;\n }\n #ngxDmTourRoot.ngx-dm-tour-show #ngxDmTourBackdrop {\n opacity: var(--ngx-dm-tour-backdrop-opacity, .3);\n }\n #ngxDmTourRoot.ngx-dm-tour-show #ngxDmTourDialog {\n opacity: 1;\n }\n #ngxDmTourRoot.ngx-dm-tour-show .ngx-dm-tour-text {\n opacity: 1;\n }\n #ngxDmTourBackdrop.ngx-dm-tour-dialog {\n background-color: var(--ngx-dm-tour-backdrop-color, black);\n }\n #ngxDmTourDialogContainer {\n justify-content: center;\n align-items: center;\n display: flex;\n overflow: auto;\n }\n #ngxDmTourDialog {\n transition: opacity .5s;\n opacity: 0;\n min-width: 800px;\n min-height: 600px;\n background-color: white;\n box-shadow: 0 0 10px rgba(0,153,228,.5);\n display: flex;\n flex-direction: column;\n overflow: hidden;\n padding: 10px 0;\n position: relative;\n }\n #ngxDmTourDialogTitle {\n color: #0099e4;\n padding: 0 16px 8px;\n font-weight: bold;\n font-size: 1.5em;\n }\n #ngxDmTourDialogDesc {\n position: relative;\n display: flex;\n flex: 1;\n flex-basis: 1e-9px;\n }\n #ngxDmTourDialogDescInner {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n overflow: auto;\n padding: 10px;\n }\n #ngxDmTourDialogFooter {\n padding: 8px 8px 0 8px;\n text-align: right;\n margin-top: 2px;\n }\n .ngx-dm-tour-button {\n transition: all .15s;\n height: 26px;\n line-height: 1.5;\n position: relative;\n display: inline-block;\n font-weight: 400;\n text-align: center;\n border: 1px solid #d9d9d9;\n cursor: pointer;\n padding: 0 8px;\n font-size: 14px;\n color: white;\n background-color: #0099e4;\n border-color: #1890ff;\n box-shadow: 0 2px 0 rgba(0,0,0,.045);\n }\n .ngx-dm-tour-button:hover {\n box-shadow: 0 2px 5px rgba(0,153,228,.5);\n top: 0 !important;\n }\n #ngxDmTourDialogBtnIndex:before {\n content: \"Content Index\"\n }\n #ngxDmTourDialogBtnControls{\n margin-left: 8px;\n position: absolute;\n top: -2px;\n right: 30px;\n border-bottom-left-radius: 12px;\n border-bottom-right-radius: 12px;\n padding: 0 8px;\n border-top: none;\n }\n #ngxDmTourDialogBtnControls:before {\n content: \"Highlight Important Controls\"\n }\n #ngxDmTourDialogBtnClose {\n position: absolute;\n right: 0;\n top: -2px;\n padding: 0 4px;\n border-radius: 0;\n border-bottom-left-radius: 50%;\n border-top: none;\n border-right: none;\n }\n #ngxDmTourDialogBtnClose:before {\n content: \"\\\\01F5D9\"\n }\n .ngx-dm-tour-text {\n transition: opacity .5s;\n opacity: 0;\n position: absolute;\n border: 2px solid white;\n border-radius: 8px;\n background: #0099e4;\n text-align: center;\n min-width: 70px;\n max-width: 400px;\n max-height: 200px;\n box-shadow: 0 0 4px rgba(0,0,0,.25);\n }\n .ngx-dm-tour-text > .ngx-dm-tour-text-inner {\n color: white;\n padding: 8px;\n }\n .ngx-dm-tour-text:after {\n border: 2px solid;\n border-color: transparent white white transparent;\n box-shadow: 2px 2px 2px rgba(0,0,0,.25);\n background: #0099e4;\n content: \" \";\n position: absolute;\n z-index: -1\n }\n .ngx-dm-tour-text.ngx-dm-tour-text-top-left:after {\n bottom: -8px;\n left: 8px;\n width: 16px;\n height: 16px;\n transform: rotate(45deg);\n }\n .ngx-dm-tour-text.ngx-dm-tour-text-top-center:after {\n bottom: -8px;\n left: calc(50% - 8px);\n width: 16px;\n height: 16px;\n transform: rotate(45deg);\n }\n .ngx-dm-tour-text.ngx-dm-tour-text-top-right:after {\n bottom: -8px;\n right: 8px;\n width: 16px;\n height: 16px;\n transform: rotate(45deg);\n }\n .ngx-dm-tour-text.ngx-dm-tour-text-bottom-left:after {\n top: -8px;\n left: 8px;\n width: 16px;\n height: 16px;\n transform: rotate(-135deg);\n }\n .ngx-dm-tour-text.ngx-dm-tour-text-bottom-center:after {\n top: -8px;\n left: calc(50% - 8px);\n width: 16px;\n height: 16px;\n transform: rotate(-135deg);\n }\n .ngx-dm-tour-text.ngx-dm-tour-text-bottom-right:after {\n top: -8px;\n right: 8px;\n width: 16px;\n height: 16px;\n transform: rotate(-135deg);\n }\n .ngx-dm-tour-text.ngx-dm-tour-text-right-top:after {\n top: 8px;\n left: -8px;\n width: 16px;\n height: 16px;\n transform: rotate(135deg);\n }\n .ngx-dm-tour-text.ngx-dm-tour-text-right-center:after {\n top: calc(50% - 8px);\n left: -8px;\n width: 16px;\n height: 16px;\n transform: rotate(135deg);\n }\n .ngx-dm-tour-text.ngx-dm-tour-text-right-bottom:after {\n bottom: 8px;\n left: -8px;\n width: 16px;\n height: 16px;\n transform: rotate(135deg);\n }\n .ngx-dm-tour-text.ngx-dm-tour-text-left-top:after {\n top: 8px;\n right: -8px;\n width: 16px;\n height: 16px;\n transform: rotate(-45deg);\n }\n .ngx-dm-tour-text.ngx-dm-tour-text-left-center:after {\n top: calc(50% - 8px);\n right: -8px;\n width: 16px;\n height: 16px;\n transform: rotate(-45deg);\n }\n .ngx-dm-tour-text.ngx-dm-tour-text-left-bottom:after {\n bottom: 8px;\n right: -8px;\n width: 16px;\n height: 16px;\n transform: rotate(-45deg);\n }\n`;\n","import { Injectable, ElementRef, Inject, Optional, RendererFactory2, Renderer2 } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\nimport { HttpClient } from '@angular/common/http';\n\nimport { DmTourConfig, DmTourSection, DmTourControl, DM_TOUR_CONF } from './models';\nimport { isElemVisible } from './utils';\nimport { Observable, Subject } from 'rxjs';\nimport { GLOBAL_STYLES } from './dm-tour.styles';\n\nimport { debounceTime } from 'rxjs/operators';\nimport ResizeObserver from 'resize-observer-polyfill';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class DmTourService {\n\n private _cfg: DmTourConfig;\n private _sections: { [id: string]: DmTourSection };\n private _controls: { [sectionId: string]: { [id: string]: DmTourControl } } = {};\n\n private _r2: Renderer2;\n private _root: any;\n private _onClickRemove: () => void;\n private _onKeyupRemove: () => void;\n\n private _hlVisible: { type: 'help' | 'controls', sectionId: string } = null;\n\n constructor(\n private _rendererFactory: RendererFactory2,\n private _http: HttpClient,\n @Inject(DOCUMENT) private document,\n @Inject(DM_TOUR_CONF) @Optional() cfg: DmTourConfig\n ) {\n this._cfg = new DmTourConfig(cfg);\n this._r2 = this._rendererFactory.createRenderer(null, null);\n if (this._cfg.loadIndexOnStart) {\n this._addGlobalStyles();\n this._loadSections().subscribe(\n () => {},\n err => this._handleLoadError(err)\n );\n }\n if (ResizeObserver) {\n const resized = new Subject<void>();\n new ResizeObserver(() => resized.next()).observe(this.document.body);\n resized.pipe(debounceTime(500)).subscribe(() => this._resized());\n }\n }\n\n private _resized() {\n this._L('_resized', this._hlVisible);\n if (this._r2 && this._root && this._hlVisible && this._hlVisible.type == 'controls') {\n const bd = this.document.querySelector('#ngxDmTourRoot');\n this._L('_resized, bd:', bd);\n if (bd) {\n bd.remove();\n this._root = null;\n }\n if (this._onClickRemove) {\n this._onClickRemove();\n this._onClickRemove = null;\n }\n if (this._onKeyupRemove) {\n this._onKeyupRemove();\n this._onKeyupRemove = null;\n }\n const sid = this._hlVisible.sectionId;\n this._hlVisible = null;\n this._showControlsHelp(sid);\n }\n }\n\n registerControl(sectionId: string, id: string, el: ElementRef) {\n if (!sectionId || !id || !el) {\n return;\n }\n this._L(`registerControl, sectionId: ${sectionId}, is: ${id}, el:`, el);\n if (!this._controls[sectionId]) {\n this._controls[sectionId] = {};\n }\n if (!this._controls[sectionId][id]) {\n this._controls[sectionId][id] = { id };\n }\n this._controls[sectionId][id].el = el.nativeElement;\n }\n\n unregisterControl(sectionId: string, id: string) {\n if (!this._controls[sectionId] || this._controls[sectionId][id]) {\n return;\n }\n this._L(`unregisterControl, sectionId: ${sectionId}, is: ${id}`);\n delete this._controls[sectionId][id].el;\n }\n\n showControlsHelp(sectionId: string) {\n if (this._hlVisible) {\n return;\n }\n if (!this._sections) {\n this._addGlobalStyles();\n this._loadSections().subscribe(\n () => {\n this._loadSectionControls(sectionId).subscribe(\n () => this._showControlsHelp(sectionId),\n err => this._handleLoadError(err)\n );\n },\n err => this._handleLoadError(err)\n );\n }\n else if (!this._sections[sectionId]) {\n this._handleLoadError(`There is no a section \"${sectionId}\" defined.`);\n }\n else if (this._sections[sectionId] && !this._sections[sectionId].controlsLoaded) {\n this._loadSectionControls(sectionId).subscribe(\n () => this._showControlsHelp(sectionId),\n err => this._handleLoadError(err)\n );\n }\n else {\n this._showControlsHelp(sectionId);\n }\n }\n\n showHelp(sectionId: string) {\n if (this._hlVisible) {\n return;\n }\n if (!this._sections) {\n this._addGlobalStyles();\n this._loadSections().subscribe(\n () => {\n this._loadSectionHtml(sectionId).subscribe(\n () => this._showHelp(sectionId),\n err => this._handleLoadError(err)\n );\n },\n err => this._handleLoadError(err)\n );\n }\n else if (!this._sections[sectionId]) {\n this._handleLoadError(`There is no a section \"${sectionId}\" defined.`);\n }\n else if (this._sections[sectionId] && !this._sections[sectionId].controlsLoaded) {\n this._loadSectionHtml(sectionId).subscribe(\n () => this._showHelp(sectionId),\n err => this._handleLoadError(err)\n );\n }\n else {\n this._showHelp(sectionId);\n }\n }\n\n private _loadSections(): Observable<void> {\n this._showLoading();\n return new Observable(obs => {\n this._http.get<{ sections: DmTourSection[] }>(this._cfg.rootPath + '/index.json').subscribe(\n res => {\n this._hideLoading();\n if (res && res.sections) {\n this._sections = {};\n for (const section of res.sections) {\n this._sections[section.id] = section;\n }\n obs.next();\n }\n else {\n obs.error('Wrong data format in ${this._cfg.rootPath}/index.json');\n }\n },\n err => {\n this._hideLoading();\n obs.error(err);\n }\n );\n });\n }\n\n private _loadSectionControls(sectionId: string): Observable<void> {\n this._showLoading();\n if (!this._controls[sectionId]) {\n this._controls[sectionId] = {};\n }\n return new Observable(obs => {\n this._http.get<{ controls: DmTourControl[] }>(`${this._cfg.rootPath}/${sectionId}/index.json`).subscribe(\n res => {\n this._hideLoading();\n if (res && res.controls) {\n for (const ctrl of res.controls) {\n const c = this._controls[sectionId][ctrl.id];\n this._controls[sectionId][ctrl.id] = ctrl;\n this._controls[sectionId][ctrl.id].el = c ? c.el : null;\n }\n obs.next();\n }\n else {\n obs.error('${this._cfg.rootPath}/${sectionId}/index.json');\n }\n },\n err => {\n this._hideLoading();\n obs.error(err);\n }\n );\n });\n }\n\n private _loadSectionHtml(sectionId: string): Observable<void> {\n this._showLoading();\n return new Observable(obs => {\n this._http.get(`${this._cfg.rootPath}/${sectionId}/index.html`, { responseType: 'text' }).subscribe(\n res => {\n this._L('section html:', res);\n this._hideLoading();\n this._sections[sectionId].html = res;\n obs.next();\n },\n err => {\n this._hideLoading();\n obs.error(err);\n }\n );\n });\n }\n\n private _showControlsHelp(sectionId: string) {\n const ids: string[] = this._controls[sectionId] ? Object.keys(this._controls[sectionId]) : [];\n if (!ids || ids.length == 0) {\n this._W(`There are no visible controls registered for the section \"${sectionId}\"`);\n return;\n }\n const R = this._r2;\n const bd = this.document.querySelector('#ngxDmTourRoot');\n if (bd) {\n R.removeChild(this.document.body, bd);\n }\n const svg = R.createElement('svg', 'svg');\n const defs = R.createElement('defs', 'svg');\n\n let stop: any;\n\n const rgr = R.createElement('radialGradient', 'svg');\n R.setAttribute(rgr, 'id', 'ngxDmTourGradientR');\n stop = R.createElement('stop', 'svg');\n R.setAttribute(stop, 'offset', '90%');\n R.setAttribute(stop, 'stop-color', 'black');\n R.appendChild(rgr, stop);\n stop = R.createElement('stop', 'svg');\n R.setAttribute(stop, 'offset', '100%');\n R.setAttribute(stop, 'stop-color', 'transparent');\n R.appendChild(rgr, stop);\n R.appendChild(defs, rgr);\n\n const mask = R.createElement('mask', 'svg');\n R.setAttribute(mask, 'id', 'ngxDmTourControlsMask');\n const mrect = R.createElement('rect', 'svg');\n R.setAttribute(mrect, 'width', '10000');\n R.setAttribute(mrect, 'height', '10000');\n R.setAttribute(mrect, 'fill', 'white');\n R.appendChild(mask, mrect);\n\n const tts: any[] = [];\n for (const id of ids) {\n const c = this._controls[sectionId][id];\n if (c && c.el) {\n if (!c.children && c.text) {\n const tt = this._addControlHl(c, mask);\n if (tt) {\n tts.push(tt);\n }\n }\n else if (c.children) {\n for (const ch of c.children) {\n if (ch.text) {\n const tt = this._addControlHl(ch, mask);\n if (tt) {\n tts.push(tt);\n }\n }\n }\n }\n }\n }\n if (tts.length == 0) {\n this._W(`There are no visible controls registered for the section \"${sectionId}\"`);\n return;\n }\n R.appendChild(defs, mask);\n R.appendChild(svg, defs);\n\n const rect = R.createElement('rect', 'svg');\n R.setAttribute(rect, 'width', '10000');\n R.setAttribute(rect, 'height', '10000');\n R.setAttribute(rect, 'x', '0');\n R.setAttribute(rect, 'y', '0');\n R.setAttribute(rect, 'fill', 'var(--ngx-dm-tour-backdrop-color, black)');\n R.setAttribute(rect, 'mask', 'url(#ngxDmTourControlsMask)');\n R.appendChild(svg, rect);\n R.setAttribute(svg, 'width', '10000px');\n R.setAttribute(svg, 'height', '10000px');\n\n this._root = R.createElement('div');\n R.setAttribute(this._root, 'id', 'ngxDmTourRoot');\n if (this._cfg.customCssClass) {\n R.addClass(this._root, this._cfg.customCssClass);\n }\n const root = R.createElement('div');\n R.appendChild(this._root, root);\n R.setAttribute(root, 'id', 'ngxDmTourBackdrop');\n R.appendChild(root, svg);\n\n for (const tt of tts) {\n R.appendChild(this._root, tt);\n }\n\n this.document.activeElement.blur();\n this._hlVisible = { type: 'controls', sectionId };\n R.appendChild(this.document.body, this._root);\n setTimeout(() => {\n R.addClass(this._root, 'ngx-dm-tour-show');\n this._onClickRemove = R.listen(this.document, 'click', e => this.hideControlsHelp(e));\n this._onKeyupRemove = R.listen(this.document, 'keyup', e => this.hideControlsHelp(e));\n }, 300);\n }\n\n private _addControlHl(c: DmTourControl, mask: any): any {\n const dr = this.document.body.getBoundingClientRect();\n const MR = Math.round;\n const R = this._r2;\n const el = typeof c.el === 'string' ? this.document.querySelector(c.el) : c.el;\n const b = this._getBoundaries(el);\n const vis = isElemVisible(el);\n this._L('control:', c, '\\nelem:', el, '\\nboundaries:', b, '\\nisVisible:', vis);\n if (!vis || !b || b.width == 0 || b.height == 0) {\n return null;\n }\n const shape = c.shape\n ? c.shape\n : this._cfg.defaultShape == 'auto'\n ? (b.width > 200 || b.height > 200 ? 'square' : 'circle')\n : this._cfg.defaultShape;\n if (shape == 'square') {\n const hl = R.createElement('rect', 'svg');\n R.setAttribute(hl, 'x', '' + MR(b.left - 10));\n R.setAttribute(hl, 'y', '' + MR(b.top - 10));\n R.setAttribute(hl, 'width', '' + MR(b.width + 20));\n R.setAttribute(hl, 'height', '' + MR(b.height + 20));\n R.setAttribute(hl, 'rx', '8');\n R.setAttribute(hl, 'fill', 'black');\n R.setAttribute(hl, 'stroke', 'black');\n R.setAttribute(hl, 'stroke-width', 'var(--ngx-dm-tour-hl-stroke-width, 15)');\n R.setAttribute(hl, 'stroke-opacity', 'var(--ngx-dm-tour-hl-stroke-opacity, .3)');\n R.appendChild(mask, hl);\n }\n else {\n const hl = R.createElement('circle', 'svg');\n const r = b.width > b.height ? b.width / 2 : b.height / 2;\n R.setAttribute(hl, 'cx', '' + MR(b.left + b.width / 2));\n R.setAttribute(hl, 'cy', '' + MR(b.top + b.height / 2));\n R.setAttribute(hl, 'r', '' + MR(r + 10));\n R.setAttribute(hl, 'fill', 'black');\n R.setAttribute(hl, 'stroke', 'black');\n R.setAttribute(hl, 'stroke-width', 'var(--ngx-dm-tour-hl-stroke-width, 15)');\n R.setAttribute(hl, 'stroke-opacity', 'var(--ngx-dm-tour-hl-stroke-opacity, .3)');\n R.appendChild(mask, hl);\n }\n\n const tt = R.createElement('div');\n R.addClass(tt, 'ngx-dm-tour-text');\n const tti = R.createElement('div');\n R.addClass(tti, 'ngx-dm-tour-text-inner');\n R.appendChild(tti, R.createText(c.text));\n R.appendChild(tt, tti);\n let pos = c.pos && c.pos != 'auto' ? c.pos.split('-') : null;\n if (!pos) {\n if (b.top > 250) {\n pos = ['top', 'center'];\n }\n else if (dr.width - b.right > 250) {\n pos = ['right', 'center'];\n }\n else if (dr.height - b.bottom > 250) {\n pos = ['bottom', 'center'];\n }\n else if (b.left > 250) {\n pos = ['left', 'center'];\n }\n else {\n pos = ['center', 'center'];\n }\n }\n else if (pos.length == 1) {\n pos.push('center');\n }\n let x = MR(b.left + b.width / 2);\n let y = MR(b.top + b.height / 2);\n let tx = -50;\n let ty = -50;\n if (pos[0] == 'top') {\n ty = -100;\n y = b.top - 20;\n if (pos[1] == 'left') {\n tx = 0;\n x = b.left;\n }\n else if (pos[1] == 'right') {\n tx = -100;\n x = b.right;\n }\n }\n else if (pos[0] == 'bottom') {\n ty = 0;\n y = b.bottom + 20;\n if (pos[1] == 'left') {\n tx = 0;\n x = b.left;\n }\n else if (pos[1] == 'right') {\n tx = -100;\n x = b.right;\n }\n }\n else if (pos[0] == 'left') {\n tx = -100;\n x = b.left - 20;\n if (pos[1] == 'top') {\n ty = 0;\n y = b.top;\n }\n else if (pos[1] == 'bottom') {\n ty = -100;\n y = b.bottom;\n }\n }\n else if (pos[0] == 'right') {\n tx = 0;\n x = b.right + 20;\n if (pos[1] == 'top') {\n ty = 0;\n y = b.top;\n }\n else if (pos[1] == 'bottom') {\n ty = -100;\n y = b.bottom;\n }\n }\n // console.log(`[${c.id}] pos:`, pos, '\\n\\tb:', b, `-> ${x}x${y}`, '\\n\\tc:', c);\n R.setStyle(tt, 'top', `${y}px`);\n R.setStyle(tt, 'left', `${x}px`);\n R.setStyle(tt, 'transform', `translate(${tx}%, ${ty}%) scale(1)`);\n R.addClass(tt, `ngx-dm-tour-text-${pos[0]}-${pos[1]}`);\n\n return tt;\n }\n\n private _showHelp(sectionId: string) {\n const sec = this._sections[sectionId];\n const R = this._r2;\n const obd = this.document.querySelector('ngxDmTourRoot');\n if (obd) {\n obd.remove();\n }\n\n this._root = R.createElement('div');\n R.setAttribute(this._root, 'id', 'ngxDmTourRoot');\n if (this._cfg.customCssClass) {\n R.addClass(this._root, this._cfg.customCssClass);\n }\n const root = R.createElement('div');\n R.appendChild(this._root, root);\n R.setAttribute(root, 'id', 'ngxDmTourBackdrop');\n R.addClass(root, 'ngx-dm-tour-dialog');\n\n const dc = R.createElement('div');\n R.appendChild(this._root, dc);\n R.setAttribute(dc, 'id', 'ngxDmTourDialogContainer');\n const d = R.createElement('div');\n R.appendChild(dc, d);\n R.setAttribute(d, 'id', 'ngxDmTourDialog');\n R.addClass(d, `ngx-dm-tour-section-${sec.id}`);\n\n const btnClose = R.createElement('button');\n R.appendChild(d, btnClose);\n R.setAttribute(btnClose, 'id', 'ngxDmTourDialogBtnClose');\n R.addClass(btnClose, 'ngx-dm-tour-button');\n const btnControls = R.createElement('button');\n R.appendChild(d, btnControls);\n R.setAttribute(btnControls, 'id', 'ngxDmTourDialogBtnControls');\n R.addClass(btnControls, 'ngx-dm-tour-button');\n R.listen(btnControls, 'click', e => this.hideHelp(e, () => this.showControlsHelp(sectionId)));\n\n const dt = R.createElement('div');\n R.appendChild(d, dt);\n R.setAttribute(dt, 'id', 'ngxDmTourDialogTitle');\n R.appendChild(dt, R.createText(`Section \"${sec.title}\"`));\n\n const dd = R.createElement('div');\n R.appendChild(d, dd);\n R.setAttribute(dd, 'id', 'ngxDmTourDialogDesc');\n const ddi = R.createElement('div');\n R.appendChild(dd, ddi);\n R.setAttribute(ddi, 'id', 'ngxDmTourDialogDescInner');\n ddi.innerHTML = sec.html;\n\n this.document.activeElement.blur();\n this._hlVisible = { type: 'help', sectionId };\n R.appendChild(this.document.body, this._root);\n this._L('_showHelp, root:', this._root);\n setTimeout(() => {\n R.addClass(this._root, 'ngx-dm-tour-show');\n this._onClickRemove = R.listen(this.document, 'click', e => this.hideControlsHelp(e));\n this._onKeyupRemove = R.listen(this.document, 'keyup', e => this.hideControlsHelp(e));\n });\n }\n\n hideControlsHelp(e?: Event) {\n this.hideHelp(e);\n }\n\n hideHelp(e?: Event, cb?: () => void) {\n this._L('hideHelp');\n if (e) {\n e.stopImmediatePropagation();\n e.preventDefault();\n }\n if (this._onClickRemove) {\n this._onClickRemove();\n this._onClickRemove = null;\n }\n if (this._onKeyupRemove) {\n this._onKeyupRemove();\n this._onKeyupRemove = null;\n }\n if (this._root && this._r2) {\n this._r2.removeClass(this._root, 'ngx-dm-tour-show');\n setTimeout(() => {\n if (this._root) {\n this._root.remove();\n }\n this._hlVisible = null;\n if (cb) {\n cb();\n }\n }, 500);\n }\n else {\n this._hlVisible = null;\n if (cb) {\n cb();\n }\n }\n }\n\n private _getBoundaries(el: any): DOMRect {\n if (!el || !el.getBoundingClientRect) {\n return null;\n }\n return el.getBoundingClientRect();\n }\n\n private _showLoading() {\n const R = this._r2;\n const obd = this.document.querySelector('#ngxDmTourLoading');\n if (obd) {\n obd.remove();\n }\n\n const root = R.createElement('div');\n R.setAttribute(root, 'id', 'ngxDmTourLoading');\n if (this._cfg.customCssClass) {\n R.addClass(root, this._cfg.customCssClass);\n }\n root.innerHTML = this._cfg.loaderHtml;\n\n this.document.activeElement.blur();\n R.appendChild(this.document.body, root);\n setTimeout(() => R.setStyle(root, 'background-color', 'var(--ngx-dm-tour-loading-bg-color, rgba(0,0,0,.3))'));\n }\n\n private _hideLoading() {\n const R = this._r2;\n const obd = this.document.querySelector('#ngxDmTourLoading');\n if (obd) {\n obd.remove();\n }\n }\n\n private _handleLoadError(err: any) {\n this._W('[ngx-dm-tour] load error:', err);\n }\n\n private _addGlobalStyles() {\n const obd = this.document.head.querySelector('#ngxDmTourStyles');\n if (!obd) {\n const R = this._r2;\n const root = R.createElement('style');\n R.setAttribute(root, 'id', 'ngxDmTourStyles');\n root.innerHTML = GLOBAL_STYLES;\n R.appendChild(this.document.head, root);\n }\n }\n\n private _L(...args) {\n if (this._cfg.debug > 0) {\n console.log('[ngx-dm-tour]', ...args);\n }\n }\n\n private _W(...args) {\n if (this._cfg.debug > 1) {\n console.warn('[ngx-dm-tour]', ...args);\n }\n }\n\n}\n","import { Directive, Input, ElementRef, AfterViewInit, OnDestroy } from '@angular/core';\nimport { DmTourService } from './dm-tour.service';\n\n@Directive({\n selector: '[dm-tour]'\n})\nexport class DmTourDirective implements AfterViewInit, OnDestroy {\n @Input('dm-tour') item: string;\n\n constructor(private _el: ElementRef, private _ts: DmTourService) {\n }\n\n ngAfterViewInit() {\n if (!this.item) {\n return;\n }\n const path = this.item.split('.');\n if (!path || path.length != 2) {\n console.warn('[dm-tour] tour element ID must be in form \"sectionID.ItemID\": ', this.item);\n return;\n }\n this._ts.registerControl(\n path[0],\n path[1],\n this._el\n );\n }\n\n ngOnDestroy() {\n if (!this.item) {\n return;\n }\n const path = this.item.split('.');\n if (!path || path.length != 2) {\n return;\n }\n this._ts.unregisterControl(path[0], path[path.length - 1]);\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { HttpClientModule } from '@angular/common/http';\n\nimport { DmTourDirective } from './dm-tour.directive'\n\n@NgModule({\n declarations: [\n DmTourDirective\n ],\n imports: [\n CommonModule, HttpClientModule\n ],\n exports: [\n DmTourDirective\n ]\n})\nexport class DmTourModule { }\n"],"names":["InjectionToken","Subject","debounceTime","Observable","Injectable","RendererFactory2","HttpClient","Inject","DOCUMENT","Optional","Directive","ElementRef","Input","NgModule","CommonModule","HttpClientModule"],"mappings":";;;;;;;;IAAA;IACA;IACA;IACA;IACA;AACA;IACA;IACA;IACA;IACA;AACA;IACA;IACA;IACA;IACA;AACA;IACA,IAAI,aAAa,GAAG,SAAS,CAAC,EAAE,CAAC,EAAE;IACnC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