@devtron-labs/devtron-fe-common-lib 0.0.41-beta-4 → 0.0.41-beta-6
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/index.js
CHANGED
|
@@ -26463,10 +26463,10 @@ var getCommonSelectStyle = function (styleOverrides) {
|
|
|
26463
26463
|
*/
|
|
26464
26464
|
var getRedirectionProps = function (url) {
|
|
26465
26465
|
try {
|
|
26466
|
+
// The URL is validated when added using the form
|
|
26466
26467
|
var isInternalUrl = new URL(url).origin === window.location.origin;
|
|
26467
|
-
var redirectionUrl = url.startsWith('http://') || url.startsWith('https://') ? url : "https://".concat(url);
|
|
26468
26468
|
return {
|
|
26469
|
-
href:
|
|
26469
|
+
href: url,
|
|
26470
26470
|
target: isInternalUrl ? '_self' : '_blank',
|
|
26471
26471
|
rel: isInternalUrl ? undefined : 'external noreferrer',
|
|
26472
26472
|
url: url,
|
|
@@ -26474,7 +26474,8 @@ var getRedirectionProps = function (url) {
|
|
|
26474
26474
|
}
|
|
26475
26475
|
catch (err) {
|
|
26476
26476
|
return {
|
|
26477
|
-
href:
|
|
26477
|
+
href: url,
|
|
26478
|
+
target: '_blank',
|
|
26478
26479
|
url: "".concat(url, " (Invalid URL)"),
|
|
26479
26480
|
};
|
|
26480
26481
|
}
|
|
@@ -26561,7 +26562,7 @@ var templates = {
|
|
|
26561
26562
|
WrapIfAdditionalTemplate: WrapIfAdditionalTemplate,
|
|
26562
26563
|
};
|
|
26563
26564
|
|
|
26564
|
-
var css_248z = ".rjsf-form-template__field {\n grid-template-columns: 250px 1fr;\n}\n.rjsf-form-template__additional-fields {\n grid-template-columns: 1fr 1fr minmax(20px, auto);\n}\n.rjsf-form-template__array-field-item {\n grid-template-columns: 1fr auto;\n}\n.rjsf-form-template__array-field-item :first-child {\n margin: 0;\n}";
|
|
26565
|
+
var css_248z = ".rjsf-form-template__field {\n grid-template-columns: 250px 1fr;\n}\n.rjsf-form-template__additional-fields {\n grid-template-columns: 1fr 1fr minmax(20px, auto);\n}\n.rjsf-form-template__array-field-item {\n grid-template-columns: 1fr auto;\n}\n.rjsf-form-template__array-field-item > :first-child {\n margin: 0;\n}";
|
|
26565
26566
|
styleInject(css_248z);
|
|
26566
26567
|
|
|
26567
26568
|
// Need to use this way because the default import was not working as expected
|
package/package.json
CHANGED
package/src/Common/RJSF/utils.ts
CHANGED
|
@@ -67,17 +67,18 @@ export const getRedirectionProps = (
|
|
|
67
67
|
url: string
|
|
68
68
|
} => {
|
|
69
69
|
try {
|
|
70
|
+
// The URL is validated when added using the form
|
|
70
71
|
const isInternalUrl = new URL(url).origin === window.location.origin
|
|
71
|
-
const redirectionUrl = url.startsWith('http://') || url.startsWith('https://') ? url : `https://${url}`
|
|
72
72
|
return {
|
|
73
|
-
href:
|
|
73
|
+
href: url,
|
|
74
74
|
target: isInternalUrl ? '_self' : '_blank',
|
|
75
75
|
rel: isInternalUrl ? undefined : 'external noreferrer',
|
|
76
76
|
url,
|
|
77
77
|
}
|
|
78
78
|
} catch (err) {
|
|
79
79
|
return {
|
|
80
|
-
href:
|
|
80
|
+
href: url,
|
|
81
|
+
target: '_blank',
|
|
81
82
|
url: `${url} (Invalid URL)`,
|
|
82
83
|
}
|
|
83
84
|
}
|