@wallarm-org/design-system 4.8.0-rc-feat-parser.1 → 4.8.0-rc-fix-claude-code.2

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 (176) hide show
  1. package/README.md +4 -2
  2. package/dist/components/BulkBar/index.d.ts +5 -0
  3. package/dist/components/Drawer/classes.js +1 -1
  4. package/dist/components/DropdownMenu/DropdownMenu.d.ts +0 -2
  5. package/dist/components/DropdownMenu/DropdownMenu.js +71 -84
  6. package/dist/components/DropdownMenu/DropdownMenuItemDescription.js +1 -1
  7. package/dist/components/FilterInput/hooks/useFilterInputAutocomplete/useFilterInputAutocomplete.js +1 -1
  8. package/dist/components/NotificationCenter/NotificationCenter.d.ts +20 -0
  9. package/dist/components/NotificationCenter/NotificationCenter.js +65 -0
  10. package/dist/components/NotificationCenter/NotificationCenterBody.d.ts +18 -0
  11. package/dist/components/NotificationCenter/NotificationCenterBody.js +202 -0
  12. package/dist/components/NotificationCenter/NotificationCenterContent.d.ts +5 -0
  13. package/dist/components/NotificationCenter/NotificationCenterContent.js +42 -0
  14. package/dist/components/NotificationCenter/NotificationCenterHeader.d.ts +20 -0
  15. package/dist/components/NotificationCenter/NotificationCenterHeader.js +202 -0
  16. package/dist/components/NotificationCenter/NotificationCenterItem.d.ts +26 -0
  17. package/dist/components/NotificationCenter/NotificationCenterItem.js +211 -0
  18. package/dist/components/NotificationCenter/NotificationCenterItemTime.d.ts +9 -0
  19. package/dist/components/NotificationCenter/NotificationCenterItemTime.js +148 -0
  20. package/dist/components/NotificationCenter/NotificationCenterItemTitle.d.ts +14 -0
  21. package/dist/components/NotificationCenter/NotificationCenterItemTitle.js +115 -0
  22. package/dist/components/NotificationCenter/NotificationCenterTabs.d.ts +10 -0
  23. package/dist/components/NotificationCenter/NotificationCenterTabs.js +77 -0
  24. package/dist/components/NotificationCenter/NotificationCenterTrigger.d.ts +13 -0
  25. package/dist/components/NotificationCenter/NotificationCenterTrigger.js +138 -0
  26. package/dist/components/NotificationCenter/index.d.ts +9 -0
  27. package/dist/components/NotificationCenter/index.js +9 -0
  28. package/dist/components/Overlay/Overlay.js +1 -1
  29. package/dist/components/SearchInput/SearchInput.d.ts +7 -5
  30. package/dist/components/SearchInput/SearchInput.js +119 -101
  31. package/dist/components/Select/SelectSearchInput.d.ts +1 -1
  32. package/dist/components/Table/types.d.ts +1 -1
  33. package/dist/components/Tabs/Tabs.d.ts +1 -0
  34. package/dist/components/Tabs/Tabs.js +30 -28
  35. package/dist/components/Tabs/TabsList/index.d.ts +1 -1
  36. package/dist/components/Tabs/index.d.ts +2 -2
  37. package/dist/components/Tour/TourPositioner.d.ts +3 -0
  38. package/dist/components/Tour/TourPositioner.js +4 -4
  39. package/dist/guidelines/foundations/color.md +157 -0
  40. package/dist/guidelines/foundations/focus.md +122 -0
  41. package/dist/guidelines/foundations/layering.md +131 -0
  42. package/dist/guidelines/foundations/radius-elevation.md +111 -0
  43. package/dist/guidelines/foundations/spacing.md +117 -0
  44. package/dist/guidelines/foundations/typography.md +114 -0
  45. package/dist/guidelines/patterns/app-layout.md +1567 -0
  46. package/dist/guidelines/patterns/auth-page.md +668 -0
  47. package/dist/guidelines/patterns/confirmation-dialogs.md +605 -0
  48. package/dist/guidelines/patterns/create-edit-forms.md +768 -0
  49. package/dist/guidelines/patterns/detail-drawer.md +868 -0
  50. package/dist/guidelines/patterns/empty-states.md +461 -0
  51. package/dist/guidelines/patterns/entity-table.md +533 -0
  52. package/dist/guidelines/patterns/feedback-toasts.md +493 -0
  53. package/dist/guidelines/patterns/filtering.md +630 -0
  54. package/dist/guidelines/patterns/resource-list-page.md +558 -0
  55. package/dist/guidelines/patterns/settings-page.md +752 -0
  56. package/dist/guidelines/rules.md +25 -0
  57. package/dist/index.d.ts +2 -3
  58. package/dist/index.js +1 -2
  59. package/dist/metadata/components.json +12431 -9208
  60. package/dist/metadata/guidelines.json +1705 -0
  61. package/dist/theme/typography.css +5 -0
  62. package/dist/utils/formatDateTime.d.ts +6 -0
  63. package/dist/utils/formatDateTime.js +13 -1
  64. package/package.json +6 -4
  65. package/dist/components/Rules/PointSelector/KeyboardShortcutsDialog.d.ts +0 -14
  66. package/dist/components/Rules/PointSelector/KeyboardShortcutsDialog.js +0 -209
  67. package/dist/components/Rules/PointSelector/MatchStep.d.ts +0 -15
  68. package/dist/components/Rules/PointSelector/MatchStep.js +0 -186
  69. package/dist/components/Rules/PointSelector/MenuFooterHints.d.ts +0 -16
  70. package/dist/components/Rules/PointSelector/MenuFooterHints.js +0 -177
  71. package/dist/components/Rules/PointSelector/PointPreview.d.ts +0 -10
  72. package/dist/components/Rules/PointSelector/PointPreview.js +0 -88
  73. package/dist/components/Rules/PointSelector/PointSelector.d.ts +0 -17
  74. package/dist/components/Rules/PointSelector/PointSelector.js +0 -937
  75. package/dist/components/Rules/PointSelector/PointSelectorEmptyState.d.ts +0 -12
  76. package/dist/components/Rules/PointSelector/PointSelectorEmptyState.js +0 -173
  77. package/dist/components/Rules/PointSelector/PointSelectorError.d.ts +0 -31
  78. package/dist/components/Rules/PointSelector/PointSelectorError.js +0 -275
  79. package/dist/components/Rules/PointSelector/PointSelectorInput.d.ts +0 -20
  80. package/dist/components/Rules/PointSelector/PointSelectorInput.js +0 -130
  81. package/dist/components/Rules/PointSelector/PointSelectorMenu.d.ts +0 -31
  82. package/dist/components/Rules/PointSelector/PointSelectorMenu.js +0 -317
  83. package/dist/components/Rules/PointSelector/PointSelectorSkeleton.d.ts +0 -8
  84. package/dist/components/Rules/PointSelector/PointSelectorSkeleton.js +0 -73
  85. package/dist/components/Rules/PointSelector/SampleRequest.d.ts +0 -14
  86. package/dist/components/Rules/PointSelector/SampleRequest.js +0 -116
  87. package/dist/components/Rules/PointSelector/StepMenu.d.ts +0 -40
  88. package/dist/components/Rules/PointSelector/StepMenu.js +0 -210
  89. package/dist/components/Rules/PointSelector/VersionWarning.d.ts +0 -26
  90. package/dist/components/Rules/PointSelector/VersionWarning.js +0 -231
  91. package/dist/components/Rules/PointSelector/WhereBar.d.ts +0 -48
  92. package/dist/components/Rules/PointSelector/WhereBar.js +0 -263
  93. package/dist/components/Rules/PointSelector/classes.d.ts +0 -28
  94. package/dist/components/Rules/PointSelector/classes.js +0 -22
  95. package/dist/components/Rules/PointSelector/index.d.ts +0 -20
  96. package/dist/components/Rules/PointSelector/index.js +0 -18
  97. package/dist/components/Rules/PointSelector/liftLayer.d.ts +0 -8
  98. package/dist/components/Rules/PointSelector/liftLayer.js +0 -4
  99. package/dist/components/Rules/PointSelector/sampleValue.d.ts +0 -6
  100. package/dist/components/Rules/PointSelector/sampleValue.js +0 -51
  101. package/dist/components/Rules/PointSelector/sdkBridge.d.ts +0 -508
  102. package/dist/components/Rules/PointSelector/sdkBridge.js +0 -339
  103. package/dist/components/Rules/PointSelector/types.d.ts +0 -304
  104. package/dist/components/Rules/PointSelector/types.js +0 -0
  105. package/dist/components/Rules/PointSelector/usePointSelector.d.ts +0 -161
  106. package/dist/components/Rules/PointSelector/usePointSelector.js +0 -1088
  107. package/dist/components/Rules/RuleBuilder/ActionEditor/ActionEditor.d.ts +0 -28
  108. package/dist/components/Rules/RuleBuilder/ActionEditor/ActionEditor.js +0 -208
  109. package/dist/components/Rules/RuleBuilder/ActionEditor/ActionFields.d.ts +0 -23
  110. package/dist/components/Rules/RuleBuilder/ActionEditor/ActionFields.js +0 -950
  111. package/dist/components/Rules/RuleBuilder/ActionEditor/ActionTargetPicker.d.ts +0 -21
  112. package/dist/components/Rules/RuleBuilder/ActionEditor/ActionTargetPicker.js +0 -110
  113. package/dist/components/Rules/RuleBuilder/ActionEditor/ActionTypeSelect.d.ts +0 -20
  114. package/dist/components/Rules/RuleBuilder/ActionEditor/ActionTypeSelect.js +0 -31
  115. package/dist/components/Rules/RuleBuilder/ActionEditor/AttackTypeField.d.ts +0 -23
  116. package/dist/components/Rules/RuleBuilder/ActionEditor/AttackTypeField.js +0 -131
  117. package/dist/components/Rules/RuleBuilder/ActionEditor/classes.d.ts +0 -17
  118. package/dist/components/Rules/RuleBuilder/ActionEditor/classes.js +0 -14
  119. package/dist/components/Rules/RuleBuilder/ActionEditor/index.d.ts +0 -6
  120. package/dist/components/Rules/RuleBuilder/ActionEditor/index.js +0 -6
  121. package/dist/components/Rules/RuleBuilder/ConditionTree/AddConditionMenu.d.ts +0 -24
  122. package/dist/components/Rules/RuleBuilder/ConditionTree/AddConditionMenu.js +0 -245
  123. package/dist/components/Rules/RuleBuilder/ConditionTree/AttackCondition.d.ts +0 -15
  124. package/dist/components/Rules/RuleBuilder/ConditionTree/AttackCondition.js +0 -691
  125. package/dist/components/Rules/RuleBuilder/ConditionTree/ConditionCard.d.ts +0 -19
  126. package/dist/components/Rules/RuleBuilder/ConditionTree/ConditionCard.js +0 -72
  127. package/dist/components/Rules/RuleBuilder/ConditionTree/ConditionTree.d.ts +0 -27
  128. package/dist/components/Rules/RuleBuilder/ConditionTree/ConditionTree.js +0 -407
  129. package/dist/components/Rules/RuleBuilder/ConditionTree/FieldCondition.d.ts +0 -14
  130. package/dist/components/Rules/RuleBuilder/ConditionTree/FieldCondition.js +0 -269
  131. package/dist/components/Rules/RuleBuilder/ConditionTree/GroupCondition.d.ts +0 -25
  132. package/dist/components/Rules/RuleBuilder/ConditionTree/GroupCondition.js +0 -99
  133. package/dist/components/Rules/RuleBuilder/ConditionTree/SampleCondition.d.ts +0 -14
  134. package/dist/components/Rules/RuleBuilder/ConditionTree/SampleCondition.js +0 -118
  135. package/dist/components/Rules/RuleBuilder/ConditionTree/SignalCondition.d.ts +0 -14
  136. package/dist/components/Rules/RuleBuilder/ConditionTree/SignalCondition.js +0 -446
  137. package/dist/components/Rules/RuleBuilder/ConditionTree/TagCondition.d.ts +0 -14
  138. package/dist/components/Rules/RuleBuilder/ConditionTree/TagCondition.js +0 -266
  139. package/dist/components/Rules/RuleBuilder/ConditionTree/classes.d.ts +0 -35
  140. package/dist/components/Rules/RuleBuilder/ConditionTree/classes.js +0 -57
  141. package/dist/components/Rules/RuleBuilder/ConditionTree/index.d.ts +0 -15
  142. package/dist/components/Rules/RuleBuilder/ConditionTree/index.js +0 -10
  143. package/dist/components/Rules/RuleBuilder/RuleBuilder.d.ts +0 -67
  144. package/dist/components/Rules/RuleBuilder/RuleBuilder.js +0 -366
  145. package/dist/components/Rules/RuleBuilder/Summary/ActionSummary.d.ts +0 -32
  146. package/dist/components/Rules/RuleBuilder/Summary/ActionSummary.js +0 -420
  147. package/dist/components/Rules/RuleBuilder/Summary/ConditionSummary.d.ts +0 -27
  148. package/dist/components/Rules/RuleBuilder/Summary/ConditionSummary.js +0 -446
  149. package/dist/components/Rules/RuleBuilder/Summary/index.d.ts +0 -7
  150. package/dist/components/Rules/RuleBuilder/Summary/index.js +0 -2
  151. package/dist/components/Rules/RuleBuilder/classes.d.ts +0 -19
  152. package/dist/components/Rules/RuleBuilder/classes.js +0 -18
  153. package/dist/components/Rules/RuleBuilder/index.d.ts +0 -55
  154. package/dist/components/Rules/RuleBuilder/index.js +0 -11
  155. package/dist/components/Rules/RuleBuilder/models/actionModel.d.ts +0 -31
  156. package/dist/components/Rules/RuleBuilder/models/actionModel.js +0 -276
  157. package/dist/components/Rules/RuleBuilder/models/conditionModel.d.ts +0 -95
  158. package/dist/components/Rules/RuleBuilder/models/conditionModel.js +0 -418
  159. package/dist/components/Rules/RuleBuilder/models/index.d.ts +0 -3
  160. package/dist/components/Rules/RuleBuilder/models/index.js +0 -3
  161. package/dist/components/Rules/RuleBuilder/models/validation.d.ts +0 -176
  162. package/dist/components/Rules/RuleBuilder/models/validation.js +0 -242
  163. package/dist/components/Rules/RuleBuilder/shared/ChoiceSelect.d.ts +0 -27
  164. package/dist/components/Rules/RuleBuilder/shared/ChoiceSelect.js +0 -92
  165. package/dist/components/Rules/RuleBuilder/shared/index.d.ts +0 -1
  166. package/dist/components/Rules/RuleBuilder/shared/index.js +0 -1
  167. package/dist/components/Rules/RuleBuilder/types.d.ts +0 -384
  168. package/dist/components/Rules/RuleBuilder/types.js +0 -0
  169. package/dist/components/Rules/RuleBuilder/utils/constants.d.ts +0 -65
  170. package/dist/components/Rules/RuleBuilder/utils/constants.js +0 -356
  171. package/dist/components/Rules/RuleBuilder/utils/extractBindings.d.ts +0 -48
  172. package/dist/components/Rules/RuleBuilder/utils/extractBindings.js +0 -42
  173. package/dist/components/Rules/RuleBuilder/utils/helpers.d.ts +0 -92
  174. package/dist/components/Rules/RuleBuilder/utils/helpers.js +0 -54
  175. package/dist/components/Rules/RuleBuilder/utils/index.d.ts +0 -2
  176. package/dist/components/Rules/RuleBuilder/utils/index.js +0 -2
@@ -1,366 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { c } from "react/compiler-runtime";
3
- import { useEffect } from "react";
4
- import { useProton } from "@wallarm-org/rules-lib";
5
- import { cn } from "../../../utils/cn.js";
6
- import { useTestId } from "../../../utils/testId.js";
7
- import { Code } from "../../Code/index.js";
8
- import { Text } from "../../Text/index.js";
9
- import { checkPoint, needsRecanonalization } from "../PointSelector/sdkBridge.js";
10
- import { ActionEditor } from "./ActionEditor/index.js";
11
- import { ConditionTree } from "./ConditionTree/index.js";
12
- import { ruleBuilderVariants } from "./classes.js";
13
- import { toProtonAction } from "./models/actionModel.js";
14
- import { conditionProblems, toProtonCondition } from "./models/conditionModel.js";
15
- import { actionProblems, ruleMetaProblems, validateBindingRefs, validateBindingUniqueness } from "./models/validation.js";
16
- const ALL_SECTIONS = [
17
- "conditions",
18
- "action",
19
- "code"
20
- ];
21
- const RuleBuilder = (t0)=>{
22
- const $ = c(65);
23
- const { ref, "data-testid": testIdProp, ruleId, ruleDescription, scope, condition, action, onConditionChange, onActionChange, attackTypes, showProblems: t1, sections: t2, afterConditions, className, proton: protonProp } = t0;
24
- const showProblems = void 0 === t1 ? false : t1;
25
- const sections = void 0 === t2 ? ALL_SECTIONS : t2;
26
- const testId = useTestId("rule-builder");
27
- const finalTestId = testIdProp ?? testId;
28
- const protonFromHook = useProton()[0];
29
- const proton = protonProp ?? protonFromHook;
30
- let t3;
31
- if ($[0] !== sections) {
32
- t3 = (section)=>sections.includes(section);
33
- $[0] = sections;
34
- $[1] = t3;
35
- } else t3 = $[1];
36
- const shows = t3;
37
- const showHeadings = sections.length > 1;
38
- let t4;
39
- if ($[2] !== ruleId || $[3] !== showProblems) {
40
- t4 = showProblems ? ruleMetaProblems(ruleId) : [];
41
- $[2] = ruleId;
42
- $[3] = showProblems;
43
- $[4] = t4;
44
- } else t4 = $[4];
45
- const metaIssues = t4;
46
- let t5;
47
- if ($[5] !== condition || $[6] !== showProblems) {
48
- t5 = showProblems ? [
49
- ...conditionProblems(condition),
50
- ...validateBindingUniqueness(condition)
51
- ] : [];
52
- $[5] = condition;
53
- $[6] = showProblems;
54
- $[7] = t5;
55
- } else t5 = $[7];
56
- const conditionIssues = t5;
57
- let t6;
58
- if ($[8] !== action || $[9] !== condition || $[10] !== proton || $[11] !== showProblems) {
59
- t6 = showProblems ? [
60
- ...actionProblems(action),
61
- ...validateBindingRefs(action, condition, proton)
62
- ] : [];
63
- $[8] = action;
64
- $[9] = condition;
65
- $[10] = proton;
66
- $[11] = showProblems;
67
- $[12] = t6;
68
- } else t6 = $[12];
69
- const actionIssues = t6;
70
- let t7;
71
- if ($[13] !== action || $[14] !== condition || $[15] !== onActionChange || $[16] !== onConditionChange || $[17] !== proton) {
72
- t7 = ()=>{
73
- if (!proton) return;
74
- const currentVersion = proton.version().canonical;
75
- let conditionUpdated = false;
76
- const migrateCondition = (node)=>{
77
- if ("group" === node.kind) {
78
- const updatedChildren = node.children.map(migrateCondition);
79
- return {
80
- ...node,
81
- children: updatedChildren
82
- };
83
- }
84
- if ("field" === node.kind) {
85
- if (node.value.canonical && needsRecanonalization(currentVersion, node.value.canonicalVersion ?? void 0)) {
86
- const result = checkPoint(proton, node.value.canonical, {
87
- context: node.context,
88
- profile: "tree"
89
- });
90
- if (result.canonical && result.canonical !== node.value.canonical) {
91
- console.info("Condition point re-canonicalized due to SDK version change", {
92
- old: node.value.canonical,
93
- new: result.canonical,
94
- oldVersion: node.value.canonicalVersion,
95
- newVersion: currentVersion
96
- });
97
- conditionUpdated = true;
98
- return {
99
- ...node,
100
- value: {
101
- ...node.value,
102
- canonical: result.canonical,
103
- canonicalVersion: currentVersion
104
- }
105
- };
106
- }
107
- }
108
- return node;
109
- }
110
- if (("attack" === node.kind || "signal" === node.kind || "tag" === node.kind) && "flow" !== node.point) {
111
- if (needsRecanonalization(currentVersion, node.canonicalVersion)) {
112
- const result_0 = checkPoint(proton, node.point, {
113
- context: "http_request",
114
- profile: "tree"
115
- });
116
- if (result_0.canonical && result_0.canonical !== node.point) {
117
- console.info(`${node.kind} condition point re-canonicalized due to SDK version change`, {
118
- old: node.point,
119
- new: result_0.canonical,
120
- oldVersion: node.canonicalVersion,
121
- newVersion: currentVersion
122
- });
123
- conditionUpdated = true;
124
- if ("attack" === node.kind) return {
125
- ...node,
126
- point: result_0.canonical,
127
- canonicalVersion: currentVersion
128
- };
129
- if ("signal" === node.kind) return {
130
- ...node,
131
- point: result_0.canonical,
132
- canonicalVersion: currentVersion
133
- };
134
- if ("tag" === node.kind) return {
135
- ...node,
136
- point: result_0.canonical,
137
- canonicalVersion: currentVersion
138
- };
139
- }
140
- }
141
- }
142
- return node;
143
- };
144
- const updatedCondition = migrateCondition(condition);
145
- if (conditionUpdated) onConditionChange(updatedCondition);
146
- if (action.target && !action.target.whole && action.target.canonical && needsRecanonalization(currentVersion, action.target.canonicalVersion)) {
147
- const result_1 = checkPoint(proton, action.target.canonical, {
148
- context: action.target.context,
149
- profile: "tree"
150
- });
151
- if (result_1.canonical && result_1.canonical !== action.target.canonical) {
152
- console.info("Action target re-canonicalized due to SDK version change", {
153
- old: action.target.canonical,
154
- new: result_1.canonical,
155
- oldVersion: action.target.canonicalVersion,
156
- newVersion: currentVersion
157
- });
158
- onActionChange({
159
- ...action,
160
- target: {
161
- ...action.target,
162
- canonical: result_1.canonical,
163
- canonicalVersion: currentVersion
164
- }
165
- });
166
- }
167
- }
168
- };
169
- $[13] = action;
170
- $[14] = condition;
171
- $[15] = onActionChange;
172
- $[16] = onConditionChange;
173
- $[17] = proton;
174
- $[18] = t7;
175
- } else t7 = $[18];
176
- let t8;
177
- if ($[19] !== proton) {
178
- t8 = [
179
- proton
180
- ];
181
- $[19] = proton;
182
- $[20] = t8;
183
- } else t8 = $[20];
184
- useEffect(t7, t8);
185
- let t9;
186
- if ($[21] !== action || $[22] !== condition || $[23] !== proton || $[24] !== ruleDescription || $[25] !== ruleId || $[26] !== scope) {
187
- const protonCondition = toProtonCondition(condition, proton);
188
- const protonAction = toProtonAction(action, proton);
189
- let t10;
190
- if ($[28] !== scope) {
191
- t10 = scope && {
192
- scope
193
- };
194
- $[28] = scope;
195
- $[29] = t10;
196
- } else t10 = $[29];
197
- const ruleset = {
198
- meta: {
199
- format: "0.10.3",
200
- revision: new Date().toISOString()
201
- },
202
- rules: [
203
- {
204
- meta: {
205
- id: ruleId,
206
- desc: ruleDescription ?? ""
207
- },
208
- ...t10,
209
- condition: protonCondition,
210
- action: [
211
- protonAction
212
- ]
213
- }
214
- ]
215
- };
216
- t9 = JSON.stringify(ruleset, null, 2);
217
- $[21] = action;
218
- $[22] = condition;
219
- $[23] = proton;
220
- $[24] = ruleDescription;
221
- $[25] = ruleId;
222
- $[26] = scope;
223
- $[27] = t9;
224
- } else t9 = $[27];
225
- const generatedJSON = t9;
226
- let t10;
227
- if ($[30] !== className) {
228
- t10 = cn(ruleBuilderVariants(), className);
229
- $[30] = className;
230
- $[31] = t10;
231
- } else t10 = $[31];
232
- let t11;
233
- if ($[32] !== metaIssues || $[33] !== showProblems) {
234
- t11 = metaIssues.length > 0 && showProblems && /*#__PURE__*/ jsx("div", {
235
- className: "flex flex-col gap-4 rounded-lg border border-border-danger bg-bg-danger-subtle p-12",
236
- children: metaIssues.map(_temp)
237
- });
238
- $[32] = metaIssues;
239
- $[33] = showProblems;
240
- $[34] = t11;
241
- } else t11 = $[34];
242
- let t12;
243
- if ($[35] !== afterConditions || $[36] !== attackTypes || $[37] !== condition || $[38] !== conditionIssues || $[39] !== onConditionChange || $[40] !== showHeadings || $[41] !== showProblems || $[42] !== shows) {
244
- t12 = shows("conditions") && /*#__PURE__*/ jsxs("section", {
245
- className: "flex flex-col gap-12",
246
- children: [
247
- showHeadings && /*#__PURE__*/ jsx("h3", {
248
- className: "text-md font-medium",
249
- children: "Conditions"
250
- }),
251
- /*#__PURE__*/ jsx(ConditionTree, {
252
- condition: condition,
253
- onChange: onConditionChange,
254
- attackTypes: attackTypes,
255
- isRoot: true,
256
- showProblems: showProblems,
257
- problems: conditionIssues
258
- }),
259
- conditionIssues.length > 0 && showProblems && /*#__PURE__*/ jsx("div", {
260
- className: "flex flex-col gap-4",
261
- children: conditionIssues.map(_temp2)
262
- }),
263
- afterConditions
264
- ]
265
- });
266
- $[35] = afterConditions;
267
- $[36] = attackTypes;
268
- $[37] = condition;
269
- $[38] = conditionIssues;
270
- $[39] = onConditionChange;
271
- $[40] = showHeadings;
272
- $[41] = showProblems;
273
- $[42] = shows;
274
- $[43] = t12;
275
- } else t12 = $[43];
276
- let t13;
277
- if ($[44] !== action || $[45] !== actionIssues || $[46] !== attackTypes || $[47] !== condition || $[48] !== onActionChange || $[49] !== showHeadings || $[50] !== showProblems || $[51] !== shows) {
278
- t13 = shows("action") && /*#__PURE__*/ jsxs("section", {
279
- className: "flex flex-col gap-12",
280
- children: [
281
- showHeadings && /*#__PURE__*/ jsx("h3", {
282
- className: "text-md font-medium",
283
- children: "Action"
284
- }),
285
- /*#__PURE__*/ jsx(ActionEditor, {
286
- value: action,
287
- onChange: onActionChange,
288
- attackTypes: attackTypes,
289
- condition: condition,
290
- problems: actionIssues,
291
- showProblems: showProblems
292
- })
293
- ]
294
- });
295
- $[44] = action;
296
- $[45] = actionIssues;
297
- $[46] = attackTypes;
298
- $[47] = condition;
299
- $[48] = onActionChange;
300
- $[49] = showHeadings;
301
- $[50] = showProblems;
302
- $[51] = shows;
303
- $[52] = t13;
304
- } else t13 = $[52];
305
- let t14;
306
- if ($[53] !== generatedJSON || $[54] !== showHeadings || $[55] !== shows) {
307
- t14 = shows("code") && /*#__PURE__*/ jsxs("section", {
308
- className: "flex flex-col gap-12",
309
- children: [
310
- showHeadings && /*#__PURE__*/ jsx("h3", {
311
- className: "text-md font-medium",
312
- children: "Generated Rule"
313
- }),
314
- /*#__PURE__*/ jsx(Code, {
315
- size: "m",
316
- className: "max-h-[600px] overflow-auto",
317
- children: generatedJSON
318
- })
319
- ]
320
- });
321
- $[53] = generatedJSON;
322
- $[54] = showHeadings;
323
- $[55] = shows;
324
- $[56] = t14;
325
- } else t14 = $[56];
326
- let t15;
327
- if ($[57] !== finalTestId || $[58] !== ref || $[59] !== t10 || $[60] !== t11 || $[61] !== t12 || $[62] !== t13 || $[63] !== t14) {
328
- t15 = /*#__PURE__*/ jsxs("div", {
329
- ref: ref,
330
- "data-slot": "rule-builder",
331
- "data-testid": finalTestId,
332
- className: t10,
333
- children: [
334
- t11,
335
- t12,
336
- t13,
337
- t14
338
- ]
339
- });
340
- $[57] = finalTestId;
341
- $[58] = ref;
342
- $[59] = t10;
343
- $[60] = t11;
344
- $[61] = t12;
345
- $[62] = t13;
346
- $[63] = t14;
347
- $[64] = t15;
348
- } else t15 = $[64];
349
- return t15;
350
- };
351
- RuleBuilder.displayName = "RuleBuilder";
352
- function _temp(problem) {
353
- return /*#__PURE__*/ jsx(Text, {
354
- size: "sm",
355
- color: "danger",
356
- children: problem
357
- }, problem);
358
- }
359
- function _temp2(problem_0) {
360
- return /*#__PURE__*/ jsx(Text, {
361
- size: "sm",
362
- color: "danger",
363
- children: problem_0
364
- }, problem_0);
365
- }
366
- export { RuleBuilder };
@@ -1,32 +0,0 @@
1
- /**
2
- * ActionSummary - Read-only action display
3
- *
4
- * Displays an action configuration in a read-only format for review/confirmation.
5
- * Shows action description, target, and all relevant fields based on action type.
6
- */
7
- import type { FC, Ref } from 'react';
8
- import { type TestableProps } from '../../../../utils/testId.js';
9
- import type { ActionDraft, Choice } from '../types.js';
10
- export interface ActionSummaryProps extends TestableProps {
11
- ref?: Ref<HTMLDivElement>;
12
- /** Action configuration to display */
13
- action: ActionDraft;
14
- /** Available attack types for label lookup */
15
- attackTypes: Choice[];
16
- /** Additional CSS class */
17
- className?: string;
18
- }
19
- /**
20
- * ActionSummary component.
21
- *
22
- * Displays an action configuration in read-only format for review/confirmation.
23
- *
24
- * @example
25
- * ```tsx
26
- * <ActionSummary
27
- * action={action}
28
- * attackTypes={attackTypeChoices}
29
- * />
30
- * ```
31
- */
32
- export declare const ActionSummary: FC<ActionSummaryProps>;