@uipath/apollo-wind 2.93.0 → 2.94.1
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/components/forms/field-renderer.cjs +1 -1
- package/dist/components/forms/field-renderer.js +1 -1
- package/dist/components/forms/field-rules-strings.cjs +40 -0
- package/dist/components/forms/field-rules-strings.d.ts +17 -0
- package/dist/components/forms/field-rules-strings.js +6 -0
- package/dist/components/forms/field-rules.cjs +526 -0
- package/dist/components/forms/field-rules.d.ts +97 -0
- package/dist/components/forms/field-rules.js +468 -0
- package/dist/components/forms/form-designer.cjs +208 -592
- package/dist/components/forms/form-designer.js +210 -594
- package/dist/components/forms/form-schema.d.ts +5 -0
- package/dist/components/forms/index.cjs +43 -3
- package/dist/components/forms/index.d.ts +4 -0
- package/dist/components/forms/index.js +5 -1
- package/dist/components/forms/metadata-form.cjs +1 -1
- package/dist/components/forms/metadata-form.js +1 -1
- package/dist/components/forms/rules-engine-dialect.cjs +644 -0
- package/dist/components/forms/rules-engine-dialect.d.ts +90 -0
- package/dist/components/forms/rules-engine-dialect.js +537 -0
- package/dist/components/forms/rules-engine.cjs +99 -10
- package/dist/components/forms/rules-engine.d.ts +5 -0
- package/dist/components/forms/rules-engine.js +99 -10
- package/dist/components/forms/use-field-rules.cjs +122 -0
- package/dist/components/forms/use-field-rules.d.ts +31 -0
- package/dist/components/forms/use-field-rules.js +88 -0
- package/dist/components/ui/command.cjs +1 -1
- package/dist/components/ui/command.js +1 -1
- package/dist/components/ui/conditions-editor/condition-row.cjs +458 -0
- package/dist/components/ui/conditions-editor/condition-row.d.ts +23 -0
- package/dist/components/ui/conditions-editor/condition-row.js +421 -0
- package/dist/components/ui/conditions-editor/conditions-editor.cjs +363 -0
- package/dist/components/ui/conditions-editor/conditions-editor.d.ts +67 -0
- package/dist/components/ui/conditions-editor/conditions-editor.js +329 -0
- package/dist/components/ui/conditions-editor/context.cjs +45 -0
- package/dist/components/ui/conditions-editor/context.d.ts +54 -0
- package/dist/components/ui/conditions-editor/context.js +8 -0
- package/dist/components/ui/conditions-editor/index.cjs +55 -0
- package/dist/components/ui/conditions-editor/index.d.ts +6 -0
- package/dist/components/ui/conditions-editor/index.js +6 -0
- package/dist/components/ui/conditions-editor/model.cjs +126 -0
- package/dist/components/ui/conditions-editor/model.d.ts +39 -0
- package/dist/components/ui/conditions-editor/model.js +71 -0
- package/dist/components/ui/conditions-editor/status.cjs +198 -0
- package/dist/components/ui/conditions-editor/status.d.ts +44 -0
- package/dist/components/ui/conditions-editor/status.js +131 -0
- package/dist/components/ui/conditions-editor/strings.cjs +86 -0
- package/dist/components/ui/conditions-editor/strings.d.ts +62 -0
- package/dist/components/ui/conditions-editor/strings.js +52 -0
- package/dist/components/ui/conditions-editor/vocabulary.cjs +163 -0
- package/dist/components/ui/conditions-editor/vocabulary.d.ts +51 -0
- package/dist/components/ui/conditions-editor/vocabulary.js +129 -0
- package/dist/components/ui/context-menu.cjs +1 -1
- package/dist/components/ui/context-menu.js +1 -1
- package/dist/components/ui/dropdown-menu.cjs +1 -1
- package/dist/components/ui/dropdown-menu.js +1 -1
- package/dist/components/ui/field-actions/index.cjs +9 -2
- package/dist/components/ui/field-actions/index.d.ts +1 -0
- package/dist/components/ui/field-actions/index.js +2 -1
- package/dist/components/ui/field-actions/insert-variable-action.cjs +3 -1
- package/dist/components/ui/field-actions/insert-variable-action.d.ts +4 -1
- package/dist/components/ui/field-actions/insert-variable-action.js +3 -1
- package/dist/components/ui/field-actions/rules-action.cjs +244 -0
- package/dist/components/ui/field-actions/rules-action.d.ts +42 -0
- package/dist/components/ui/field-actions/rules-action.js +207 -0
- package/dist/components/ui/index.cjs +285 -246
- package/dist/components/ui/index.d.ts +3 -0
- package/dist/components/ui/index.js +3 -0
- package/dist/components/ui/quick-form-field/components/field-header.cjs +137 -167
- package/dist/components/ui/quick-form-field/components/field-header.d.ts +1 -1
- package/dist/components/ui/quick-form-field/components/field-header.js +138 -168
- package/dist/components/ui/quick-form-field/components/header-actions.cjs +187 -0
- package/dist/components/ui/quick-form-field/components/header-actions.d.ts +59 -0
- package/dist/components/ui/quick-form-field/components/header-actions.js +138 -0
- package/dist/components/ui/quick-form-field/components/header-context.cjs +59 -0
- package/dist/components/ui/quick-form-field/components/header-context.d.ts +33 -0
- package/dist/components/ui/quick-form-field/components/header-context.js +16 -0
- package/dist/components/ui/quick-form-field/index.cjs +18 -4
- package/dist/components/ui/quick-form-field/index.d.ts +2 -0
- package/dist/components/ui/quick-form-field/index.js +3 -1
- package/dist/components/ui/quick-form-field/quick-form-field.cjs +1 -1
- package/dist/components/ui/quick-form-field/quick-form-field.d.ts +6 -6
- package/dist/components/ui/quick-form-field/quick-form-field.js +1 -1
- package/dist/components/ui/quick-form-field/types.d.ts +42 -11
- package/dist/components/ui/row-groups/add-row-button.cjs +54 -0
- package/dist/components/ui/row-groups/add-row-button.d.ts +10 -0
- package/dist/components/ui/row-groups/add-row-button.js +20 -0
- package/dist/components/ui/row-groups/after-press.cjs +73 -0
- package/dist/components/ui/row-groups/after-press.d.ts +7 -0
- package/dist/components/ui/row-groups/after-press.js +36 -0
- package/dist/components/ui/row-groups/collapsible-row-group.cjs +83 -0
- package/dist/components/ui/row-groups/collapsible-row-group.d.ts +13 -0
- package/dist/components/ui/row-groups/collapsible-row-group.js +49 -0
- package/dist/components/ui/row-groups/empty-rows.cjs +42 -0
- package/dist/components/ui/row-groups/empty-rows.d.ts +7 -0
- package/dist/components/ui/row-groups/empty-rows.js +8 -0
- package/dist/components/ui/row-groups/group-mode-toggle.cjs +80 -0
- package/dist/components/ui/row-groups/group-mode-toggle.d.ts +26 -0
- package/dist/components/ui/row-groups/group-mode-toggle.js +40 -0
- package/dist/components/ui/row-groups/index.cjs +62 -0
- package/dist/components/ui/row-groups/index.d.ts +6 -0
- package/dist/components/ui/row-groups/index.js +7 -0
- package/dist/components/ui/row-groups/row-delete-button.cjs +54 -0
- package/dist/components/ui/row-groups/row-delete-button.d.ts +18 -0
- package/dist/components/ui/row-groups/row-delete-button.js +20 -0
- package/dist/components/ui/row-groups/use-row-focus.cjs +82 -0
- package/dist/components/ui/row-groups/use-row-focus.d.ts +17 -0
- package/dist/components/ui/row-groups/use-row-focus.js +48 -0
- package/dist/components/ui/rules-editor/context.cjs +45 -0
- package/dist/components/ui/rules-editor/context.d.ts +52 -0
- package/dist/components/ui/rules-editor/context.js +8 -0
- package/dist/components/ui/rules-editor/index.cjs +56 -0
- package/dist/components/ui/rules-editor/index.d.ts +4 -0
- package/dist/components/ui/rules-editor/index.js +4 -0
- package/dist/components/ui/rules-editor/model.cjs +205 -0
- package/dist/components/ui/rules-editor/model.d.ts +128 -0
- package/dist/components/ui/rules-editor/model.js +144 -0
- package/dist/components/ui/rules-editor/rule-card.cjs +470 -0
- package/dist/components/ui/rules-editor/rule-card.d.ts +14 -0
- package/dist/components/ui/rules-editor/rule-card.js +436 -0
- package/dist/components/ui/rules-editor/rules-editor.cjs +160 -0
- package/dist/components/ui/rules-editor/rules-editor.d.ts +66 -0
- package/dist/components/ui/rules-editor/rules-editor.js +126 -0
- package/dist/components/ui/rules-editor/strings.cjs +68 -0
- package/dist/components/ui/rules-editor/strings.d.ts +56 -0
- package/dist/components/ui/rules-editor/strings.js +34 -0
- package/dist/components/ui/select.cjs +1 -1
- package/dist/components/ui/select.js +1 -1
- package/dist/index.cjs +129 -8
- package/dist/index.d.ts +17 -4
- package/dist/index.js +10 -3
- package/dist/styles.css +97 -24
- package/package.json +2 -2
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useMemo, useRef } from "react";
|
|
3
|
+
import { DEFAULT_CONDITION_OPERATORS } from "../conditions-editor/index.js";
|
|
4
|
+
import { defaultValueModes } from "../conditions-editor/status.js";
|
|
5
|
+
import { AddRowButton, EmptyRows, useRowFocus } from "../row-groups/index.js";
|
|
6
|
+
import { usePressTracking } from "../row-groups/after-press.js";
|
|
7
|
+
import { cn } from "../../../lib/index.js";
|
|
8
|
+
import { RulesEditorContext } from "./context.js";
|
|
9
|
+
import { createRule } from "./model.js";
|
|
10
|
+
import { RuleCard } from "./rule-card.js";
|
|
11
|
+
import { DEFAULT_RULES_EDITOR_STRINGS } from "./strings.js";
|
|
12
|
+
function RulesEditor({ value, onChange, label, outcomes, defaultOutcome, fields, operators = DEFAULT_CONDITION_OPERATORS, valueModes, variables, renderValue, showMatchMode = true, allowExpressions = true, dialect, renderExpressionEditor, forceErrors = false, defaultTouched, disabled = false, className, strings, conditionsStrings, valueModeStrings, multiSelectStrings }) {
|
|
13
|
+
usePressTracking();
|
|
14
|
+
const focus = useRowFocus();
|
|
15
|
+
const latest = useRef({
|
|
16
|
+
value,
|
|
17
|
+
onChange
|
|
18
|
+
});
|
|
19
|
+
latest.current = {
|
|
20
|
+
value,
|
|
21
|
+
onChange
|
|
22
|
+
};
|
|
23
|
+
const updateRule = useCallback((rule)=>latest.current.onChange(latest.current.value.map((current)=>current.id === rule.id ? rule : current)), []);
|
|
24
|
+
const { afterDelete } = focus;
|
|
25
|
+
const deleteRule = useCallback((id, position)=>{
|
|
26
|
+
afterDelete(position);
|
|
27
|
+
latest.current.onChange(latest.current.value.filter((rule)=>rule.id !== id));
|
|
28
|
+
}, [
|
|
29
|
+
afterDelete
|
|
30
|
+
]);
|
|
31
|
+
const text = useMemo(()=>({
|
|
32
|
+
...DEFAULT_RULES_EDITOR_STRINGS,
|
|
33
|
+
...strings
|
|
34
|
+
}), [
|
|
35
|
+
strings
|
|
36
|
+
]);
|
|
37
|
+
const ruleConditionsStrings = useMemo(()=>({
|
|
38
|
+
...conditionsStrings,
|
|
39
|
+
empty: ''
|
|
40
|
+
}), [
|
|
41
|
+
conditionsStrings
|
|
42
|
+
]);
|
|
43
|
+
const modes = valueModes ?? defaultValueModes(variables);
|
|
44
|
+
const vocabulary = useMemo(()=>({
|
|
45
|
+
fields,
|
|
46
|
+
operators,
|
|
47
|
+
valueModes: modes
|
|
48
|
+
}), [
|
|
49
|
+
fields,
|
|
50
|
+
operators,
|
|
51
|
+
modes
|
|
52
|
+
]);
|
|
53
|
+
const editor = useMemo(()=>({
|
|
54
|
+
outcomes,
|
|
55
|
+
vocabulary,
|
|
56
|
+
variables,
|
|
57
|
+
renderValue,
|
|
58
|
+
showMatchMode,
|
|
59
|
+
allowExpressions,
|
|
60
|
+
dialect,
|
|
61
|
+
renderExpressionEditor,
|
|
62
|
+
forceErrors,
|
|
63
|
+
defaultTouched,
|
|
64
|
+
disabled,
|
|
65
|
+
strings: text,
|
|
66
|
+
conditionsStrings: ruleConditionsStrings,
|
|
67
|
+
valueModeStrings,
|
|
68
|
+
multiSelectStrings,
|
|
69
|
+
updateRule
|
|
70
|
+
}), [
|
|
71
|
+
outcomes,
|
|
72
|
+
vocabulary,
|
|
73
|
+
variables,
|
|
74
|
+
renderValue,
|
|
75
|
+
showMatchMode,
|
|
76
|
+
allowExpressions,
|
|
77
|
+
dialect,
|
|
78
|
+
renderExpressionEditor,
|
|
79
|
+
forceErrors,
|
|
80
|
+
defaultTouched,
|
|
81
|
+
disabled,
|
|
82
|
+
text,
|
|
83
|
+
ruleConditionsStrings,
|
|
84
|
+
valueModeStrings,
|
|
85
|
+
multiSelectStrings,
|
|
86
|
+
updateRule
|
|
87
|
+
]);
|
|
88
|
+
return /*#__PURE__*/ jsx(RulesEditorContext.Provider, {
|
|
89
|
+
value: editor,
|
|
90
|
+
children: /*#__PURE__*/ jsxs("fieldset", {
|
|
91
|
+
"aria-label": label,
|
|
92
|
+
className: cn('m-0 flex min-w-0 flex-col gap-2 border-0 p-0', className),
|
|
93
|
+
children: [
|
|
94
|
+
/*#__PURE__*/ jsx("div", {
|
|
95
|
+
ref: focus.listRef,
|
|
96
|
+
className: "flex flex-col gap-2",
|
|
97
|
+
children: 0 === value.length ? text.empty && /*#__PURE__*/ jsx(EmptyRows, {
|
|
98
|
+
children: text.empty
|
|
99
|
+
}) : value.map((rule, position)=>/*#__PURE__*/ jsx(RuleCard, {
|
|
100
|
+
rule: rule,
|
|
101
|
+
index: position + 1,
|
|
102
|
+
position: position,
|
|
103
|
+
onDelete: deleteRule
|
|
104
|
+
}, rule.id))
|
|
105
|
+
}),
|
|
106
|
+
/*#__PURE__*/ jsx("div", {
|
|
107
|
+
children: /*#__PURE__*/ jsx(AddRowButton, {
|
|
108
|
+
ref: focus.addRef,
|
|
109
|
+
disabled: disabled,
|
|
110
|
+
onClick: ()=>{
|
|
111
|
+
focus.afterAdd();
|
|
112
|
+
onChange([
|
|
113
|
+
...value,
|
|
114
|
+
createRule({
|
|
115
|
+
outcome: defaultOutcome ?? outcomes[0]?.value ?? ''
|
|
116
|
+
})
|
|
117
|
+
]);
|
|
118
|
+
},
|
|
119
|
+
children: text.addRule
|
|
120
|
+
})
|
|
121
|
+
})
|
|
122
|
+
]
|
|
123
|
+
})
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
export { RulesEditor };
|
|
@@ -0,0 +1,68 @@
|
|
|
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
|
+
DEFAULT_RULES_EDITOR_STRINGS: ()=>DEFAULT_RULES_EDITOR_STRINGS
|
|
28
|
+
});
|
|
29
|
+
const DEFAULT_RULES_EDITOR_STRINGS = {
|
|
30
|
+
outcomeLabel: 'Outcome',
|
|
31
|
+
outcomePlaceholder: 'Select an outcome',
|
|
32
|
+
errorOutcome: 'Select an outcome.',
|
|
33
|
+
when: 'when',
|
|
34
|
+
always: 'always',
|
|
35
|
+
ruleName: (position)=>`Rule ${position}`,
|
|
36
|
+
removeRule: (position)=>`Remove rule ${position}`,
|
|
37
|
+
ruleConditions: (rule)=>`${rule} conditions`,
|
|
38
|
+
modeConditions: 'Conditions',
|
|
39
|
+
modeExpression: 'Expression',
|
|
40
|
+
modeConditionsDescription: 'Pick fields, operators, and values.',
|
|
41
|
+
modeExpressionDescription: 'Write one expression.',
|
|
42
|
+
ruleMode: (rule, mode)=>`${rule} mode: ${mode}`,
|
|
43
|
+
expressionLabel: 'Expression',
|
|
44
|
+
expressionPlaceholder: '',
|
|
45
|
+
errorExpression: 'Enter an expression.',
|
|
46
|
+
errorExpressionInvalid: "This expression can't run. Check its syntax and what it uses.",
|
|
47
|
+
errorExpressionUnknownFields: (fields)=>`Uses ${fields.join(', ')}, which the form does not contain.`,
|
|
48
|
+
modePreserved: 'Stored conditions',
|
|
49
|
+
preservedNote: 'These conditions are not supported in the current editor but will continue to execute.',
|
|
50
|
+
switchFromPreservedDescription: 'These stored conditions cannot be edited here, so they will be removed.',
|
|
51
|
+
ruleNeedsRepair: (reason)=>`This rule cannot be evaluated: ${reason}.`,
|
|
52
|
+
repairAction: 'Repair rule',
|
|
53
|
+
addRule: 'Add rule',
|
|
54
|
+
empty: 'No rules.',
|
|
55
|
+
switchToExpressionTitle: 'Switch to an expression?',
|
|
56
|
+
switchToExpressionDescription: 'These conditions cannot be written as an expression, so they will be removed.',
|
|
57
|
+
switchToConditionsTitle: 'Switch to conditions?',
|
|
58
|
+
switchToConditionsDescription: 'This expression cannot be shown as conditions, so it will be removed.',
|
|
59
|
+
switchConfirm: 'Switch',
|
|
60
|
+
cancel: 'Cancel'
|
|
61
|
+
};
|
|
62
|
+
exports.DEFAULT_RULES_EDITOR_STRINGS = __webpack_exports__.DEFAULT_RULES_EDITOR_STRINGS;
|
|
63
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
64
|
+
"DEFAULT_RULES_EDITOR_STRINGS"
|
|
65
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
66
|
+
Object.defineProperty(exports, '__esModule', {
|
|
67
|
+
value: true
|
|
68
|
+
});
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export interface RulesEditorStrings {
|
|
2
|
+
outcomeLabel: string;
|
|
3
|
+
outcomePlaceholder: string;
|
|
4
|
+
/** Shown when a rule's outcome is not one the editor offers. */
|
|
5
|
+
errorOutcome: string;
|
|
6
|
+
/**
|
|
7
|
+
* After the outcome select: "Show when". The select comes first, so a language that puts the
|
|
8
|
+
* conjunction first cannot reorder the two.
|
|
9
|
+
*/
|
|
10
|
+
when: string;
|
|
11
|
+
/** After the outcome select of a rule with no conditions, which always applies: "Show always". */
|
|
12
|
+
always: string;
|
|
13
|
+
/** The rule half of every control's name, e.g. "Rule 2" + "Outcome". */
|
|
14
|
+
ruleName: (position: number) => string;
|
|
15
|
+
removeRule: (position: number) => string;
|
|
16
|
+
/** Names a rule's conditions group, e.g. "Rule 2 conditions". */
|
|
17
|
+
ruleConditions: (rule: string) => string;
|
|
18
|
+
/** The rule mode menu's options. */
|
|
19
|
+
modeConditions: string;
|
|
20
|
+
modeConditionsDescription: string;
|
|
21
|
+
modeExpression: string;
|
|
22
|
+
modeExpressionDescription: string;
|
|
23
|
+
/** Names the mode menu by the current mode, e.g. "Rule 2 mode: Conditions". */
|
|
24
|
+
ruleMode: (rule: string, mode: string) => string;
|
|
25
|
+
/** The expression editor's label. */
|
|
26
|
+
expressionLabel: string;
|
|
27
|
+
/** An example of a valid expression. Empty shows none. */
|
|
28
|
+
expressionPlaceholder: string;
|
|
29
|
+
errorExpression: string;
|
|
30
|
+
/** For an expression the dialect cannot run. */
|
|
31
|
+
errorExpressionInvalid: string;
|
|
32
|
+
/** For an expression naming fields the form does not contain, by the keys it names. */
|
|
33
|
+
errorExpressionUnknownFields: (fields: string[]) => string;
|
|
34
|
+
/** Names a preserved rule's mode and its read-only source. */
|
|
35
|
+
modePreserved: string;
|
|
36
|
+
/** Under a preserved rule's source: it cannot be edited here, and still runs. */
|
|
37
|
+
preservedNote: string;
|
|
38
|
+
/** Asks before a preserved rule's source is replaced by another mode. */
|
|
39
|
+
switchFromPreservedDescription: string;
|
|
40
|
+
/** At the bottom of a rule the dialect cannot evaluate as it shows, with the dialect's reason. */
|
|
41
|
+
ruleNeedsRepair: (reason: string) => string;
|
|
42
|
+
/** After that message: rewrites the rule so it is evaluated as it shows. */
|
|
43
|
+
repairAction: string;
|
|
44
|
+
addRule: string;
|
|
45
|
+
/** Says what happens with no rules, e.g. "No rules. The field always shows." Empty shows none. */
|
|
46
|
+
empty: string;
|
|
47
|
+
/** Asked when a rule's conditions cannot be written as an expression. */
|
|
48
|
+
switchToExpressionTitle: string;
|
|
49
|
+
switchToExpressionDescription: string;
|
|
50
|
+
/** Asked when a rule's expression cannot be shown as conditions. */
|
|
51
|
+
switchToConditionsTitle: string;
|
|
52
|
+
switchToConditionsDescription: string;
|
|
53
|
+
switchConfirm: string;
|
|
54
|
+
cancel: string;
|
|
55
|
+
}
|
|
56
|
+
export declare const DEFAULT_RULES_EDITOR_STRINGS: RulesEditorStrings;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
const DEFAULT_RULES_EDITOR_STRINGS = {
|
|
2
|
+
outcomeLabel: 'Outcome',
|
|
3
|
+
outcomePlaceholder: 'Select an outcome',
|
|
4
|
+
errorOutcome: 'Select an outcome.',
|
|
5
|
+
when: 'when',
|
|
6
|
+
always: 'always',
|
|
7
|
+
ruleName: (position)=>`Rule ${position}`,
|
|
8
|
+
removeRule: (position)=>`Remove rule ${position}`,
|
|
9
|
+
ruleConditions: (rule)=>`${rule} conditions`,
|
|
10
|
+
modeConditions: 'Conditions',
|
|
11
|
+
modeExpression: 'Expression',
|
|
12
|
+
modeConditionsDescription: 'Pick fields, operators, and values.',
|
|
13
|
+
modeExpressionDescription: 'Write one expression.',
|
|
14
|
+
ruleMode: (rule, mode)=>`${rule} mode: ${mode}`,
|
|
15
|
+
expressionLabel: 'Expression',
|
|
16
|
+
expressionPlaceholder: '',
|
|
17
|
+
errorExpression: 'Enter an expression.',
|
|
18
|
+
errorExpressionInvalid: "This expression can't run. Check its syntax and what it uses.",
|
|
19
|
+
errorExpressionUnknownFields: (fields)=>`Uses ${fields.join(', ')}, which the form does not contain.`,
|
|
20
|
+
modePreserved: 'Stored conditions',
|
|
21
|
+
preservedNote: 'These conditions are not supported in the current editor but will continue to execute.',
|
|
22
|
+
switchFromPreservedDescription: 'These stored conditions cannot be edited here, so they will be removed.',
|
|
23
|
+
ruleNeedsRepair: (reason)=>`This rule cannot be evaluated: ${reason}.`,
|
|
24
|
+
repairAction: 'Repair rule',
|
|
25
|
+
addRule: 'Add rule',
|
|
26
|
+
empty: 'No rules.',
|
|
27
|
+
switchToExpressionTitle: 'Switch to an expression?',
|
|
28
|
+
switchToExpressionDescription: 'These conditions cannot be written as an expression, so they will be removed.',
|
|
29
|
+
switchToConditionsTitle: 'Switch to conditions?',
|
|
30
|
+
switchToConditionsDescription: 'This expression cannot be shown as conditions, so it will be removed.',
|
|
31
|
+
switchConfirm: 'Switch',
|
|
32
|
+
cancel: 'Cancel'
|
|
33
|
+
};
|
|
34
|
+
export { DEFAULT_RULES_EDITOR_STRINGS };
|
|
@@ -230,7 +230,7 @@ SelectItem.displayName = react_select_namespaceObject.Item.displayName;
|
|
|
230
230
|
const SelectSeparator = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.Separator, {
|
|
231
231
|
ref: ref,
|
|
232
232
|
"data-slot": "select-separator",
|
|
233
|
-
className: (0, index_cjs_namespaceObject.cn)('-mx-1 my-1 h-px bg-
|
|
233
|
+
className: (0, index_cjs_namespaceObject.cn)('-mx-1 my-1 h-px bg-border-subtle', className),
|
|
234
234
|
...props
|
|
235
235
|
}));
|
|
236
236
|
SelectSeparator.displayName = react_select_namespaceObject.Separator.displayName;
|
|
@@ -193,7 +193,7 @@ SelectItem.displayName = Item.displayName;
|
|
|
193
193
|
const SelectSeparator = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Separator, {
|
|
194
194
|
ref: ref,
|
|
195
195
|
"data-slot": "select-separator",
|
|
196
|
-
className: cn('-mx-1 my-1 h-px bg-
|
|
196
|
+
className: cn('-mx-1 my-1 h-px bg-border-subtle', className),
|
|
197
197
|
...props
|
|
198
198
|
}));
|
|
199
199
|
SelectSeparator.displayName = Separator.displayName;
|