@checkstack/ui 0.2.3 → 0.2.4
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @checkstack/ui
|
|
2
2
|
|
|
3
|
+
## 0.2.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d94121b: Add group-to-role mapping for SAML and LDAP authentication
|
|
8
|
+
|
|
9
|
+
**Features:**
|
|
10
|
+
|
|
11
|
+
- SAML and LDAP users can now be automatically assigned Checkstack roles based on their directory group memberships
|
|
12
|
+
- Configure group mappings in the authentication strategy settings with dynamic role dropdowns
|
|
13
|
+
- Managed role sync: roles configured in mappings are fully synchronized (added when user gains group, removed when user leaves group)
|
|
14
|
+
- Unmanaged roles (manually assigned, not in any mapping) are preserved during sync
|
|
15
|
+
- Optional default role for all users from a directory
|
|
16
|
+
|
|
17
|
+
**Bug Fix:**
|
|
18
|
+
|
|
19
|
+
- Fixed `x-options-resolver` not working for fields inside arrays with `.default([])` in DynamicForm schemas
|
|
20
|
+
|
|
3
21
|
## 0.2.3
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -5,6 +5,7 @@ import { Button } from "./Button";
|
|
|
5
5
|
import { Badge, type BadgeProps } from "./Badge";
|
|
6
6
|
import { Toggle } from "./Toggle";
|
|
7
7
|
import { DynamicForm } from "./DynamicForm";
|
|
8
|
+
import type { OptionsResolver } from "./DynamicForm/types";
|
|
8
9
|
import { DynamicIcon, type LucideIconName } from "./DynamicIcon";
|
|
9
10
|
import { MarkdownBlock } from "./Markdown";
|
|
10
11
|
import { cn } from "../utils";
|
|
@@ -23,6 +24,8 @@ export interface ConfigSection {
|
|
|
23
24
|
value?: Record<string, unknown>;
|
|
24
25
|
/** Called when configuration is saved */
|
|
25
26
|
onSave?: (config: Record<string, unknown>) => Promise<void>;
|
|
27
|
+
/** Optional resolvers for dynamic dropdown fields (x-options-resolver) */
|
|
28
|
+
optionsResolvers?: Record<string, OptionsResolver>;
|
|
26
29
|
}
|
|
27
30
|
|
|
28
31
|
/**
|
|
@@ -130,7 +133,7 @@ export function StrategyConfigCard({
|
|
|
130
133
|
initial[section.id] = true;
|
|
131
134
|
}
|
|
132
135
|
return initial;
|
|
133
|
-
}
|
|
136
|
+
},
|
|
134
137
|
);
|
|
135
138
|
|
|
136
139
|
// Determine if we're in controlled or uncontrolled mode
|
|
@@ -167,7 +170,7 @@ export function StrategyConfigCard({
|
|
|
167
170
|
|
|
168
171
|
const handleSectionValueChange = (
|
|
169
172
|
sectionId: string,
|
|
170
|
-
value: Record<string, unknown
|
|
173
|
+
value: Record<string, unknown>,
|
|
171
174
|
) => {
|
|
172
175
|
setSectionValues((prev) => ({ ...prev, [sectionId]: value }));
|
|
173
176
|
};
|
|
@@ -186,7 +189,7 @@ export function StrategyConfigCard({
|
|
|
186
189
|
<Card
|
|
187
190
|
className={cn(
|
|
188
191
|
"overflow-hidden transition-all",
|
|
189
|
-
localEnabled ? "border-primary/30" : "opacity-80"
|
|
192
|
+
localEnabled ? "border-primary/30" : "opacity-80",
|
|
190
193
|
)}
|
|
191
194
|
>
|
|
192
195
|
<CardHeader className="p-4">
|
|
@@ -257,7 +260,7 @@ export function StrategyConfigCard({
|
|
|
257
260
|
<Power
|
|
258
261
|
className={cn(
|
|
259
262
|
"h-4 w-4 mr-1",
|
|
260
|
-
localEnabled ? "text-green-300" : "text-muted-foreground"
|
|
263
|
+
localEnabled ? "text-green-300" : "text-muted-foreground",
|
|
261
264
|
)}
|
|
262
265
|
/>
|
|
263
266
|
{localEnabled ? "Enabled" : "Disabled"}
|
|
@@ -311,6 +314,7 @@ export function StrategyConfigCard({
|
|
|
311
314
|
onValidChange={(isValid) =>
|
|
312
315
|
handleSectionValidChange(section.id, isValid)
|
|
313
316
|
}
|
|
317
|
+
optionsResolvers={section.optionsResolvers}
|
|
314
318
|
/>
|
|
315
319
|
|
|
316
320
|
{section.onSave && (
|