@wallarm-org/design-system 4.8.0-rc-fix-claude-code.1 → 4.8.0-rc-feat-parser.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/README.md +2 -4
- package/dist/components/BulkBar/index.d.ts +0 -5
- package/dist/components/Drawer/classes.js +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +2 -0
- package/dist/components/DropdownMenu/DropdownMenu.js +84 -71
- package/dist/components/DropdownMenu/DropdownMenuItemDescription.js +1 -1
- package/dist/components/FilterInput/hooks/useFilterInputAutocomplete/useFilterInputAutocomplete.js +1 -1
- package/dist/components/Overlay/Overlay.js +1 -1
- package/dist/components/Rules/PointSelector/KeyboardShortcutsDialog.d.ts +14 -0
- package/dist/components/Rules/PointSelector/KeyboardShortcutsDialog.js +209 -0
- package/dist/components/Rules/PointSelector/MatchStep.d.ts +15 -0
- package/dist/components/Rules/PointSelector/MatchStep.js +186 -0
- package/dist/components/Rules/PointSelector/MenuFooterHints.d.ts +16 -0
- package/dist/components/Rules/PointSelector/MenuFooterHints.js +177 -0
- package/dist/components/Rules/PointSelector/PointPreview.d.ts +10 -0
- package/dist/components/Rules/PointSelector/PointPreview.js +88 -0
- package/dist/components/Rules/PointSelector/PointSelector.d.ts +17 -0
- package/dist/components/Rules/PointSelector/PointSelector.js +937 -0
- package/dist/components/Rules/PointSelector/PointSelectorEmptyState.d.ts +12 -0
- package/dist/components/Rules/PointSelector/PointSelectorEmptyState.js +173 -0
- package/dist/components/Rules/PointSelector/PointSelectorError.d.ts +31 -0
- package/dist/components/Rules/PointSelector/PointSelectorError.js +275 -0
- package/dist/components/Rules/PointSelector/PointSelectorInput.d.ts +20 -0
- package/dist/components/Rules/PointSelector/PointSelectorInput.js +130 -0
- package/dist/components/Rules/PointSelector/PointSelectorMenu.d.ts +31 -0
- package/dist/components/Rules/PointSelector/PointSelectorMenu.js +317 -0
- package/dist/components/Rules/PointSelector/PointSelectorSkeleton.d.ts +8 -0
- package/dist/components/Rules/PointSelector/PointSelectorSkeleton.js +73 -0
- package/dist/components/Rules/PointSelector/SampleRequest.d.ts +14 -0
- package/dist/components/Rules/PointSelector/SampleRequest.js +116 -0
- package/dist/components/Rules/PointSelector/StepMenu.d.ts +40 -0
- package/dist/components/Rules/PointSelector/StepMenu.js +210 -0
- package/dist/components/Rules/PointSelector/VersionWarning.d.ts +26 -0
- package/dist/components/Rules/PointSelector/VersionWarning.js +231 -0
- package/dist/components/Rules/PointSelector/WhereBar.d.ts +48 -0
- package/dist/components/Rules/PointSelector/WhereBar.js +263 -0
- package/dist/components/Rules/PointSelector/classes.d.ts +28 -0
- package/dist/components/Rules/PointSelector/classes.js +22 -0
- package/dist/components/Rules/PointSelector/index.d.ts +20 -0
- package/dist/components/Rules/PointSelector/index.js +18 -0
- package/dist/components/Rules/PointSelector/liftLayer.d.ts +8 -0
- package/dist/components/Rules/PointSelector/liftLayer.js +4 -0
- package/dist/components/Rules/PointSelector/sampleValue.d.ts +6 -0
- package/dist/components/Rules/PointSelector/sampleValue.js +51 -0
- package/dist/components/Rules/PointSelector/sdkBridge.d.ts +508 -0
- package/dist/components/Rules/PointSelector/sdkBridge.js +339 -0
- package/dist/components/Rules/PointSelector/types.d.ts +304 -0
- package/dist/components/Rules/PointSelector/types.js +0 -0
- package/dist/components/Rules/PointSelector/usePointSelector.d.ts +161 -0
- package/dist/components/Rules/PointSelector/usePointSelector.js +1088 -0
- package/dist/components/Rules/RuleBuilder/ActionEditor/ActionEditor.d.ts +28 -0
- package/dist/components/Rules/RuleBuilder/ActionEditor/ActionEditor.js +208 -0
- package/dist/components/Rules/RuleBuilder/ActionEditor/ActionFields.d.ts +23 -0
- package/dist/components/Rules/RuleBuilder/ActionEditor/ActionFields.js +950 -0
- package/dist/components/Rules/RuleBuilder/ActionEditor/ActionTargetPicker.d.ts +21 -0
- package/dist/components/Rules/RuleBuilder/ActionEditor/ActionTargetPicker.js +110 -0
- package/dist/components/Rules/RuleBuilder/ActionEditor/ActionTypeSelect.d.ts +20 -0
- package/dist/components/Rules/RuleBuilder/ActionEditor/ActionTypeSelect.js +31 -0
- package/dist/components/Rules/RuleBuilder/ActionEditor/AttackTypeField.d.ts +23 -0
- package/dist/components/Rules/RuleBuilder/ActionEditor/AttackTypeField.js +131 -0
- package/dist/components/Rules/RuleBuilder/ActionEditor/classes.d.ts +17 -0
- package/dist/components/Rules/RuleBuilder/ActionEditor/classes.js +14 -0
- package/dist/components/Rules/RuleBuilder/ActionEditor/index.d.ts +6 -0
- package/dist/components/Rules/RuleBuilder/ActionEditor/index.js +6 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/AddConditionMenu.d.ts +24 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/AddConditionMenu.js +245 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/AttackCondition.d.ts +15 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/AttackCondition.js +691 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/ConditionCard.d.ts +19 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/ConditionCard.js +72 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/ConditionTree.d.ts +27 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/ConditionTree.js +407 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/FieldCondition.d.ts +14 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/FieldCondition.js +269 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/GroupCondition.d.ts +25 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/GroupCondition.js +99 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/SampleCondition.d.ts +14 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/SampleCondition.js +118 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/SignalCondition.d.ts +14 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/SignalCondition.js +446 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/TagCondition.d.ts +14 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/TagCondition.js +266 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/classes.d.ts +35 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/classes.js +57 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/index.d.ts +15 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/index.js +10 -0
- package/dist/components/Rules/RuleBuilder/RuleBuilder.d.ts +67 -0
- package/dist/components/Rules/RuleBuilder/RuleBuilder.js +366 -0
- package/dist/components/Rules/RuleBuilder/Summary/ActionSummary.d.ts +32 -0
- package/dist/components/Rules/RuleBuilder/Summary/ActionSummary.js +420 -0
- package/dist/components/Rules/RuleBuilder/Summary/ConditionSummary.d.ts +27 -0
- package/dist/components/Rules/RuleBuilder/Summary/ConditionSummary.js +446 -0
- package/dist/components/Rules/RuleBuilder/Summary/index.d.ts +7 -0
- package/dist/components/Rules/RuleBuilder/Summary/index.js +2 -0
- package/dist/components/Rules/RuleBuilder/classes.d.ts +19 -0
- package/dist/components/Rules/RuleBuilder/classes.js +18 -0
- package/dist/components/Rules/RuleBuilder/index.d.ts +55 -0
- package/dist/components/Rules/RuleBuilder/index.js +11 -0
- package/dist/components/Rules/RuleBuilder/models/actionModel.d.ts +31 -0
- package/dist/components/Rules/RuleBuilder/models/actionModel.js +276 -0
- package/dist/components/Rules/RuleBuilder/models/conditionModel.d.ts +95 -0
- package/dist/components/Rules/RuleBuilder/models/conditionModel.js +418 -0
- package/dist/components/Rules/RuleBuilder/models/index.d.ts +3 -0
- package/dist/components/Rules/RuleBuilder/models/index.js +3 -0
- package/dist/components/Rules/RuleBuilder/models/validation.d.ts +176 -0
- package/dist/components/Rules/RuleBuilder/models/validation.js +242 -0
- package/dist/components/Rules/RuleBuilder/shared/ChoiceSelect.d.ts +27 -0
- package/dist/components/Rules/RuleBuilder/shared/ChoiceSelect.js +92 -0
- package/dist/components/Rules/RuleBuilder/shared/index.d.ts +1 -0
- package/dist/components/Rules/RuleBuilder/shared/index.js +1 -0
- package/dist/components/Rules/RuleBuilder/types.d.ts +384 -0
- package/dist/components/Rules/RuleBuilder/types.js +0 -0
- package/dist/components/Rules/RuleBuilder/utils/constants.d.ts +65 -0
- package/dist/components/Rules/RuleBuilder/utils/constants.js +356 -0
- package/dist/components/Rules/RuleBuilder/utils/extractBindings.d.ts +48 -0
- package/dist/components/Rules/RuleBuilder/utils/extractBindings.js +42 -0
- package/dist/components/Rules/RuleBuilder/utils/helpers.d.ts +92 -0
- package/dist/components/Rules/RuleBuilder/utils/helpers.js +54 -0
- package/dist/components/Rules/RuleBuilder/utils/index.d.ts +2 -0
- package/dist/components/Rules/RuleBuilder/utils/index.js +2 -0
- package/dist/components/SearchInput/SearchInput.d.ts +5 -7
- package/dist/components/SearchInput/SearchInput.js +101 -119
- package/dist/components/Select/SelectSearchInput.d.ts +1 -1
- package/dist/components/Table/types.d.ts +1 -1
- package/dist/components/Tabs/Tabs.d.ts +0 -1
- package/dist/components/Tabs/Tabs.js +28 -30
- package/dist/components/Tabs/TabsList/index.d.ts +1 -1
- package/dist/components/Tabs/index.d.ts +2 -2
- package/dist/components/Tour/TourPositioner.d.ts +0 -3
- package/dist/components/Tour/TourPositioner.js +4 -4
- package/dist/index.d.ts +3 -2
- package/dist/index.js +2 -1
- package/dist/metadata/components.json +9077 -12300
- package/dist/theme/typography.css +0 -5
- package/dist/utils/formatDateTime.d.ts +0 -6
- package/dist/utils/formatDateTime.js +1 -13
- package/package.json +4 -6
- package/dist/components/NotificationCenter/NotificationCenter.d.ts +0 -20
- package/dist/components/NotificationCenter/NotificationCenter.js +0 -65
- package/dist/components/NotificationCenter/NotificationCenterBody.d.ts +0 -18
- package/dist/components/NotificationCenter/NotificationCenterBody.js +0 -202
- package/dist/components/NotificationCenter/NotificationCenterContent.d.ts +0 -5
- package/dist/components/NotificationCenter/NotificationCenterContent.js +0 -42
- package/dist/components/NotificationCenter/NotificationCenterHeader.d.ts +0 -20
- package/dist/components/NotificationCenter/NotificationCenterHeader.js +0 -202
- package/dist/components/NotificationCenter/NotificationCenterItem.d.ts +0 -26
- package/dist/components/NotificationCenter/NotificationCenterItem.js +0 -211
- package/dist/components/NotificationCenter/NotificationCenterItemTime.d.ts +0 -9
- package/dist/components/NotificationCenter/NotificationCenterItemTime.js +0 -148
- package/dist/components/NotificationCenter/NotificationCenterItemTitle.d.ts +0 -14
- package/dist/components/NotificationCenter/NotificationCenterItemTitle.js +0 -115
- package/dist/components/NotificationCenter/NotificationCenterTabs.d.ts +0 -10
- package/dist/components/NotificationCenter/NotificationCenterTabs.js +0 -77
- package/dist/components/NotificationCenter/NotificationCenterTrigger.d.ts +0 -13
- package/dist/components/NotificationCenter/NotificationCenterTrigger.js +0 -138
- package/dist/components/NotificationCenter/index.d.ts +0 -9
- package/dist/components/NotificationCenter/index.js +0 -9
- package/dist/guidelines/foundations/color.md +0 -157
- package/dist/guidelines/foundations/focus.md +0 -122
- package/dist/guidelines/foundations/layering.md +0 -131
- package/dist/guidelines/foundations/radius-elevation.md +0 -111
- package/dist/guidelines/foundations/spacing.md +0 -117
- package/dist/guidelines/foundations/typography.md +0 -114
- package/dist/guidelines/patterns/app-layout.md +0 -1567
- package/dist/guidelines/patterns/auth-page.md +0 -668
- package/dist/guidelines/patterns/confirmation-dialogs.md +0 -605
- package/dist/guidelines/patterns/create-edit-forms.md +0 -768
- package/dist/guidelines/patterns/detail-drawer.md +0 -868
- package/dist/guidelines/patterns/empty-states.md +0 -461
- package/dist/guidelines/patterns/entity-table.md +0 -533
- package/dist/guidelines/patterns/feedback-toasts.md +0 -493
- package/dist/guidelines/patterns/filtering.md +0 -630
- package/dist/guidelines/patterns/resource-list-page.md +0 -558
- package/dist/guidelines/patterns/settings-page.md +0 -752
- package/dist/guidelines/rules.md +0 -25
- package/dist/metadata/guidelines.json +0 -1705
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
3
|
+
import { useTestId } from "../../../utils/testId.js";
|
|
4
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuFooter, DropdownMenuGroup, DropdownMenuItem, DropdownMenuItemContent, DropdownMenuItemDescription, DropdownMenuItemText, DropdownMenuLabel, DropdownMenuShortcut } from "../../DropdownMenu/index.js";
|
|
5
|
+
import { Kbd } from "../../Kbd/index.js";
|
|
6
|
+
import { MenuFooterHints } from "./MenuFooterHints.js";
|
|
7
|
+
const PointSelectorMenu = (t0)=>{
|
|
8
|
+
const $ = c(81);
|
|
9
|
+
let anchorRef;
|
|
10
|
+
let contentId;
|
|
11
|
+
let highlightedId;
|
|
12
|
+
let items;
|
|
13
|
+
let onClose;
|
|
14
|
+
let onHighlight;
|
|
15
|
+
let onSelect;
|
|
16
|
+
let open;
|
|
17
|
+
let props;
|
|
18
|
+
let t1;
|
|
19
|
+
if ($[0] !== t0) {
|
|
20
|
+
const { open: t2, contentId: t3, anchorRef: t4, focusRef, items: t5, highlightedId: t6, onSelect: t7, onHighlight: t8, onClose: t9, isNameMode: t10, ...t11 } = t0;
|
|
21
|
+
open = t2;
|
|
22
|
+
contentId = t3;
|
|
23
|
+
anchorRef = t4;
|
|
24
|
+
items = t5;
|
|
25
|
+
highlightedId = t6;
|
|
26
|
+
onSelect = t7;
|
|
27
|
+
onHighlight = t8;
|
|
28
|
+
onClose = t9;
|
|
29
|
+
t1 = t10;
|
|
30
|
+
props = t11;
|
|
31
|
+
$[0] = t0;
|
|
32
|
+
$[1] = anchorRef;
|
|
33
|
+
$[2] = contentId;
|
|
34
|
+
$[3] = highlightedId;
|
|
35
|
+
$[4] = items;
|
|
36
|
+
$[5] = onClose;
|
|
37
|
+
$[6] = onHighlight;
|
|
38
|
+
$[7] = onSelect;
|
|
39
|
+
$[8] = open;
|
|
40
|
+
$[9] = props;
|
|
41
|
+
$[10] = t1;
|
|
42
|
+
} else {
|
|
43
|
+
anchorRef = $[1];
|
|
44
|
+
contentId = $[2];
|
|
45
|
+
highlightedId = $[3];
|
|
46
|
+
items = $[4];
|
|
47
|
+
onClose = $[5];
|
|
48
|
+
onHighlight = $[6];
|
|
49
|
+
onSelect = $[7];
|
|
50
|
+
open = $[8];
|
|
51
|
+
props = $[9];
|
|
52
|
+
t1 = $[10];
|
|
53
|
+
}
|
|
54
|
+
const isNameMode = void 0 === t1 ? false : t1;
|
|
55
|
+
const testId = useTestId("menu");
|
|
56
|
+
let T0;
|
|
57
|
+
let T1;
|
|
58
|
+
let T2;
|
|
59
|
+
let t10;
|
|
60
|
+
let t11;
|
|
61
|
+
let t12;
|
|
62
|
+
let t13;
|
|
63
|
+
let t14;
|
|
64
|
+
let t15;
|
|
65
|
+
let t16;
|
|
66
|
+
let t17;
|
|
67
|
+
let t18;
|
|
68
|
+
let t19;
|
|
69
|
+
let t2;
|
|
70
|
+
let t3;
|
|
71
|
+
let t4;
|
|
72
|
+
let t5;
|
|
73
|
+
let t6;
|
|
74
|
+
let t7;
|
|
75
|
+
let t8;
|
|
76
|
+
let t9;
|
|
77
|
+
if ($[11] !== anchorRef || $[12] !== contentId || $[13] !== highlightedId || $[14] !== items || $[15] !== onClose || $[16] !== onHighlight || $[17] !== onSelect || $[18] !== open || $[19] !== props || $[20] !== testId) {
|
|
78
|
+
const grouped = items.reduce(_temp, {});
|
|
79
|
+
items.slice(0, 9);
|
|
80
|
+
T2 = DropdownMenu;
|
|
81
|
+
t12 = open;
|
|
82
|
+
if ($[42] !== contentId) {
|
|
83
|
+
t13 = contentId ? {
|
|
84
|
+
content: contentId
|
|
85
|
+
} : void 0;
|
|
86
|
+
$[42] = contentId;
|
|
87
|
+
$[43] = t13;
|
|
88
|
+
} else t13 = $[43];
|
|
89
|
+
if ($[44] !== onClose) {
|
|
90
|
+
t14 = (next)=>!next && onClose?.();
|
|
91
|
+
$[44] = onClose;
|
|
92
|
+
$[45] = t14;
|
|
93
|
+
} else t14 = $[45];
|
|
94
|
+
t15 = false;
|
|
95
|
+
t16 = false;
|
|
96
|
+
t17 = highlightedId ?? void 0;
|
|
97
|
+
if ($[46] !== onHighlight) {
|
|
98
|
+
t18 = (d)=>d.highlightedValue && onHighlight?.(d.highlightedValue);
|
|
99
|
+
$[46] = onHighlight;
|
|
100
|
+
$[47] = t18;
|
|
101
|
+
} else t18 = $[47];
|
|
102
|
+
if ($[48] !== anchorRef) {
|
|
103
|
+
t19 = {
|
|
104
|
+
placement: "bottom-start",
|
|
105
|
+
flip: false,
|
|
106
|
+
gutter: 6,
|
|
107
|
+
getAnchorRect: ()=>anchorRef?.current?.getBoundingClientRect() ?? null
|
|
108
|
+
};
|
|
109
|
+
$[48] = anchorRef;
|
|
110
|
+
$[49] = t19;
|
|
111
|
+
} else t19 = $[49];
|
|
112
|
+
T1 = DropdownMenuContent;
|
|
113
|
+
t4 = props;
|
|
114
|
+
t5 = "point-selector-menu";
|
|
115
|
+
t6 = testId;
|
|
116
|
+
t7 = "listbox";
|
|
117
|
+
t8 = contentId;
|
|
118
|
+
t9 = "w-[460px]";
|
|
119
|
+
if ($[50] === Symbol.for("react.memo_cache_sentinel")) {
|
|
120
|
+
t10 = {
|
|
121
|
+
maxHeight: "min(460px, var(--available-height))"
|
|
122
|
+
};
|
|
123
|
+
t11 = /*#__PURE__*/ jsx(DropdownMenuLabel, {
|
|
124
|
+
children: "Choose next step"
|
|
125
|
+
});
|
|
126
|
+
$[50] = t10;
|
|
127
|
+
$[51] = t11;
|
|
128
|
+
} else {
|
|
129
|
+
t10 = $[50];
|
|
130
|
+
t11 = $[51];
|
|
131
|
+
}
|
|
132
|
+
T0 = DropdownMenuGroup;
|
|
133
|
+
t2 = "flex flex-col gap-1";
|
|
134
|
+
t3 = Object.entries(grouped).map((t20)=>{
|
|
135
|
+
const [category, categoryItems] = t20;
|
|
136
|
+
const relevantItems = categoryItems.filter(_temp2);
|
|
137
|
+
if (0 === relevantItems.length) return null;
|
|
138
|
+
return /*#__PURE__*/ jsx("div", {
|
|
139
|
+
children: categoryItems.map((t21)=>{
|
|
140
|
+
const { item: item_0, index: index_1 } = t21;
|
|
141
|
+
if (index_1 >= 9) return null;
|
|
142
|
+
const displayNumber = index_1 + 1;
|
|
143
|
+
const itemId = `item-${index_1}`;
|
|
144
|
+
return /*#__PURE__*/ jsxs(DropdownMenuItem, {
|
|
145
|
+
value: itemId,
|
|
146
|
+
role: "option",
|
|
147
|
+
"aria-selected": itemId === highlightedId,
|
|
148
|
+
onSelect: ()=>onSelect(item_0),
|
|
149
|
+
children: [
|
|
150
|
+
/*#__PURE__*/ jsxs(DropdownMenuItemContent, {
|
|
151
|
+
children: [
|
|
152
|
+
/*#__PURE__*/ jsx(DropdownMenuItemText, {
|
|
153
|
+
children: item_0.label
|
|
154
|
+
}),
|
|
155
|
+
item_0.detail && /*#__PURE__*/ jsx(DropdownMenuItemDescription, {
|
|
156
|
+
children: item_0.detail
|
|
157
|
+
})
|
|
158
|
+
]
|
|
159
|
+
}),
|
|
160
|
+
/*#__PURE__*/ jsx(DropdownMenuShortcut, {
|
|
161
|
+
children: /*#__PURE__*/ jsx(Kbd, {
|
|
162
|
+
size: "small",
|
|
163
|
+
children: displayNumber
|
|
164
|
+
})
|
|
165
|
+
})
|
|
166
|
+
]
|
|
167
|
+
}, itemId);
|
|
168
|
+
})
|
|
169
|
+
}, category);
|
|
170
|
+
});
|
|
171
|
+
$[11] = anchorRef;
|
|
172
|
+
$[12] = contentId;
|
|
173
|
+
$[13] = highlightedId;
|
|
174
|
+
$[14] = items;
|
|
175
|
+
$[15] = onClose;
|
|
176
|
+
$[16] = onHighlight;
|
|
177
|
+
$[17] = onSelect;
|
|
178
|
+
$[18] = open;
|
|
179
|
+
$[19] = props;
|
|
180
|
+
$[20] = testId;
|
|
181
|
+
$[21] = T0;
|
|
182
|
+
$[22] = T1;
|
|
183
|
+
$[23] = T2;
|
|
184
|
+
$[24] = t10;
|
|
185
|
+
$[25] = t11;
|
|
186
|
+
$[26] = t12;
|
|
187
|
+
$[27] = t13;
|
|
188
|
+
$[28] = t14;
|
|
189
|
+
$[29] = t15;
|
|
190
|
+
$[30] = t16;
|
|
191
|
+
$[31] = t17;
|
|
192
|
+
$[32] = t18;
|
|
193
|
+
$[33] = t19;
|
|
194
|
+
$[34] = t2;
|
|
195
|
+
$[35] = t3;
|
|
196
|
+
$[36] = t4;
|
|
197
|
+
$[37] = t5;
|
|
198
|
+
$[38] = t6;
|
|
199
|
+
$[39] = t7;
|
|
200
|
+
$[40] = t8;
|
|
201
|
+
$[41] = t9;
|
|
202
|
+
} else {
|
|
203
|
+
T0 = $[21];
|
|
204
|
+
T1 = $[22];
|
|
205
|
+
T2 = $[23];
|
|
206
|
+
t10 = $[24];
|
|
207
|
+
t11 = $[25];
|
|
208
|
+
t12 = $[26];
|
|
209
|
+
t13 = $[27];
|
|
210
|
+
t14 = $[28];
|
|
211
|
+
t15 = $[29];
|
|
212
|
+
t16 = $[30];
|
|
213
|
+
t17 = $[31];
|
|
214
|
+
t18 = $[32];
|
|
215
|
+
t19 = $[33];
|
|
216
|
+
t2 = $[34];
|
|
217
|
+
t3 = $[35];
|
|
218
|
+
t4 = $[36];
|
|
219
|
+
t5 = $[37];
|
|
220
|
+
t6 = $[38];
|
|
221
|
+
t7 = $[39];
|
|
222
|
+
t8 = $[40];
|
|
223
|
+
t9 = $[41];
|
|
224
|
+
}
|
|
225
|
+
let t20;
|
|
226
|
+
if ($[52] !== T0 || $[53] !== t2 || $[54] !== t3) {
|
|
227
|
+
t20 = /*#__PURE__*/ jsx(T0, {
|
|
228
|
+
className: t2,
|
|
229
|
+
children: t3
|
|
230
|
+
});
|
|
231
|
+
$[52] = T0;
|
|
232
|
+
$[53] = t2;
|
|
233
|
+
$[54] = t3;
|
|
234
|
+
$[55] = t20;
|
|
235
|
+
} else t20 = $[55];
|
|
236
|
+
const t21 = isNameMode ? "name" : "list";
|
|
237
|
+
let t22;
|
|
238
|
+
if ($[56] !== t21) {
|
|
239
|
+
t22 = /*#__PURE__*/ jsx(DropdownMenuFooter, {
|
|
240
|
+
children: /*#__PURE__*/ jsx(MenuFooterHints, {
|
|
241
|
+
variant: t21,
|
|
242
|
+
escLabel: "to close"
|
|
243
|
+
})
|
|
244
|
+
});
|
|
245
|
+
$[56] = t21;
|
|
246
|
+
$[57] = t22;
|
|
247
|
+
} else t22 = $[57];
|
|
248
|
+
let t23;
|
|
249
|
+
if ($[58] !== T1 || $[59] !== t10 || $[60] !== t11 || $[61] !== t20 || $[62] !== t22 || $[63] !== t4 || $[64] !== t5 || $[65] !== t6 || $[66] !== t7 || $[67] !== t8 || $[68] !== t9) {
|
|
250
|
+
t23 = /*#__PURE__*/ jsxs(T1, {
|
|
251
|
+
...t4,
|
|
252
|
+
"data-slot": t5,
|
|
253
|
+
"data-testid": t6,
|
|
254
|
+
role: t7,
|
|
255
|
+
id: t8,
|
|
256
|
+
className: t9,
|
|
257
|
+
style: t10,
|
|
258
|
+
children: [
|
|
259
|
+
t11,
|
|
260
|
+
t20,
|
|
261
|
+
t22
|
|
262
|
+
]
|
|
263
|
+
});
|
|
264
|
+
$[58] = T1;
|
|
265
|
+
$[59] = t10;
|
|
266
|
+
$[60] = t11;
|
|
267
|
+
$[61] = t20;
|
|
268
|
+
$[62] = t22;
|
|
269
|
+
$[63] = t4;
|
|
270
|
+
$[64] = t5;
|
|
271
|
+
$[65] = t6;
|
|
272
|
+
$[66] = t7;
|
|
273
|
+
$[67] = t8;
|
|
274
|
+
$[68] = t9;
|
|
275
|
+
$[69] = t23;
|
|
276
|
+
} else t23 = $[69];
|
|
277
|
+
let t24;
|
|
278
|
+
if ($[70] !== T2 || $[71] !== t12 || $[72] !== t13 || $[73] !== t14 || $[74] !== t15 || $[75] !== t16 || $[76] !== t17 || $[77] !== t18 || $[78] !== t19 || $[79] !== t23) {
|
|
279
|
+
t24 = /*#__PURE__*/ jsx(T2, {
|
|
280
|
+
open: t12,
|
|
281
|
+
ids: t13,
|
|
282
|
+
onOpenChange: t14,
|
|
283
|
+
closeOnSelect: t15,
|
|
284
|
+
closeOnInteractOutside: t16,
|
|
285
|
+
highlightedValue: t17,
|
|
286
|
+
onHighlightChange: t18,
|
|
287
|
+
positioning: t19,
|
|
288
|
+
children: t23
|
|
289
|
+
});
|
|
290
|
+
$[70] = T2;
|
|
291
|
+
$[71] = t12;
|
|
292
|
+
$[72] = t13;
|
|
293
|
+
$[73] = t14;
|
|
294
|
+
$[74] = t15;
|
|
295
|
+
$[75] = t16;
|
|
296
|
+
$[76] = t17;
|
|
297
|
+
$[77] = t18;
|
|
298
|
+
$[78] = t19;
|
|
299
|
+
$[79] = t23;
|
|
300
|
+
$[80] = t24;
|
|
301
|
+
} else t24 = $[80];
|
|
302
|
+
return t24;
|
|
303
|
+
};
|
|
304
|
+
PointSelectorMenu.displayName = "PointSelectorMenu";
|
|
305
|
+
function _temp(acc, item, index) {
|
|
306
|
+
if (!acc[item.category]) acc[item.category] = [];
|
|
307
|
+
acc[item.category]?.push({
|
|
308
|
+
item,
|
|
309
|
+
index
|
|
310
|
+
});
|
|
311
|
+
return acc;
|
|
312
|
+
}
|
|
313
|
+
function _temp2(t0) {
|
|
314
|
+
const { index: index_0 } = t0;
|
|
315
|
+
return index_0 < 9;
|
|
316
|
+
}
|
|
317
|
+
export { PointSelectorMenu };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
3
|
+
import { Skeleton } from "../../Skeleton/index.js";
|
|
4
|
+
import { Text } from "../../Text/index.js";
|
|
5
|
+
const PointSelectorSkeleton = ()=>{
|
|
6
|
+
const $ = c(3);
|
|
7
|
+
let t0;
|
|
8
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
9
|
+
t0 = /*#__PURE__*/ jsxs("div", {
|
|
10
|
+
className: "flex items-center justify-between gap-12",
|
|
11
|
+
children: [
|
|
12
|
+
/*#__PURE__*/ jsx(Skeleton, {
|
|
13
|
+
width: "200px",
|
|
14
|
+
height: "20px",
|
|
15
|
+
rounded: 4
|
|
16
|
+
}),
|
|
17
|
+
/*#__PURE__*/ jsx(Skeleton, {
|
|
18
|
+
width: "160px",
|
|
19
|
+
height: "36px",
|
|
20
|
+
rounded: 8
|
|
21
|
+
})
|
|
22
|
+
]
|
|
23
|
+
});
|
|
24
|
+
$[0] = t0;
|
|
25
|
+
} else t0 = $[0];
|
|
26
|
+
let t1;
|
|
27
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
28
|
+
t1 = /*#__PURE__*/ jsxs("div", {
|
|
29
|
+
className: "flex flex-col gap-8 rounded-12 border border-border-primary-light bg-bg-surface-1 p-12",
|
|
30
|
+
children: [
|
|
31
|
+
t0,
|
|
32
|
+
/*#__PURE__*/ jsxs("div", {
|
|
33
|
+
className: "flex flex-col gap-8",
|
|
34
|
+
children: [
|
|
35
|
+
/*#__PURE__*/ jsx(Skeleton, {
|
|
36
|
+
width: "100%",
|
|
37
|
+
height: "40px",
|
|
38
|
+
rounded: 8
|
|
39
|
+
}),
|
|
40
|
+
/*#__PURE__*/ jsx(Skeleton, {
|
|
41
|
+
width: "180px",
|
|
42
|
+
height: "16px",
|
|
43
|
+
rounded: 4
|
|
44
|
+
})
|
|
45
|
+
]
|
|
46
|
+
})
|
|
47
|
+
]
|
|
48
|
+
});
|
|
49
|
+
$[1] = t1;
|
|
50
|
+
} else t1 = $[1];
|
|
51
|
+
let t2;
|
|
52
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
53
|
+
t2 = /*#__PURE__*/ jsxs("div", {
|
|
54
|
+
"data-slot": "point-selector-skeleton",
|
|
55
|
+
className: "flex flex-col gap-12",
|
|
56
|
+
children: [
|
|
57
|
+
t1,
|
|
58
|
+
/*#__PURE__*/ jsx("div", {
|
|
59
|
+
className: "flex items-center justify-center py-8",
|
|
60
|
+
children: /*#__PURE__*/ jsx(Text, {
|
|
61
|
+
size: "sm",
|
|
62
|
+
color: "secondary",
|
|
63
|
+
children: "Loading SDK..."
|
|
64
|
+
})
|
|
65
|
+
})
|
|
66
|
+
]
|
|
67
|
+
});
|
|
68
|
+
$[2] = t2;
|
|
69
|
+
} else t2 = $[2];
|
|
70
|
+
return t2;
|
|
71
|
+
};
|
|
72
|
+
PointSelectorSkeleton.displayName = "PointSelectorSkeleton";
|
|
73
|
+
export { PointSelectorSkeleton };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import { type RuleContext, type SampleValue, type Segment } from '@wallarm-org/rules-lib';
|
|
3
|
+
export interface SampleRequestProps {
|
|
4
|
+
segments: readonly Segment[];
|
|
5
|
+
context: RuleContext;
|
|
6
|
+
/** What the condition looks for; absent: the value as a placeholder. */
|
|
7
|
+
value?: SampleValue;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Where the value sits in a message, drawn as a sample request (or response):
|
|
11
|
+
* only what the point names is written out, the rest are ‹placeholders›, and
|
|
12
|
+
* the value the condition looks at is highlighted. Styled as a DS code snippet.
|
|
13
|
+
*/
|
|
14
|
+
export declare const SampleRequest: FC<SampleRequestProps>;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
3
|
+
import { sampleMessage } from "@wallarm-org/rules-lib";
|
|
4
|
+
import { useTestId } from "../../../utils/testId.js";
|
|
5
|
+
const ROLE_CLASS = {
|
|
6
|
+
"": "",
|
|
7
|
+
ph: "italic text-syntax-comment",
|
|
8
|
+
str: "text-syntax-string",
|
|
9
|
+
key: "text-syntax-property",
|
|
10
|
+
fn: "text-syntax-function",
|
|
11
|
+
hname: "text-syntax-attr-name"
|
|
12
|
+
};
|
|
13
|
+
const tokenClass = (t)=>2 === t.highlight ? "rounded-4 bg-syntax-highlight-brand-highlight px-2 text-syntax-highlight-brand-code" : ROLE_CLASS[t.role];
|
|
14
|
+
const SampleRequest = (t0)=>{
|
|
15
|
+
const $ = c(23);
|
|
16
|
+
const { segments, context, value } = t0;
|
|
17
|
+
const testId = useTestId("sample");
|
|
18
|
+
let t1;
|
|
19
|
+
let t2;
|
|
20
|
+
let t3;
|
|
21
|
+
let t4;
|
|
22
|
+
let t5;
|
|
23
|
+
let t6;
|
|
24
|
+
let t7;
|
|
25
|
+
if ($[0] !== context || $[1] !== segments || $[2] !== testId || $[3] !== value) {
|
|
26
|
+
const lines = sampleMessage(segments, context, value);
|
|
27
|
+
const title = "http_response" === context ? "Sample response" : "Sample request";
|
|
28
|
+
t3 = "sample-request";
|
|
29
|
+
t4 = testId;
|
|
30
|
+
t5 = "code-snippet-bg m-0 flex flex-col overflow-hidden rounded-8 font-mono text-syntax-no-syntax";
|
|
31
|
+
t6 = title;
|
|
32
|
+
if ($[11] !== title) {
|
|
33
|
+
t7 = /*#__PURE__*/ jsx("figcaption", {
|
|
34
|
+
className: "border-b border-border-primary-light px-12 py-6 font-sans text-text-secondary text-xs",
|
|
35
|
+
children: title
|
|
36
|
+
});
|
|
37
|
+
$[11] = title;
|
|
38
|
+
$[12] = t7;
|
|
39
|
+
} else t7 = $[12];
|
|
40
|
+
t1 = "overflow-x-auto py-8 text-xs";
|
|
41
|
+
t2 = lines.map(_temp2);
|
|
42
|
+
$[0] = context;
|
|
43
|
+
$[1] = segments;
|
|
44
|
+
$[2] = testId;
|
|
45
|
+
$[3] = value;
|
|
46
|
+
$[4] = t1;
|
|
47
|
+
$[5] = t2;
|
|
48
|
+
$[6] = t3;
|
|
49
|
+
$[7] = t4;
|
|
50
|
+
$[8] = t5;
|
|
51
|
+
$[9] = t6;
|
|
52
|
+
$[10] = t7;
|
|
53
|
+
} else {
|
|
54
|
+
t1 = $[4];
|
|
55
|
+
t2 = $[5];
|
|
56
|
+
t3 = $[6];
|
|
57
|
+
t4 = $[7];
|
|
58
|
+
t5 = $[8];
|
|
59
|
+
t6 = $[9];
|
|
60
|
+
t7 = $[10];
|
|
61
|
+
}
|
|
62
|
+
let t8;
|
|
63
|
+
if ($[13] !== t1 || $[14] !== t2) {
|
|
64
|
+
t8 = /*#__PURE__*/ jsx("div", {
|
|
65
|
+
className: t1,
|
|
66
|
+
children: t2
|
|
67
|
+
});
|
|
68
|
+
$[13] = t1;
|
|
69
|
+
$[14] = t2;
|
|
70
|
+
$[15] = t8;
|
|
71
|
+
} else t8 = $[15];
|
|
72
|
+
let t9;
|
|
73
|
+
if ($[16] !== t3 || $[17] !== t4 || $[18] !== t5 || $[19] !== t6 || $[20] !== t7 || $[21] !== t8) {
|
|
74
|
+
t9 = /*#__PURE__*/ jsxs("figure", {
|
|
75
|
+
"data-slot": t3,
|
|
76
|
+
"data-testid": t4,
|
|
77
|
+
className: t5,
|
|
78
|
+
"aria-label": t6,
|
|
79
|
+
children: [
|
|
80
|
+
t7,
|
|
81
|
+
t8
|
|
82
|
+
]
|
|
83
|
+
});
|
|
84
|
+
$[16] = t3;
|
|
85
|
+
$[17] = t4;
|
|
86
|
+
$[18] = t5;
|
|
87
|
+
$[19] = t6;
|
|
88
|
+
$[20] = t7;
|
|
89
|
+
$[21] = t8;
|
|
90
|
+
$[22] = t9;
|
|
91
|
+
} else t9 = $[22];
|
|
92
|
+
return t9;
|
|
93
|
+
};
|
|
94
|
+
SampleRequest.displayName = "SampleRequest";
|
|
95
|
+
function _temp(t, k) {
|
|
96
|
+
return /*#__PURE__*/ jsx("span", {
|
|
97
|
+
className: tokenClass(t),
|
|
98
|
+
children: t.text
|
|
99
|
+
}, k);
|
|
100
|
+
}
|
|
101
|
+
function _temp2(line, i) {
|
|
102
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
103
|
+
className: "flex min-h-20 items-center",
|
|
104
|
+
children: [
|
|
105
|
+
/*#__PURE__*/ jsx("span", {
|
|
106
|
+
className: "w-32 shrink-0 select-none pr-12 text-right text-syntax-comment",
|
|
107
|
+
children: i + 1
|
|
108
|
+
}),
|
|
109
|
+
/*#__PURE__*/ jsx("span", {
|
|
110
|
+
className: "whitespace-pre pr-12",
|
|
111
|
+
children: line.map(_temp)
|
|
112
|
+
})
|
|
113
|
+
]
|
|
114
|
+
}, i);
|
|
115
|
+
}
|
|
116
|
+
export { SampleRequest };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { FC, ReactNode, RefObject } from 'react';
|
|
2
|
+
import type { MenuFooter, MenuRow } from './types.js';
|
|
3
|
+
interface Props {
|
|
4
|
+
open: boolean;
|
|
5
|
+
/** The menu's id. The anchor names it in `aria-controls`: a modal drawer's
|
|
6
|
+
* focus trap lets focus into the portaled menu only when an expanded
|
|
7
|
+
* element inside the drawer controls it. */
|
|
8
|
+
contentId: string;
|
|
9
|
+
/** The element the menu hangs under (the query bar). */
|
|
10
|
+
anchorRef: RefObject<HTMLElement | null>;
|
|
11
|
+
/** The input the user types in; keeps keyboard focus while the menu is open. */
|
|
12
|
+
focusRef: RefObject<HTMLInputElement | null>;
|
|
13
|
+
title: string;
|
|
14
|
+
rows: MenuRow[];
|
|
15
|
+
highlightedId: string | null;
|
|
16
|
+
status?: string;
|
|
17
|
+
footer: MenuFooter;
|
|
18
|
+
escLabel: string;
|
|
19
|
+
/** Content above the rows: the name input of a name step. */
|
|
20
|
+
header?: ReactNode;
|
|
21
|
+
applyLabel?: string;
|
|
22
|
+
/** Nothing is ticked yet: the apply button is shown but inactive. */
|
|
23
|
+
applyDisabled?: boolean;
|
|
24
|
+
onApply?: () => void;
|
|
25
|
+
onHighlight: (id: string) => void;
|
|
26
|
+
onChoose: (id: string) => void;
|
|
27
|
+
onClose: () => void;
|
|
28
|
+
/** Show examples when no segments chosen */
|
|
29
|
+
showExamples?: boolean;
|
|
30
|
+
/** Called when example is clicked */
|
|
31
|
+
onSelectExample?: (point: string) => void;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* A design-system dropdown menu anchored to the query bar, like the
|
|
35
|
+
* FilterInput menu: a question, rows with a muted second line, the option's
|
|
36
|
+
* number on the right, ticks for a multi-select, keyboard hints in the footer.
|
|
37
|
+
* Keyboard focus stays in `focusRef`; the highlight is controlled.
|
|
38
|
+
*/
|
|
39
|
+
export declare const StepMenu: FC<Props>;
|
|
40
|
+
export {};
|