@esportsplus/ui 0.34.8 → 0.35.0

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.
@@ -6,12 +6,12 @@ type A = Attributes & {
6
6
  processing: boolean;
7
7
  };
8
8
  };
9
- type Action = (data: Payload) => Promise<Errors> | Errors;
9
+ type Action = <T extends Record<string, any>>(data: Payload<T>) => Promise<Errors> | Errors;
10
10
  type Errors = {
11
11
  errors: Response<unknown>['errors'];
12
12
  };
13
- type Payload = {
14
- input: Record<string, any>;
13
+ type Payload<T extends Record<string, any>> = {
14
+ input: T;
15
15
  response: typeof response;
16
16
  };
17
17
  declare const _default: {
@@ -115,8 +115,8 @@ declare const _default: {
115
115
  onwebkittransitionend?: ((this: import("@esportsplus/template").Element, event: Event) => void) | undefined;
116
116
  onwheel?: ((this: import("@esportsplus/template").Element, event: WheelEvent) => void) | undefined;
117
117
  } & Record<PropertyKey, unknown> & {
118
- action: (data: {
119
- input: Record<string, any>;
118
+ action: <T extends Record<string, any>>(data: {
119
+ input: T;
120
120
  response: typeof import("@esportsplus/action").default;
121
121
  }) => Promise<{
122
122
  errors: import("@esportsplus/action").Response<unknown>["errors"];
@@ -242,8 +242,8 @@ declare const _default: {
242
242
  onwebkittransitionend?: ((this: import("@esportsplus/template").Element, event: Event) => void) | undefined;
243
243
  onwheel?: ((this: import("@esportsplus/template").Element, event: WheelEvent) => void) | undefined;
244
244
  } & Record<PropertyKey, unknown> & {
245
- action: (data: {
246
- input: Record<string, any>;
245
+ action: <T extends Record<string, any>>(data: {
246
+ input: T;
247
247
  response: typeof import("@esportsplus/action").default;
248
248
  }) => Promise<{
249
249
  errors: import("@esportsplus/action").Response<unknown>["errors"];
@@ -368,8 +368,8 @@ declare const _default: {
368
368
  onwebkittransitionend?: ((this: import("@esportsplus/template").Element, event: Event) => void) | undefined;
369
369
  onwheel?: ((this: import("@esportsplus/template").Element, event: WheelEvent) => void) | undefined;
370
370
  } & Record<PropertyKey, unknown> & {
371
- action: (data: {
372
- input: Record<string, any>;
371
+ action: <T_1 extends Record<string, any>>(data: {
372
+ input: T_1;
373
373
  response: typeof import("@esportsplus/action").default;
374
374
  }) => Promise<{
375
375
  errors: import("@esportsplus/action").Response<unknown>["errors"];
@@ -494,8 +494,8 @@ declare const _default: {
494
494
  onwebkittransitionend?: ((this: import("@esportsplus/template").Element, event: Event) => void) | undefined;
495
495
  onwheel?: ((this: import("@esportsplus/template").Element, event: WheelEvent) => void) | undefined;
496
496
  } & Record<PropertyKey, unknown> & {
497
- action: (data: {
498
- input: Record<string, any>;
497
+ action: <T_1 extends Record<string, any>>(data: {
498
+ input: T_1;
499
499
  response: typeof import("@esportsplus/action").default;
500
500
  }) => Promise<{
501
501
  errors: import("@esportsplus/action").Response<unknown>["errors"];
@@ -621,8 +621,8 @@ declare const _default: {
621
621
  onwebkittransitionend?: ((this: import("@esportsplus/template").Element, event: Event) => void) | undefined;
622
622
  onwheel?: ((this: import("@esportsplus/template").Element, event: WheelEvent) => void) | undefined;
623
623
  } & Record<PropertyKey, unknown> & {
624
- action: (data: {
625
- input: Record<string, any>;
624
+ action: <T_1 extends Record<string, any>>(data: {
625
+ input: T_1;
626
626
  response: typeof import("@esportsplus/action").default;
627
627
  }) => Promise<{
628
628
  errors: import("@esportsplus/action").Response<unknown>["errors"];
@@ -748,8 +748,8 @@ declare const _default: {
748
748
  onwebkittransitionend?: ((this: import("@esportsplus/template").Element, event: Event) => void) | undefined;
749
749
  onwheel?: ((this: import("@esportsplus/template").Element, event: WheelEvent) => void) | undefined;
750
750
  } & Record<PropertyKey, unknown> & {
751
- action: (data: {
752
- input: Record<string, any>;
751
+ action: <T_1 extends Record<string, any>>(data: {
752
+ input: T_1;
753
753
  response: typeof import("@esportsplus/action").default;
754
754
  }) => Promise<{
755
755
  errors: import("@esportsplus/action").Response<unknown>["errors"];
@@ -875,8 +875,8 @@ declare const _default: {
875
875
  onwebkittransitionend?: ((this: import("@esportsplus/template").Element, event: Event) => void) | undefined;
876
876
  onwheel?: ((this: import("@esportsplus/template").Element, event: WheelEvent) => void) | undefined;
877
877
  } & Record<PropertyKey, unknown> & {
878
- action: (data: {
879
- input: Record<string, any>;
878
+ action: <T_1 extends Record<string, any>>(data: {
879
+ input: T_1;
880
880
  response: typeof import("@esportsplus/action").default;
881
881
  }) => Promise<{
882
882
  errors: import("@esportsplus/action").Response<unknown>["errors"];
@@ -1001,8 +1001,8 @@ declare const _default: {
1001
1001
  onwebkittransitionend?: ((this: import("@esportsplus/template").Element, event: Event) => void) | undefined;
1002
1002
  onwheel?: ((this: import("@esportsplus/template").Element, event: WheelEvent) => void) | undefined;
1003
1003
  } & Record<PropertyKey, unknown> & {
1004
- action: (data: {
1005
- input: Record<string, any>;
1004
+ action: <T extends Record<string, any>>(data: {
1005
+ input: T;
1006
1006
  response: typeof import("@esportsplus/action").default;
1007
1007
  }) => Promise<{
1008
1008
  errors: import("@esportsplus/action").Response<unknown>["errors"];
@@ -1127,8 +1127,8 @@ declare const _default: {
1127
1127
  onwebkittransitionend?: ((this: import("@esportsplus/template").Element, event: Event) => void) | undefined;
1128
1128
  onwheel?: ((this: import("@esportsplus/template").Element, event: WheelEvent) => void) | undefined;
1129
1129
  } & Record<PropertyKey, unknown> & {
1130
- action: (data: {
1131
- input: Record<string, any>;
1130
+ action: <T extends Record<string, any>>(data: {
1131
+ input: T;
1132
1132
  response: typeof import("@esportsplus/action").default;
1133
1133
  }) => Promise<{
1134
1134
  errors: import("@esportsplus/action").Response<unknown>["errors"];
@@ -1254,8 +1254,8 @@ declare const _default: {
1254
1254
  onwebkittransitionend?: ((this: import("@esportsplus/template").Element, event: Event) => void) | undefined;
1255
1255
  onwheel?: ((this: import("@esportsplus/template").Element, event: WheelEvent) => void) | undefined;
1256
1256
  } & Record<PropertyKey, unknown> & {
1257
- action: (data: {
1258
- input: Record<string, any>;
1257
+ action: <T extends Record<string, any>>(data: {
1258
+ input: T;
1259
1259
  response: typeof import("@esportsplus/action").default;
1260
1260
  }) => Promise<{
1261
1261
  errors: import("@esportsplus/action").Response<unknown>["errors"];
package/package.json CHANGED
@@ -3,8 +3,8 @@
3
3
  "dependencies": {
4
4
  "@esportsplus/action": "^0.0.58",
5
5
  "@esportsplus/queue": "^0.1.0",
6
- "@esportsplus/reactivity": "^0.17.2",
7
- "@esportsplus/template": "^0.26.1",
6
+ "@esportsplus/reactivity": "^0.18.0",
7
+ "@esportsplus/template": "^0.26.2",
8
8
  "@esportsplus/utilities": "^0.22.2",
9
9
  "modern-normalize": "^3.0.1"
10
10
  },
@@ -42,7 +42,7 @@
42
42
  "private": false,
43
43
  "sideEffects": false,
44
44
  "type": "module",
45
- "version": "0.34.8",
45
+ "version": "0.35.0",
46
46
  "scripts": {
47
47
  "build": "run-s build:vite build:ts",
48
48
  "build:ts": "tsc && tsc-alias",
@@ -7,12 +7,12 @@ import input from './input';
7
7
 
8
8
  type A = Attributes & { action: Action, state?: { processing: boolean } };
9
9
 
10
- type Action = (data: Payload) => Promise<Errors> | Errors;
10
+ type Action = <T extends Record<string, any>>(data: Payload<T>) => Promise<Errors> | Errors;
11
11
 
12
12
  type Errors = { errors: Response<unknown>['errors'] };
13
13
 
14
- type Payload = {
15
- input: Record<string, any>;
14
+ type Payload<T extends Record<string, any>> = {
15
+ input: T;
16
16
  response: typeof response;
17
17
  };
18
18