5htp-core 0.3.6-3 → 0.3.6-4

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "5htp-core",
3
3
  "description": "Convenient TypeScript framework designed for Performance and Productivity.",
4
- "version": "0.3.6-3",
4
+ "version": "0.3.6-4",
5
5
  "author": "Gaetan Le Gac (https://github.com/gaetanlegac)",
6
6
  "repository": "git://github.com/gaetanlegac/5htp-core.git",
7
7
  "license": "MIT",
@@ -11,6 +11,9 @@ import type { Schema } from '@common/validation';
11
11
  import type { TValidationResult } from '@common/validation/schema';
12
12
  import useContext from '@/client/context';
13
13
 
14
+ // Exports
15
+ export type { TValidationResult, TSchemaData } from '@common/validation/schema';
16
+
14
17
  /*----------------------------------
15
18
  - TYPES
16
19
  ----------------------------------*/
@@ -23,7 +26,7 @@ type TFormOptions<TFormData extends {}> = {
23
26
  }
24
27
  }
25
28
 
26
- type FieldsAttrs<TFormData extends {}> = {
29
+ export type FieldsAttrs<TFormData extends {}> = {
27
30
  [fieldName in keyof TFormData]: {}
28
31
  }
29
32
 
@@ -33,6 +33,9 @@ export type TValidationResult<TFields extends TSchemaFields> = {
33
33
  erreurs: TListeErreursSaisie
34
34
  }
35
35
 
36
+ export type TSchemaData<TSchema extends Schema<{}>> =
37
+ TValidationResult<TSchema["fields"]>
38
+
36
39
  export type TValidatedData<TFields extends TSchemaFields> = {
37
40
  // For each field, the values returned by validator.validate()
38
41
  [name in keyof TFields]: ReturnType<TFields[name]["validate"]>
@@ -22,7 +22,6 @@ import Validator, { TValidator } from './validator'
22
22
 
23
23
  // Components
24
24
  import NumberInput from '@client/components/input/Number';
25
- import Dropdown from '@client/components/dropdown.old';
26
25
 
27
26
  /*----------------------------------
28
27
  - TYPES