@formio/js 5.1.0-dev.6123.055aa35 → 5.1.0-dev.6126.7fb6eb6
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/dist/formio.builder.css +0 -6
- package/dist/formio.builder.min.css +1 -1
- package/dist/formio.embed.css +1 -1
- package/dist/formio.embed.js +1 -1
- package/dist/formio.embed.min.css +1 -1
- package/dist/formio.embed.min.js +1 -1
- package/dist/formio.form.css +0 -6
- package/dist/formio.form.js +1 -1
- package/dist/formio.form.min.css +1 -1
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.css +0 -6
- package/dist/formio.full.js +1 -1
- package/dist/formio.full.min.css +1 -1
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.js +1 -1
- package/dist/formio.min.js +1 -1
- package/lib/cjs/Embed.js +9 -1
- package/lib/mjs/Embed.js +9 -1
- package/package.json +1 -1
package/lib/cjs/Embed.js
CHANGED
@@ -282,7 +282,7 @@ class Formio {
|
|
282
282
|
src: url("https://cdn.jsdelivr.net/npm/bootstrap-icons/font/fonts/bootstrap-icons.woff2?dd67030699838ea613ee6dbda90effa6") format("woff2"),
|
283
283
|
url("https://cdn.jsdelivr.net/npm/bootstrap-icons/font/fonts/bootstrap-icons.woff?dd67030699838ea613ee6dbda90effa6") format("woff");
|
284
284
|
}`
|
285
|
-
}
|
285
|
+
},
|
286
286
|
};
|
287
287
|
// Add all bootswatch templates.
|
288
288
|
['cerulean', 'cosmo', 'cyborg', 'darkly', 'flatly', 'journal', 'litera', 'lumen', 'lux', 'materia', 'minty', 'pulse', 'sandstone', 'simplex', 'sketchy', 'slate', 'solar', 'spacelab', 'superhero', 'united', 'yeti'].forEach((template) => {
|
@@ -350,6 +350,14 @@ class Formio {
|
|
350
350
|
}
|
351
351
|
}
|
352
352
|
yield _a.addStyles(libWrapper, _a.formioScript(_a.config.style || `${_a.cdn.js}/${renderer}.css`, builder));
|
353
|
+
// In some cases (dropdown list of autocomplete or confirmation popup of skethpad) we render elements outside of shadow dom
|
354
|
+
// and as result we can't get access to this styles outside of shadow dom. Here i added needed styles to work it properly
|
355
|
+
if (useShadowDom) {
|
356
|
+
yield _a.addStyles(document.body, _a.formioScript(_a.config.style || `${_a.cdn.js}/${renderer}.css`, builder));
|
357
|
+
const toGlobalStyleLibs = ["bootstrap", "bootstrap4", "bootstrap-icons"];
|
358
|
+
const libHrefs = toGlobalStyleLibs.map(key => _a.config.libs[key]).filter(Boolean).map(href => href.css);
|
359
|
+
yield _a.addStyles(document.body, libHrefs, builder);
|
360
|
+
}
|
353
361
|
if (_a.config.before) {
|
354
362
|
yield _a.config.before(_a.FormioClass, element, _a.config);
|
355
363
|
}
|
package/lib/mjs/Embed.js
CHANGED
@@ -270,7 +270,7 @@ export class Formio {
|
|
270
270
|
src: url("https://cdn.jsdelivr.net/npm/bootstrap-icons/font/fonts/bootstrap-icons.woff2?dd67030699838ea613ee6dbda90effa6") format("woff2"),
|
271
271
|
url("https://cdn.jsdelivr.net/npm/bootstrap-icons/font/fonts/bootstrap-icons.woff?dd67030699838ea613ee6dbda90effa6") format("woff");
|
272
272
|
}`
|
273
|
-
}
|
273
|
+
},
|
274
274
|
};
|
275
275
|
// Add all bootswatch templates.
|
276
276
|
['cerulean', 'cosmo', 'cyborg', 'darkly', 'flatly', 'journal', 'litera', 'lumen', 'lux', 'materia', 'minty', 'pulse', 'sandstone', 'simplex', 'sketchy', 'slate', 'solar', 'spacelab', 'superhero', 'united', 'yeti'].forEach((template) => {
|
@@ -338,6 +338,14 @@ export class Formio {
|
|
338
338
|
}
|
339
339
|
}
|
340
340
|
await Formio.addStyles(libWrapper, Formio.formioScript(Formio.config.style || `${Formio.cdn.js}/${renderer}.css`, builder));
|
341
|
+
// In some cases (dropdown list of autocomplete or confirmation popup of skethpad) we render elements outside of shadow dom
|
342
|
+
// and as result we can't get access to this styles outside of shadow dom. Here i added needed styles to work it properly
|
343
|
+
if (useShadowDom) {
|
344
|
+
await Formio.addStyles(document.body, Formio.formioScript(Formio.config.style || `${Formio.cdn.js}/${renderer}.css`, builder));
|
345
|
+
const toGlobalStyleLibs = ["bootstrap", "bootstrap4", "bootstrap-icons"];
|
346
|
+
const libHrefs = toGlobalStyleLibs.map(key => Formio.config.libs[key]).filter(Boolean).map(href => href.css);
|
347
|
+
await Formio.addStyles(document.body, libHrefs, builder);
|
348
|
+
}
|
341
349
|
if (Formio.config.before) {
|
342
350
|
await Formio.config.before(Formio.FormioClass, element, Formio.config);
|
343
351
|
}
|