1 | (function webpackUniversalModuleDefinition(root, factory) {
|
2 | if(typeof exports === 'object' && typeof module === 'object')
|
3 | module.exports = factory();
|
4 | else if(typeof define === 'function' && define.amd)
|
5 | define([], factory);
|
6 | else if(typeof exports === 'object')
|
7 | exports["BBHelpClient"] = factory();
|
8 | else
|
9 | root["BBHelpClient"] = factory();
|
10 | })(this, function() {
|
11 | return (function(modules) {
|
12 |
|
13 | var installedModules = {};
|
14 |
|
15 |
|
16 | function __webpack_require__(moduleId) {
|
17 |
|
18 |
|
19 | if(installedModules[moduleId]) {
|
20 | return installedModules[moduleId].exports;
|
21 | }
|
22 |
|
23 | var module = installedModules[moduleId] = {
|
24 | i: moduleId,
|
25 | l: false,
|
26 | exports: {}
|
27 | };
|
28 |
|
29 |
|
30 | modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
31 |
|
32 |
|
33 | module.l = true;
|
34 |
|
35 |
|
36 | return module.exports;
|
37 | }
|
38 |
|
39 |
|
40 |
|
41 | __webpack_require__.m = modules;
|
42 |
|
43 |
|
44 | __webpack_require__.c = installedModules;
|
45 |
|
46 |
|
47 | __webpack_require__.i = function(value) { return value; };
|
48 |
|
49 |
|
50 | __webpack_require__.d = function(exports, name, getter) {
|
51 | if(!__webpack_require__.o(exports, name)) {
|
52 | Object.defineProperty(exports, name, {
|
53 | configurable: false,
|
54 | enumerable: true,
|
55 | get: getter
|
56 | /******/ });
|
57 | /******/ }
|
58 | /******/ };
|
59 | /******/
|
60 | /******/ // getDefaultExport function for compatibility with non-harmony modules
|
61 | /******/ __webpack_require__.n = function(module) {
|
62 | var getter = module && module.__esModule ?
|
63 | function getDefault() { return module['default']; } :
|
64 | function getModuleExports() { return module; };
|
65 | __webpack_require__.d(getter, 'a', getter);
|
66 | return getter;
|
67 | };
|
68 |
|
69 |
|
70 | __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
71 |
|
72 |
|
73 | __webpack_require__.p = "";
|
74 |
|
75 |
|
76 | return __webpack_require__(__webpack_require__.s = 1);
|
77 | })
|
78 |
|
79 | ([
|
80 |
|
81 | (function(module, exports, __webpack_require__) {
|
82 |
|
83 | "use strict";
|
84 |
|
85 | Object.defineProperty(exports, "__esModule", { value: true });
|
86 | var register_script_1 = __webpack_require__(2);
|
87 | var BBHelpClient = (function () {
|
88 | function BBHelpClient() {
|
89 | }
|
90 | BBHelpClient.addStyles = function () {
|
91 | var css = "\n .bb-omnibar-bar.bar { padding-right: 50px !important; }\n .bb-omnibar > .bb-omnibar-desktop > .bb-omnibar-accountflyout { right: 50px !important; }\n #bb-help-container { z-index: 9999; }\n ";
|
92 | var style = document.createElement('style');
|
93 | style.type = 'text/css';
|
94 | style.appendChild(document.createTextNode(css));
|
95 | document.head.appendChild(style);
|
96 | };
|
97 | BBHelpClient.load = function (config) {
|
98 | if (config === void 0) { config = {}; }
|
99 | if (config.defaultHelpKey !== undefined) {
|
100 | BBHelpClient.defaultHelpKey = config.defaultHelpKey;
|
101 | }
|
102 | config.getCurrentHelpKey = BBHelpClient.getCurrentHelpKey;
|
103 | return register_script_1.registerScript('https://cdn.blackbaudcloud.com/bb-help/bb-help.js')
|
104 | .then(function () {
|
105 | BBHelpClient.addStyles();
|
106 |
|
107 | BBHELP.HelpWidget.load(config);
|
108 | });
|
109 | };
|
110 | BBHelpClient.setCurrentHelpKey = function (helpKey) {
|
111 | if (helpKey === void 0) { helpKey = BBHelpClient.defaultHelpKey; }
|
112 | BBHelpClient.currentHelpKey = helpKey;
|
113 | };
|
114 | BBHelpClient.setHelpKeyToDefault = function () {
|
115 | BBHelpClient.setCurrentHelpKey(BBHelpClient.defaultHelpKey);
|
116 | };
|
117 | BBHelpClient.openWidgetToHelpKey = function (helpKey) {
|
118 | if (helpKey === void 0) { helpKey = BBHelpClient.currentHelpKey; }
|
119 | BBHELP.HelpWidget.open(helpKey);
|
120 | };
|
121 | BBHelpClient.getCurrentHelpKey = function () {
|
122 | return BBHelpClient.currentHelpKey || BBHelpClient.defaultHelpKey;
|
123 | };
|
124 | return BBHelpClient;
|
125 | }());
|
126 | BBHelpClient.defaultHelpKey = 'default.html';
|
127 | exports.BBHelpClient = BBHelpClient;
|
128 |
|
129 |
|
130 | }),
|
131 |
|
132 | (function(module, exports, __webpack_require__) {
|
133 |
|
134 | "use strict";
|
135 |
|
136 | function __export(m) {
|
137 | for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
138 | }
|
139 | Object.defineProperty(exports, "__esModule", { value: true });
|
140 | __export(__webpack_require__(0));
|
141 |
|
142 |
|
143 | }),
|
144 |
|
145 | (function(module, exports, __webpack_require__) {
|
146 |
|
147 | "use strict";
|
148 |
|
149 | Object.defineProperty(exports, "__esModule", { value: true });
|
150 | exports.registerScript = function (url) {
|
151 | return new Promise(function (resolve, reject) {
|
152 | var scriptEl = document.createElement('script');
|
153 | scriptEl.onload = resolve;
|
154 | scriptEl.onerror = reject;
|
155 | scriptEl.src = url;
|
156 | document.body.appendChild(scriptEl);
|
157 | });
|
158 | };
|
159 |
|
160 |
|
161 | })
|
162 | ]);
|
163 | }); |
\ | No newline at end of file |