Skip to content

Commit 3973781

Browse files
github-actions[bot]George-Payne
authored andcommitted
Version Packages
1 parent 85e2ad3 commit 3973781

File tree

12 files changed

+124
-115
lines changed

12 files changed

+124
-115
lines changed

.changeset/breezy-paws-hide.md

Lines changed: 0 additions & 33 deletions
This file was deleted.

.changeset/hungry-spies-sniff.md

Lines changed: 0 additions & 26 deletions
This file was deleted.

.changeset/ninety-dolls-rescue.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/rare-hats-sip.md

Lines changed: 0 additions & 47 deletions
This file was deleted.

packages/fields/CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,34 @@
11
# @kurrent-ui/fields
22

3+
## 2.1.0
4+
5+
### Minor Changes
6+
7+
- [`b0f2624f`](https://github.com/EventStore/Design-System/commit/b0f2624fef898cf25a72409216140857d6862303) - `FieldChangeEvent` is now more flexible.
8+
9+
Previously, it only took the complete form type, and a key to the form:
10+
11+
```ts
12+
interface MyForm {
13+
something: number;
14+
another: string;
15+
}
16+
17+
const handleSomethingChange = (
18+
e: FieldChangeEvent<MyForm, 'something'>,
19+
) => {
20+
// e.details is now `{ name: "something", value: number }`
21+
};
22+
```
23+
24+
Now, you can also pass a typing as a single value, so it is easier to use outside of a validatedForm context:
25+
26+
```ts
27+
const handleSomethingChange = (e: FieldChangeEvent<number>) => {
28+
// e.details is now `{ name: string, value: number }`
29+
};
30+
```
31+
332
## 2.0.0
433

534
### Major Changes

packages/fields/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@kurrent-ui/fields",
3-
"version": "2.0.0",
3+
"version": "2.1.0",
44
"description": "Forms and fields for Kurrent Design System",
55
"license": "Apache-2.0",
66
"main": "dist/index.cjs.js",

packages/forms/CHANGELOG.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,42 @@
11
# @kurrent-ui/forms
22

3+
## 2.1.0
4+
5+
### Minor Changes
6+
7+
- [`2f6239c9`](https://github.com/EventStore/Design-System/commit/2f6239c9f88192f88af1df12ef2300cadcf58ce6) - `createValidatedForm` has a new option `shouldValidateBranch` for helping to create branching forms.
8+
9+
When a parent validated form is validated, it will only call validation on a nested validated form if `shouldValidateBranch` returns true (or is `undefined`).
10+
`shouldValidateBranch` is passed the data of the top level form which had validation called on it, it's own data, and the reason for validating.
11+
12+
Example usage
13+
14+
```ts
15+
interface DinnerForm {
16+
mealType: string;
17+
pizzaToppings: {
18+
pepperoni: boolean;
19+
pineapple: boolean;
20+
};
21+
}
22+
23+
const form = createValidatedForm<DinnerForm, DinnerForm>({
24+
mealType: '',
25+
pizzaToppings: createValidatedForm<
26+
DinnerForm['pizzaToppings'],
27+
DinnerForm
28+
>(
29+
{
30+
pepperoni: true,
31+
pineapple: true,
32+
},
33+
{
34+
shouldValidateBranch: (root) => root.mealType === 'pizza',
35+
},
36+
),
37+
});
38+
```
39+
340
## 2.0.0
441

542
### Major Changes

packages/forms/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@kurrent-ui/forms",
3-
"version": "2.0.0",
3+
"version": "2.1.0",
44
"description": "Form validation and working copy data store.",
55
"license": "Apache-2.0",
66
"main": "dist/index.js",

packages/stores/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @kurrent-ui/stores
22

3+
## 2.0.1
4+
5+
### Patch Changes
6+
7+
- [`e63b24dd`](https://github.com/EventStore/Design-System/commit/e63b24ddb98f52cafaf6c47abb1dfaf5b91c0609) - Bug Fix: `updateOrSet` returns the current value as-is, in line with `update`
8+
39
## 2.0.0
410

511
### Major Changes

packages/stores/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@kurrent-ui/stores",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"description": "Data stores for Stencil",
55
"license": "Apache-2.0",
66
"main": "dist/index.js",

0 commit comments

Comments
 (0)