@devvit/public-api 0.10.19-next-2024-04-04-1e753cc74.0 → 0.10.19-next-2024-04-04-00326d826.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useForm.d.ts","sourceRoot":"","sources":["../../../../../src/devvit/internals/blocks/handler/useForm.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAsB,OAAO,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,KAAK,EAAE,IAAI,EAAkB,YAAY,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;
|
1
|
+
{"version":3,"file":"useForm.d.ts","sourceRoot":"","sources":["../../../../../src/devvit/internals/blocks/handler/useForm.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAsB,OAAO,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,KAAK,EAAE,IAAI,EAAkB,YAAY,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AA2BpG,wBAAgB,OAAO,CACrB,IAAI,EAAE,IAAI,GAAG,YAAY,EACzB,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,GACrD,OAAO,CAMT;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAE1D;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAG1D;AAED,wBAAgB,iBAAiB,CAAC,aAAa,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO,GAAG,UAAU,CAG5F"}
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { registerHook } from './BlocksHandler.js';
|
2
|
+
import { getFormValues } from '../../../../apis/ui/helpers/getFormValues.js';
|
2
3
|
class UseFormHook {
|
3
4
|
constructor(params, form, onSubmit) {
|
4
5
|
this.state = null;
|
@@ -7,7 +8,7 @@ class UseFormHook {
|
|
7
8
|
this.onSubmit = onSubmit;
|
8
9
|
this.onUIEvent = async (event) => {
|
9
10
|
if (event.formSubmitted) {
|
10
|
-
await onSubmit(event.formSubmitted.results);
|
11
|
+
await onSubmit(getFormValues(event.formSubmitted.results));
|
11
12
|
}
|
12
13
|
};
|
13
14
|
}
|
package/meta.json
CHANGED
@@ -13729,12 +13729,17 @@
|
|
13729
13729
|
"format": "esm"
|
13730
13730
|
},
|
13731
13731
|
"src/devvit/internals/blocks/handler/useForm.ts": {
|
13732
|
-
"bytes":
|
13732
|
+
"bytes": 1882,
|
13733
13733
|
"imports": [
|
13734
13734
|
{
|
13735
13735
|
"path": "src/devvit/internals/blocks/handler/BlocksHandler.ts",
|
13736
13736
|
"kind": "import-statement",
|
13737
13737
|
"original": "./BlocksHandler.js"
|
13738
|
+
},
|
13739
|
+
{
|
13740
|
+
"path": "src/apis/ui/helpers/getFormValues.ts",
|
13741
|
+
"kind": "import-statement",
|
13742
|
+
"original": "../../../../apis/ui/helpers/getFormValues.js"
|
13738
13743
|
}
|
13739
13744
|
],
|
13740
13745
|
"format": "esm"
|
@@ -15838,7 +15843,7 @@
|
|
15838
15843
|
"bytesInOutput": 2317
|
15839
15844
|
},
|
15840
15845
|
"src/devvit/internals/blocks/handler/useForm.ts": {
|
15841
|
-
"bytesInOutput":
|
15846
|
+
"bytesInOutput": 915
|
15842
15847
|
},
|
15843
15848
|
"src/devvit/internals/blocks/handler/UIClient.ts": {
|
15844
15849
|
"bytesInOutput": 2049
|
@@ -15928,7 +15933,7 @@
|
|
15928
15933
|
"bytesInOutput": 370
|
15929
15934
|
}
|
15930
15935
|
},
|
15931
|
-
"bytes":
|
15936
|
+
"bytes": 14451050
|
15932
15937
|
}
|
15933
15938
|
}
|
15934
15939
|
}
|
package/meta.min.json
CHANGED
@@ -3648,12 +3648,17 @@
|
|
3648
3648
|
"format": "esm"
|
3649
3649
|
},
|
3650
3650
|
"src/devvit/internals/blocks/handler/useForm.ts": {
|
3651
|
-
"bytes":
|
3651
|
+
"bytes": 1882,
|
3652
3652
|
"imports": [
|
3653
3653
|
{
|
3654
3654
|
"path": "src/devvit/internals/blocks/handler/BlocksHandler.ts",
|
3655
3655
|
"kind": "import-statement",
|
3656
3656
|
"original": "./BlocksHandler.js"
|
3657
|
+
},
|
3658
|
+
{
|
3659
|
+
"path": "src/apis/ui/helpers/getFormValues.ts",
|
3660
|
+
"kind": "import-statement",
|
3661
|
+
"original": "../../../../apis/ui/helpers/getFormValues.js"
|
3657
3662
|
}
|
3658
3663
|
],
|
3659
3664
|
"format": "esm"
|
@@ -4630,7 +4635,7 @@
|
|
4630
4635
|
"imports": [],
|
4631
4636
|
"exports": [],
|
4632
4637
|
"inputs": {},
|
4633
|
-
"bytes":
|
4638
|
+
"bytes": 1223432
|
4634
4639
|
},
|
4635
4640
|
"dist/public-api.min.js": {
|
4636
4641
|
"imports": [
|
@@ -5344,7 +5349,7 @@
|
|
5344
5349
|
"bytesInOutput": 974
|
5345
5350
|
},
|
5346
5351
|
"src/devvit/internals/blocks/handler/useForm.ts": {
|
5347
|
-
"bytesInOutput":
|
5352
|
+
"bytesInOutput": 422
|
5348
5353
|
},
|
5349
5354
|
"src/devvit/internals/blocks/handler/ContextBuilder.ts": {
|
5350
5355
|
"bytesInOutput": 446
|
@@ -5422,7 +5427,7 @@
|
|
5422
5427
|
"bytesInOutput": 178
|
5423
5428
|
}
|
5424
5429
|
},
|
5425
|
-
"bytes":
|
5430
|
+
"bytes": 260695
|
5426
5431
|
}
|
5427
5432
|
}
|
5428
5433
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@devvit/public-api",
|
3
|
-
"version": "0.10.19-next-2024-04-04-
|
3
|
+
"version": "0.10.19-next-2024-04-04-00326d826.0",
|
4
4
|
"license": "BSD-3-Clause",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -29,9 +29,9 @@
|
|
29
29
|
},
|
30
30
|
"types": "./index.d.ts",
|
31
31
|
"dependencies": {
|
32
|
-
"@devvit/protos": "0.10.19-next-2024-04-04-
|
33
|
-
"@devvit/runtimes": "0.10.19-next-2024-04-04-
|
34
|
-
"@devvit/shared-types": "0.10.19-next-2024-04-04-
|
32
|
+
"@devvit/protos": "0.10.19-next-2024-04-04-00326d826.0",
|
33
|
+
"@devvit/runtimes": "0.10.19-next-2024-04-04-00326d826.0",
|
34
|
+
"@devvit/shared-types": "0.10.19-next-2024-04-04-00326d826.0",
|
35
35
|
"base64-js": "1.5.1",
|
36
36
|
"clone-deep": "4.0.1",
|
37
37
|
"core-js": "3.27.2",
|
@@ -41,7 +41,7 @@
|
|
41
41
|
"@ampproject/filesize": "4.3.0",
|
42
42
|
"@devvit/eslint-config": "0.10.18",
|
43
43
|
"@devvit/repo-tools": "0.10.18",
|
44
|
-
"@devvit/tsconfig": "0.10.19-next-2024-04-04-
|
44
|
+
"@devvit/tsconfig": "0.10.19-next-2024-04-04-00326d826.0",
|
45
45
|
"@microsoft/api-extractor": "7.41.0",
|
46
46
|
"@reddit/faceplate-ui": "11.1.0",
|
47
47
|
"@types/clone-deep": "4.0.1",
|
@@ -63,5 +63,5 @@
|
|
63
63
|
}
|
64
64
|
},
|
65
65
|
"source": "./src/index.ts",
|
66
|
-
"gitHead": "
|
66
|
+
"gitHead": "27b5bf949b2c007d3f38e4c17e8c1210e7ce0f76"
|
67
67
|
}
|