@uipath/apollo-react 6.70.1 → 6.71.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/dist/canvas/components/Guardrails/builder-types.d.ts +2 -0
- package/dist/canvas/components/Guardrails/builder-types.d.ts.map +1 -1
- package/dist/canvas/components/Guardrails/components/guardrail-file-support-indicator.cjs +45 -7
- package/dist/canvas/components/Guardrails/components/guardrail-file-support-indicator.d.ts.map +1 -1
- package/dist/canvas/components/Guardrails/components/guardrail-file-support-indicator.js +46 -8
- package/dist/canvas/components/Guardrails/form-schema-builder.cjs +33 -6
- package/dist/canvas/components/Guardrails/form-schema-builder.d.ts +3 -0
- package/dist/canvas/components/Guardrails/form-schema-builder.d.ts.map +1 -1
- package/dist/canvas/components/Guardrails/form-schema-builder.js +23 -2
- package/dist/canvas/components/Guardrails/guardrail-builder.cjs +10 -4
- package/dist/canvas/components/Guardrails/guardrail-builder.d.ts.map +1 -1
- package/dist/canvas/components/Guardrails/guardrail-builder.js +11 -5
- package/dist/canvas/components/Guardrails/guardrail-validator-form.cjs +19 -8
- package/dist/canvas/components/Guardrails/guardrail-validator-form.d.ts.map +1 -1
- package/dist/canvas/components/Guardrails/guardrail-validator-form.js +20 -9
- package/dist/canvas/components/Guardrails/i18n.cjs +10 -0
- package/dist/canvas/components/Guardrails/i18n.d.ts +2 -0
- package/dist/canvas/components/Guardrails/i18n.d.ts.map +1 -1
- package/dist/canvas/components/Guardrails/i18n.js +10 -0
- package/dist/canvas/components/Guardrails/index.cjs +6 -0
- package/dist/canvas/components/Guardrails/index.d.ts +2 -2
- package/dist/canvas/components/Guardrails/index.d.ts.map +1 -1
- package/dist/canvas/components/Guardrails/index.js +2 -2
- package/dist/canvas/components/Guardrails/parameter-footer-bridge.cjs +50 -0
- package/dist/canvas/components/Guardrails/parameter-footer-bridge.d.ts +5 -0
- package/dist/canvas/components/Guardrails/parameter-footer-bridge.d.ts.map +1 -0
- package/dist/canvas/components/Guardrails/parameter-footer-bridge.js +13 -0
- package/dist/canvas/components/Guardrails/types.d.ts +2 -0
- package/dist/canvas/components/Guardrails/types.d.ts.map +1 -1
- package/dist/canvas/components/Guardrails/utils.cjs +21 -0
- package/dist/canvas/components/Guardrails/utils.d.ts +3 -1
- package/dist/canvas/components/Guardrails/utils.d.ts.map +1 -1
- package/dist/canvas/components/Guardrails/utils.js +16 -1
- package/dist/canvas/locales/de.cjs +1 -1
- package/dist/canvas/locales/de.d.ts.map +1 -1
- package/dist/canvas/locales/de.js +1 -1
- package/dist/canvas/locales/en.cjs +1 -1
- package/dist/canvas/locales/en.d.ts.map +1 -1
- package/dist/canvas/locales/en.js +1 -1
- package/dist/canvas/locales/es-MX.cjs +1 -1
- package/dist/canvas/locales/es-MX.d.ts.map +1 -1
- package/dist/canvas/locales/es-MX.js +1 -1
- package/dist/canvas/locales/es.cjs +1 -1
- package/dist/canvas/locales/es.d.ts.map +1 -1
- package/dist/canvas/locales/es.js +1 -1
- package/dist/canvas/locales/fr.cjs +1 -1
- package/dist/canvas/locales/fr.d.ts.map +1 -1
- package/dist/canvas/locales/fr.js +1 -1
- package/dist/canvas/locales/ja.cjs +1 -1
- package/dist/canvas/locales/ja.d.ts.map +1 -1
- package/dist/canvas/locales/ja.js +1 -1
- package/dist/canvas/locales/ko.cjs +1 -1
- package/dist/canvas/locales/ko.d.ts.map +1 -1
- package/dist/canvas/locales/ko.js +1 -1
- package/dist/canvas/locales/pt-BR.cjs +1 -1
- package/dist/canvas/locales/pt-BR.d.ts.map +1 -1
- package/dist/canvas/locales/pt-BR.js +1 -1
- package/dist/canvas/locales/pt.cjs +1 -1
- package/dist/canvas/locales/pt.d.ts.map +1 -1
- package/dist/canvas/locales/pt.js +1 -1
- package/dist/canvas/locales/ro.cjs +1 -1
- package/dist/canvas/locales/ro.d.ts.map +1 -1
- package/dist/canvas/locales/ro.js +1 -1
- package/dist/canvas/locales/tr.cjs +1 -1
- package/dist/canvas/locales/tr.d.ts.map +1 -1
- package/dist/canvas/locales/tr.js +1 -1
- package/dist/canvas/locales/zh-CN.cjs +1 -1
- package/dist/canvas/locales/zh-CN.d.ts.map +1 -1
- package/dist/canvas/locales/zh-CN.js +1 -1
- package/dist/canvas/locales/zh-TW.cjs +1 -1
- package/dist/canvas/locales/zh-TW.d.ts.map +1 -1
- package/dist/canvas/locales/zh-TW.js +1 -1
- package/dist/canvas/styles/tailwind.canvas.css +1 -1
- package/package.json +3 -3
|
@@ -72,6 +72,8 @@ export interface GuardrailFileSupport {
|
|
|
72
72
|
supported: boolean;
|
|
73
73
|
formats: GuardrailFileFormat[];
|
|
74
74
|
unavailableReason?: GuardrailFileSupportUnavailableReason;
|
|
75
|
+
uninspectedFormats?: GuardrailFileFormat[];
|
|
76
|
+
visionModelFormats?: GuardrailFileFormat[];
|
|
75
77
|
}
|
|
76
78
|
export interface GuardrailDefinition {
|
|
77
79
|
validator: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder-types.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/Guardrails/builder-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,4BAA4B,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAC;AAQzF,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC;AAEtD,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AAGD,MAAM,MAAM,4BAA4B,GAAG,IAAI,CAAC,sBAAsB,EAAE,QAAQ,GAAG,WAAW,CAAC,CAAC;AAEhG,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;AAGlE,eAAO,MAAM,sBAAsB;;;;;;;CAOzB,CAAC;AACX,MAAM,MAAM,2BAA2B,GACrC,CAAC,OAAO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IAErD,KAAK,EAAE,MAAM,CAAC;IAEd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAMD,MAAM,WAAW,+BAA+B;IAE9C,IAAI,EAAE,OAAO,GAAG,WAAW,CAAC;IAE5B,SAAS,EAAE,0BAA0B,CAAC;IAEtC,KAAK,EAAE,MAAM,CAAC;IAEd,OAAO,EAAE,MAAM,CAAC;IAEhB,OAAO,EAAE,OAAO,CAAC;IAEjB,KAAK,CAAC,EAAE,MAAM,CAAC;IAMf,QAAQ,EAAE,CAAC,SAAS,EAAE,0BAA0B,KAAK,IAAI,CAAC;CAC3D;AAED,MAAM,WAAW,qBAAqB;IAEpC,qBAAqB,CAAC,EAAE,CAAC,GAAG,EAAE,+BAA+B,KAAK,KAAK,CAAC,SAAS,CAAC;IAMlF,qBAAqB,CAAC,EAAE,CAAC,GAAG,EAAE,+BAA+B,KAAK,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;IAE9F,eAAe,CAAC,EAAE,CAAC,GAAG,EAAE,yBAAyB,KAAK,KAAK,CAAC,SAAS,CAAC;IAEtE,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAChC"}
|
|
@@ -30,6 +30,8 @@ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
|
30
30
|
const apollo_wind_namespaceObject = require("@uipath/apollo-wind");
|
|
31
31
|
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
32
32
|
const external_i18n_cjs_namespaceObject = require("../i18n.cjs");
|
|
33
|
+
const LINE_CLASS = 'flex items-center gap-1.5 text-xs text-muted-foreground';
|
|
34
|
+
const ICON_CLASS = 'size-3.5 shrink-0';
|
|
33
35
|
const FORMAT_ORDER = [
|
|
34
36
|
'Text',
|
|
35
37
|
'Pdf',
|
|
@@ -44,9 +46,9 @@ function formatNames(formats, labels) {
|
|
|
44
46
|
function GuardrailFileSupportIndicator({ fileSupport, labels: labelOverrides, className }) {
|
|
45
47
|
const labels = (0, external_i18n_cjs_namespaceObject.useGuardrailFileSupportLabels)(labelOverrides);
|
|
46
48
|
if (void 0 === fileSupport) return null;
|
|
47
|
-
const shell = (icon, text)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
49
|
+
const shell = (icon, text, lineClassName)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
48
50
|
"data-slot": "guardrail-file-support",
|
|
49
|
-
className: (0, apollo_wind_namespaceObject.cn)(
|
|
51
|
+
className: (0, apollo_wind_namespaceObject.cn)(LINE_CLASS, lineClassName),
|
|
50
52
|
children: [
|
|
51
53
|
icon,
|
|
52
54
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
@@ -57,18 +59,54 @@ function GuardrailFileSupportIndicator({ fileSupport, labels: labelOverrides, cl
|
|
|
57
59
|
if (!fileSupport.supported) {
|
|
58
60
|
const reason = 'AutomationSuite' === fileSupport.unavailableReason ? labels.unavailableOnAutomationSuite : labels.notSupported;
|
|
59
61
|
return shell(/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.FileText, {
|
|
60
|
-
className:
|
|
62
|
+
className: ICON_CLASS,
|
|
61
63
|
"aria-hidden": true
|
|
62
|
-
}), reason);
|
|
64
|
+
}), reason, className);
|
|
63
65
|
}
|
|
64
66
|
const names = formatNames(fileSupport.formats, labels);
|
|
65
67
|
const text = 0 === names.length ? labels.supported : (0, external_i18n_cjs_namespaceObject.formatGuardrailFormMessage)(labels.supportedFormats, {
|
|
66
68
|
formats: names.join(labels.formatSeparator)
|
|
67
69
|
});
|
|
68
|
-
|
|
69
|
-
|
|
70
|
+
const warning = warningMessage(fileSupport, labels);
|
|
71
|
+
if (void 0 === warning) return shell(/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Paperclip, {
|
|
72
|
+
className: ICON_CLASS,
|
|
70
73
|
"aria-hidden": true
|
|
71
|
-
}), text);
|
|
74
|
+
}), text, className);
|
|
75
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
76
|
+
className: (0, apollo_wind_namespaceObject.cn)('space-y-1', className),
|
|
77
|
+
children: [
|
|
78
|
+
shell(/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Paperclip, {
|
|
79
|
+
className: ICON_CLASS,
|
|
80
|
+
"aria-hidden": true
|
|
81
|
+
}), text),
|
|
82
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("output", {
|
|
83
|
+
"data-slot": "guardrail-file-support-warning",
|
|
84
|
+
className: LINE_CLASS,
|
|
85
|
+
children: [
|
|
86
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Info, {
|
|
87
|
+
className: ICON_CLASS,
|
|
88
|
+
"aria-hidden": true
|
|
89
|
+
}),
|
|
90
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
91
|
+
children: warning
|
|
92
|
+
})
|
|
93
|
+
]
|
|
94
|
+
})
|
|
95
|
+
]
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
function warningMessage(fileSupport, labels) {
|
|
99
|
+
const sentence = (template, formats)=>{
|
|
100
|
+
const names = formatNames(formats ?? [], labels);
|
|
101
|
+
return 0 === names.length ? void 0 : (0, external_i18n_cjs_namespaceObject.formatGuardrailFormMessage)(template, {
|
|
102
|
+
formats: names.join(labels.formatSeparator)
|
|
103
|
+
});
|
|
104
|
+
};
|
|
105
|
+
const sentences = [
|
|
106
|
+
sentence(labels.uninspectedFormats, fileSupport.uninspectedFormats),
|
|
107
|
+
sentence(labels.visionModelFormats, fileSupport.visionModelFormats)
|
|
108
|
+
].filter((value)=>void 0 !== value);
|
|
109
|
+
return 0 === sentences.length ? void 0 : sentences.join(' ');
|
|
72
110
|
}
|
|
73
111
|
exports.GuardrailFileSupportIndicator = __webpack_exports__.GuardrailFileSupportIndicator;
|
|
74
112
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
package/dist/canvas/components/Guardrails/components/guardrail-file-support-indicator.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guardrail-file-support-indicator.d.ts","sourceRoot":"","sources":["../../../../../src/canvas/components/Guardrails/components/guardrail-file-support-indicator.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAuB,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAClF,OAAO,EAEL,KAAK,kCAAkC,EAGxC,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,kCAAkC;IAMjD,WAAW,CAAC,EAAE,oBAAoB,CAAC;IAEnC,MAAM,CAAC,EAAE,kCAAkC,CAAC;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;
|
|
1
|
+
{"version":3,"file":"guardrail-file-support-indicator.d.ts","sourceRoot":"","sources":["../../../../../src/canvas/components/Guardrails/components/guardrail-file-support-indicator.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAuB,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAClF,OAAO,EAEL,KAAK,kCAAkC,EAGxC,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,kCAAkC;IAMjD,WAAW,CAAC,EAAE,oBAAoB,CAAC;IAEnC,MAAM,CAAC,EAAE,kCAAkC,CAAC;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAgCD,wBAAgB,6BAA6B,CAAC,EAC5C,WAAW,EACX,MAAM,EAAE,cAAc,EACtB,SAAS,GACV,EAAE,kCAAkC,kDA6CpC"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "@uipath/apollo-wind";
|
|
3
|
-
import { FileText, Paperclip } from "lucide-react";
|
|
3
|
+
import { FileText, Info, Paperclip } from "lucide-react";
|
|
4
4
|
import { formatGuardrailFormMessage, useGuardrailFileSupportLabels } from "../i18n.js";
|
|
5
|
+
const LINE_CLASS = 'flex items-center gap-1.5 text-xs text-muted-foreground';
|
|
6
|
+
const ICON_CLASS = 'size-3.5 shrink-0';
|
|
5
7
|
const FORMAT_ORDER = [
|
|
6
8
|
'Text',
|
|
7
9
|
'Pdf',
|
|
@@ -16,9 +18,9 @@ function formatNames(formats, labels) {
|
|
|
16
18
|
function GuardrailFileSupportIndicator({ fileSupport, labels: labelOverrides, className }) {
|
|
17
19
|
const labels = useGuardrailFileSupportLabels(labelOverrides);
|
|
18
20
|
if (void 0 === fileSupport) return null;
|
|
19
|
-
const shell = (icon, text)=>/*#__PURE__*/ jsxs("div", {
|
|
21
|
+
const shell = (icon, text, lineClassName)=>/*#__PURE__*/ jsxs("div", {
|
|
20
22
|
"data-slot": "guardrail-file-support",
|
|
21
|
-
className: cn(
|
|
23
|
+
className: cn(LINE_CLASS, lineClassName),
|
|
22
24
|
children: [
|
|
23
25
|
icon,
|
|
24
26
|
/*#__PURE__*/ jsx("span", {
|
|
@@ -29,17 +31,53 @@ function GuardrailFileSupportIndicator({ fileSupport, labels: labelOverrides, cl
|
|
|
29
31
|
if (!fileSupport.supported) {
|
|
30
32
|
const reason = 'AutomationSuite' === fileSupport.unavailableReason ? labels.unavailableOnAutomationSuite : labels.notSupported;
|
|
31
33
|
return shell(/*#__PURE__*/ jsx(FileText, {
|
|
32
|
-
className:
|
|
34
|
+
className: ICON_CLASS,
|
|
33
35
|
"aria-hidden": true
|
|
34
|
-
}), reason);
|
|
36
|
+
}), reason, className);
|
|
35
37
|
}
|
|
36
38
|
const names = formatNames(fileSupport.formats, labels);
|
|
37
39
|
const text = 0 === names.length ? labels.supported : formatGuardrailFormMessage(labels.supportedFormats, {
|
|
38
40
|
formats: names.join(labels.formatSeparator)
|
|
39
41
|
});
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
const warning = warningMessage(fileSupport, labels);
|
|
43
|
+
if (void 0 === warning) return shell(/*#__PURE__*/ jsx(Paperclip, {
|
|
44
|
+
className: ICON_CLASS,
|
|
42
45
|
"aria-hidden": true
|
|
43
|
-
}), text);
|
|
46
|
+
}), text, className);
|
|
47
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
48
|
+
className: cn('space-y-1', className),
|
|
49
|
+
children: [
|
|
50
|
+
shell(/*#__PURE__*/ jsx(Paperclip, {
|
|
51
|
+
className: ICON_CLASS,
|
|
52
|
+
"aria-hidden": true
|
|
53
|
+
}), text),
|
|
54
|
+
/*#__PURE__*/ jsxs("output", {
|
|
55
|
+
"data-slot": "guardrail-file-support-warning",
|
|
56
|
+
className: LINE_CLASS,
|
|
57
|
+
children: [
|
|
58
|
+
/*#__PURE__*/ jsx(Info, {
|
|
59
|
+
className: ICON_CLASS,
|
|
60
|
+
"aria-hidden": true
|
|
61
|
+
}),
|
|
62
|
+
/*#__PURE__*/ jsx("span", {
|
|
63
|
+
children: warning
|
|
64
|
+
})
|
|
65
|
+
]
|
|
66
|
+
})
|
|
67
|
+
]
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
function warningMessage(fileSupport, labels) {
|
|
71
|
+
const sentence = (template, formats)=>{
|
|
72
|
+
const names = formatNames(formats ?? [], labels);
|
|
73
|
+
return 0 === names.length ? void 0 : formatGuardrailFormMessage(template, {
|
|
74
|
+
formats: names.join(labels.formatSeparator)
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
const sentences = [
|
|
78
|
+
sentence(labels.uninspectedFormats, fileSupport.uninspectedFormats),
|
|
79
|
+
sentence(labels.visionModelFormats, fileSupport.visionModelFormats)
|
|
80
|
+
].filter((value)=>void 0 !== value);
|
|
81
|
+
return 0 === sentences.length ? void 0 : sentences.join(' ');
|
|
44
82
|
}
|
|
45
83
|
export { GuardrailFileSupportIndicator };
|
|
@@ -24,17 +24,23 @@ var __webpack_require__ = {};
|
|
|
24
24
|
var __webpack_exports__ = {};
|
|
25
25
|
__webpack_require__.r(__webpack_exports__);
|
|
26
26
|
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
-
GUARDRAIL_ENUM_LIST_CHIPS_COMPONENT: ()=>GUARDRAIL_ENUM_LIST_CHIPS_COMPONENT,
|
|
28
27
|
GUARDRAIL_MAP_ENUM_COMPONENT: ()=>GUARDRAIL_MAP_ENUM_COMPONENT,
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
guardrailParameterFooterFieldName: ()=>guardrailParameterFooterFieldName,
|
|
29
|
+
GUARDRAIL_PARAMETER_FOOTER_COMPONENT: ()=>GUARDRAIL_PARAMETER_FOOTER_COMPONENT,
|
|
31
30
|
MAX_INLINE_ENUM_OPTIONS: ()=>MAX_INLINE_ENUM_OPTIONS,
|
|
32
|
-
buildGuardrailFormSchema: ()=>buildGuardrailFormSchema
|
|
31
|
+
buildGuardrailFormSchema: ()=>buildGuardrailFormSchema,
|
|
32
|
+
GUARDRAIL_ENUM_LIST_CHIPS_COMPONENT: ()=>GUARDRAIL_ENUM_LIST_CHIPS_COMPONENT,
|
|
33
|
+
coerceGuardrailParameterValue: ()=>coerceGuardrailParameterValue,
|
|
34
|
+
GUARDRAIL_RENDER_PARAMETER_COMPONENT: ()=>GUARDRAIL_RENDER_PARAMETER_COMPONENT
|
|
33
35
|
});
|
|
34
36
|
const apollo_wind_namespaceObject = require("@uipath/apollo-wind");
|
|
35
37
|
const GUARDRAIL_ENUM_LIST_CHIPS_COMPONENT = 'guardrail-enum-list-chips';
|
|
36
38
|
const GUARDRAIL_MAP_ENUM_COMPONENT = 'guardrail-map-enum';
|
|
37
39
|
const GUARDRAIL_RENDER_PARAMETER_COMPONENT = 'guardrail-render-parameter';
|
|
40
|
+
const GUARDRAIL_PARAMETER_FOOTER_COMPONENT = 'guardrail-parameter-footer';
|
|
41
|
+
function guardrailParameterFooterFieldName(parameterId) {
|
|
42
|
+
return `guardrail-footer:${parameterId}`;
|
|
43
|
+
}
|
|
38
44
|
const MAX_INLINE_ENUM_OPTIONS = 8;
|
|
39
45
|
function buildFieldValidation(def, labels) {
|
|
40
46
|
const validation = {};
|
|
@@ -66,7 +72,24 @@ function buildGuardrailFormSchema(definitions, labels, options) {
|
|
|
66
72
|
p.id,
|
|
67
73
|
p
|
|
68
74
|
]));
|
|
69
|
-
const fields = definitions.
|
|
75
|
+
const fields = definitions.flatMap((def)=>{
|
|
76
|
+
const field = buildGuardrailField(def, definitions, labels, initialById, options);
|
|
77
|
+
if (!options?.footerIds?.has(def.id)) return [
|
|
78
|
+
field
|
|
79
|
+
];
|
|
80
|
+
return [
|
|
81
|
+
field,
|
|
82
|
+
{
|
|
83
|
+
type: 'custom',
|
|
84
|
+
name: guardrailParameterFooterFieldName(def.id),
|
|
85
|
+
label: '',
|
|
86
|
+
component: GUARDRAIL_PARAMETER_FOOTER_COMPONENT,
|
|
87
|
+
componentProps: {
|
|
88
|
+
parameterId: def.id
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
];
|
|
92
|
+
});
|
|
70
93
|
return {
|
|
71
94
|
id: 'guardrail-validator-form',
|
|
72
95
|
title: '',
|
|
@@ -229,17 +252,21 @@ function coerceGuardrailParameterValue(value, def) {
|
|
|
229
252
|
}
|
|
230
253
|
exports.GUARDRAIL_ENUM_LIST_CHIPS_COMPONENT = __webpack_exports__.GUARDRAIL_ENUM_LIST_CHIPS_COMPONENT;
|
|
231
254
|
exports.GUARDRAIL_MAP_ENUM_COMPONENT = __webpack_exports__.GUARDRAIL_MAP_ENUM_COMPONENT;
|
|
255
|
+
exports.GUARDRAIL_PARAMETER_FOOTER_COMPONENT = __webpack_exports__.GUARDRAIL_PARAMETER_FOOTER_COMPONENT;
|
|
232
256
|
exports.GUARDRAIL_RENDER_PARAMETER_COMPONENT = __webpack_exports__.GUARDRAIL_RENDER_PARAMETER_COMPONENT;
|
|
233
257
|
exports.MAX_INLINE_ENUM_OPTIONS = __webpack_exports__.MAX_INLINE_ENUM_OPTIONS;
|
|
234
258
|
exports.buildGuardrailFormSchema = __webpack_exports__.buildGuardrailFormSchema;
|
|
235
259
|
exports.coerceGuardrailParameterValue = __webpack_exports__.coerceGuardrailParameterValue;
|
|
260
|
+
exports.guardrailParameterFooterFieldName = __webpack_exports__.guardrailParameterFooterFieldName;
|
|
236
261
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
237
262
|
"GUARDRAIL_ENUM_LIST_CHIPS_COMPONENT",
|
|
238
263
|
"GUARDRAIL_MAP_ENUM_COMPONENT",
|
|
264
|
+
"GUARDRAIL_PARAMETER_FOOTER_COMPONENT",
|
|
239
265
|
"GUARDRAIL_RENDER_PARAMETER_COMPONENT",
|
|
240
266
|
"MAX_INLINE_ENUM_OPTIONS",
|
|
241
267
|
"buildGuardrailFormSchema",
|
|
242
|
-
"coerceGuardrailParameterValue"
|
|
268
|
+
"coerceGuardrailParameterValue",
|
|
269
|
+
"guardrailParameterFooterFieldName"
|
|
243
270
|
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
244
271
|
Object.defineProperty(exports, '__esModule', {
|
|
245
272
|
value: true
|
|
@@ -4,11 +4,14 @@ import type { GuardrailParameterDefinition, GuardrailValidatorParameter } from '
|
|
|
4
4
|
export declare const GUARDRAIL_ENUM_LIST_CHIPS_COMPONENT = "guardrail-enum-list-chips";
|
|
5
5
|
export declare const GUARDRAIL_MAP_ENUM_COMPONENT = "guardrail-map-enum";
|
|
6
6
|
export declare const GUARDRAIL_RENDER_PARAMETER_COMPONENT = "guardrail-render-parameter";
|
|
7
|
+
export declare const GUARDRAIL_PARAMETER_FOOTER_COMPONENT = "guardrail-parameter-footer";
|
|
8
|
+
export declare function guardrailParameterFooterFieldName(parameterId: string): string;
|
|
7
9
|
export declare const MAX_INLINE_ENUM_OPTIONS = 8;
|
|
8
10
|
export interface BuildGuardrailFormSchemaOptions {
|
|
9
11
|
overriddenIds?: ReadonlySet<string>;
|
|
10
12
|
initialParameters?: GuardrailValidatorParameter[];
|
|
11
13
|
enumSyntheticValues?: Record<string, string>;
|
|
14
|
+
footerIds?: ReadonlySet<string>;
|
|
12
15
|
}
|
|
13
16
|
export declare function buildGuardrailFormSchema(definitions: GuardrailParameterDefinition[], labels: GuardrailValidatorFormLabels, options?: BuildGuardrailFormSchemaOptions): FormSchema;
|
|
14
17
|
export declare function coerceGuardrailParameterValue(value: unknown, def: GuardrailParameterDefinition): unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-schema-builder.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/Guardrails/form-schema-builder.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAkC,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtF,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC3D,OAAO,KAAK,EAAE,4BAA4B,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAC;AAGzF,eAAO,MAAM,mCAAmC,8BAA8B,CAAC;AAC/E,eAAO,MAAM,4BAA4B,uBAAuB,CAAC;AACjE,eAAO,MAAM,oCAAoC,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"form-schema-builder.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/Guardrails/form-schema-builder.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAkC,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtF,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC3D,OAAO,KAAK,EAAE,4BAA4B,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAC;AAGzF,eAAO,MAAM,mCAAmC,8BAA8B,CAAC;AAC/E,eAAO,MAAM,4BAA4B,uBAAuB,CAAC;AACjE,eAAO,MAAM,oCAAoC,+BAA+B,CAAC;AACjF,eAAO,MAAM,oCAAoC,+BAA+B,CAAC;AAMjF,wBAAgB,iCAAiC,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAE7E;AAGD,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAEzC,MAAM,WAAW,+BAA+B;IAE9C,aAAa,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAMpC,iBAAiB,CAAC,EAAE,2BAA2B,EAAE,CAAC;IAMlD,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAE7C,SAAS,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CACjC;AAkDD,wBAAgB,wBAAwB,CACtC,WAAW,EAAE,4BAA4B,EAAE,EAC3C,MAAM,EAAE,4BAA4B,EACpC,OAAO,CAAC,EAAE,+BAA+B,GACxC,UAAU,CAwBZ;AA0LD,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,OAAO,EACd,GAAG,EAAE,4BAA4B,GAChC,OAAO,CAYT"}
|
|
@@ -2,6 +2,10 @@ import { formatTemplate } from "@uipath/apollo-wind";
|
|
|
2
2
|
const GUARDRAIL_ENUM_LIST_CHIPS_COMPONENT = 'guardrail-enum-list-chips';
|
|
3
3
|
const GUARDRAIL_MAP_ENUM_COMPONENT = 'guardrail-map-enum';
|
|
4
4
|
const GUARDRAIL_RENDER_PARAMETER_COMPONENT = 'guardrail-render-parameter';
|
|
5
|
+
const GUARDRAIL_PARAMETER_FOOTER_COMPONENT = 'guardrail-parameter-footer';
|
|
6
|
+
function guardrailParameterFooterFieldName(parameterId) {
|
|
7
|
+
return `guardrail-footer:${parameterId}`;
|
|
8
|
+
}
|
|
5
9
|
const MAX_INLINE_ENUM_OPTIONS = 8;
|
|
6
10
|
function buildFieldValidation(def, labels) {
|
|
7
11
|
const validation = {};
|
|
@@ -33,7 +37,24 @@ function buildGuardrailFormSchema(definitions, labels, options) {
|
|
|
33
37
|
p.id,
|
|
34
38
|
p
|
|
35
39
|
]));
|
|
36
|
-
const fields = definitions.
|
|
40
|
+
const fields = definitions.flatMap((def)=>{
|
|
41
|
+
const field = buildGuardrailField(def, definitions, labels, initialById, options);
|
|
42
|
+
if (!options?.footerIds?.has(def.id)) return [
|
|
43
|
+
field
|
|
44
|
+
];
|
|
45
|
+
return [
|
|
46
|
+
field,
|
|
47
|
+
{
|
|
48
|
+
type: 'custom',
|
|
49
|
+
name: guardrailParameterFooterFieldName(def.id),
|
|
50
|
+
label: '',
|
|
51
|
+
component: GUARDRAIL_PARAMETER_FOOTER_COMPONENT,
|
|
52
|
+
componentProps: {
|
|
53
|
+
parameterId: def.id
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
];
|
|
57
|
+
});
|
|
37
58
|
return {
|
|
38
59
|
id: 'guardrail-validator-form',
|
|
39
60
|
title: '',
|
|
@@ -194,4 +215,4 @@ function coerceGuardrailParameterValue(value, def) {
|
|
|
194
215
|
return value;
|
|
195
216
|
}
|
|
196
217
|
}
|
|
197
|
-
export { GUARDRAIL_ENUM_LIST_CHIPS_COMPONENT, GUARDRAIL_MAP_ENUM_COMPONENT, GUARDRAIL_RENDER_PARAMETER_COMPONENT, MAX_INLINE_ENUM_OPTIONS, buildGuardrailFormSchema, coerceGuardrailParameterValue };
|
|
218
|
+
export { GUARDRAIL_ENUM_LIST_CHIPS_COMPONENT, GUARDRAIL_MAP_ENUM_COMPONENT, GUARDRAIL_PARAMETER_FOOTER_COMPONENT, GUARDRAIL_RENDER_PARAMETER_COMPONENT, MAX_INLINE_ENUM_OPTIONS, buildGuardrailFormSchema, coerceGuardrailParameterValue, guardrailParameterFooterFieldName };
|
|
@@ -206,6 +206,11 @@ function GuardrailBuilder({ open, definition, scope, guardrail, defaultName, exi
|
|
|
206
206
|
labels: labels
|
|
207
207
|
});
|
|
208
208
|
const validatorFormErrors = displayErrors.parameters;
|
|
209
|
+
const fileSupportIndicator = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(guardrail_file_support_indicator_cjs_namespaceObject.GuardrailFileSupportIndicator, {
|
|
210
|
+
fileSupport: definition.fileSupport
|
|
211
|
+
});
|
|
212
|
+
const appliesTo = (0, external_utils_cjs_namespaceObject.getGuardrailAppliesTo)(definition.parameters, formData.validatorParameters);
|
|
213
|
+
const fileSupportUnderAppliesTo = definition.fileSupport?.supported === true && void 0 !== appliesTo;
|
|
209
214
|
const formBody = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
210
215
|
ref: rootRef,
|
|
211
216
|
"data-slot": "guardrail-builder",
|
|
@@ -250,9 +255,7 @@ function GuardrailBuilder({ open, definition, scope, guardrail, defaultName, exi
|
|
|
250
255
|
nameError: displayErrors.name,
|
|
251
256
|
labels: labels
|
|
252
257
|
}),
|
|
253
|
-
|
|
254
|
-
fileSupport: definition.fileSupport
|
|
255
|
-
}),
|
|
258
|
+
!fileSupportUnderAppliesTo && fileSupportIndicator,
|
|
256
259
|
definition.parameters.length > 0 && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
257
260
|
className: "space-y-3",
|
|
258
261
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_guardrail_validator_form_cjs_namespaceObject.GuardrailValidatorForm, {
|
|
@@ -268,7 +271,10 @@ function GuardrailBuilder({ open, definition, scope, guardrail, defaultName, exi
|
|
|
268
271
|
return next;
|
|
269
272
|
}),
|
|
270
273
|
renderParameter: renderParameter,
|
|
271
|
-
overrideParameterIds: overrideParameterIds
|
|
274
|
+
overrideParameterIds: overrideParameterIds,
|
|
275
|
+
parameterFooters: fileSupportUnderAppliesTo && 'Text' !== appliesTo ? {
|
|
276
|
+
[external_utils_cjs_namespaceObject.GUARDRAIL_APPLIES_TO_PARAMETER_ID]: fileSupportIndicator
|
|
277
|
+
} : void 0
|
|
272
278
|
})
|
|
273
279
|
}),
|
|
274
280
|
showScopeSelector && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(guardrail_scope_selector_cjs_namespaceObject.GuardrailScopeSelector, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guardrail-builder.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/Guardrails/guardrail-builder.tsx"],"names":[],"mappings":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AC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAYD,wBAAgB,gBAAgB,CAAC,EAC/B,IAAI,EACJ,UAAU,EACV,KAAK,EACL,SAAS,EACT,WAAW,EACX,aAAa,EACb,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,MAAM,EACN,QAAQ,EACR,WAAW,EACX,kBAAyB,EACzB,MAAc,EACd,UAAkB,EAClB,cAAc,EACd,KAAK,EACL,UAAkB,EAClB,aAAqB,EACrB,oBAA6B,EAC7B,kBAAkB,EAClB,qBAAqB,EACrB,qBAAqB,EACrB,eAAe,EACf,YAAY,EACZ,qBAAqB,EACrB,MAAM,EAAE,UAAU,EAClB,eAAe,EACf,oBAAoB,EACpB,YAAY,EAAE,gBAAwB,EACtC,MAAM,EAAE,cAAc,EACtB,SAAS,GACV,EAAE,qBAAqB,2CA+WvB;yBAhZe,gBAAgB"}
|
|
@@ -16,7 +16,7 @@ import { GuardrailValidatorForm } from "./guardrail-validator-form.js";
|
|
|
16
16
|
import { formatGuardrailFormMessage, useGuardrailBuilderLabels } from "./i18n.js";
|
|
17
17
|
import { useGuardrailFormErrors } from "./use-guardrail-form-errors.js";
|
|
18
18
|
import { useSwallowEnter } from "./use-swallow-enter.js";
|
|
19
|
-
import { dropEmptyOptionalParameters, getOutOfRangeParameterIds, getRequiredEmptyParameterIds, syncMapEnumParameters } from "./utils.js";
|
|
19
|
+
import { GUARDRAIL_APPLIES_TO_PARAMETER_ID, dropEmptyOptionalParameters, getGuardrailAppliesTo, getOutOfRangeParameterIds, getRequiredEmptyParameterIds, syncMapEnumParameters } from "./utils.js";
|
|
20
20
|
const EMPTY_PARAM_IDS = new Set();
|
|
21
21
|
const BUILDER_ERROR_MERGES = {
|
|
22
22
|
parameters: {
|
|
@@ -178,6 +178,11 @@ function GuardrailBuilder({ open, definition, scope, guardrail, defaultName, exi
|
|
|
178
178
|
labels: labels
|
|
179
179
|
});
|
|
180
180
|
const validatorFormErrors = displayErrors.parameters;
|
|
181
|
+
const fileSupportIndicator = /*#__PURE__*/ jsx(GuardrailFileSupportIndicator, {
|
|
182
|
+
fileSupport: definition.fileSupport
|
|
183
|
+
});
|
|
184
|
+
const appliesTo = getGuardrailAppliesTo(definition.parameters, formData.validatorParameters);
|
|
185
|
+
const fileSupportUnderAppliesTo = definition.fileSupport?.supported === true && void 0 !== appliesTo;
|
|
181
186
|
const formBody = /*#__PURE__*/ jsxs("div", {
|
|
182
187
|
ref: rootRef,
|
|
183
188
|
"data-slot": "guardrail-builder",
|
|
@@ -222,9 +227,7 @@ function GuardrailBuilder({ open, definition, scope, guardrail, defaultName, exi
|
|
|
222
227
|
nameError: displayErrors.name,
|
|
223
228
|
labels: labels
|
|
224
229
|
}),
|
|
225
|
-
|
|
226
|
-
fileSupport: definition.fileSupport
|
|
227
|
-
}),
|
|
230
|
+
!fileSupportUnderAppliesTo && fileSupportIndicator,
|
|
228
231
|
definition.parameters.length > 0 && /*#__PURE__*/ jsx("div", {
|
|
229
232
|
className: "space-y-3",
|
|
230
233
|
children: /*#__PURE__*/ jsx(GuardrailValidatorForm, {
|
|
@@ -240,7 +243,10 @@ function GuardrailBuilder({ open, definition, scope, guardrail, defaultName, exi
|
|
|
240
243
|
return next;
|
|
241
244
|
}),
|
|
242
245
|
renderParameter: renderParameter,
|
|
243
|
-
overrideParameterIds: overrideParameterIds
|
|
246
|
+
overrideParameterIds: overrideParameterIds,
|
|
247
|
+
parameterFooters: fileSupportUnderAppliesTo && 'Text' !== appliesTo ? {
|
|
248
|
+
[GUARDRAIL_APPLIES_TO_PARAMETER_ID]: fileSupportIndicator
|
|
249
|
+
} : void 0
|
|
244
250
|
})
|
|
245
251
|
}),
|
|
246
252
|
showScopeSelector && /*#__PURE__*/ jsx(GuardrailScopeSelector, {
|
|
@@ -33,15 +33,17 @@ const enum_list_chips_field_cjs_namespaceObject = require("./components/enum-lis
|
|
|
33
33
|
const map_enum_field_cjs_namespaceObject = require("./components/map-enum-field.cjs");
|
|
34
34
|
const external_form_schema_builder_cjs_namespaceObject = require("./form-schema-builder.cjs");
|
|
35
35
|
const external_i18n_cjs_namespaceObject = require("./i18n.cjs");
|
|
36
|
+
const external_parameter_footer_bridge_cjs_namespaceObject = require("./parameter-footer-bridge.cjs");
|
|
36
37
|
const external_render_parameter_bridge_cjs_namespaceObject = require("./render-parameter-bridge.cjs");
|
|
37
38
|
const external_use_metadata_form_bridge_cjs_namespaceObject = require("./use-metadata-form-bridge.cjs");
|
|
38
39
|
const GUARDRAIL_CUSTOM_COMPONENTS = {
|
|
39
40
|
[external_form_schema_builder_cjs_namespaceObject.GUARDRAIL_ENUM_LIST_CHIPS_COMPONENT]: enum_list_chips_field_cjs_namespaceObject.EnumListChipsField,
|
|
40
41
|
[external_form_schema_builder_cjs_namespaceObject.GUARDRAIL_MAP_ENUM_COMPONENT]: map_enum_field_cjs_namespaceObject.MapEnumField,
|
|
41
|
-
[external_form_schema_builder_cjs_namespaceObject.GUARDRAIL_RENDER_PARAMETER_COMPONENT]: external_render_parameter_bridge_cjs_namespaceObject.RenderParameterBridge
|
|
42
|
+
[external_form_schema_builder_cjs_namespaceObject.GUARDRAIL_RENDER_PARAMETER_COMPONENT]: external_render_parameter_bridge_cjs_namespaceObject.RenderParameterBridge,
|
|
43
|
+
[external_form_schema_builder_cjs_namespaceObject.GUARDRAIL_PARAMETER_FOOTER_COMPONENT]: external_parameter_footer_bridge_cjs_namespaceObject.ParameterFooterBridge
|
|
42
44
|
};
|
|
43
45
|
const EMPTY_OVERRIDES = new Set();
|
|
44
|
-
const GuardrailValidatorForm = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)(({ parameterDefinitions, parameters, onChange, errors, onClearError, renderParameter, overrideParameterIds, validateLive = true, labels: labelOverrides, className }, ref)=>{
|
|
46
|
+
const GuardrailValidatorForm = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)(({ parameterDefinitions, parameters, onChange, errors, onClearError, renderParameter, overrideParameterIds, validateLive = true, parameterFooters, labels: labelOverrides, className }, ref)=>{
|
|
45
47
|
const labels = (0, external_i18n_cjs_namespaceObject.useGuardrailFormLabels)(labelOverrides);
|
|
46
48
|
const defsById = (0, external_react_namespaceObject.useMemo)(()=>new Map(parameterDefinitions.map((d)=>[
|
|
47
49
|
d.id,
|
|
@@ -118,17 +120,23 @@ const GuardrailValidatorForm = /*#__PURE__*/ (0, external_react_namespaceObject.
|
|
|
118
120
|
parameterDefinitions,
|
|
119
121
|
parameters
|
|
120
122
|
]);
|
|
123
|
+
const footerIdsKey = Object.entries(parameterFooters ?? {}).filter(([, node])=>null != node && false !== node).map(([id])=>id).join('\n');
|
|
124
|
+
const footerIds = (0, external_react_namespaceObject.useMemo)(()=>new Set(footerIdsKey ? footerIdsKey.split('\n') : []), [
|
|
125
|
+
footerIdsKey
|
|
126
|
+
]);
|
|
121
127
|
const [initialParameters] = (0, external_react_namespaceObject.useState)(parameters);
|
|
122
128
|
const schema = (0, external_react_namespaceObject.useMemo)(()=>(0, external_form_schema_builder_cjs_namespaceObject.buildGuardrailFormSchema)(parameterDefinitions, labels, {
|
|
123
129
|
overriddenIds,
|
|
124
130
|
initialParameters,
|
|
125
|
-
enumSyntheticValues
|
|
131
|
+
enumSyntheticValues,
|
|
132
|
+
footerIds
|
|
126
133
|
}), [
|
|
127
134
|
parameterDefinitions,
|
|
128
135
|
labels,
|
|
129
136
|
overriddenIds,
|
|
130
137
|
initialParameters,
|
|
131
|
-
enumSyntheticValues
|
|
138
|
+
enumSyntheticValues,
|
|
139
|
+
footerIds
|
|
132
140
|
]);
|
|
133
141
|
const values = (0, external_react_namespaceObject.useMemo)(()=>{
|
|
134
142
|
const record = {};
|
|
@@ -181,10 +189,13 @@ const GuardrailValidatorForm = /*#__PURE__*/ (0, external_react_namespaceObject.
|
|
|
181
189
|
className: (0, apollo_wind_namespaceObject.cn)('space-y-4', className),
|
|
182
190
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_render_parameter_bridge_cjs_namespaceObject.GuardrailRenderParameterProvider, {
|
|
183
191
|
value: bridgeContext,
|
|
184
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
192
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_parameter_footer_bridge_cjs_namespaceObject.GuardrailParameterFootersProvider, {
|
|
193
|
+
value: parameterFooters,
|
|
194
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.MetadataForm, {
|
|
195
|
+
schema: formSchema,
|
|
196
|
+
plugins: plugins,
|
|
197
|
+
container: "div"
|
|
198
|
+
})
|
|
188
199
|
})
|
|
189
200
|
})
|
|
190
201
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guardrail-validator-form.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/Guardrails/guardrail-validator-form.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"guardrail-validator-form.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/Guardrails/guardrail-validator-form.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAEV,2BAA2B,EAE5B,MAAM,SAAS,CAAC;AAwCjB,eAAO,MAAM,sBAAsB,wHA4LlC,CAAC"}
|
|
@@ -3,17 +3,19 @@ import { MetadataForm, cn } from "@uipath/apollo-wind";
|
|
|
3
3
|
import { forwardRef, useCallback, useMemo, useRef, useState } from "react";
|
|
4
4
|
import { EnumListChipsField } from "./components/enum-list-chips-field.js";
|
|
5
5
|
import { MapEnumField } from "./components/map-enum-field.js";
|
|
6
|
-
import { GUARDRAIL_ENUM_LIST_CHIPS_COMPONENT, GUARDRAIL_MAP_ENUM_COMPONENT, GUARDRAIL_RENDER_PARAMETER_COMPONENT, buildGuardrailFormSchema, coerceGuardrailParameterValue } from "./form-schema-builder.js";
|
|
6
|
+
import { GUARDRAIL_ENUM_LIST_CHIPS_COMPONENT, GUARDRAIL_MAP_ENUM_COMPONENT, GUARDRAIL_PARAMETER_FOOTER_COMPONENT, GUARDRAIL_RENDER_PARAMETER_COMPONENT, buildGuardrailFormSchema, coerceGuardrailParameterValue } from "./form-schema-builder.js";
|
|
7
7
|
import { useGuardrailFormLabels } from "./i18n.js";
|
|
8
|
+
import { GuardrailParameterFootersProvider, ParameterFooterBridge } from "./parameter-footer-bridge.js";
|
|
8
9
|
import { GuardrailRenderParameterProvider, RenderParameterBridge } from "./render-parameter-bridge.js";
|
|
9
10
|
import { useMetadataFormBridge } from "./use-metadata-form-bridge.js";
|
|
10
11
|
const GUARDRAIL_CUSTOM_COMPONENTS = {
|
|
11
12
|
[GUARDRAIL_ENUM_LIST_CHIPS_COMPONENT]: EnumListChipsField,
|
|
12
13
|
[GUARDRAIL_MAP_ENUM_COMPONENT]: MapEnumField,
|
|
13
|
-
[GUARDRAIL_RENDER_PARAMETER_COMPONENT]: RenderParameterBridge
|
|
14
|
+
[GUARDRAIL_RENDER_PARAMETER_COMPONENT]: RenderParameterBridge,
|
|
15
|
+
[GUARDRAIL_PARAMETER_FOOTER_COMPONENT]: ParameterFooterBridge
|
|
14
16
|
};
|
|
15
17
|
const EMPTY_OVERRIDES = new Set();
|
|
16
|
-
const GuardrailValidatorForm = /*#__PURE__*/ forwardRef(({ parameterDefinitions, parameters, onChange, errors, onClearError, renderParameter, overrideParameterIds, validateLive = true, labels: labelOverrides, className }, ref)=>{
|
|
18
|
+
const GuardrailValidatorForm = /*#__PURE__*/ forwardRef(({ parameterDefinitions, parameters, onChange, errors, onClearError, renderParameter, overrideParameterIds, validateLive = true, parameterFooters, labels: labelOverrides, className }, ref)=>{
|
|
17
19
|
const labels = useGuardrailFormLabels(labelOverrides);
|
|
18
20
|
const defsById = useMemo(()=>new Map(parameterDefinitions.map((d)=>[
|
|
19
21
|
d.id,
|
|
@@ -90,17 +92,23 @@ const GuardrailValidatorForm = /*#__PURE__*/ forwardRef(({ parameterDefinitions,
|
|
|
90
92
|
parameterDefinitions,
|
|
91
93
|
parameters
|
|
92
94
|
]);
|
|
95
|
+
const footerIdsKey = Object.entries(parameterFooters ?? {}).filter(([, node])=>null != node && false !== node).map(([id])=>id).join('\n');
|
|
96
|
+
const footerIds = useMemo(()=>new Set(footerIdsKey ? footerIdsKey.split('\n') : []), [
|
|
97
|
+
footerIdsKey
|
|
98
|
+
]);
|
|
93
99
|
const [initialParameters] = useState(parameters);
|
|
94
100
|
const schema = useMemo(()=>buildGuardrailFormSchema(parameterDefinitions, labels, {
|
|
95
101
|
overriddenIds,
|
|
96
102
|
initialParameters,
|
|
97
|
-
enumSyntheticValues
|
|
103
|
+
enumSyntheticValues,
|
|
104
|
+
footerIds
|
|
98
105
|
}), [
|
|
99
106
|
parameterDefinitions,
|
|
100
107
|
labels,
|
|
101
108
|
overriddenIds,
|
|
102
109
|
initialParameters,
|
|
103
|
-
enumSyntheticValues
|
|
110
|
+
enumSyntheticValues,
|
|
111
|
+
footerIds
|
|
104
112
|
]);
|
|
105
113
|
const values = useMemo(()=>{
|
|
106
114
|
const record = {};
|
|
@@ -153,10 +161,13 @@ const GuardrailValidatorForm = /*#__PURE__*/ forwardRef(({ parameterDefinitions,
|
|
|
153
161
|
className: cn('space-y-4', className),
|
|
154
162
|
children: /*#__PURE__*/ jsx(GuardrailRenderParameterProvider, {
|
|
155
163
|
value: bridgeContext,
|
|
156
|
-
children: /*#__PURE__*/ jsx(
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
164
|
+
children: /*#__PURE__*/ jsx(GuardrailParameterFootersProvider, {
|
|
165
|
+
value: parameterFooters,
|
|
166
|
+
children: /*#__PURE__*/ jsx(MetadataForm, {
|
|
167
|
+
schema: formSchema,
|
|
168
|
+
plugins: plugins,
|
|
169
|
+
container: "div"
|
|
170
|
+
})
|
|
160
171
|
})
|
|
161
172
|
})
|
|
162
173
|
});
|
|
@@ -278,6 +278,16 @@ function buildGuardrailFileSupportLabels(_) {
|
|
|
278
278
|
id: 'guardrails.file-support.unavailable-automation-suite',
|
|
279
279
|
message: 'Text prompts only (files are not available in this environment)'
|
|
280
280
|
}),
|
|
281
|
+
uninspectedFormats: _({
|
|
282
|
+
id: 'guardrails.file-support.uninspected-formats',
|
|
283
|
+
message: 'Not inspected yet: {formats}. Files of these kinds attached to a run pass this guardrail without being checked.',
|
|
284
|
+
values: TEMPLATE_TOKENS
|
|
285
|
+
}),
|
|
286
|
+
visionModelFormats: _({
|
|
287
|
+
id: 'guardrails.file-support.vision-model-formats',
|
|
288
|
+
message: 'Read only when the selected model supports images: {formats}.',
|
|
289
|
+
values: TEMPLATE_TOKENS
|
|
290
|
+
}),
|
|
281
291
|
formats: {
|
|
282
292
|
Text: _({
|
|
283
293
|
id: 'guardrails.file-support.format.Text',
|