@uipath/apollo-react 6.52.0 → 6.54.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.
@@ -0,0 +1,156 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = (exports1, definition)=>{
5
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
6
+ enumerable: true,
7
+ get: definition[key]
8
+ });
9
+ };
10
+ })();
11
+ (()=>{
12
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
13
+ })();
14
+ (()=>{
15
+ __webpack_require__.r = (exports1)=>{
16
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
17
+ value: 'Module'
18
+ });
19
+ Object.defineProperty(exports1, '__esModule', {
20
+ value: true
21
+ });
22
+ };
23
+ })();
24
+ var __webpack_exports__ = {};
25
+ __webpack_require__.r(__webpack_exports__);
26
+ __webpack_require__.d(__webpack_exports__, {
27
+ GuardrailRemoveDialog: ()=>GuardrailRemoveDialog
28
+ });
29
+ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
30
+ const apollo_wind_namespaceObject = require("@uipath/apollo-wind");
31
+ const external_lucide_react_namespaceObject = require("lucide-react");
32
+ const external_react_namespaceObject = require("react");
33
+ const external_i18n_cjs_namespaceObject = require("./i18n.cjs");
34
+ function ImpactList({ toolNames, scopes, formatScope }) {
35
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("ul", {
36
+ className: "list-disc pl-5",
37
+ children: [
38
+ toolNames.map((name, index)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("li", {
39
+ children: name
40
+ }, `tool:${index}:${name}`)),
41
+ scopes.map((scope, index)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("li", {
42
+ children: formatScope ? formatScope(scope) : scope
43
+ }, `scope:${index}:${scope}`))
44
+ ]
45
+ });
46
+ }
47
+ function GuardrailRemoveDialog({ open, guardrailName, toolName, affectedToolNames = [], affectedScopes = [], remainingToolNames = [], remainingScopes = [], onConfirm, onCancel, formatScope, showCloseButton = false, closeOnBackdropClick = false, container, labels: labelOverrides, className }) {
48
+ const labels = (0, external_i18n_cjs_namespaceObject.useGuardrailRemoveDialogLabels)(labelOverrides);
49
+ const cancelRef = (0, external_react_namespaceObject.useRef)(null);
50
+ const hasAffected = affectedToolNames.length > 0 || affectedScopes.length > 0;
51
+ const hasRemaining = remainingToolNames.length > 0 || remainingScopes.length > 0;
52
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.Dialog, {
53
+ open: open,
54
+ onOpenChange: (next)=>{
55
+ if (!next) onCancel();
56
+ },
57
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(apollo_wind_namespaceObject.DialogContent, {
58
+ "data-slot": "guardrail-remove-dialog",
59
+ container: container,
60
+ className: className,
61
+ showCloseButton: false,
62
+ onPointerDownOutside: closeOnBackdropClick ? void 0 : (event)=>event.preventDefault(),
63
+ onOpenAutoFocus: (event)=>{
64
+ event.preventDefault();
65
+ cancelRef.current?.focus({
66
+ preventScroll: true
67
+ });
68
+ },
69
+ children: [
70
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(apollo_wind_namespaceObject.DialogHeader, {
71
+ children: [
72
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.DialogTitle, {
73
+ children: labels.title
74
+ }),
75
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.DialogDescription, {
76
+ asChild: true,
77
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
78
+ className: "space-y-3",
79
+ children: [
80
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("p", {
81
+ children: (0, external_i18n_cjs_namespaceObject.formatGuardrailFormMessage)(labels.confirmPrompt, {
82
+ name: guardrailName
83
+ })
84
+ }),
85
+ hasAffected && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
86
+ children: [
87
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("p", {
88
+ children: labels.alsoApplicable
89
+ }),
90
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ImpactList, {
91
+ toolNames: affectedToolNames,
92
+ scopes: affectedScopes,
93
+ formatScope: formatScope
94
+ })
95
+ ]
96
+ }),
97
+ hasRemaining && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
98
+ children: [
99
+ void 0 !== toolName && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("p", {
100
+ children: (0, external_i18n_cjs_namespaceObject.formatGuardrailFormMessage)(labels.removedForTool, {
101
+ toolName
102
+ })
103
+ }),
104
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("p", {
105
+ children: labels.stillApplicable
106
+ }),
107
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ImpactList, {
108
+ toolNames: remainingToolNames,
109
+ scopes: remainingScopes,
110
+ formatScope: formatScope
111
+ })
112
+ ]
113
+ })
114
+ ]
115
+ })
116
+ })
117
+ ]
118
+ }),
119
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(apollo_wind_namespaceObject.DialogFooter, {
120
+ children: [
121
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.DialogClose, {
122
+ asChild: true,
123
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.Button, {
124
+ ref: cancelRef,
125
+ variant: "outline",
126
+ children: labels.cancel
127
+ })
128
+ }),
129
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.Button, {
130
+ onClick: onConfirm,
131
+ children: labels.remove
132
+ })
133
+ ]
134
+ }),
135
+ showCloseButton && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.DialogClose, {
136
+ asChild: true,
137
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.Button, {
138
+ variant: "ghost",
139
+ size: "xs",
140
+ icon: true,
141
+ "aria-label": labels.close,
142
+ className: "absolute top-4 right-4",
143
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.X, {})
144
+ })
145
+ })
146
+ ]
147
+ })
148
+ });
149
+ }
150
+ exports.GuardrailRemoveDialog = __webpack_exports__.GuardrailRemoveDialog;
151
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
152
+ "GuardrailRemoveDialog"
153
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
154
+ Object.defineProperty(exports, '__esModule', {
155
+ value: true
156
+ });
@@ -0,0 +1,21 @@
1
+ import { type ReactNode } from 'react';
2
+ import { type GuardrailRemoveDialogLabels } from './i18n';
3
+ export interface GuardrailRemoveDialogProps {
4
+ open: boolean;
5
+ guardrailName: string;
6
+ toolName?: string;
7
+ affectedToolNames?: string[];
8
+ affectedScopes?: string[];
9
+ remainingToolNames?: string[];
10
+ remainingScopes?: string[];
11
+ onConfirm: () => void;
12
+ onCancel: () => void;
13
+ formatScope?: (scope: string) => ReactNode;
14
+ showCloseButton?: boolean;
15
+ closeOnBackdropClick?: boolean;
16
+ container?: HTMLElement | 'body' | null;
17
+ labels?: Partial<GuardrailRemoveDialogLabels>;
18
+ className?: string;
19
+ }
20
+ export declare function GuardrailRemoveDialog({ open, guardrailName, toolName, affectedToolNames, affectedScopes, remainingToolNames, remainingScopes, onConfirm, onCancel, formatScope, showCloseButton, closeOnBackdropClick, container, labels: labelOverrides, className, }: GuardrailRemoveDialogProps): import("react/jsx-runtime").JSX.Element;
21
+ //# sourceMappingURL=guardrail-remove-dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guardrail-remove-dialog.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/Guardrails/guardrail-remove-dialog.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,SAAS,EAAU,MAAM,OAAO,CAAC;AAC/C,OAAO,EAEL,KAAK,2BAA2B,EAEjC,MAAM,QAAQ,CAAC;AAEhB,MAAM,WAAW,0BAA0B;IAEzC,IAAI,EAAE,OAAO,CAAC;IAEd,aAAa,EAAE,MAAM,CAAC;IAEtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAMlB,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC9B,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAE3B,SAAS,EAAE,MAAM,IAAI,CAAC;IAEtB,QAAQ,EAAE,MAAM,IAAI,CAAC;IAErB,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,SAAS,CAAC;IAK3C,eAAe,CAAC,EAAE,OAAO,CAAC;IAK1B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAM/B,SAAS,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,IAAI,CAAC;IACxC,MAAM,CAAC,EAAE,OAAO,CAAC,2BAA2B,CAAC,CAAC;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA+BD,wBAAgB,qBAAqB,CAAC,EACpC,IAAI,EACJ,aAAa,EACb,QAAQ,EACR,iBAAsB,EACtB,cAAmB,EACnB,kBAAuB,EACvB,eAAoB,EACpB,SAAS,EACT,QAAQ,EACR,WAAW,EACX,eAAuB,EACvB,oBAA4B,EAC5B,SAAS,EACT,MAAM,EAAE,cAAc,EACtB,SAAS,GACV,EAAE,0BAA0B,2CAkG5B"}
@@ -0,0 +1,122 @@
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import { Button, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle } from "@uipath/apollo-wind";
3
+ import { X } from "lucide-react";
4
+ import { useRef } from "react";
5
+ import { formatGuardrailFormMessage, useGuardrailRemoveDialogLabels } from "./i18n.js";
6
+ function ImpactList({ toolNames, scopes, formatScope }) {
7
+ return /*#__PURE__*/ jsxs("ul", {
8
+ className: "list-disc pl-5",
9
+ children: [
10
+ toolNames.map((name, index)=>/*#__PURE__*/ jsx("li", {
11
+ children: name
12
+ }, `tool:${index}:${name}`)),
13
+ scopes.map((scope, index)=>/*#__PURE__*/ jsx("li", {
14
+ children: formatScope ? formatScope(scope) : scope
15
+ }, `scope:${index}:${scope}`))
16
+ ]
17
+ });
18
+ }
19
+ function GuardrailRemoveDialog({ open, guardrailName, toolName, affectedToolNames = [], affectedScopes = [], remainingToolNames = [], remainingScopes = [], onConfirm, onCancel, formatScope, showCloseButton = false, closeOnBackdropClick = false, container, labels: labelOverrides, className }) {
20
+ const labels = useGuardrailRemoveDialogLabels(labelOverrides);
21
+ const cancelRef = useRef(null);
22
+ const hasAffected = affectedToolNames.length > 0 || affectedScopes.length > 0;
23
+ const hasRemaining = remainingToolNames.length > 0 || remainingScopes.length > 0;
24
+ return /*#__PURE__*/ jsx(Dialog, {
25
+ open: open,
26
+ onOpenChange: (next)=>{
27
+ if (!next) onCancel();
28
+ },
29
+ children: /*#__PURE__*/ jsxs(DialogContent, {
30
+ "data-slot": "guardrail-remove-dialog",
31
+ container: container,
32
+ className: className,
33
+ showCloseButton: false,
34
+ onPointerDownOutside: closeOnBackdropClick ? void 0 : (event)=>event.preventDefault(),
35
+ onOpenAutoFocus: (event)=>{
36
+ event.preventDefault();
37
+ cancelRef.current?.focus({
38
+ preventScroll: true
39
+ });
40
+ },
41
+ children: [
42
+ /*#__PURE__*/ jsxs(DialogHeader, {
43
+ children: [
44
+ /*#__PURE__*/ jsx(DialogTitle, {
45
+ children: labels.title
46
+ }),
47
+ /*#__PURE__*/ jsx(DialogDescription, {
48
+ asChild: true,
49
+ children: /*#__PURE__*/ jsxs("div", {
50
+ className: "space-y-3",
51
+ children: [
52
+ /*#__PURE__*/ jsx("p", {
53
+ children: formatGuardrailFormMessage(labels.confirmPrompt, {
54
+ name: guardrailName
55
+ })
56
+ }),
57
+ hasAffected && /*#__PURE__*/ jsxs(Fragment, {
58
+ children: [
59
+ /*#__PURE__*/ jsx("p", {
60
+ children: labels.alsoApplicable
61
+ }),
62
+ /*#__PURE__*/ jsx(ImpactList, {
63
+ toolNames: affectedToolNames,
64
+ scopes: affectedScopes,
65
+ formatScope: formatScope
66
+ })
67
+ ]
68
+ }),
69
+ hasRemaining && /*#__PURE__*/ jsxs(Fragment, {
70
+ children: [
71
+ void 0 !== toolName && /*#__PURE__*/ jsx("p", {
72
+ children: formatGuardrailFormMessage(labels.removedForTool, {
73
+ toolName
74
+ })
75
+ }),
76
+ /*#__PURE__*/ jsx("p", {
77
+ children: labels.stillApplicable
78
+ }),
79
+ /*#__PURE__*/ jsx(ImpactList, {
80
+ toolNames: remainingToolNames,
81
+ scopes: remainingScopes,
82
+ formatScope: formatScope
83
+ })
84
+ ]
85
+ })
86
+ ]
87
+ })
88
+ })
89
+ ]
90
+ }),
91
+ /*#__PURE__*/ jsxs(DialogFooter, {
92
+ children: [
93
+ /*#__PURE__*/ jsx(DialogClose, {
94
+ asChild: true,
95
+ children: /*#__PURE__*/ jsx(Button, {
96
+ ref: cancelRef,
97
+ variant: "outline",
98
+ children: labels.cancel
99
+ })
100
+ }),
101
+ /*#__PURE__*/ jsx(Button, {
102
+ onClick: onConfirm,
103
+ children: labels.remove
104
+ })
105
+ ]
106
+ }),
107
+ showCloseButton && /*#__PURE__*/ jsx(DialogClose, {
108
+ asChild: true,
109
+ children: /*#__PURE__*/ jsx(Button, {
110
+ variant: "ghost",
111
+ size: "xs",
112
+ icon: true,
113
+ "aria-label": labels.close,
114
+ className: "absolute top-4 right-4",
115
+ children: /*#__PURE__*/ jsx(X, {})
116
+ })
117
+ })
118
+ ]
119
+ })
120
+ });
121
+ }
122
+ export { GuardrailRemoveDialog };
@@ -28,16 +28,20 @@ __webpack_require__.d(__webpack_exports__, {
28
28
  GUARDRAIL_FORM_EN_LABELS: ()=>GUARDRAIL_FORM_EN_LABELS,
29
29
  resolveGuardrailPaletteLabels: ()=>resolveGuardrailPaletteLabels,
30
30
  GUARDRAIL_PALETTE_EN_MESSAGES: ()=>GUARDRAIL_PALETTE_EN_MESSAGES,
31
+ GUARDRAIL_REMOVE_DIALOG_EN_MESSAGES: ()=>GUARDRAIL_REMOVE_DIALOG_EN_MESSAGES,
31
32
  GUARDRAIL_LIST_EN_MESSAGES: ()=>GUARDRAIL_LIST_EN_MESSAGES,
33
+ GUARDRAIL_REMOVE_DIALOG_EN_LABELS: ()=>GUARDRAIL_REMOVE_DIALOG_EN_LABELS,
32
34
  GUARDRAIL_LIST_EN_LABELS: ()=>GUARDRAIL_LIST_EN_LABELS,
33
35
  resolveGuardrailFormLabels: ()=>resolveGuardrailFormLabels,
34
- useGuardrailFormLabels: ()=>useGuardrailFormLabels,
36
+ useGuardrailRemoveDialogLabels: ()=>useGuardrailRemoveDialogLabels,
37
+ resolveGuardrailRemoveDialogLabels: ()=>resolveGuardrailRemoveDialogLabels,
35
38
  GUARDRAIL_PALETTE_EN_LABELS: ()=>GUARDRAIL_PALETTE_EN_LABELS,
36
- useGuardrailPaletteLabels: ()=>useGuardrailPaletteLabels,
39
+ useGuardrailFormLabels: ()=>useGuardrailFormLabels,
37
40
  useGuardrailBuilderLabels: ()=>useGuardrailBuilderLabels,
41
+ useGuardrailPaletteLabels: ()=>useGuardrailPaletteLabels,
38
42
  resolveGuardrailBuilderLabels: ()=>resolveGuardrailBuilderLabels,
39
- useGuardrailListLabels: ()=>useGuardrailListLabels,
40
43
  formatGuardrailFormMessage: ()=>formatGuardrailFormMessage,
44
+ useGuardrailListLabels: ()=>useGuardrailListLabels,
41
45
  resolveGuardrailListLabels: ()=>resolveGuardrailListLabels
42
46
  });
43
47
  const external_react_namespaceObject = require("react");
@@ -137,7 +141,8 @@ const TEMPLATE_TOKENS = {
137
141
  label: '{{label}}',
138
142
  position: '{{position}}',
139
143
  min: '{{min}}',
140
- max: '{{max}}'
144
+ max: '{{max}}',
145
+ toolName: '{{toolName}}'
141
146
  };
142
147
  function useGuardrailFormLabels(overrides) {
143
148
  const { _ } = (0, index_cjs_namespaceObject.useSafeLingui)();
@@ -578,21 +583,83 @@ function useGuardrailPaletteLabels(overrides) {
578
583
  overrides
579
584
  ]);
580
585
  }
586
+ function buildGuardrailRemoveDialogLabels(_) {
587
+ return {
588
+ title: _({
589
+ id: 'guardrails.remove-dialog.title',
590
+ message: 'Remove guardrail'
591
+ }),
592
+ confirmPrompt: _({
593
+ id: 'guardrails.remove-dialog.confirm-prompt',
594
+ message: 'Please, confirm you’d like to remove "{name}" guardrail',
595
+ values: TEMPLATE_TOKENS
596
+ }),
597
+ alsoApplicable: _({
598
+ id: 'guardrails.remove-dialog.also-applicable',
599
+ message: 'This guardrail is also applicable to:'
600
+ }),
601
+ removedForTool: _({
602
+ id: 'guardrails.remove-dialog.removed-for-tool',
603
+ message: 'The guardrail will be removed for tool "{toolName}".',
604
+ values: TEMPLATE_TOKENS
605
+ }),
606
+ stillApplicable: _({
607
+ id: 'guardrails.remove-dialog.still-applicable',
608
+ message: 'It will still be applicable to:'
609
+ }),
610
+ close: _({
611
+ id: 'guardrails.remove-dialog.close',
612
+ message: 'Close'
613
+ }),
614
+ cancel: _({
615
+ id: 'guardrails.remove-dialog.cancel',
616
+ message: 'Cancel'
617
+ }),
618
+ remove: _({
619
+ id: 'guardrails.remove-dialog.remove',
620
+ message: 'Remove'
621
+ })
622
+ };
623
+ }
624
+ const englishRemoveDialogTranslate = ({ message, values })=>values ? message.replace(/\{(\w+)\}/g, (match, token)=>values[token] ?? match) : message;
625
+ const GUARDRAIL_REMOVE_DIALOG_EN_LABELS = buildGuardrailRemoveDialogLabels(englishRemoveDialogTranslate);
626
+ const GUARDRAIL_REMOVE_DIALOG_EN_MESSAGES = Object.freeze((()=>{
627
+ const messages = {};
628
+ buildGuardrailRemoveDialogLabels((descriptor)=>{
629
+ messages[descriptor.id] = descriptor.message;
630
+ return descriptor.message;
631
+ });
632
+ return messages;
633
+ })());
634
+ function resolveGuardrailRemoveDialogLabels(catalog, overrides) {
635
+ return mergeLabels(GUARDRAIL_REMOVE_DIALOG_EN_LABELS, catalog, overrides);
636
+ }
637
+ function useGuardrailRemoveDialogLabels(overrides) {
638
+ const { _ } = (0, index_cjs_namespaceObject.useSafeLingui)();
639
+ return (0, external_react_namespaceObject.useMemo)(()=>resolveGuardrailRemoveDialogLabels(buildGuardrailRemoveDialogLabels(_), overrides), [
640
+ _,
641
+ overrides
642
+ ]);
643
+ }
581
644
  exports.GUARDRAIL_BUILDER_EN_LABELS = __webpack_exports__.GUARDRAIL_BUILDER_EN_LABELS;
582
645
  exports.GUARDRAIL_FORM_EN_LABELS = __webpack_exports__.GUARDRAIL_FORM_EN_LABELS;
583
646
  exports.GUARDRAIL_LIST_EN_LABELS = __webpack_exports__.GUARDRAIL_LIST_EN_LABELS;
584
647
  exports.GUARDRAIL_LIST_EN_MESSAGES = __webpack_exports__.GUARDRAIL_LIST_EN_MESSAGES;
585
648
  exports.GUARDRAIL_PALETTE_EN_LABELS = __webpack_exports__.GUARDRAIL_PALETTE_EN_LABELS;
586
649
  exports.GUARDRAIL_PALETTE_EN_MESSAGES = __webpack_exports__.GUARDRAIL_PALETTE_EN_MESSAGES;
650
+ exports.GUARDRAIL_REMOVE_DIALOG_EN_LABELS = __webpack_exports__.GUARDRAIL_REMOVE_DIALOG_EN_LABELS;
651
+ exports.GUARDRAIL_REMOVE_DIALOG_EN_MESSAGES = __webpack_exports__.GUARDRAIL_REMOVE_DIALOG_EN_MESSAGES;
587
652
  exports.formatGuardrailFormMessage = __webpack_exports__.formatGuardrailFormMessage;
588
653
  exports.resolveGuardrailBuilderLabels = __webpack_exports__.resolveGuardrailBuilderLabels;
589
654
  exports.resolveGuardrailFormLabels = __webpack_exports__.resolveGuardrailFormLabels;
590
655
  exports.resolveGuardrailListLabels = __webpack_exports__.resolveGuardrailListLabels;
591
656
  exports.resolveGuardrailPaletteLabels = __webpack_exports__.resolveGuardrailPaletteLabels;
657
+ exports.resolveGuardrailRemoveDialogLabels = __webpack_exports__.resolveGuardrailRemoveDialogLabels;
592
658
  exports.useGuardrailBuilderLabels = __webpack_exports__.useGuardrailBuilderLabels;
593
659
  exports.useGuardrailFormLabels = __webpack_exports__.useGuardrailFormLabels;
594
660
  exports.useGuardrailListLabels = __webpack_exports__.useGuardrailListLabels;
595
661
  exports.useGuardrailPaletteLabels = __webpack_exports__.useGuardrailPaletteLabels;
662
+ exports.useGuardrailRemoveDialogLabels = __webpack_exports__.useGuardrailRemoveDialogLabels;
596
663
  for(var __rspack_i in __webpack_exports__)if (-1 === [
597
664
  "GUARDRAIL_BUILDER_EN_LABELS",
598
665
  "GUARDRAIL_FORM_EN_LABELS",
@@ -600,15 +667,19 @@ for(var __rspack_i in __webpack_exports__)if (-1 === [
600
667
  "GUARDRAIL_LIST_EN_MESSAGES",
601
668
  "GUARDRAIL_PALETTE_EN_LABELS",
602
669
  "GUARDRAIL_PALETTE_EN_MESSAGES",
670
+ "GUARDRAIL_REMOVE_DIALOG_EN_LABELS",
671
+ "GUARDRAIL_REMOVE_DIALOG_EN_MESSAGES",
603
672
  "formatGuardrailFormMessage",
604
673
  "resolveGuardrailBuilderLabels",
605
674
  "resolveGuardrailFormLabels",
606
675
  "resolveGuardrailListLabels",
607
676
  "resolveGuardrailPaletteLabels",
677
+ "resolveGuardrailRemoveDialogLabels",
608
678
  "useGuardrailBuilderLabels",
609
679
  "useGuardrailFormLabels",
610
680
  "useGuardrailListLabels",
611
- "useGuardrailPaletteLabels"
681
+ "useGuardrailPaletteLabels",
682
+ "useGuardrailRemoveDialogLabels"
612
683
  ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
613
684
  Object.defineProperty(exports, '__esModule', {
614
685
  value: true
@@ -113,4 +113,18 @@ export declare const GUARDRAIL_PALETTE_EN_LABELS: GuardrailPaletteLabels;
113
113
  export declare const GUARDRAIL_PALETTE_EN_MESSAGES: Readonly<Record<string, string>>;
114
114
  export declare function resolveGuardrailPaletteLabels(catalog?: Partial<GuardrailPaletteLabels>, overrides?: Partial<GuardrailPaletteLabels>): GuardrailPaletteLabels;
115
115
  export declare function useGuardrailPaletteLabels(overrides?: Partial<GuardrailPaletteLabels>): GuardrailPaletteLabels;
116
+ export interface GuardrailRemoveDialogLabels {
117
+ title: string;
118
+ confirmPrompt: string;
119
+ alsoApplicable: string;
120
+ removedForTool: string;
121
+ stillApplicable: string;
122
+ close: string;
123
+ cancel: string;
124
+ remove: string;
125
+ }
126
+ export declare const GUARDRAIL_REMOVE_DIALOG_EN_LABELS: GuardrailRemoveDialogLabels;
127
+ export declare const GUARDRAIL_REMOVE_DIALOG_EN_MESSAGES: Readonly<Record<string, string>>;
128
+ export declare function resolveGuardrailRemoveDialogLabels(catalog?: Partial<GuardrailRemoveDialogLabels>, overrides?: Partial<GuardrailRemoveDialogLabels>): GuardrailRemoveDialogLabels;
129
+ export declare function useGuardrailRemoveDialogLabels(overrides?: Partial<GuardrailRemoveDialogLabels>): GuardrailRemoveDialogLabels;
116
130
  //# sourceMappingURL=i18n.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/Guardrails/i18n.ts"],"names":[],"mappings":"AAiBA,MAAM,WAAW,4BAA4B;IAE3C,eAAe,EAAE,MAAM,CAAC;IAExB,eAAe,EAAE,MAAM,CAAC;IAExB,mBAAmB,EAAE,MAAM,CAAC;IAE5B,OAAO,EAAE,MAAM,CAAC;IAEhB,UAAU,EAAE,MAAM,CAAC;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5B;AAmCD,eAAO,MAAM,2BAA2B,EAAE,sBAEzC,CAAC;AAMF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAS1E,CAAC;AAGF,wBAAgB,6BAA6B,CAC3C,OAAO,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,EACzC,SAAS,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,GAC1C,sBAAsB,CAExB;AAGD,wBAAgB,yBAAyB,CACvC,SAAS,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,GAC1C,sBAAsB,CAMxB;AAQD,MAAM,WAAW,2BAA2B;IAC1C,KAAK,EAAE,MAAM,CAAC;IAEd,aAAa,EAAE,MAAM,CAAC;IAEtB,cAAc,EAAE,MAAM,CAAC;IAEvB,cAAc,EAAE,MAAM,CAAC;IAEvB,eAAe,EAAE,MAAM,CAAC;IAExB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AA+CD,eAAO,MAAM,iCAAiC,EAAE,2BACgB,CAAC;AAMjE,eAAO,MAAM,mCAAmC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAShF,CAAC;AAGF,wBAAgB,kCAAkC,CAChD,OAAO,CAAC,EAAE,OAAO,CAAC,2BAA2B,CAAC,EAC9C,SAAS,CAAC,EAAE,OAAO,CAAC,2BAA2B,CAAC,GAC/C,2BAA2B,CAE7B;AAGD,wBAAgB,8BAA8B,CAC5C,SAAS,CAAC,EAAE,OAAO,CAAC,2BAA2B,CAAC,GAC/C,2BAA2B,CAM7B"}
@@ -95,7 +95,8 @@ const TEMPLATE_TOKENS = {
95
95
  label: '{{label}}',
96
96
  position: '{{position}}',
97
97
  min: '{{min}}',
98
- max: '{{max}}'
98
+ max: '{{max}}',
99
+ toolName: '{{toolName}}'
99
100
  };
100
101
  function useGuardrailFormLabels(overrides) {
101
102
  const { _ } = useSafeLingui();
@@ -536,4 +537,62 @@ function useGuardrailPaletteLabels(overrides) {
536
537
  overrides
537
538
  ]);
538
539
  }
539
- export { GUARDRAIL_BUILDER_EN_LABELS, GUARDRAIL_FORM_EN_LABELS, GUARDRAIL_LIST_EN_LABELS, GUARDRAIL_LIST_EN_MESSAGES, GUARDRAIL_PALETTE_EN_LABELS, GUARDRAIL_PALETTE_EN_MESSAGES, formatGuardrailFormMessage, resolveGuardrailBuilderLabels, resolveGuardrailFormLabels, resolveGuardrailListLabels, resolveGuardrailPaletteLabels, useGuardrailBuilderLabels, useGuardrailFormLabels, useGuardrailListLabels, useGuardrailPaletteLabels };
540
+ function buildGuardrailRemoveDialogLabels(_) {
541
+ return {
542
+ title: _({
543
+ id: 'guardrails.remove-dialog.title',
544
+ message: 'Remove guardrail'
545
+ }),
546
+ confirmPrompt: _({
547
+ id: 'guardrails.remove-dialog.confirm-prompt',
548
+ message: 'Please, confirm you’d like to remove "{name}" guardrail',
549
+ values: TEMPLATE_TOKENS
550
+ }),
551
+ alsoApplicable: _({
552
+ id: 'guardrails.remove-dialog.also-applicable',
553
+ message: 'This guardrail is also applicable to:'
554
+ }),
555
+ removedForTool: _({
556
+ id: 'guardrails.remove-dialog.removed-for-tool',
557
+ message: 'The guardrail will be removed for tool "{toolName}".',
558
+ values: TEMPLATE_TOKENS
559
+ }),
560
+ stillApplicable: _({
561
+ id: 'guardrails.remove-dialog.still-applicable',
562
+ message: 'It will still be applicable to:'
563
+ }),
564
+ close: _({
565
+ id: 'guardrails.remove-dialog.close',
566
+ message: 'Close'
567
+ }),
568
+ cancel: _({
569
+ id: 'guardrails.remove-dialog.cancel',
570
+ message: 'Cancel'
571
+ }),
572
+ remove: _({
573
+ id: 'guardrails.remove-dialog.remove',
574
+ message: 'Remove'
575
+ })
576
+ };
577
+ }
578
+ const englishRemoveDialogTranslate = ({ message, values })=>values ? message.replace(/\{(\w+)\}/g, (match, token)=>values[token] ?? match) : message;
579
+ const GUARDRAIL_REMOVE_DIALOG_EN_LABELS = buildGuardrailRemoveDialogLabels(englishRemoveDialogTranslate);
580
+ const GUARDRAIL_REMOVE_DIALOG_EN_MESSAGES = Object.freeze((()=>{
581
+ const messages = {};
582
+ buildGuardrailRemoveDialogLabels((descriptor)=>{
583
+ messages[descriptor.id] = descriptor.message;
584
+ return descriptor.message;
585
+ });
586
+ return messages;
587
+ })());
588
+ function resolveGuardrailRemoveDialogLabels(catalog, overrides) {
589
+ return mergeLabels(GUARDRAIL_REMOVE_DIALOG_EN_LABELS, catalog, overrides);
590
+ }
591
+ function useGuardrailRemoveDialogLabels(overrides) {
592
+ const { _ } = useSafeLingui();
593
+ return useMemo(()=>resolveGuardrailRemoveDialogLabels(buildGuardrailRemoveDialogLabels(_), overrides), [
594
+ _,
595
+ overrides
596
+ ]);
597
+ }
598
+ export { GUARDRAIL_BUILDER_EN_LABELS, GUARDRAIL_FORM_EN_LABELS, GUARDRAIL_LIST_EN_LABELS, GUARDRAIL_LIST_EN_MESSAGES, GUARDRAIL_PALETTE_EN_LABELS, GUARDRAIL_PALETTE_EN_MESSAGES, GUARDRAIL_REMOVE_DIALOG_EN_LABELS, GUARDRAIL_REMOVE_DIALOG_EN_MESSAGES, formatGuardrailFormMessage, resolveGuardrailBuilderLabels, resolveGuardrailFormLabels, resolveGuardrailListLabels, resolveGuardrailPaletteLabels, resolveGuardrailRemoveDialogLabels, useGuardrailBuilderLabels, useGuardrailFormLabels, useGuardrailListLabels, useGuardrailPaletteLabels, useGuardrailRemoveDialogLabels };