@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.
Files changed (132) hide show
  1. package/dist/components/forms/field-renderer.cjs +1 -1
  2. package/dist/components/forms/field-renderer.js +1 -1
  3. package/dist/components/forms/field-rules-strings.cjs +40 -0
  4. package/dist/components/forms/field-rules-strings.d.ts +17 -0
  5. package/dist/components/forms/field-rules-strings.js +6 -0
  6. package/dist/components/forms/field-rules.cjs +526 -0
  7. package/dist/components/forms/field-rules.d.ts +97 -0
  8. package/dist/components/forms/field-rules.js +468 -0
  9. package/dist/components/forms/form-designer.cjs +208 -592
  10. package/dist/components/forms/form-designer.js +210 -594
  11. package/dist/components/forms/form-schema.d.ts +5 -0
  12. package/dist/components/forms/index.cjs +43 -3
  13. package/dist/components/forms/index.d.ts +4 -0
  14. package/dist/components/forms/index.js +5 -1
  15. package/dist/components/forms/metadata-form.cjs +1 -1
  16. package/dist/components/forms/metadata-form.js +1 -1
  17. package/dist/components/forms/rules-engine-dialect.cjs +644 -0
  18. package/dist/components/forms/rules-engine-dialect.d.ts +90 -0
  19. package/dist/components/forms/rules-engine-dialect.js +537 -0
  20. package/dist/components/forms/rules-engine.cjs +99 -10
  21. package/dist/components/forms/rules-engine.d.ts +5 -0
  22. package/dist/components/forms/rules-engine.js +99 -10
  23. package/dist/components/forms/use-field-rules.cjs +122 -0
  24. package/dist/components/forms/use-field-rules.d.ts +31 -0
  25. package/dist/components/forms/use-field-rules.js +88 -0
  26. package/dist/components/ui/command.cjs +1 -1
  27. package/dist/components/ui/command.js +1 -1
  28. package/dist/components/ui/conditions-editor/condition-row.cjs +458 -0
  29. package/dist/components/ui/conditions-editor/condition-row.d.ts +23 -0
  30. package/dist/components/ui/conditions-editor/condition-row.js +421 -0
  31. package/dist/components/ui/conditions-editor/conditions-editor.cjs +363 -0
  32. package/dist/components/ui/conditions-editor/conditions-editor.d.ts +67 -0
  33. package/dist/components/ui/conditions-editor/conditions-editor.js +329 -0
  34. package/dist/components/ui/conditions-editor/context.cjs +45 -0
  35. package/dist/components/ui/conditions-editor/context.d.ts +54 -0
  36. package/dist/components/ui/conditions-editor/context.js +8 -0
  37. package/dist/components/ui/conditions-editor/index.cjs +55 -0
  38. package/dist/components/ui/conditions-editor/index.d.ts +6 -0
  39. package/dist/components/ui/conditions-editor/index.js +6 -0
  40. package/dist/components/ui/conditions-editor/model.cjs +126 -0
  41. package/dist/components/ui/conditions-editor/model.d.ts +39 -0
  42. package/dist/components/ui/conditions-editor/model.js +71 -0
  43. package/dist/components/ui/conditions-editor/status.cjs +198 -0
  44. package/dist/components/ui/conditions-editor/status.d.ts +44 -0
  45. package/dist/components/ui/conditions-editor/status.js +131 -0
  46. package/dist/components/ui/conditions-editor/strings.cjs +86 -0
  47. package/dist/components/ui/conditions-editor/strings.d.ts +62 -0
  48. package/dist/components/ui/conditions-editor/strings.js +52 -0
  49. package/dist/components/ui/conditions-editor/vocabulary.cjs +163 -0
  50. package/dist/components/ui/conditions-editor/vocabulary.d.ts +51 -0
  51. package/dist/components/ui/conditions-editor/vocabulary.js +129 -0
  52. package/dist/components/ui/context-menu.cjs +1 -1
  53. package/dist/components/ui/context-menu.js +1 -1
  54. package/dist/components/ui/dropdown-menu.cjs +1 -1
  55. package/dist/components/ui/dropdown-menu.js +1 -1
  56. package/dist/components/ui/field-actions/index.cjs +9 -2
  57. package/dist/components/ui/field-actions/index.d.ts +1 -0
  58. package/dist/components/ui/field-actions/index.js +2 -1
  59. package/dist/components/ui/field-actions/insert-variable-action.cjs +3 -1
  60. package/dist/components/ui/field-actions/insert-variable-action.d.ts +4 -1
  61. package/dist/components/ui/field-actions/insert-variable-action.js +3 -1
  62. package/dist/components/ui/field-actions/rules-action.cjs +244 -0
  63. package/dist/components/ui/field-actions/rules-action.d.ts +42 -0
  64. package/dist/components/ui/field-actions/rules-action.js +207 -0
  65. package/dist/components/ui/index.cjs +285 -246
  66. package/dist/components/ui/index.d.ts +3 -0
  67. package/dist/components/ui/index.js +3 -0
  68. package/dist/components/ui/quick-form-field/components/field-header.cjs +137 -167
  69. package/dist/components/ui/quick-form-field/components/field-header.d.ts +1 -1
  70. package/dist/components/ui/quick-form-field/components/field-header.js +138 -168
  71. package/dist/components/ui/quick-form-field/components/header-actions.cjs +187 -0
  72. package/dist/components/ui/quick-form-field/components/header-actions.d.ts +59 -0
  73. package/dist/components/ui/quick-form-field/components/header-actions.js +138 -0
  74. package/dist/components/ui/quick-form-field/components/header-context.cjs +59 -0
  75. package/dist/components/ui/quick-form-field/components/header-context.d.ts +33 -0
  76. package/dist/components/ui/quick-form-field/components/header-context.js +16 -0
  77. package/dist/components/ui/quick-form-field/index.cjs +18 -4
  78. package/dist/components/ui/quick-form-field/index.d.ts +2 -0
  79. package/dist/components/ui/quick-form-field/index.js +3 -1
  80. package/dist/components/ui/quick-form-field/quick-form-field.cjs +1 -1
  81. package/dist/components/ui/quick-form-field/quick-form-field.d.ts +6 -6
  82. package/dist/components/ui/quick-form-field/quick-form-field.js +1 -1
  83. package/dist/components/ui/quick-form-field/types.d.ts +42 -11
  84. package/dist/components/ui/row-groups/add-row-button.cjs +54 -0
  85. package/dist/components/ui/row-groups/add-row-button.d.ts +10 -0
  86. package/dist/components/ui/row-groups/add-row-button.js +20 -0
  87. package/dist/components/ui/row-groups/after-press.cjs +73 -0
  88. package/dist/components/ui/row-groups/after-press.d.ts +7 -0
  89. package/dist/components/ui/row-groups/after-press.js +36 -0
  90. package/dist/components/ui/row-groups/collapsible-row-group.cjs +83 -0
  91. package/dist/components/ui/row-groups/collapsible-row-group.d.ts +13 -0
  92. package/dist/components/ui/row-groups/collapsible-row-group.js +49 -0
  93. package/dist/components/ui/row-groups/empty-rows.cjs +42 -0
  94. package/dist/components/ui/row-groups/empty-rows.d.ts +7 -0
  95. package/dist/components/ui/row-groups/empty-rows.js +8 -0
  96. package/dist/components/ui/row-groups/group-mode-toggle.cjs +80 -0
  97. package/dist/components/ui/row-groups/group-mode-toggle.d.ts +26 -0
  98. package/dist/components/ui/row-groups/group-mode-toggle.js +40 -0
  99. package/dist/components/ui/row-groups/index.cjs +62 -0
  100. package/dist/components/ui/row-groups/index.d.ts +6 -0
  101. package/dist/components/ui/row-groups/index.js +7 -0
  102. package/dist/components/ui/row-groups/row-delete-button.cjs +54 -0
  103. package/dist/components/ui/row-groups/row-delete-button.d.ts +18 -0
  104. package/dist/components/ui/row-groups/row-delete-button.js +20 -0
  105. package/dist/components/ui/row-groups/use-row-focus.cjs +82 -0
  106. package/dist/components/ui/row-groups/use-row-focus.d.ts +17 -0
  107. package/dist/components/ui/row-groups/use-row-focus.js +48 -0
  108. package/dist/components/ui/rules-editor/context.cjs +45 -0
  109. package/dist/components/ui/rules-editor/context.d.ts +52 -0
  110. package/dist/components/ui/rules-editor/context.js +8 -0
  111. package/dist/components/ui/rules-editor/index.cjs +56 -0
  112. package/dist/components/ui/rules-editor/index.d.ts +4 -0
  113. package/dist/components/ui/rules-editor/index.js +4 -0
  114. package/dist/components/ui/rules-editor/model.cjs +205 -0
  115. package/dist/components/ui/rules-editor/model.d.ts +128 -0
  116. package/dist/components/ui/rules-editor/model.js +144 -0
  117. package/dist/components/ui/rules-editor/rule-card.cjs +470 -0
  118. package/dist/components/ui/rules-editor/rule-card.d.ts +14 -0
  119. package/dist/components/ui/rules-editor/rule-card.js +436 -0
  120. package/dist/components/ui/rules-editor/rules-editor.cjs +160 -0
  121. package/dist/components/ui/rules-editor/rules-editor.d.ts +66 -0
  122. package/dist/components/ui/rules-editor/rules-editor.js +126 -0
  123. package/dist/components/ui/rules-editor/strings.cjs +68 -0
  124. package/dist/components/ui/rules-editor/strings.d.ts +56 -0
  125. package/dist/components/ui/rules-editor/strings.js +34 -0
  126. package/dist/components/ui/select.cjs +1 -1
  127. package/dist/components/ui/select.js +1 -1
  128. package/dist/index.cjs +129 -8
  129. package/dist/index.d.ts +17 -4
  130. package/dist/index.js +10 -3
  131. package/dist/styles.css +97 -24
  132. package/package.json +2 -2
@@ -0,0 +1,163 @@
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_CONDITION_OPERATORS: ()=>DEFAULT_CONDITION_OPERATORS
28
+ });
29
+ function patternError(pattern) {
30
+ try {
31
+ new RegExp(pattern);
32
+ return;
33
+ } catch {
34
+ return 'Enter a valid pattern.';
35
+ }
36
+ }
37
+ const DEFAULT_CONDITION_OPERATORS = {
38
+ string: [
39
+ {
40
+ value: 'equals',
41
+ label: 'Equals'
42
+ },
43
+ {
44
+ value: 'notEquals',
45
+ label: 'Not equals'
46
+ },
47
+ {
48
+ value: 'contains',
49
+ label: 'Contains'
50
+ },
51
+ {
52
+ value: 'startsWith',
53
+ label: 'Starts with'
54
+ },
55
+ {
56
+ value: 'matches',
57
+ label: 'Matches pattern',
58
+ valueError: patternError,
59
+ valueHint: 'A JavaScript regular expression, such as ^INV-[0-9]+$'
60
+ },
61
+ {
62
+ value: 'isEmpty',
63
+ label: 'Is empty',
64
+ hasValue: false
65
+ },
66
+ {
67
+ value: 'isNotEmpty',
68
+ label: 'Is not empty',
69
+ hasValue: false
70
+ }
71
+ ],
72
+ number: [
73
+ {
74
+ value: 'equals',
75
+ label: 'Equals'
76
+ },
77
+ {
78
+ value: 'notEquals',
79
+ label: 'Not equals'
80
+ },
81
+ {
82
+ value: 'greaterThan',
83
+ label: 'Greater than'
84
+ },
85
+ {
86
+ value: 'lessThan',
87
+ label: 'Less than'
88
+ },
89
+ {
90
+ value: 'isEmpty',
91
+ label: 'Is empty',
92
+ hasValue: false
93
+ },
94
+ {
95
+ value: 'isNotEmpty',
96
+ label: 'Is not empty',
97
+ hasValue: false
98
+ }
99
+ ],
100
+ date: [
101
+ {
102
+ value: 'equals',
103
+ label: 'On'
104
+ },
105
+ {
106
+ value: 'lessThan',
107
+ label: 'Before'
108
+ },
109
+ {
110
+ value: 'greaterThan',
111
+ label: 'After'
112
+ },
113
+ {
114
+ value: 'isEmpty',
115
+ label: 'Is empty',
116
+ hasValue: false
117
+ },
118
+ {
119
+ value: 'isNotEmpty',
120
+ label: 'Is not empty',
121
+ hasValue: false
122
+ }
123
+ ],
124
+ enum: [
125
+ {
126
+ value: 'equals',
127
+ label: 'Is'
128
+ },
129
+ {
130
+ value: 'notEquals',
131
+ label: 'Is not'
132
+ },
133
+ {
134
+ value: 'isOneOf',
135
+ label: 'Is one of',
136
+ multiple: true
137
+ },
138
+ {
139
+ value: 'isNotOneOf',
140
+ label: 'Is not one of',
141
+ multiple: true
142
+ }
143
+ ],
144
+ other: [
145
+ {
146
+ value: 'isEmpty',
147
+ label: 'Is empty',
148
+ hasValue: false
149
+ },
150
+ {
151
+ value: 'isNotEmpty',
152
+ label: 'Is not empty',
153
+ hasValue: false
154
+ }
155
+ ]
156
+ };
157
+ exports.DEFAULT_CONDITION_OPERATORS = __webpack_exports__.DEFAULT_CONDITION_OPERATORS;
158
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
159
+ "DEFAULT_CONDITION_OPERATORS"
160
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
161
+ Object.defineProperty(exports, '__esModule', {
162
+ value: true
163
+ });
@@ -0,0 +1,51 @@
1
+ import type { ConditionValueMode } from './model';
2
+ /**
3
+ * Picks the operators and the Fixed value control. `enum` needs `options`. `other` is a value
4
+ * a condition can only check is there, such as a file or a list.
5
+ */
6
+ export type ConditionFieldType = 'string' | 'number' | 'date' | 'enum' | 'other';
7
+ export interface ConditionFieldOption {
8
+ value: string;
9
+ label: string;
10
+ }
11
+ /** What a value is compared in, for an operator's `valueError`. */
12
+ export interface ConditionValueContext {
13
+ field: ConditionField;
14
+ mode: ConditionValueMode;
15
+ }
16
+ /** A field a condition can compare. */
17
+ export interface ConditionField {
18
+ value: string;
19
+ label: string;
20
+ type: ConditionFieldType;
21
+ options?: readonly ConditionFieldOption[];
22
+ }
23
+ export interface ConditionOperator {
24
+ value: string;
25
+ label: string;
26
+ /** False for operators like "Is empty", which hide the value. */
27
+ hasValue?: boolean;
28
+ /** Takes several options in Fixed value, e.g. "Is one of". For `enum` fields. */
29
+ multiple?: boolean;
30
+ /**
31
+ * The value modes it can compare against. A mode left out stays in the mode menu, disabled, and
32
+ * picking this operator while the row is in it resets the row to the first mode allowed.
33
+ * Omitted, it allows every mode the editor offers.
34
+ */
35
+ valueModes?: readonly ConditionValueMode[];
36
+ /**
37
+ * The message for a value it cannot use, such as a pattern that does not compile, or `undefined`
38
+ * for one it can, given the row's field and value mode too. A row it flags is incomplete.
39
+ * English, as `label` is.
40
+ */
41
+ valueError?: (value: string, row: ConditionValueContext) => string | undefined;
42
+ /** How to write the value, shown under it, such as which pattern syntax. English, as `label` is. */
43
+ valueHint?: string;
44
+ }
45
+ /** The operators each field type offers, in menu order. */
46
+ export type ConditionOperators = Record<ConditionFieldType, readonly ConditionOperator[]>;
47
+ /**
48
+ * English operators. The ids are shared across types, so `lessThan` reads "Before" on a date, which
49
+ * keeps whatever turns them into rules to one case per id. Map the labels to translate them.
50
+ */
51
+ export declare const DEFAULT_CONDITION_OPERATORS: ConditionOperators;
@@ -0,0 +1,129 @@
1
+ function patternError(pattern) {
2
+ try {
3
+ new RegExp(pattern);
4
+ return;
5
+ } catch {
6
+ return 'Enter a valid pattern.';
7
+ }
8
+ }
9
+ const DEFAULT_CONDITION_OPERATORS = {
10
+ string: [
11
+ {
12
+ value: 'equals',
13
+ label: 'Equals'
14
+ },
15
+ {
16
+ value: 'notEquals',
17
+ label: 'Not equals'
18
+ },
19
+ {
20
+ value: 'contains',
21
+ label: 'Contains'
22
+ },
23
+ {
24
+ value: 'startsWith',
25
+ label: 'Starts with'
26
+ },
27
+ {
28
+ value: 'matches',
29
+ label: 'Matches pattern',
30
+ valueError: patternError,
31
+ valueHint: 'A JavaScript regular expression, such as ^INV-[0-9]+$'
32
+ },
33
+ {
34
+ value: 'isEmpty',
35
+ label: 'Is empty',
36
+ hasValue: false
37
+ },
38
+ {
39
+ value: 'isNotEmpty',
40
+ label: 'Is not empty',
41
+ hasValue: false
42
+ }
43
+ ],
44
+ number: [
45
+ {
46
+ value: 'equals',
47
+ label: 'Equals'
48
+ },
49
+ {
50
+ value: 'notEquals',
51
+ label: 'Not equals'
52
+ },
53
+ {
54
+ value: 'greaterThan',
55
+ label: 'Greater than'
56
+ },
57
+ {
58
+ value: 'lessThan',
59
+ label: 'Less than'
60
+ },
61
+ {
62
+ value: 'isEmpty',
63
+ label: 'Is empty',
64
+ hasValue: false
65
+ },
66
+ {
67
+ value: 'isNotEmpty',
68
+ label: 'Is not empty',
69
+ hasValue: false
70
+ }
71
+ ],
72
+ date: [
73
+ {
74
+ value: 'equals',
75
+ label: 'On'
76
+ },
77
+ {
78
+ value: 'lessThan',
79
+ label: 'Before'
80
+ },
81
+ {
82
+ value: 'greaterThan',
83
+ label: 'After'
84
+ },
85
+ {
86
+ value: 'isEmpty',
87
+ label: 'Is empty',
88
+ hasValue: false
89
+ },
90
+ {
91
+ value: 'isNotEmpty',
92
+ label: 'Is not empty',
93
+ hasValue: false
94
+ }
95
+ ],
96
+ enum: [
97
+ {
98
+ value: 'equals',
99
+ label: 'Is'
100
+ },
101
+ {
102
+ value: 'notEquals',
103
+ label: 'Is not'
104
+ },
105
+ {
106
+ value: 'isOneOf',
107
+ label: 'Is one of',
108
+ multiple: true
109
+ },
110
+ {
111
+ value: 'isNotOneOf',
112
+ label: 'Is not one of',
113
+ multiple: true
114
+ }
115
+ ],
116
+ other: [
117
+ {
118
+ value: 'isEmpty',
119
+ label: 'Is empty',
120
+ hasValue: false
121
+ },
122
+ {
123
+ value: 'isNotEmpty',
124
+ label: 'Is not empty',
125
+ hasValue: false
126
+ }
127
+ ]
128
+ };
129
+ export { DEFAULT_CONDITION_OPERATORS };
@@ -167,7 +167,7 @@ ContextMenuLabel.displayName = react_context_menu_namespaceObject.Label.displayN
167
167
  const ContextMenuSeparator = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_context_menu_namespaceObject.Separator, {
168
168
  ref: ref,
169
169
  "data-slot": "context-menu-separator",
170
- className: (0, index_cjs_namespaceObject.cn)('-mx-1 my-1 h-px bg-border', className),
170
+ className: (0, index_cjs_namespaceObject.cn)('-mx-1 my-1 h-px bg-border-subtle', className),
171
171
  ...props
172
172
  }));
173
173
  ContextMenuSeparator.displayName = react_context_menu_namespaceObject.Separator.displayName;
@@ -125,7 +125,7 @@ ContextMenuLabel.displayName = Label.displayName;
125
125
  const ContextMenuSeparator = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Separator, {
126
126
  ref: ref,
127
127
  "data-slot": "context-menu-separator",
128
- className: cn('-mx-1 my-1 h-px bg-border', className),
128
+ className: cn('-mx-1 my-1 h-px bg-border-subtle', className),
129
129
  ...props
130
130
  }));
131
131
  ContextMenuSeparator.displayName = Separator.displayName;
@@ -182,7 +182,7 @@ DropdownMenuLabel.displayName = react_dropdown_menu_namespaceObject.Label.displa
182
182
  const DropdownMenuSeparator = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.Separator, {
183
183
  ref: ref,
184
184
  "data-slot": "dropdown-menu-separator",
185
- className: (0, index_cjs_namespaceObject.cn)('-mx-1 my-1 h-px bg-surface-overlay', className),
185
+ className: (0, index_cjs_namespaceObject.cn)('-mx-1 my-1 h-px bg-border-subtle', className),
186
186
  ...props
187
187
  }));
188
188
  DropdownMenuSeparator.displayName = react_dropdown_menu_namespaceObject.Separator.displayName;
@@ -140,7 +140,7 @@ DropdownMenuLabel.displayName = Label.displayName;
140
140
  const DropdownMenuSeparator = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Separator, {
141
141
  ref: ref,
142
142
  "data-slot": "dropdown-menu-separator",
143
- className: cn('-mx-1 my-1 h-px bg-surface-overlay', className),
143
+ className: cn('-mx-1 my-1 h-px bg-border-subtle', className),
144
144
  ...props
145
145
  }));
146
146
  DropdownMenuSeparator.displayName = Separator.displayName;
@@ -25,21 +25,28 @@ var __webpack_exports__ = {};
25
25
  __webpack_require__.r(__webpack_exports__);
26
26
  __webpack_require__.d(__webpack_exports__, {
27
27
  AiAssistAction: ()=>external_ai_assist_action_cjs_namespaceObject.AiAssistAction,
28
+ InsertVariableAction: ()=>external_insert_variable_action_cjs_namespaceObject.InsertVariableAction,
29
+ RulesAction: ()=>external_rules_action_cjs_namespaceObject.RulesAction,
28
30
  DEFAULT_AI_ASSIST_ACTION_STRINGS: ()=>external_ai_assist_action_cjs_namespaceObject.DEFAULT_AI_ASSIST_ACTION_STRINGS,
29
31
  DEFAULT_INSERT_VARIABLE_ACTION_STRINGS: ()=>external_insert_variable_action_cjs_namespaceObject.DEFAULT_INSERT_VARIABLE_ACTION_STRINGS,
30
- InsertVariableAction: ()=>external_insert_variable_action_cjs_namespaceObject.InsertVariableAction
32
+ DEFAULT_RULES_ACTION_STRINGS: ()=>external_rules_action_cjs_namespaceObject.DEFAULT_RULES_ACTION_STRINGS
31
33
  });
32
34
  const external_ai_assist_action_cjs_namespaceObject = require("./ai-assist-action.cjs");
33
35
  const external_insert_variable_action_cjs_namespaceObject = require("./insert-variable-action.cjs");
36
+ const external_rules_action_cjs_namespaceObject = require("./rules-action.cjs");
34
37
  exports.AiAssistAction = __webpack_exports__.AiAssistAction;
35
38
  exports.DEFAULT_AI_ASSIST_ACTION_STRINGS = __webpack_exports__.DEFAULT_AI_ASSIST_ACTION_STRINGS;
36
39
  exports.DEFAULT_INSERT_VARIABLE_ACTION_STRINGS = __webpack_exports__.DEFAULT_INSERT_VARIABLE_ACTION_STRINGS;
40
+ exports.DEFAULT_RULES_ACTION_STRINGS = __webpack_exports__.DEFAULT_RULES_ACTION_STRINGS;
37
41
  exports.InsertVariableAction = __webpack_exports__.InsertVariableAction;
42
+ exports.RulesAction = __webpack_exports__.RulesAction;
38
43
  for(var __rspack_i in __webpack_exports__)if (-1 === [
39
44
  "AiAssistAction",
40
45
  "DEFAULT_AI_ASSIST_ACTION_STRINGS",
41
46
  "DEFAULT_INSERT_VARIABLE_ACTION_STRINGS",
42
- "InsertVariableAction"
47
+ "DEFAULT_RULES_ACTION_STRINGS",
48
+ "InsertVariableAction",
49
+ "RulesAction"
43
50
  ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
44
51
  Object.defineProperty(exports, '__esModule', {
45
52
  value: true
@@ -1,2 +1,3 @@
1
1
  export { AiAssistAction, type AiAssistActionProps, type AiAssistActionStrings, type AiAssistContentProps, DEFAULT_AI_ASSIST_ACTION_STRINGS, } from './ai-assist-action';
2
2
  export { DEFAULT_INSERT_VARIABLE_ACTION_STRINGS, InsertVariableAction, type InsertVariableActionProps, type InsertVariableActionStrings, } from './insert-variable-action';
3
+ export { DEFAULT_RULES_ACTION_STRINGS, RulesAction, type RulesActionProps, type RulesActionStrings, } from './rules-action';
@@ -1,3 +1,4 @@
1
1
  import { AiAssistAction, DEFAULT_AI_ASSIST_ACTION_STRINGS } from "./ai-assist-action.js";
2
2
  import { DEFAULT_INSERT_VARIABLE_ACTION_STRINGS, InsertVariableAction } from "./insert-variable-action.js";
3
- export { AiAssistAction, DEFAULT_AI_ASSIST_ACTION_STRINGS, DEFAULT_INSERT_VARIABLE_ACTION_STRINGS, InsertVariableAction };
3
+ import { DEFAULT_RULES_ACTION_STRINGS, RulesAction } from "./rules-action.js";
4
+ export { AiAssistAction, DEFAULT_AI_ASSIST_ACTION_STRINGS, DEFAULT_INSERT_VARIABLE_ACTION_STRINGS, DEFAULT_RULES_ACTION_STRINGS, InsertVariableAction, RulesAction };
@@ -31,6 +31,7 @@ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
31
31
  const external_lucide_react_namespaceObject = require("lucide-react");
32
32
  const external_react_namespaceObject = require("react");
33
33
  const external_button_cjs_namespaceObject = require("../button.cjs");
34
+ const header_context_cjs_namespaceObject = require("../quick-form-field/components/header-context.cjs");
34
35
  const index_cjs_namespaceObject = require("../variable-picker/index.cjs");
35
36
  const external_lib_index_cjs_namespaceObject = require("../../../lib/index.cjs");
36
37
  const external_collapse_cjs_namespaceObject = require("./collapse.cjs");
@@ -52,7 +53,8 @@ function InsertVariableAction({ variables = NO_VARIABLES, renderPicker, onInsert
52
53
  const lazy = 'function' == typeof variables;
53
54
  const inert = disabled || !onInsert || !renderPicker && !lazy && 0 === variables.length;
54
55
  const [openedItems, setOpenedItems] = (0, external_react_namespaceObject.useState)([]);
55
- const collapsedTextClass = (0, external_lib_index_cjs_namespaceObject.cn)(external_collapse_cjs_namespaceObject.COLLAPSED_HIDDEN, compact && '!hidden');
56
+ const header = (0, header_context_cjs_namespaceObject.useQuickFormFieldHeader)();
57
+ const collapsedTextClass = (0, external_lib_index_cjs_namespaceObject.cn)(external_collapse_cjs_namespaceObject.COLLAPSED_HIDDEN, (compact ?? header?.compact) && '!hidden');
56
58
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.VariablePicker, {
57
59
  disabled: inert,
58
60
  items: lazy ? openedItems : variables,
@@ -22,7 +22,10 @@ interface InsertVariableActionBaseProps {
22
22
  */
23
23
  onInsert?: (value: string, item: VariablePickerItem) => void;
24
24
  disabled?: boolean;
25
- /** Icon only. Below a 260px `@container` the action also collapses to its icon by itself. */
25
+ /**
26
+ * Icon only, or with its text even in a `compact` QuickFormField. In a field's header it defaults
27
+ * to the field's `compact`. Below a 260px `@container` it collapses to its icon either way.
28
+ */
26
29
  compact?: boolean;
27
30
  /** Overrides for any subset of the English strings. */
28
31
  strings?: Partial<InsertVariableActionStrings>;
@@ -2,6 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { Braces, ChevronDown } from "lucide-react";
3
3
  import { useState } from "react";
4
4
  import { Button } from "../button.js";
5
+ import { useQuickFormFieldHeader } from "../quick-form-field/components/header-context.js";
5
6
  import { VariablePicker } from "../variable-picker/index.js";
6
7
  import { cn } from "../../../lib/index.js";
7
8
  import { COLLAPSED_HIDDEN, FIELD_ACTION_CLASS } from "./collapse.js";
@@ -23,7 +24,8 @@ function InsertVariableAction({ variables = NO_VARIABLES, renderPicker, onInsert
23
24
  const lazy = 'function' == typeof variables;
24
25
  const inert = disabled || !onInsert || !renderPicker && !lazy && 0 === variables.length;
25
26
  const [openedItems, setOpenedItems] = useState([]);
26
- const collapsedTextClass = cn(COLLAPSED_HIDDEN, compact && '!hidden');
27
+ const header = useQuickFormFieldHeader();
28
+ const collapsedTextClass = cn(COLLAPSED_HIDDEN, (compact ?? header?.compact) && '!hidden');
27
29
  return /*#__PURE__*/ jsx(VariablePicker, {
28
30
  disabled: inert,
29
31
  items: lazy ? openedItems : variables,