@frontegg/js 6.10.0 → 6.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AdminPortal/index.js +20 -7
- package/AdminPortalRenderer/index.js +99 -59
- package/AppHolder/index.js +22 -11
- package/CheckoutDialog/index.js +20 -7
- package/FronteggApp/FronteggApp.js +334 -166
- package/HostedLogin/index.js +35 -24
- package/LoginBoxRenderer/index.js +111 -70
- package/index.js +1 -1
- package/initialize.js +113 -81
- package/node/AdminPortal/index.js +25 -7
- package/node/AdminPortalRenderer/index.js +105 -63
- package/node/AppHolder/index.js +25 -11
- package/node/CheckoutDialog/index.js +25 -7
- package/node/FronteggApp/FronteggApp.js +342 -171
- package/node/FronteggApp/index.js +1 -1
- package/node/HostedLogin/index.js +42 -29
- package/node/LoginBoxRenderer/index.js +117 -74
- package/node/index.js +9 -9
- package/node/initialize.js +120 -82
- package/node/utils/index.js +31 -22
- package/node/version.js +3 -3
- package/package.json +14 -2
- package/umd/frontegg.development.js +26518 -0
- package/umd/frontegg.production.min.js +2 -0
- package/umd/frontegg.production.min.js.LICENSE.txt +1 -0
- package/utils/index.js +29 -20
- package/version.js +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
package/utils/index.js
CHANGED
|
@@ -1,25 +1,34 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export var formatName = function formatName(name) {
|
|
2
|
+
return name.replace(/\W+/g, ' ').split(/ |\B(?=[A-Z])/).map(function (word) {
|
|
3
|
+
return word.toLowerCase();
|
|
4
|
+
}).join('');
|
|
5
|
+
};
|
|
6
|
+
export var createElement = function createElement(container, type) {
|
|
7
|
+
var attrs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
8
|
+
var el = document.createElement(type);
|
|
9
|
+
Object.keys(attrs).forEach(function (key) {
|
|
10
|
+
return el.setAttribute(key, attrs[key]);
|
|
11
|
+
});
|
|
5
12
|
container.appendChild(el);
|
|
6
13
|
return el;
|
|
7
14
|
};
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
export var waitThemeSetter = function waitThemeSetter(instance) {
|
|
16
|
+
return new Promise(function (resolve, reject) {
|
|
17
|
+
var timeout = 4000;
|
|
18
|
+
var interval = setInterval(function () {
|
|
19
|
+
if (instance.themeSetter != null) {
|
|
20
|
+
clearInterval(interval);
|
|
21
|
+
resolve(true);
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
16
24
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
25
|
+
if (timeout < 0) {
|
|
26
|
+
reject('Failed to load Renderer with themeSetter');
|
|
27
|
+
clearInterval(interval);
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
22
30
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
});
|
|
31
|
+
timeout -= 50;
|
|
32
|
+
}, 50);
|
|
33
|
+
});
|
|
34
|
+
};
|
package/version.js
CHANGED