@qrvey/utils 1.16.0-26 → 1.16.0-27
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.
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
* @param domain Qrvey domain
|
|
4
4
|
* @param root0 Optional parameters
|
|
5
5
|
* @param root0.styleId Optional styleId for the style tag
|
|
6
|
+
* @param root0.nonce Optional nonce attribute for csp.
|
|
6
7
|
*/
|
|
7
|
-
export declare function loadDefaultQrveyFonts(domain: string, { styleId: _styleId }?: {
|
|
8
|
+
export declare function loadDefaultQrveyFonts(domain: string, { styleId: _styleId, nonce }?: {
|
|
8
9
|
styleId?: string;
|
|
10
|
+
nonce?: string;
|
|
9
11
|
}): void;
|
|
@@ -7,8 +7,9 @@ exports.loadDefaultQrveyFonts = void 0;
|
|
|
7
7
|
* @param domain Qrvey domain
|
|
8
8
|
* @param root0 Optional parameters
|
|
9
9
|
* @param root0.styleId Optional styleId for the style tag
|
|
10
|
+
* @param root0.nonce Optional nonce attribute for csp.
|
|
10
11
|
*/
|
|
11
|
-
function loadDefaultQrveyFonts(domain, { styleId: _styleId } = {}) {
|
|
12
|
+
function loadDefaultQrveyFonts(domain, { styleId: _styleId, nonce } = {}) {
|
|
12
13
|
if (!domain)
|
|
13
14
|
return;
|
|
14
15
|
const styleId = _styleId !== null && _styleId !== void 0 ? _styleId : "qrvey-font-styles";
|
|
@@ -18,6 +19,7 @@ function loadDefaultQrveyFonts(domain, { styleId: _styleId } = {}) {
|
|
|
18
19
|
return;
|
|
19
20
|
// Import new styles
|
|
20
21
|
const style = document.createElement("style");
|
|
22
|
+
style.nonce = nonce;
|
|
21
23
|
style.id = styleId;
|
|
22
24
|
style.textContent = `
|
|
23
25
|
@import url('${domain}/cdn/fonts/Roboto/roboto.css');
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
* @param domain Qrvey domain
|
|
4
4
|
* @param root0 Optional parameters
|
|
5
5
|
* @param root0.styleId Optional styleId for the style tag
|
|
6
|
+
* @param root0.nonce Optional nonce attribute for csp.
|
|
6
7
|
*/
|
|
7
|
-
export declare function loadDefaultQrveyFonts(domain: string, { styleId: _styleId }?: {
|
|
8
|
+
export declare function loadDefaultQrveyFonts(domain: string, { styleId: _styleId, nonce }?: {
|
|
8
9
|
styleId?: string;
|
|
10
|
+
nonce?: string;
|
|
9
11
|
}): void;
|
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
* @param domain Qrvey domain
|
|
5
5
|
* @param root0 Optional parameters
|
|
6
6
|
* @param root0.styleId Optional styleId for the style tag
|
|
7
|
+
* @param root0.nonce Optional nonce attribute for csp.
|
|
7
8
|
*/
|
|
8
|
-
export function loadDefaultQrveyFonts(domain, { styleId: _styleId } = {}) {
|
|
9
|
+
export function loadDefaultQrveyFonts(domain, { styleId: _styleId, nonce } = {}) {
|
|
9
10
|
if (!domain)
|
|
10
11
|
return;
|
|
11
12
|
const styleId = _styleId !== null && _styleId !== void 0 ? _styleId : "qrvey-font-styles";
|
|
@@ -15,6 +16,7 @@ export function loadDefaultQrveyFonts(domain, { styleId: _styleId } = {}) {
|
|
|
15
16
|
return;
|
|
16
17
|
// Import new styles
|
|
17
18
|
const style = document.createElement("style");
|
|
19
|
+
style.nonce = nonce;
|
|
18
20
|
style.id = styleId;
|
|
19
21
|
style.textContent = `
|
|
20
22
|
@import url('${domain}/cdn/fonts/Roboto/roboto.css');
|