@payfit/unity-components 2.9.7 → 2.9.8

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.
@@ -51,5 +51,5 @@ export interface FieldRevalidateLogicProps {
51
51
  * </form.AppField>
52
52
  * ```
53
53
  */
54
- export declare const fieldRevalidateLogic: ({ whenPristine, whenDirty, }: FieldRevalidateLogicProps) => ValidationLogicFn;
54
+ export declare const fieldRevalidateLogic: (config: FieldRevalidateLogicProps) => ValidationLogicFn;
55
55
  export {};
@@ -1,31 +1,29 @@
1
1
  import { defaultValidationLogic as l } from "@tanstack/form-core";
2
- const m = {
2
+ const v = {
3
3
  change: ["change", "blur", "submit"],
4
4
  blur: ["blur", "submit"],
5
5
  submit: ["submit"]
6
- }, v = ({
7
- whenPristine: r = "blur",
8
- whenDirty: d = "change"
9
- }) => {
10
- let n = !1;
6
+ }, b = (n) => {
7
+ const { whenPristine: s = "blur", whenDirty: d = "change" } = n;
8
+ let r = !1;
11
9
  return (a) => {
12
10
  if (Object.keys(a.validators ?? {}).length === 0)
13
11
  return a.runValidation({ validators: [], form: a.form });
14
12
  const e = a.event.async ? a.validators?.onDynamicAsync : a.validators?.onDynamic;
15
13
  if (!e)
16
14
  return l(a);
17
- a.event.type === "blur" && (n = !0);
15
+ a.event.type === "blur" && (r = !0);
18
16
  const o = {
19
17
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- TanStack FormValidators properties are typed as `any`
20
18
  fn: e,
21
19
  cause: "dynamic"
22
- }, u = n ? d : r, t = [];
23
- m[u].includes(a.event.type) && t.push(o);
20
+ }, u = r ? d : s, t = [];
21
+ v[u].includes(a.event.type) && t.push(o);
24
22
  let i = [];
25
23
  return l({
26
24
  ...a,
27
- runValidation: (c) => {
28
- i = c.validators;
25
+ runValidation: (m) => {
26
+ i = m.validators;
29
27
  }
30
28
  }), t.length === 0 ? a.runValidation({
31
29
  validators: i,
@@ -37,5 +35,5 @@ const m = {
37
35
  };
38
36
  };
39
37
  export {
40
- v as fieldRevalidateLogic
38
+ b as fieldRevalidateLogic
41
39
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payfit/unity-components",
3
- "version": "2.9.7",
3
+ "version": "2.9.8",
4
4
  "module": "./dist/esm/index.js",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -42,15 +42,15 @@
42
42
  "@hookform/devtools": "4.4.0",
43
43
  "@hookform/resolvers": "5.2.1",
44
44
  "@internationalized/date": "3.11.0",
45
- "@payfit/unity-illustrations": "2.9.7",
45
+ "@payfit/unity-illustrations": "2.9.8",
46
46
  "@radix-ui/react-avatar": "1.1.11",
47
47
  "@radix-ui/react-slot": "1.2.4",
48
48
  "@react-aria/interactions": "3.27.0",
49
49
  "@react-aria/utils": "3.33.0",
50
50
  "@react-types/shared": "3.26.0",
51
51
  "@standard-schema/spec": "1.1.0",
52
- "@tanstack/form-core": "1.28.0",
53
- "@tanstack/react-form": "1.28.0",
52
+ "@tanstack/form-core": "1.28.3",
53
+ "@tanstack/react-form": "1.28.3",
54
54
  "@tanstack/react-virtual": "3.13.18",
55
55
  "@use-gesture/react": "10.3.1",
56
56
  "prettier": "3.1.0",
@@ -71,8 +71,8 @@
71
71
  },
72
72
  "peerDependencies": {
73
73
  "@hookform/devtools": "^4",
74
- "@payfit/unity-icons": "2.9.7",
75
- "@payfit/unity-themes": "2.9.7",
74
+ "@payfit/unity-icons": "2.9.8",
75
+ "@payfit/unity-themes": "2.9.8",
76
76
  "@storybook/react-vite": "^10.2.2",
77
77
  "@tanstack/react-query": "^5",
78
78
  "@tanstack/react-router": "^1.131",
@@ -91,9 +91,9 @@
91
91
  "@payfit/hr-apps-tsconfigs": "0.0.0-use.local",
92
92
  "@payfit/storybook-addon-console-errors": "0.0.0-use.local",
93
93
  "@payfit/storybook-config": "0.0.0-use.local",
94
- "@payfit/unity-icons": "2.9.7",
95
- "@payfit/unity-illustrations": "2.9.7",
96
- "@payfit/unity-themes": "2.9.7",
94
+ "@payfit/unity-icons": "2.9.8",
95
+ "@payfit/unity-illustrations": "2.9.8",
96
+ "@payfit/unity-themes": "2.9.8",
97
97
  "@payfit/vite-configs": "0.0.0-use.local",
98
98
  "@storybook/addon-a11y": "10.2.10",
99
99
  "@storybook/addon-docs": "10.2.10",
@@ -101,7 +101,7 @@
101
101
  "@storybook/addon-vitest": "10.2.10",
102
102
  "@storybook/react-vite": "10.2.10",
103
103
  "@tanstack/react-devtools": "0.9.6",
104
- "@tanstack/react-form-devtools": "0.2.13",
104
+ "@tanstack/react-form-devtools": "0.2.16",
105
105
  "@tanstack/react-query": "5.90.21",
106
106
  "@tanstack/react-router": "1.159.5",
107
107
  "@tanstack/react-router-devtools": "1.159.5",