@uipath/apollo-react 6.64.1 → 6.65.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 +1 -0
- package/dist/canvas/components/Guardrails/builder-types.d.ts.map +1 -1
- package/dist/canvas/components/Guardrails/builder-utils.cjs +9 -2
- package/dist/canvas/components/Guardrails/builder-utils.d.ts +1 -0
- package/dist/canvas/components/Guardrails/builder-utils.d.ts.map +1 -1
- package/dist/canvas/components/Guardrails/builder-utils.js +6 -2
- package/dist/canvas/components/Guardrails/components/centralized-guardrail-row.cjs +3 -1
- package/dist/canvas/components/Guardrails/components/centralized-guardrail-row.d.ts.map +1 -1
- package/dist/canvas/components/Guardrails/components/centralized-guardrail-row.js +3 -1
- package/dist/canvas/components/Guardrails/components/escalate-action-fields.cjs +23 -8
- package/dist/canvas/components/Guardrails/components/escalate-action-fields.d.ts +2 -1
- package/dist/canvas/components/Guardrails/components/escalate-action-fields.d.ts.map +1 -1
- package/dist/canvas/components/Guardrails/components/escalate-action-fields.js +23 -8
- package/dist/canvas/components/Guardrails/components/guardrail-action-section.cjs +20 -20
- package/dist/canvas/components/Guardrails/components/guardrail-action-section.d.ts +5 -1
- package/dist/canvas/components/Guardrails/components/guardrail-action-section.d.ts.map +1 -1
- package/dist/canvas/components/Guardrails/components/guardrail-action-section.js +20 -20
- package/dist/canvas/components/Guardrails/components/guardrail-list-row.cjs +2 -1
- package/dist/canvas/components/Guardrails/components/guardrail-list-row.d.ts.map +1 -1
- package/dist/canvas/components/Guardrails/components/guardrail-list-row.js +2 -1
- package/dist/canvas/components/Guardrails/components/guardrail-palette-item.cjs +5 -1
- package/dist/canvas/components/Guardrails/components/guardrail-palette-item.d.ts +1 -0
- package/dist/canvas/components/Guardrails/components/guardrail-palette-item.d.ts.map +1 -1
- package/dist/canvas/components/Guardrails/components/guardrail-palette-item.js +5 -1
- package/dist/canvas/components/Guardrails/components/guardrail-scope-selector.cjs +9 -2
- package/dist/canvas/components/Guardrails/components/guardrail-scope-selector.d.ts +2 -1
- package/dist/canvas/components/Guardrails/components/guardrail-scope-selector.d.ts.map +1 -1
- package/dist/canvas/components/Guardrails/components/guardrail-scope-selector.js +9 -2
- package/dist/canvas/components/Guardrails/custom-guardrail-builder.cjs +14 -6
- package/dist/canvas/components/Guardrails/custom-guardrail-builder.d.ts +4 -1
- package/dist/canvas/components/Guardrails/custom-guardrail-builder.d.ts.map +1 -1
- package/dist/canvas/components/Guardrails/custom-guardrail-builder.js +14 -6
- package/dist/canvas/components/Guardrails/guardrail-builder.cjs +25 -6
- package/dist/canvas/components/Guardrails/guardrail-builder.d.ts +7 -2
- package/dist/canvas/components/Guardrails/guardrail-builder.d.ts.map +1 -1
- package/dist/canvas/components/Guardrails/guardrail-builder.js +26 -7
- package/dist/canvas/components/Guardrails/guardrail-form-layout.cjs +17 -0
- package/dist/canvas/components/Guardrails/guardrail-form-layout.d.ts +1 -1
- package/dist/canvas/components/Guardrails/guardrail-form-layout.d.ts.map +1 -1
- package/dist/canvas/components/Guardrails/guardrail-form-layout.js +17 -0
- package/dist/canvas/components/Guardrails/guardrail-palette-utils.cjs +4 -4
- package/dist/canvas/components/Guardrails/guardrail-palette-utils.d.ts +1 -1
- package/dist/canvas/components/Guardrails/guardrail-palette-utils.d.ts.map +1 -1
- package/dist/canvas/components/Guardrails/guardrail-palette-utils.js +4 -4
- package/dist/canvas/components/Guardrails/guardrail-palette.cjs +16 -7
- package/dist/canvas/components/Guardrails/guardrail-palette.d.ts +2 -1
- package/dist/canvas/components/Guardrails/guardrail-palette.d.ts.map +1 -1
- package/dist/canvas/components/Guardrails/guardrail-palette.js +16 -7
- package/dist/canvas/components/Guardrails/i18n.cjs +13 -0
- package/dist/canvas/components/Guardrails/i18n.d.ts +9 -6
- package/dist/canvas/components/Guardrails/i18n.d.ts.map +1 -1
- package/dist/canvas/components/Guardrails/i18n.js +13 -0
- package/package.json +3 -3
|
@@ -74,6 +74,7 @@ export interface GuardrailDefinition {
|
|
|
74
74
|
status: GuardrailDefinitionStatus;
|
|
75
75
|
usageNote?: React.ReactNode;
|
|
76
76
|
byoValidatorName?: string;
|
|
77
|
+
byoConnectorName?: string;
|
|
77
78
|
}
|
|
78
79
|
export declare const GUARDRAIL_BYO_VALIDATOR_TYPE = "byo";
|
|
79
80
|
export interface GuardrailBuilderValue {
|
|
@@ -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,sBAAsB,CAAC,CAAC,MAAM,OAAO,sBAAsB,CAAC,CAAC;
|
|
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,sBAAsB,CAAC,CAAC,MAAM,OAAO,sBAAsB,CAAC,CAAC;AASvE,MAAM,MAAM,0BAA0B,GAClC;IAAE,IAAI,EAAE,CAAC,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GAC/C;IAAE,IAAI,EAAE,CAAC,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GAC/C;IAAE,IAAI,EAAE,CAAC,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC1B;IAAE,IAAI,EAAE,CAAC,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GACnD;IAAE,IAAI,EAAE,CAAC,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC1B;IAAE,IAAI,EAAE,CAAC,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC;AAExD,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,MAAM,eAAe,GACvB;IAAE,WAAW,EAAE,KAAK,CAAC;IAAC,aAAa,EAAE,sBAAsB,CAAA;CAAE,GAC7D;IAAE,WAAW,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAGxC;IAAE,WAAW,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,OAAO,EAAE,CAAA;CAAE,GAC5C;IAAE,WAAW,EAAE,UAAU,CAAC;IAAC,GAAG,EAAE,oBAAoB,CAAC;IAAC,SAAS,EAAE,0BAA0B,CAAA;CAAE,CAAC;AAGlG,MAAM,MAAM,uBAAuB,GAAG,OAAO,CAAC,eAAe,EAAE;IAAE,WAAW,EAAE,UAAU,CAAA;CAAE,CAAC,CAAC;AAE5F,MAAM,MAAM,yBAAyB,GACjC,WAAW,GACX,iBAAiB,GACjB,cAAc,GACd,UAAU,CAAC;AASf,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,cAAc,EAAE,CAAC;IAChC,UAAU,EAAE,4BAA4B,EAAE,CAAC;IAC3C,MAAM,EAAE,yBAAyB,CAAC;IAElC,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE5B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAGD,eAAO,MAAM,4BAA4B,QAAQ,CAAC;AAGlD,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,cAAc,EAAE,kBAAkB,CAAC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,MAAM,EAAE,eAAe,CAAC;IACxB,eAAe,EAAE,OAAO,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,mBAAmB,EAAE,2BAA2B,EAAE,CAAC;IACnD,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAMD,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrC;AAGD,MAAM,MAAM,qBAAqB,GAAG,IAAI,CACtC,sBAAsB,EACtB,aAAa,GAAG,cAAc,GAAG,WAAW,GAAG,WAAW,CAC3D,CAAC;AAGF,MAAM,MAAM,6BAA6B,GAAG,IAAI,CAAC,qBAAqB,EAAE,WAAW,GAAG,WAAW,CAAC,CAAC;AAGnG,MAAM,WAAW,+BAA+B;IAC9C,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAEvB,YAAY,EAAE,MAAM,CAAC;IAErB,WAAW,EAAE,MAAM,CAAC;IAKpB,OAAO,EAAE,MAAM,CAAC;IAEhB,OAAO,EAAE,OAAO,CAAC;IAMjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,CAAC,SAAS,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IACtE,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAGD,MAAM,WAAW,yBAAyB;IAExC,GAAG,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACjC,QAAQ,EAAE,CAAC,GAAG,EAAE,oBAAoB,GAAG,IAAI,KAAK,IAAI,CAAC;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"}
|
|
@@ -24,6 +24,7 @@ var __webpack_require__ = {};
|
|
|
24
24
|
var __webpack_exports__ = {};
|
|
25
25
|
__webpack_require__.r(__webpack_exports__);
|
|
26
26
|
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
isModelledGuardrailRecipientType: ()=>isModelledGuardrailRecipientType,
|
|
27
28
|
getGuardrailSelectorErrorFields: ()=>getGuardrailSelectorErrorFields,
|
|
28
29
|
generateGuardrailId: ()=>generateGuardrailId,
|
|
29
30
|
initGuardrailBuilderFormData: ()=>initGuardrailBuilderFormData,
|
|
@@ -32,6 +33,10 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
32
33
|
});
|
|
33
34
|
const external_builder_types_cjs_namespaceObject = require("./builder-types.cjs");
|
|
34
35
|
const external_utils_cjs_namespaceObject = require("./utils.cjs");
|
|
36
|
+
const MODELLED_RECIPIENT_TYPES = new Set(Object.values(external_builder_types_cjs_namespaceObject.GuardrailRecipientType));
|
|
37
|
+
function isModelledGuardrailRecipientType(type) {
|
|
38
|
+
return MODELLED_RECIPIENT_TYPES.has(type);
|
|
39
|
+
}
|
|
35
40
|
function generateGuardrailId() {
|
|
36
41
|
return `guardrail-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 7)}`;
|
|
37
42
|
}
|
|
@@ -80,7 +85,7 @@ function getGuardrailActionErrorFields(action) {
|
|
|
80
85
|
case 'escalate':
|
|
81
86
|
{
|
|
82
87
|
const recipient = action.recipient;
|
|
83
|
-
const filled = 'value' in recipient ? recipient.value.trim().length > 0 : recipient.assetName.trim().length > 0;
|
|
88
|
+
const filled = !isModelledGuardrailRecipientType(recipient.type) || ('value' in recipient ? recipient.value.trim().length > 0 : recipient.assetName.trim().length > 0);
|
|
84
89
|
if (!filled) fields.push('recipient');
|
|
85
90
|
if (!action.app.id) fields.push('actionApp');
|
|
86
91
|
break;
|
|
@@ -132,12 +137,14 @@ exports.generateGuardrailId = __webpack_exports__.generateGuardrailId;
|
|
|
132
137
|
exports.getGuardrailActionErrorFields = __webpack_exports__.getGuardrailActionErrorFields;
|
|
133
138
|
exports.getGuardrailSelectorErrorFields = __webpack_exports__.getGuardrailSelectorErrorFields;
|
|
134
139
|
exports.initGuardrailBuilderFormData = __webpack_exports__.initGuardrailBuilderFormData;
|
|
140
|
+
exports.isModelledGuardrailRecipientType = __webpack_exports__.isModelledGuardrailRecipientType;
|
|
135
141
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
136
142
|
"createDefaultGuardrailAction",
|
|
137
143
|
"generateGuardrailId",
|
|
138
144
|
"getGuardrailActionErrorFields",
|
|
139
145
|
"getGuardrailSelectorErrorFields",
|
|
140
|
-
"initGuardrailBuilderFormData"
|
|
146
|
+
"initGuardrailBuilderFormData",
|
|
147
|
+
"isModelledGuardrailRecipientType"
|
|
141
148
|
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
142
149
|
Object.defineProperty(exports, '__esModule', {
|
|
143
150
|
value: true
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type GuardrailAction, type GuardrailBuilderValue, type GuardrailDefinition, type GuardrailScope, type GuardrailSelector } from './builder-types';
|
|
2
|
+
export declare function isModelledGuardrailRecipientType(type: number): boolean;
|
|
2
3
|
export declare function generateGuardrailId(): string;
|
|
3
4
|
export declare function createDefaultGuardrailAction(type: GuardrailAction['$actionType']): GuardrailAction;
|
|
4
5
|
export type GuardrailActionErrorField = 'blockReason' | 'filterFields' | 'recipient' | 'actionApp';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder-utils.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/Guardrails/builder-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EAExB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACvB,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"builder-utils.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/Guardrails/builder-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EAExB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACvB,MAAM,iBAAiB,CAAC;AAazB,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEtE;AAED,wBAAgB,mBAAmB,IAAI,MAAM,CAE5C;AAGD,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,eAAe,CAAC,aAAa,CAAC,GACnC,eAAe,CAejB;AAED,MAAM,MAAM,yBAAyB,GAAG,aAAa,GAAG,cAAc,GAAG,WAAW,GAAG,WAAW,CAAC;AAGnG,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,eAAe,GACtB,yBAAyB,EAAE,CAuB7B;AAED,MAAM,MAAM,2BAA2B,GAAG,QAAQ,GAAG,WAAW,CAAC;AAMjE,wBAAgB,+BAA+B,CAC7C,QAAQ,EAAE,iBAAiB,GAC1B,2BAA2B,EAAE,CAU/B;AAED,MAAM,WAAW,wBAAwB;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,MAAM,EAAE,eAAe,CAAC;IACxB,eAAe,EAAE,OAAO,CAAC;IACzB,mBAAmB,EAAE,qBAAqB,CAAC,qBAAqB,CAAC,CAAC;CACnE;AAUD,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,mBAAmB,EAC/B,KAAK,EAAE,cAAc,EACrB,QAAQ,CAAC,EAAE,qBAAqB,EAChC,QAAQ,CAAC,EAAE,MAAM,GAChB,wBAAwB,CAwC1B"}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { GuardrailRecipientType } from "./builder-types.js";
|
|
2
2
|
import { normalizeGuardrailParameters, seedGuardrailParameters } from "./utils.js";
|
|
3
|
+
const MODELLED_RECIPIENT_TYPES = new Set(Object.values(GuardrailRecipientType));
|
|
4
|
+
function isModelledGuardrailRecipientType(type) {
|
|
5
|
+
return MODELLED_RECIPIENT_TYPES.has(type);
|
|
6
|
+
}
|
|
3
7
|
function generateGuardrailId() {
|
|
4
8
|
return `guardrail-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 7)}`;
|
|
5
9
|
}
|
|
@@ -48,7 +52,7 @@ function getGuardrailActionErrorFields(action) {
|
|
|
48
52
|
case 'escalate':
|
|
49
53
|
{
|
|
50
54
|
const recipient = action.recipient;
|
|
51
|
-
const filled = 'value' in recipient ? recipient.value.trim().length > 0 : recipient.assetName.trim().length > 0;
|
|
55
|
+
const filled = !isModelledGuardrailRecipientType(recipient.type) || ('value' in recipient ? recipient.value.trim().length > 0 : recipient.assetName.trim().length > 0);
|
|
52
56
|
if (!filled) fields.push('recipient');
|
|
53
57
|
if (!action.app.id) fields.push('actionApp');
|
|
54
58
|
break;
|
|
@@ -95,4 +99,4 @@ function initGuardrailBuilderFormData(definition, scope, existing, toolName) {
|
|
|
95
99
|
validatorParameters: seedGuardrailParameters(definition.parameters)
|
|
96
100
|
};
|
|
97
101
|
}
|
|
98
|
-
export { createDefaultGuardrailAction, generateGuardrailId, getGuardrailActionErrorFields, getGuardrailSelectorErrorFields, initGuardrailBuilderFormData };
|
|
102
|
+
export { createDefaultGuardrailAction, generateGuardrailId, getGuardrailActionErrorFields, getGuardrailSelectorErrorFields, initGuardrailBuilderFormData, isModelledGuardrailRecipientType };
|
|
@@ -82,11 +82,13 @@ function CentralizedGuardrailRow({ guardrail, name, description, definition, isC
|
|
|
82
82
|
}),
|
|
83
83
|
description && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
84
84
|
className: "block truncate text-xs text-muted-foreground",
|
|
85
|
+
title: description,
|
|
85
86
|
children: description
|
|
86
87
|
}),
|
|
87
88
|
void 0 !== providerName && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("span", {
|
|
88
|
-
className: "block truncate text-xs text-muted-foreground",
|
|
89
|
+
className: "block truncate text-xs italic text-muted-foreground",
|
|
89
90
|
"data-slot": "centralized-guardrail-provider",
|
|
91
|
+
title: `${labels.provider}: ${providerName}`,
|
|
90
92
|
children: [
|
|
91
93
|
labels.provider,
|
|
92
94
|
": ",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"centralized-guardrail-row.d.ts","sourceRoot":"","sources":["../../../../../src/canvas/components/Guardrails/components/centralized-guardrail-row.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,8BAA8B,EAAE,MAAM,sBAAsB,CAAC;AACjG,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAC;AAK3D,MAAM,WAAW,4BAA4B;IAC3C,SAAS,EAAE,oBAAoB,CAAC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,8BAA8B,CAAC;IAC5C,eAAe,EAAE,OAAO,CAAC;IAEzB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,MAAM,EAAE,2BAA2B,CAAC;IACpC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAMD,wBAAgB,uBAAuB,CAAC,EACtC,SAAS,EACT,IAAI,EACJ,WAAW,EACX,UAAU,EACV,eAAe,EACf,UAAU,EACV,MAAM,EACN,QAAQ,GACT,EAAE,4BAA4B,
|
|
1
|
+
{"version":3,"file":"centralized-guardrail-row.d.ts","sourceRoot":"","sources":["../../../../../src/canvas/components/Guardrails/components/centralized-guardrail-row.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,8BAA8B,EAAE,MAAM,sBAAsB,CAAC;AACjG,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAC;AAK3D,MAAM,WAAW,4BAA4B;IAC3C,SAAS,EAAE,oBAAoB,CAAC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,8BAA8B,CAAC;IAC5C,eAAe,EAAE,OAAO,CAAC;IAEzB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,MAAM,EAAE,2BAA2B,CAAC;IACpC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAMD,wBAAgB,uBAAuB,CAAC,EACtC,SAAS,EACT,IAAI,EACJ,WAAW,EACX,UAAU,EACV,eAAe,EACf,UAAU,EACV,MAAM,EACN,QAAQ,GACT,EAAE,4BAA4B,2CA4F9B"}
|
|
@@ -54,11 +54,13 @@ function CentralizedGuardrailRow({ guardrail, name, description, definition, isC
|
|
|
54
54
|
}),
|
|
55
55
|
description && /*#__PURE__*/ jsx("span", {
|
|
56
56
|
className: "block truncate text-xs text-muted-foreground",
|
|
57
|
+
title: description,
|
|
57
58
|
children: description
|
|
58
59
|
}),
|
|
59
60
|
void 0 !== providerName && /*#__PURE__*/ jsxs("span", {
|
|
60
|
-
className: "block truncate text-xs text-muted-foreground",
|
|
61
|
+
className: "block truncate text-xs italic text-muted-foreground",
|
|
61
62
|
"data-slot": "centralized-guardrail-provider",
|
|
63
|
+
title: `${labels.provider}: ${providerName}`,
|
|
62
64
|
children: [
|
|
63
65
|
labels.provider,
|
|
64
66
|
": ",
|
|
@@ -31,8 +31,16 @@ const apollo_wind_namespaceObject = require("@uipath/apollo-wind");
|
|
|
31
31
|
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
32
32
|
const external_react_namespaceObject = require("react");
|
|
33
33
|
const external_builder_types_cjs_namespaceObject = require("../builder-types.cjs");
|
|
34
|
+
const external_builder_utils_cjs_namespaceObject = require("../builder-utils.cjs");
|
|
34
35
|
const external_i18n_cjs_namespaceObject = require("../i18n.cjs");
|
|
35
|
-
|
|
36
|
+
const UNMODELLED_RECIPIENT_DISPLAY_TYPES = {
|
|
37
|
+
7: external_builder_types_cjs_namespaceObject.GuardrailRecipientType.StaticEmail,
|
|
38
|
+
8: external_builder_types_cjs_namespaceObject.GuardrailRecipientType.StaticGroupName,
|
|
39
|
+
9: external_builder_types_cjs_namespaceObject.GuardrailRecipientType.Group,
|
|
40
|
+
10: external_builder_types_cjs_namespaceObject.GuardrailRecipientType.Group,
|
|
41
|
+
11: external_builder_types_cjs_namespaceObject.GuardrailRecipientType.Group
|
|
42
|
+
};
|
|
43
|
+
function EscalateActionFields({ action, onChange, actionTypeSelect, asGridItems = false, errors, recipientTypeDisabled = false, labels: labelOverrides, renderRecipientSearch, renderStaticRecipient, renderAppPicker, escalateHelp, className }) {
|
|
36
44
|
const labels = (0, external_i18n_cjs_namespaceObject.useGuardrailActionLabels)(labelOverrides);
|
|
37
45
|
const uid = (0, external_react_namespaceObject.useId)();
|
|
38
46
|
const recipientTypeLabels = {
|
|
@@ -42,7 +50,12 @@ function EscalateActionFields({ action, onChange, actionTypeSelect, asGridItems
|
|
|
42
50
|
[external_builder_types_cjs_namespaceObject.GuardrailRecipientType.StaticGroupName]: labels.recipientGroupNameLabel
|
|
43
51
|
};
|
|
44
52
|
const recipientType = action.recipient.type;
|
|
45
|
-
const
|
|
53
|
+
const isUnmodelled = !(0, external_builder_utils_cjs_namespaceObject.isModelledGuardrailRecipientType)(recipientType);
|
|
54
|
+
const displayedRecipientType = isUnmodelled ? UNMODELLED_RECIPIENT_DISPLAY_TYPES[recipientType] ?? recipientType : recipientType === external_builder_types_cjs_namespaceObject.GuardrailRecipientType.AssetEmail ? external_builder_types_cjs_namespaceObject.GuardrailRecipientType.StaticEmail : recipientType === external_builder_types_cjs_namespaceObject.GuardrailRecipientType.AssetGroupName ? external_builder_types_cjs_namespaceObject.GuardrailRecipientType.StaticGroupName : recipientType;
|
|
55
|
+
const editedRecipient = isUnmodelled ? displayedRecipientType === external_builder_types_cjs_namespaceObject.GuardrailRecipientType.StaticEmail || displayedRecipientType === external_builder_types_cjs_namespaceObject.GuardrailRecipientType.StaticGroupName ? {
|
|
56
|
+
type: displayedRecipientType,
|
|
57
|
+
value: ''
|
|
58
|
+
} : null : action.recipient;
|
|
46
59
|
const handleRecipientTypeChange = (0, external_react_namespaceObject.useCallback)((value)=>{
|
|
47
60
|
const newType = Number(value);
|
|
48
61
|
let recipient;
|
|
@@ -110,7 +123,7 @@ function EscalateActionFields({ action, onChange, actionTypeSelect, asGridItems
|
|
|
110
123
|
onChange
|
|
111
124
|
]);
|
|
112
125
|
const handleTextValueChange = (0, external_react_namespaceObject.useCallback)((value)=>{
|
|
113
|
-
const r = action.recipient;
|
|
126
|
+
const r = editedRecipient ?? action.recipient;
|
|
114
127
|
if (r.type === external_builder_types_cjs_namespaceObject.GuardrailRecipientType.StaticEmail || r.type === external_builder_types_cjs_namespaceObject.GuardrailRecipientType.StaticGroupName) onChange({
|
|
115
128
|
...action,
|
|
116
129
|
recipient: {
|
|
@@ -127,19 +140,20 @@ function EscalateActionFields({ action, onChange, actionTypeSelect, asGridItems
|
|
|
127
140
|
});
|
|
128
141
|
}, [
|
|
129
142
|
action,
|
|
143
|
+
editedRecipient,
|
|
130
144
|
onChange
|
|
131
145
|
]);
|
|
132
|
-
const recipientValue = 'value' in
|
|
133
|
-
const recipientDisplayValue = ('displayName' in
|
|
146
|
+
const recipientValue = editedRecipient ? 'value' in editedRecipient ? editedRecipient.value : editedRecipient.assetName : '';
|
|
147
|
+
const recipientDisplayValue = (editedRecipient && 'displayName' in editedRecipient ? editedRecipient.displayName : '') || recipientValue;
|
|
134
148
|
const isSearchable = recipientType === external_builder_types_cjs_namespaceObject.GuardrailRecipientType.User || recipientType === external_builder_types_cjs_namespaceObject.GuardrailRecipientType.Group;
|
|
135
149
|
const searchKind = recipientType === external_builder_types_cjs_namespaceObject.GuardrailRecipientType.User ? 'user' : 'group';
|
|
136
150
|
const searchPlaceholder = 'user' === searchKind ? labels.userSearchPlaceholder : labels.groupSearchPlaceholder;
|
|
137
151
|
const recipientLabel = recipientTypeLabels[displayedRecipientType] ?? labels.recipientFallbackLabel;
|
|
138
152
|
const recipientFieldId = `${uid}-escalate-recipient`;
|
|
139
153
|
const recipientLabelId = `${recipientFieldId}-label`;
|
|
140
|
-
const staticNode = isSearchable ? void 0 : renderStaticRecipient?.({
|
|
154
|
+
const staticNode = isSearchable || !editedRecipient ? void 0 : renderStaticRecipient?.({
|
|
141
155
|
kind: displayedRecipientType === external_builder_types_cjs_namespaceObject.GuardrailRecipientType.StaticEmail ? 'email' : 'groupName',
|
|
142
|
-
recipient:
|
|
156
|
+
recipient: editedRecipient,
|
|
143
157
|
label: recipientLabel,
|
|
144
158
|
labelId: recipientLabelId,
|
|
145
159
|
invalid: Boolean(errors?.recipient),
|
|
@@ -174,6 +188,7 @@ function EscalateActionFields({ action, onChange, actionTypeSelect, asGridItems
|
|
|
174
188
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(apollo_wind_namespaceObject.Select, {
|
|
175
189
|
value: String(displayedRecipientType),
|
|
176
190
|
onValueChange: handleRecipientTypeChange,
|
|
191
|
+
disabled: recipientTypeDisabled,
|
|
177
192
|
children: [
|
|
178
193
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.SelectTrigger, {
|
|
179
194
|
id: `${uid}-escalate-recipient-type`,
|
|
@@ -190,7 +205,7 @@ function EscalateActionFields({ action, onChange, actionTypeSelect, asGridItems
|
|
|
190
205
|
})
|
|
191
206
|
]
|
|
192
207
|
}),
|
|
193
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(apollo_wind_namespaceObject.FormField, {
|
|
208
|
+
editedRecipient && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(apollo_wind_namespaceObject.FormField, {
|
|
194
209
|
children: [
|
|
195
210
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(apollo_wind_namespaceObject.Label, {
|
|
196
211
|
id: recipientLabelId,
|
|
@@ -7,6 +7,7 @@ export interface EscalateActionFieldsProps {
|
|
|
7
7
|
actionTypeSelect?: ReactNode;
|
|
8
8
|
asGridItems?: boolean;
|
|
9
9
|
errors?: GuardrailEscalateActionErrors;
|
|
10
|
+
recipientTypeDisabled?: boolean;
|
|
10
11
|
labels?: Partial<GuardrailActionLabels>;
|
|
11
12
|
renderRecipientSearch?: (ctx: GuardrailRecipientSearchContext) => ReactNode;
|
|
12
13
|
renderStaticRecipient?: (ctx: GuardrailStaticRecipientContext) => ReactNode | undefined;
|
|
@@ -14,5 +15,5 @@ export interface EscalateActionFieldsProps {
|
|
|
14
15
|
escalateHelp?: ReactNode;
|
|
15
16
|
className?: string;
|
|
16
17
|
}
|
|
17
|
-
export declare function EscalateActionFields({ action, onChange, actionTypeSelect, asGridItems, errors, labels: labelOverrides, renderRecipientSearch, renderStaticRecipient, renderAppPicker, escalateHelp, className, }: EscalateActionFieldsProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function EscalateActionFields({ action, onChange, actionTypeSelect, asGridItems, errors, recipientTypeDisabled, labels: labelOverrides, renderRecipientSearch, renderStaticRecipient, renderAppPicker, escalateHelp, className, }: EscalateActionFieldsProps): import("react/jsx-runtime").JSX.Element;
|
|
18
19
|
//# sourceMappingURL=escalate-action-fields.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"escalate-action-fields.d.ts","sourceRoot":"","sources":["../../../../../src/canvas/components/Guardrails/components/escalate-action-fields.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,KAAK,SAAS,EAAsB,MAAM,OAAO,CAAC;AAC3D,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,EAElC,KAAK,+BAA+B,EAEpC,KAAK,+BAA+B,EACrC,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"escalate-action-fields.d.ts","sourceRoot":"","sources":["../../../../../src/canvas/components/Guardrails/components/escalate-action-fields.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,KAAK,SAAS,EAAsB,MAAM,OAAO,CAAC;AAC3D,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,EAElC,KAAK,+BAA+B,EAEpC,KAAK,+BAA+B,EACrC,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,KAAK,qBAAqB,EAA4B,MAAM,SAAS,CAAC;AAc/E,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,uBAAuB,CAAC;IAChC,QAAQ,EAAE,CAAC,MAAM,EAAE,uBAAuB,KAAK,IAAI,CAAC;IAKpD,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAK7B,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB,MAAM,CAAC,EAAE,6BAA6B,CAAC;IAKvC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC,MAAM,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,CAAC;IACxC,qBAAqB,CAAC,EAAE,CAAC,GAAG,EAAE,+BAA+B,KAAK,SAAS,CAAC;IAC5E,qBAAqB,CAAC,EAAE,CAAC,GAAG,EAAE,+BAA+B,KAAK,SAAS,GAAG,SAAS,CAAC;IACxF,eAAe,CAAC,EAAE,CAAC,GAAG,EAAE,yBAAyB,KAAK,SAAS,CAAC;IAEhE,YAAY,CAAC,EAAE,SAAS,CAAC;IAEzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAWD,wBAAgB,oBAAoB,CAAC,EACnC,MAAM,EACN,QAAQ,EACR,gBAAgB,EAChB,WAAmB,EACnB,MAAM,EACN,qBAA6B,EAC7B,MAAM,EAAE,cAAc,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,eAAe,EACf,YAAY,EACZ,SAAS,GACV,EAAE,yBAAyB,2CA+Q3B"}
|
|
@@ -3,8 +3,16 @@ import { Alert, AlertDescription, FormField, FormFieldError, Input, Label, Requi
|
|
|
3
3
|
import { Info } from "lucide-react";
|
|
4
4
|
import { useCallback, useId } from "react";
|
|
5
5
|
import { GuardrailRecipientType } from "../builder-types.js";
|
|
6
|
+
import { isModelledGuardrailRecipientType } from "../builder-utils.js";
|
|
6
7
|
import { useGuardrailActionLabels } from "../i18n.js";
|
|
7
|
-
|
|
8
|
+
const UNMODELLED_RECIPIENT_DISPLAY_TYPES = {
|
|
9
|
+
7: GuardrailRecipientType.StaticEmail,
|
|
10
|
+
8: GuardrailRecipientType.StaticGroupName,
|
|
11
|
+
9: GuardrailRecipientType.Group,
|
|
12
|
+
10: GuardrailRecipientType.Group,
|
|
13
|
+
11: GuardrailRecipientType.Group
|
|
14
|
+
};
|
|
15
|
+
function EscalateActionFields({ action, onChange, actionTypeSelect, asGridItems = false, errors, recipientTypeDisabled = false, labels: labelOverrides, renderRecipientSearch, renderStaticRecipient, renderAppPicker, escalateHelp, className }) {
|
|
8
16
|
const labels = useGuardrailActionLabels(labelOverrides);
|
|
9
17
|
const uid = useId();
|
|
10
18
|
const recipientTypeLabels = {
|
|
@@ -14,7 +22,12 @@ function EscalateActionFields({ action, onChange, actionTypeSelect, asGridItems
|
|
|
14
22
|
[GuardrailRecipientType.StaticGroupName]: labels.recipientGroupNameLabel
|
|
15
23
|
};
|
|
16
24
|
const recipientType = action.recipient.type;
|
|
17
|
-
const
|
|
25
|
+
const isUnmodelled = !isModelledGuardrailRecipientType(recipientType);
|
|
26
|
+
const displayedRecipientType = isUnmodelled ? UNMODELLED_RECIPIENT_DISPLAY_TYPES[recipientType] ?? recipientType : recipientType === GuardrailRecipientType.AssetEmail ? GuardrailRecipientType.StaticEmail : recipientType === GuardrailRecipientType.AssetGroupName ? GuardrailRecipientType.StaticGroupName : recipientType;
|
|
27
|
+
const editedRecipient = isUnmodelled ? displayedRecipientType === GuardrailRecipientType.StaticEmail || displayedRecipientType === GuardrailRecipientType.StaticGroupName ? {
|
|
28
|
+
type: displayedRecipientType,
|
|
29
|
+
value: ''
|
|
30
|
+
} : null : action.recipient;
|
|
18
31
|
const handleRecipientTypeChange = useCallback((value)=>{
|
|
19
32
|
const newType = Number(value);
|
|
20
33
|
let recipient;
|
|
@@ -82,7 +95,7 @@ function EscalateActionFields({ action, onChange, actionTypeSelect, asGridItems
|
|
|
82
95
|
onChange
|
|
83
96
|
]);
|
|
84
97
|
const handleTextValueChange = useCallback((value)=>{
|
|
85
|
-
const r = action.recipient;
|
|
98
|
+
const r = editedRecipient ?? action.recipient;
|
|
86
99
|
if (r.type === GuardrailRecipientType.StaticEmail || r.type === GuardrailRecipientType.StaticGroupName) onChange({
|
|
87
100
|
...action,
|
|
88
101
|
recipient: {
|
|
@@ -99,19 +112,20 @@ function EscalateActionFields({ action, onChange, actionTypeSelect, asGridItems
|
|
|
99
112
|
});
|
|
100
113
|
}, [
|
|
101
114
|
action,
|
|
115
|
+
editedRecipient,
|
|
102
116
|
onChange
|
|
103
117
|
]);
|
|
104
|
-
const recipientValue = 'value' in
|
|
105
|
-
const recipientDisplayValue = ('displayName' in
|
|
118
|
+
const recipientValue = editedRecipient ? 'value' in editedRecipient ? editedRecipient.value : editedRecipient.assetName : '';
|
|
119
|
+
const recipientDisplayValue = (editedRecipient && 'displayName' in editedRecipient ? editedRecipient.displayName : '') || recipientValue;
|
|
106
120
|
const isSearchable = recipientType === GuardrailRecipientType.User || recipientType === GuardrailRecipientType.Group;
|
|
107
121
|
const searchKind = recipientType === GuardrailRecipientType.User ? 'user' : 'group';
|
|
108
122
|
const searchPlaceholder = 'user' === searchKind ? labels.userSearchPlaceholder : labels.groupSearchPlaceholder;
|
|
109
123
|
const recipientLabel = recipientTypeLabels[displayedRecipientType] ?? labels.recipientFallbackLabel;
|
|
110
124
|
const recipientFieldId = `${uid}-escalate-recipient`;
|
|
111
125
|
const recipientLabelId = `${recipientFieldId}-label`;
|
|
112
|
-
const staticNode = isSearchable ? void 0 : renderStaticRecipient?.({
|
|
126
|
+
const staticNode = isSearchable || !editedRecipient ? void 0 : renderStaticRecipient?.({
|
|
113
127
|
kind: displayedRecipientType === GuardrailRecipientType.StaticEmail ? 'email' : 'groupName',
|
|
114
|
-
recipient:
|
|
128
|
+
recipient: editedRecipient,
|
|
115
129
|
label: recipientLabel,
|
|
116
130
|
labelId: recipientLabelId,
|
|
117
131
|
invalid: Boolean(errors?.recipient),
|
|
@@ -146,6 +160,7 @@ function EscalateActionFields({ action, onChange, actionTypeSelect, asGridItems
|
|
|
146
160
|
/*#__PURE__*/ jsxs(Select, {
|
|
147
161
|
value: String(displayedRecipientType),
|
|
148
162
|
onValueChange: handleRecipientTypeChange,
|
|
163
|
+
disabled: recipientTypeDisabled,
|
|
149
164
|
children: [
|
|
150
165
|
/*#__PURE__*/ jsx(SelectTrigger, {
|
|
151
166
|
id: `${uid}-escalate-recipient-type`,
|
|
@@ -162,7 +177,7 @@ function EscalateActionFields({ action, onChange, actionTypeSelect, asGridItems
|
|
|
162
177
|
})
|
|
163
178
|
]
|
|
164
179
|
}),
|
|
165
|
-
/*#__PURE__*/ jsxs(FormField, {
|
|
180
|
+
editedRecipient && /*#__PURE__*/ jsxs(FormField, {
|
|
166
181
|
children: [
|
|
167
182
|
/*#__PURE__*/ jsxs(Label, {
|
|
168
183
|
id: recipientLabelId,
|
|
@@ -32,9 +32,22 @@ const external_react_namespaceObject = require("react");
|
|
|
32
32
|
const external_builder_utils_cjs_namespaceObject = require("../builder-utils.cjs");
|
|
33
33
|
const external_i18n_cjs_namespaceObject = require("../i18n.cjs");
|
|
34
34
|
const external_escalate_action_fields_cjs_namespaceObject = require("./escalate-action-fields.cjs");
|
|
35
|
-
|
|
35
|
+
const ACTION_TYPES = [
|
|
36
|
+
'log',
|
|
37
|
+
'block',
|
|
38
|
+
'filter',
|
|
39
|
+
'escalate'
|
|
40
|
+
];
|
|
41
|
+
function GuardrailActionSection({ action, onActionChange, showFilter = false, allowedActionTypes, filterContent, errors, recipientTypeDisabled, labels: labelOverrides, renderRecipientSearch, renderStaticRecipient, renderAppPicker, escalateHelp, className }) {
|
|
36
42
|
const labels = (0, external_i18n_cjs_namespaceObject.useGuardrailActionLabels)(labelOverrides);
|
|
37
43
|
const uid = (0, external_react_namespaceObject.useId)();
|
|
44
|
+
const actionTypeLabels = {
|
|
45
|
+
log: labels.actionLogLabel,
|
|
46
|
+
block: labels.actionBlockLabel,
|
|
47
|
+
filter: labels.actionFilterLabel,
|
|
48
|
+
escalate: labels.actionEscalateLabel
|
|
49
|
+
};
|
|
50
|
+
const offeredActionTypes = ACTION_TYPES.filter((type)=>void 0 !== allowedActionTypes && type === action.$actionType || ('filter' !== type || showFilter) && (allowedActionTypes?.includes(type) ?? true));
|
|
38
51
|
const actionTypeSelect = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(apollo_wind_namespaceObject.FormField, {
|
|
39
52
|
children: [
|
|
40
53
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(apollo_wind_namespaceObject.Label, {
|
|
@@ -52,25 +65,11 @@ function GuardrailActionSection({ action, onActionChange, showFilter = false, fi
|
|
|
52
65
|
id: `${uid}-action-type`,
|
|
53
66
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.SelectValue, {})
|
|
54
67
|
}),
|
|
55
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.
|
|
56
|
-
children:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}),
|
|
61
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.SelectItem, {
|
|
62
|
-
value: "block",
|
|
63
|
-
children: labels.actionBlockLabel
|
|
64
|
-
}),
|
|
65
|
-
showFilter && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.SelectItem, {
|
|
66
|
-
value: "filter",
|
|
67
|
-
children: labels.actionFilterLabel
|
|
68
|
-
}),
|
|
69
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.SelectItem, {
|
|
70
|
-
value: "escalate",
|
|
71
|
-
children: labels.actionEscalateLabel
|
|
72
|
-
})
|
|
73
|
-
]
|
|
68
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.SelectContent, {
|
|
69
|
+
children: offeredActionTypes.map((type)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.SelectItem, {
|
|
70
|
+
value: type,
|
|
71
|
+
children: actionTypeLabels[type]
|
|
72
|
+
}, type))
|
|
74
73
|
})
|
|
75
74
|
]
|
|
76
75
|
})
|
|
@@ -84,6 +83,7 @@ function GuardrailActionSection({ action, onActionChange, showFilter = false, fi
|
|
|
84
83
|
onChange: onActionChange,
|
|
85
84
|
actionTypeSelect: actionTypeSelect,
|
|
86
85
|
errors: errors,
|
|
86
|
+
recipientTypeDisabled: recipientTypeDisabled,
|
|
87
87
|
labels: labels,
|
|
88
88
|
renderRecipientSearch: renderRecipientSearch,
|
|
89
89
|
renderStaticRecipient: renderStaticRecipient,
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import type { GuardrailAction, GuardrailActionErrors, GuardrailAppPickerContext, GuardrailRecipientSearchContext, GuardrailStaticRecipientContext } from '../builder-types';
|
|
3
3
|
import { type GuardrailActionLabels } from '../i18n';
|
|
4
|
+
type GuardrailActionType = GuardrailAction['$actionType'];
|
|
4
5
|
export interface GuardrailActionSectionProps {
|
|
5
6
|
action: GuardrailAction;
|
|
6
7
|
onActionChange: (action: GuardrailAction) => void;
|
|
7
8
|
showFilter?: boolean;
|
|
9
|
+
allowedActionTypes?: readonly GuardrailActionType[];
|
|
8
10
|
filterContent?: ReactNode;
|
|
9
11
|
errors?: GuardrailActionErrors;
|
|
12
|
+
recipientTypeDisabled?: boolean;
|
|
10
13
|
labels?: Partial<GuardrailActionLabels>;
|
|
11
14
|
renderRecipientSearch?: (ctx: GuardrailRecipientSearchContext) => ReactNode;
|
|
12
15
|
renderStaticRecipient?: (ctx: GuardrailStaticRecipientContext) => ReactNode | undefined;
|
|
@@ -14,5 +17,6 @@ export interface GuardrailActionSectionProps {
|
|
|
14
17
|
escalateHelp?: ReactNode;
|
|
15
18
|
className?: string;
|
|
16
19
|
}
|
|
17
|
-
export declare function GuardrailActionSection({ action, onActionChange, showFilter, filterContent, errors, labels: labelOverrides, renderRecipientSearch, renderStaticRecipient, renderAppPicker, escalateHelp, className, }: GuardrailActionSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare function GuardrailActionSection({ action, onActionChange, showFilter, allowedActionTypes, filterContent, errors, recipientTypeDisabled, labels: labelOverrides, renderRecipientSearch, renderStaticRecipient, renderAppPicker, escalateHelp, className, }: GuardrailActionSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export {};
|
|
18
22
|
//# sourceMappingURL=guardrail-action-section.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guardrail-action-section.d.ts","sourceRoot":"","sources":["../../../../../src/canvas/components/Guardrails/components/guardrail-action-section.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,KAAK,SAAS,EAAS,MAAM,OAAO,CAAC;AAC9C,OAAO,KAAK,EACV,eAAe,EACf,qBAAqB,EACrB,yBAAyB,EACzB,+BAA+B,EAC/B,+BAA+B,EAChC,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,KAAK,qBAAqB,EAA4B,MAAM,SAAS,CAAC;AAG/E,MAAM,WAAW,2BAA2B;IAC1C,MAAM,EAAE,eAAe,CAAC;IAExB,cAAc,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;IAElD,UAAU,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"guardrail-action-section.d.ts","sourceRoot":"","sources":["../../../../../src/canvas/components/Guardrails/components/guardrail-action-section.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,KAAK,SAAS,EAAS,MAAM,OAAO,CAAC;AAC9C,OAAO,KAAK,EACV,eAAe,EACf,qBAAqB,EACrB,yBAAyB,EACzB,+BAA+B,EAC/B,+BAA+B,EAChC,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,KAAK,qBAAqB,EAA4B,MAAM,SAAS,CAAC;AAG/E,KAAK,mBAAmB,GAAG,eAAe,CAAC,aAAa,CAAC,CAAC;AAI1D,MAAM,WAAW,2BAA2B;IAC1C,MAAM,EAAE,eAAe,CAAC;IAExB,cAAc,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;IAElD,UAAU,CAAC,EAAE,OAAO,CAAC;IAMrB,kBAAkB,CAAC,EAAE,SAAS,mBAAmB,EAAE,CAAC;IAEpD,aAAa,CAAC,EAAE,SAAS,CAAC;IAE1B,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAE/B,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC,MAAM,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,CAAC;IACxC,qBAAqB,CAAC,EAAE,CAAC,GAAG,EAAE,+BAA+B,KAAK,SAAS,CAAC;IAK5E,qBAAqB,CAAC,EAAE,CAAC,GAAG,EAAE,+BAA+B,KAAK,SAAS,GAAG,SAAS,CAAC;IACxF,eAAe,CAAC,EAAE,CAAC,GAAG,EAAE,yBAAyB,KAAK,SAAS,CAAC;IAEhE,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAUD,wBAAgB,sBAAsB,CAAC,EACrC,MAAM,EACN,cAAc,EACd,UAAkB,EAClB,kBAAkB,EAClB,aAAa,EACb,MAAM,EACN,qBAAqB,EACrB,MAAM,EAAE,cAAc,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,eAAe,EACf,YAAY,EACZ,SAAS,GACV,EAAE,2BAA2B,2CAwH7B"}
|
|
@@ -4,9 +4,22 @@ import { useId } from "react";
|
|
|
4
4
|
import { createDefaultGuardrailAction } from "../builder-utils.js";
|
|
5
5
|
import { useGuardrailActionLabels } from "../i18n.js";
|
|
6
6
|
import { EscalateActionFields } from "./escalate-action-fields.js";
|
|
7
|
-
|
|
7
|
+
const ACTION_TYPES = [
|
|
8
|
+
'log',
|
|
9
|
+
'block',
|
|
10
|
+
'filter',
|
|
11
|
+
'escalate'
|
|
12
|
+
];
|
|
13
|
+
function GuardrailActionSection({ action, onActionChange, showFilter = false, allowedActionTypes, filterContent, errors, recipientTypeDisabled, labels: labelOverrides, renderRecipientSearch, renderStaticRecipient, renderAppPicker, escalateHelp, className }) {
|
|
8
14
|
const labels = useGuardrailActionLabels(labelOverrides);
|
|
9
15
|
const uid = useId();
|
|
16
|
+
const actionTypeLabels = {
|
|
17
|
+
log: labels.actionLogLabel,
|
|
18
|
+
block: labels.actionBlockLabel,
|
|
19
|
+
filter: labels.actionFilterLabel,
|
|
20
|
+
escalate: labels.actionEscalateLabel
|
|
21
|
+
};
|
|
22
|
+
const offeredActionTypes = ACTION_TYPES.filter((type)=>void 0 !== allowedActionTypes && type === action.$actionType || ('filter' !== type || showFilter) && (allowedActionTypes?.includes(type) ?? true));
|
|
10
23
|
const actionTypeSelect = /*#__PURE__*/ jsxs(FormField, {
|
|
11
24
|
children: [
|
|
12
25
|
/*#__PURE__*/ jsxs(Label, {
|
|
@@ -24,25 +37,11 @@ function GuardrailActionSection({ action, onActionChange, showFilter = false, fi
|
|
|
24
37
|
id: `${uid}-action-type`,
|
|
25
38
|
children: /*#__PURE__*/ jsx(SelectValue, {})
|
|
26
39
|
}),
|
|
27
|
-
/*#__PURE__*/
|
|
28
|
-
children:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}),
|
|
33
|
-
/*#__PURE__*/ jsx(SelectItem, {
|
|
34
|
-
value: "block",
|
|
35
|
-
children: labels.actionBlockLabel
|
|
36
|
-
}),
|
|
37
|
-
showFilter && /*#__PURE__*/ jsx(SelectItem, {
|
|
38
|
-
value: "filter",
|
|
39
|
-
children: labels.actionFilterLabel
|
|
40
|
-
}),
|
|
41
|
-
/*#__PURE__*/ jsx(SelectItem, {
|
|
42
|
-
value: "escalate",
|
|
43
|
-
children: labels.actionEscalateLabel
|
|
44
|
-
})
|
|
45
|
-
]
|
|
40
|
+
/*#__PURE__*/ jsx(SelectContent, {
|
|
41
|
+
children: offeredActionTypes.map((type)=>/*#__PURE__*/ jsx(SelectItem, {
|
|
42
|
+
value: type,
|
|
43
|
+
children: actionTypeLabels[type]
|
|
44
|
+
}, type))
|
|
46
45
|
})
|
|
47
46
|
]
|
|
48
47
|
})
|
|
@@ -56,6 +55,7 @@ function GuardrailActionSection({ action, onActionChange, showFilter = false, fi
|
|
|
56
55
|
onChange: onActionChange,
|
|
57
56
|
actionTypeSelect: actionTypeSelect,
|
|
58
57
|
errors: errors,
|
|
58
|
+
recipientTypeDisabled: recipientTypeDisabled,
|
|
59
59
|
labels: labels,
|
|
60
60
|
renderRecipientSearch: renderRecipientSearch,
|
|
61
61
|
renderStaticRecipient: renderStaticRecipient,
|
|
@@ -156,7 +156,8 @@ const GuardrailListRow = /*#__PURE__*/ external_react_namespaceObject.forwardRef
|
|
|
156
156
|
children: item.description
|
|
157
157
|
}),
|
|
158
158
|
void 0 !== state.provider && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
159
|
-
className: "truncate text-xs text-muted-foreground",
|
|
159
|
+
className: "truncate text-xs italic text-muted-foreground",
|
|
160
|
+
title: `${labels.provider}: ${state.provider}`,
|
|
160
161
|
children: [
|
|
161
162
|
labels.provider,
|
|
162
163
|
": ",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guardrail-list-row.d.ts","sourceRoot":"","sources":["../../../../../src/canvas/components/Guardrails/components/guardrail-list-row.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAA8B,KAAK,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAC/E,OAAO,KAAK,EACV,2BAA2B,EAC3B,iBAAiB,EACjB,+BAA+B,EAC/B,sBAAsB,EACtB,2BAA2B,EAC5B,MAAM,eAAe,CAAC;AAGvB,MAAM,WAAW,qBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IAC/D,IAAI,EAAE,iBAAiB,CAAC;IAExB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IAEd,KAAK,EAAE,sBAAsB,CAAC;IAC9B,MAAM,EAAE,mBAAmB,CAAC;IAE5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,cAAc,CAAC,EAAE,2BAA2B,CAAC;IAC7C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC3C,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC7C,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,+BAA+B,KAAK,KAAK,CAAC,SAAS,CAAC;IAE9E,gBAAgB,CAAC,EAAE,2BAA2B,CAAC;IAC/C,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,KAAK,CAAC,SAAS,CAAC;IAC5D,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,KAAK,CAAC,SAAS,CAAC;CAC7D;AASD,QAAA,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"guardrail-list-row.d.ts","sourceRoot":"","sources":["../../../../../src/canvas/components/Guardrails/components/guardrail-list-row.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAA8B,KAAK,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAC/E,OAAO,KAAK,EACV,2BAA2B,EAC3B,iBAAiB,EACjB,+BAA+B,EAC/B,sBAAsB,EACtB,2BAA2B,EAC5B,MAAM,eAAe,CAAC;AAGvB,MAAM,WAAW,qBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IAC/D,IAAI,EAAE,iBAAiB,CAAC;IAExB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IAEd,KAAK,EAAE,sBAAsB,CAAC;IAC9B,MAAM,EAAE,mBAAmB,CAAC;IAE5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,cAAc,CAAC,EAAE,2BAA2B,CAAC;IAC7C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC3C,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC7C,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,+BAA+B,KAAK,KAAK,CAAC,SAAS,CAAC;IAE9E,gBAAgB,CAAC,EAAE,2BAA2B,CAAC;IAC/C,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,KAAK,CAAC,SAAS,CAAC;IAC5D,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,KAAK,CAAC,SAAS,CAAC;CAC7D;AASD,QAAA,MAAM,gBAAgB,8FAwQrB,CAAC;AAGF,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -128,7 +128,8 @@ const GuardrailListRow = /*#__PURE__*/ forwardRef(({ item, id, index, state, lab
|
|
|
128
128
|
children: item.description
|
|
129
129
|
}),
|
|
130
130
|
void 0 !== state.provider && /*#__PURE__*/ jsxs("div", {
|
|
131
|
-
className: "truncate text-xs text-muted-foreground",
|
|
131
|
+
className: "truncate text-xs italic text-muted-foreground",
|
|
132
|
+
title: `${labels.provider}: ${state.provider}`,
|
|
132
133
|
children: [
|
|
133
134
|
labels.provider,
|
|
134
135
|
": ",
|
|
@@ -29,7 +29,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
29
29
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
30
30
|
const apollo_wind_namespaceObject = require("@uipath/apollo-wind");
|
|
31
31
|
const external_react_namespaceObject = require("react");
|
|
32
|
-
const GuardrailPaletteItem = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ name, description, chips, icon, disabled = false, onSelect, className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("button", {
|
|
32
|
+
const GuardrailPaletteItem = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ name, description, chips, caption, icon, disabled = false, onSelect, className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("button", {
|
|
33
33
|
ref: ref,
|
|
34
34
|
type: "button",
|
|
35
35
|
"data-slot": "guardrail-palette-item",
|
|
@@ -58,6 +58,10 @@ const GuardrailPaletteItem = /*#__PURE__*/ external_react_namespaceObject.forwar
|
|
|
58
58
|
description && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
59
59
|
className: "whitespace-normal break-words text-xs text-muted-foreground",
|
|
60
60
|
children: description
|
|
61
|
+
}),
|
|
62
|
+
caption && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
63
|
+
className: "whitespace-normal break-words text-xs italic text-muted-foreground",
|
|
64
|
+
children: caption
|
|
61
65
|
})
|
|
62
66
|
]
|
|
63
67
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guardrail-palette-item.d.ts","sourceRoot":"","sources":["../../../../../src/canvas/components/Guardrails/components/guardrail-palette-item.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,yBACf,SAAQ,IAAI,CACV,KAAK,CAAC,wBAAwB,CAAC,QAAQ,CAAC,EAExC,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,CACjD;IACD,IAAI,EAAE,MAAM,CAAC;IAEb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAExB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAKvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAMD,QAAA,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"guardrail-palette-item.d.ts","sourceRoot":"","sources":["../../../../../src/canvas/components/Guardrails/components/guardrail-palette-item.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,yBACf,SAAQ,IAAI,CACV,KAAK,CAAC,wBAAwB,CAAC,QAAQ,CAAC,EAExC,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,CACjD;IACD,IAAI,EAAE,MAAM,CAAC;IAEb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAExB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAKvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAMD,QAAA,MAAM,oBAAoB,qGAyCzB,CAAC;AAGF,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "@uipath/apollo-wind";
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
|
-
const GuardrailPaletteItem = /*#__PURE__*/ forwardRef(({ name, description, chips, icon, disabled = false, onSelect, className, ...props }, ref)=>/*#__PURE__*/ jsxs("button", {
|
|
4
|
+
const GuardrailPaletteItem = /*#__PURE__*/ forwardRef(({ name, description, chips, caption, icon, disabled = false, onSelect, className, ...props }, ref)=>/*#__PURE__*/ jsxs("button", {
|
|
5
5
|
ref: ref,
|
|
6
6
|
type: "button",
|
|
7
7
|
"data-slot": "guardrail-palette-item",
|
|
@@ -30,6 +30,10 @@ const GuardrailPaletteItem = /*#__PURE__*/ forwardRef(({ name, description, chip
|
|
|
30
30
|
description && /*#__PURE__*/ jsx("span", {
|
|
31
31
|
className: "whitespace-normal break-words text-xs text-muted-foreground",
|
|
32
32
|
children: description
|
|
33
|
+
}),
|
|
34
|
+
caption && /*#__PURE__*/ jsx("span", {
|
|
35
|
+
className: "whitespace-normal break-words text-xs italic text-muted-foreground",
|
|
36
|
+
children: caption
|
|
33
37
|
})
|
|
34
38
|
]
|
|
35
39
|
})
|