@esportsplus/ui 0.35.6 → 0.35.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.
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import response, { Response } from '@esportsplus/action';
|
|
2
2
|
import { Attributes } from '@esportsplus/template';
|
|
3
3
|
type A = {
|
|
4
|
-
action: (
|
|
5
|
-
input:
|
|
4
|
+
action: (data: {
|
|
5
|
+
input: Record<string, any>;
|
|
6
6
|
response: typeof response;
|
|
7
|
-
}) => (Promise<Errors> | Errors)
|
|
7
|
+
}) => (Promise<Errors> | Errors);
|
|
8
8
|
state?: {
|
|
9
9
|
processing: boolean;
|
|
10
10
|
};
|
|
@@ -2,14 +2,14 @@ declare const _default: {
|
|
|
2
2
|
action: {
|
|
3
3
|
(): ReturnType<(this: {
|
|
4
4
|
attributes?: ({
|
|
5
|
-
action: (
|
|
6
|
-
input:
|
|
5
|
+
action: (data: {
|
|
6
|
+
input: Record<string, any>;
|
|
7
7
|
response: typeof import("@esportsplus/action").default;
|
|
8
8
|
}) => (Promise<{
|
|
9
9
|
errors: import("@esportsplus/action").Response<unknown>["errors"];
|
|
10
10
|
}> | {
|
|
11
11
|
errors: import("@esportsplus/action").Response<unknown>["errors"];
|
|
12
|
-
})
|
|
12
|
+
});
|
|
13
13
|
state?: {
|
|
14
14
|
processing: boolean;
|
|
15
15
|
};
|
|
@@ -129,14 +129,14 @@ declare const _default: {
|
|
|
129
129
|
} & Record<PropertyKey, unknown>) | undefined;
|
|
130
130
|
content?: import("@esportsplus/template").Renderable<any>;
|
|
131
131
|
}, attributes: Readonly<{
|
|
132
|
-
action: (
|
|
133
|
-
input:
|
|
132
|
+
action: (data: {
|
|
133
|
+
input: Record<string, any>;
|
|
134
134
|
response: typeof import("@esportsplus/action").default;
|
|
135
135
|
}) => (Promise<{
|
|
136
136
|
errors: import("@esportsplus/action").Response<unknown>["errors"];
|
|
137
137
|
}> | {
|
|
138
138
|
errors: import("@esportsplus/action").Response<unknown>["errors"];
|
|
139
|
-
})
|
|
139
|
+
});
|
|
140
140
|
state?: {
|
|
141
141
|
processing: boolean;
|
|
142
142
|
};
|
|
@@ -255,14 +255,14 @@ declare const _default: {
|
|
|
255
255
|
onwheel?: ((this: import("@esportsplus/template").Element, event: WheelEvent) => void) | undefined;
|
|
256
256
|
} & Record<PropertyKey, unknown>>, content: import("@esportsplus/template").Renderable<any>) => import("@esportsplus/template").Renderable<any>>;
|
|
257
257
|
<T extends {
|
|
258
|
-
action: (
|
|
259
|
-
input:
|
|
258
|
+
action: (data: {
|
|
259
|
+
input: Record<string, any>;
|
|
260
260
|
response: typeof import("@esportsplus/action").default;
|
|
261
261
|
}) => (Promise<{
|
|
262
262
|
errors: import("@esportsplus/action").Response<unknown>["errors"];
|
|
263
263
|
}> | {
|
|
264
264
|
errors: import("@esportsplus/action").Response<unknown>["errors"];
|
|
265
|
-
})
|
|
265
|
+
});
|
|
266
266
|
state?: {
|
|
267
267
|
processing: boolean;
|
|
268
268
|
};
|
|
@@ -381,14 +381,14 @@ declare const _default: {
|
|
|
381
381
|
onwheel?: ((this: import("@esportsplus/template").Element, event: WheelEvent) => void) | undefined;
|
|
382
382
|
} & Record<PropertyKey, unknown>>(attributes: T): ReturnType<(this: {
|
|
383
383
|
attributes?: ({
|
|
384
|
-
action: (
|
|
385
|
-
input:
|
|
384
|
+
action: (data: {
|
|
385
|
+
input: Record<string, any>;
|
|
386
386
|
response: typeof import("@esportsplus/action").default;
|
|
387
387
|
}) => (Promise<{
|
|
388
388
|
errors: import("@esportsplus/action").Response<unknown>["errors"];
|
|
389
389
|
}> | {
|
|
390
390
|
errors: import("@esportsplus/action").Response<unknown>["errors"];
|
|
391
|
-
})
|
|
391
|
+
});
|
|
392
392
|
state?: {
|
|
393
393
|
processing: boolean;
|
|
394
394
|
};
|
|
@@ -508,14 +508,14 @@ declare const _default: {
|
|
|
508
508
|
} & Record<PropertyKey, unknown>) | undefined;
|
|
509
509
|
content?: import("@esportsplus/template").Renderable<any>;
|
|
510
510
|
}, attributes: Readonly<{
|
|
511
|
-
action: (
|
|
512
|
-
input:
|
|
511
|
+
action: (data: {
|
|
512
|
+
input: Record<string, any>;
|
|
513
513
|
response: typeof import("@esportsplus/action").default;
|
|
514
514
|
}) => (Promise<{
|
|
515
515
|
errors: import("@esportsplus/action").Response<unknown>["errors"];
|
|
516
516
|
}> | {
|
|
517
517
|
errors: import("@esportsplus/action").Response<unknown>["errors"];
|
|
518
|
-
})
|
|
518
|
+
});
|
|
519
519
|
state?: {
|
|
520
520
|
processing: boolean;
|
|
521
521
|
};
|
|
@@ -635,14 +635,14 @@ declare const _default: {
|
|
|
635
635
|
} & Record<PropertyKey, unknown>>, content: import("@esportsplus/template").Renderable<any>) => import("@esportsplus/template").Renderable<any>>;
|
|
636
636
|
<T extends import("@esportsplus/template").Renderable<any>>(content: T): ReturnType<(this: {
|
|
637
637
|
attributes?: ({
|
|
638
|
-
action: (
|
|
639
|
-
input:
|
|
638
|
+
action: (data: {
|
|
639
|
+
input: Record<string, any>;
|
|
640
640
|
response: typeof import("@esportsplus/action").default;
|
|
641
641
|
}) => (Promise<{
|
|
642
642
|
errors: import("@esportsplus/action").Response<unknown>["errors"];
|
|
643
643
|
}> | {
|
|
644
644
|
errors: import("@esportsplus/action").Response<unknown>["errors"];
|
|
645
|
-
})
|
|
645
|
+
});
|
|
646
646
|
state?: {
|
|
647
647
|
processing: boolean;
|
|
648
648
|
};
|
|
@@ -762,14 +762,14 @@ declare const _default: {
|
|
|
762
762
|
} & Record<PropertyKey, unknown>) | undefined;
|
|
763
763
|
content?: import("@esportsplus/template").Renderable<any>;
|
|
764
764
|
}, attributes: Readonly<{
|
|
765
|
-
action: (
|
|
766
|
-
input:
|
|
765
|
+
action: (data: {
|
|
766
|
+
input: Record<string, any>;
|
|
767
767
|
response: typeof import("@esportsplus/action").default;
|
|
768
768
|
}) => (Promise<{
|
|
769
769
|
errors: import("@esportsplus/action").Response<unknown>["errors"];
|
|
770
770
|
}> | {
|
|
771
771
|
errors: import("@esportsplus/action").Response<unknown>["errors"];
|
|
772
|
-
})
|
|
772
|
+
});
|
|
773
773
|
state?: {
|
|
774
774
|
processing: boolean;
|
|
775
775
|
};
|
|
@@ -888,14 +888,14 @@ declare const _default: {
|
|
|
888
888
|
onwheel?: ((this: import("@esportsplus/template").Element, event: WheelEvent) => void) | undefined;
|
|
889
889
|
} & Record<PropertyKey, unknown>>, content: import("@esportsplus/template").Renderable<any>) => import("@esportsplus/template").Renderable<any>>;
|
|
890
890
|
(attributes: {
|
|
891
|
-
action: (
|
|
892
|
-
input:
|
|
891
|
+
action: (data: {
|
|
892
|
+
input: Record<string, any>;
|
|
893
893
|
response: typeof import("@esportsplus/action").default;
|
|
894
894
|
}) => (Promise<{
|
|
895
895
|
errors: import("@esportsplus/action").Response<unknown>["errors"];
|
|
896
896
|
}> | {
|
|
897
897
|
errors: import("@esportsplus/action").Response<unknown>["errors"];
|
|
898
|
-
})
|
|
898
|
+
});
|
|
899
899
|
state?: {
|
|
900
900
|
processing: boolean;
|
|
901
901
|
};
|
|
@@ -1014,14 +1014,14 @@ declare const _default: {
|
|
|
1014
1014
|
onwheel?: ((this: import("@esportsplus/template").Element, event: WheelEvent) => void) | undefined;
|
|
1015
1015
|
} & Record<PropertyKey, unknown>, content: import("@esportsplus/template").Renderable<any>): ReturnType<(this: {
|
|
1016
1016
|
attributes?: ({
|
|
1017
|
-
action: (
|
|
1018
|
-
input:
|
|
1017
|
+
action: (data: {
|
|
1018
|
+
input: Record<string, any>;
|
|
1019
1019
|
response: typeof import("@esportsplus/action").default;
|
|
1020
1020
|
}) => (Promise<{
|
|
1021
1021
|
errors: import("@esportsplus/action").Response<unknown>["errors"];
|
|
1022
1022
|
}> | {
|
|
1023
1023
|
errors: import("@esportsplus/action").Response<unknown>["errors"];
|
|
1024
|
-
})
|
|
1024
|
+
});
|
|
1025
1025
|
state?: {
|
|
1026
1026
|
processing: boolean;
|
|
1027
1027
|
};
|
|
@@ -1141,14 +1141,14 @@ declare const _default: {
|
|
|
1141
1141
|
} & Record<PropertyKey, unknown>) | undefined;
|
|
1142
1142
|
content?: import("@esportsplus/template").Renderable<any>;
|
|
1143
1143
|
}, attributes: Readonly<{
|
|
1144
|
-
action: (
|
|
1145
|
-
input:
|
|
1144
|
+
action: (data: {
|
|
1145
|
+
input: Record<string, any>;
|
|
1146
1146
|
response: typeof import("@esportsplus/action").default;
|
|
1147
1147
|
}) => (Promise<{
|
|
1148
1148
|
errors: import("@esportsplus/action").Response<unknown>["errors"];
|
|
1149
1149
|
}> | {
|
|
1150
1150
|
errors: import("@esportsplus/action").Response<unknown>["errors"];
|
|
1151
|
-
})
|
|
1151
|
+
});
|
|
1152
1152
|
state?: {
|
|
1153
1153
|
processing: boolean;
|
|
1154
1154
|
};
|
package/package.json
CHANGED
|
@@ -6,12 +6,7 @@ import input from './input';
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
type A = {
|
|
9
|
-
action: (<
|
|
10
|
-
T extends Record<string, unknown>>(data: {
|
|
11
|
-
input: T;
|
|
12
|
-
response: typeof response;
|
|
13
|
-
}) => (Promise<Errors> | Errors)
|
|
14
|
-
),
|
|
9
|
+
action: (data: { input: Record<string, any>, response: typeof response }) => (Promise<Errors> | Errors),
|
|
15
10
|
state?: { processing: boolean }
|
|
16
11
|
} & Attributes;
|
|
17
12
|
|
|
@@ -81,9 +76,9 @@ export default template.factory<A>(
|
|
|
81
76
|
}
|
|
82
77
|
|
|
83
78
|
let { errors } = await action({
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
79
|
+
input: parse( new FormData( this as any as HTMLFormElement ).entries() ),
|
|
80
|
+
response
|
|
81
|
+
});
|
|
87
82
|
|
|
88
83
|
for (let i = 0, n = errors.length; i < n; i++) {
|
|
89
84
|
let { message, path } = errors[i],
|