@checkstack/ui 1.1.2 → 1.1.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,20 @@
1
1
  # @checkstack/ui
2
2
 
3
+ ## 1.1.4
4
+
5
+ ### Patch Changes
6
+
7
+ - c0c0ed2: Fix LDAP group-to-role mapping not assigning roles on login. The LDAP search now explicitly requests the `memberOf` operational attribute, which is not returned by default. Also fixes array flattening that discarded multi-valued group memberships, and adds case-insensitive DN comparison for group matching. The test LDAP environment now uses `groupOfUniqueNames` to enable the memberOf overlay. Additionally, the DynamicForm validation no longer blocks saving when optional array fields (like group mappings) are empty.
8
+
9
+ ## 1.1.3
10
+
11
+ ### Patch Changes
12
+
13
+ - 6c743d4: Resolve AJV version mismatch and update to 8.18.0 for security reasons. Also fixed a TypeScript error in the HealthCheck latency chart caused by the Recharts v3 API change.
14
+ - Updated dependencies [67158e2]
15
+ - @checkstack/common@0.6.4
16
+ - @checkstack/frontend-api@0.3.8
17
+
3
18
  ## 1.1.2
4
19
 
5
20
  ### Patch Changes
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "@checkstack/ui",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "dependencies": {
7
- "@checkstack/common": "0.6.2",
8
- "@checkstack/frontend-api": "0.3.5",
7
+ "@checkstack/common": "0.6.4",
8
+ "@checkstack/frontend-api": "0.3.8",
9
9
  "@monaco-editor/react": "^4.7.0",
10
10
  "@radix-ui/react-accordion": "^1.2.12",
11
11
  "@radix-ui/react-dialog": "^1.1.15",
12
12
  "@radix-ui/react-popover": "^1.1.15",
13
13
  "@radix-ui/react-select": "^2.2.6",
14
14
  "@radix-ui/react-slot": "^1.2.4",
15
- "ajv": "^8.17.1",
15
+ "ajv": "^8.18.0",
16
16
  "ajv-formats": "^3.0.1",
17
17
  "class-variance-authority": "^0.7.1",
18
18
  "clsx": "^2.1.0",
@@ -30,14 +30,17 @@
30
30
  "typescript": "^5.0.0",
31
31
  "@types/react": "^18.2.0",
32
32
  "@testing-library/react": "^16.0.0",
33
- "@checkstack/test-utils-frontend": "0.0.3",
34
- "@checkstack/tsconfig": "0.0.3",
35
- "@checkstack/scripts": "0.1.1"
33
+ "@checkstack/test-utils-frontend": "0.0.4",
34
+ "@checkstack/tsconfig": "0.0.4",
35
+ "@checkstack/scripts": "0.1.2"
36
36
  },
37
37
  "scripts": {
38
38
  "typecheck": "tsc --noEmit",
39
39
  "lint": "bun run lint:code",
40
40
  "lint:code": "eslint . --max-warnings 0",
41
41
  "test": "bun test"
42
+ },
43
+ "checkstack": {
44
+ "type": "tooling"
42
45
  }
43
46
  }
@@ -155,13 +155,23 @@ describe("isValueEmpty", () => {
155
155
  });
156
156
 
157
157
  describe("arrays", () => {
158
- it("treats empty array as empty", () => {
159
- expect(isValueEmpty([], arraySchema)).toBe(true);
158
+ it("treats empty array as valid when no minItems specified", () => {
159
+ expect(isValueEmpty([], arraySchema)).toBe(false);
160
+ });
161
+
162
+ it("treats empty array as empty when minItems > 0", () => {
163
+ const requiredArraySchema: JsonSchemaProperty = { type: "array", minItems: 1 } as JsonSchemaProperty;
164
+ expect(isValueEmpty([], requiredArraySchema)).toBe(true);
160
165
  });
161
166
 
162
167
  it("treats non-empty array as not empty", () => {
163
168
  expect(isValueEmpty([1, 2, 3], arraySchema)).toBe(false);
164
169
  });
170
+
171
+ it("treats non-empty array as not empty even with minItems", () => {
172
+ const requiredArraySchema: JsonSchemaProperty = { type: "array", minItems: 1 } as JsonSchemaProperty;
173
+ expect(isValueEmpty([1], requiredArraySchema)).toBe(false);
174
+ });
165
175
  });
166
176
 
167
177
  describe("objects", () => {
@@ -48,8 +48,13 @@ export function isValueEmpty(
48
48
  ): boolean {
49
49
  if (val === undefined || val === null) return true;
50
50
  if (typeof val === "string" && val.trim() === "") return true;
51
- // For arrays, check if empty
52
- if (Array.isArray(val) && val.length === 0) return true;
51
+ // For arrays, only consider empty if schema requires minimum items
52
+ if (Array.isArray(val) && val.length === 0) {
53
+ const minItems = (propSchema as JsonSchemaProperty & { minItems?: number }).minItems;
54
+ if (minItems !== undefined && minItems > 0) return true;
55
+ // Empty arrays are valid by default (e.g., optional mappings lists)
56
+ return false;
57
+ }
53
58
  // For objects (nested schemas), recursively check required fields
54
59
  if (propSchema.type === "object" && propSchema.properties) {
55
60
  const objVal = val as Record<string, unknown>;