@open-xamu-co/ui-common-types 3.0.0-next.7 → 3.0.0-next.9

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-xamu-co/ui-common-types",
3
- "version": "3.0.0-next.7",
3
+ "version": "3.0.0-next.9",
4
4
  "description": "Xamu shared types",
5
5
  "author": "@xamu-co",
6
6
  "main": "src/index.ts",
package/src/fetch.ts CHANGED
@@ -45,4 +45,4 @@ export type tHydrate<T> = (c: T, e?: unknown) => void;
45
45
 
46
46
  export type iGetPage<T, C extends string | number = string> = (
47
47
  params?: iPagination
48
- ) => Promise<iPage<T, C>>;
48
+ ) => Promise<iPage<T, C> | undefined>;
package/src/form.ts CHANGED
@@ -103,21 +103,12 @@ export type iFormValue = string | number | boolean | File;
103
103
  export interface iFormInputDefault<T extends eFormTypeSimple | eFormTypeComplex = eFormTypeSimple> {
104
104
  required?: boolean;
105
105
  type?: T;
106
- options?: (string | number | iFormOption)[];
107
106
  /**
108
107
  * String without the dots
109
108
  */
110
109
  placeholder?: string;
111
110
  icon?: IconName | tFormIcon;
112
111
  autocomplete?: tFormAutocomplete;
113
- /**
114
- * if muliple is set to true this optional value would be the required minimun amount of values
115
- */
116
- min?: number;
117
- /**
118
- * if multiple is set to true this optional value would be the mandatory maximun amount of values
119
- */
120
- max?: number;
121
112
  }
122
113
 
123
114
  /**
@@ -126,6 +117,7 @@ export interface iFormInputDefault<T extends eFormTypeSimple | eFormTypeComplex
126
117
  export interface iFormInput<V extends iFormValue = iFormValue>
127
118
  extends iFormInputDefault<eFormTypeSimple | eFormTypeComplex> {
128
119
  name: string;
120
+ options?: (string | number | iFormOption)[];
129
121
  /**
130
122
  * An array of values to simplify validation
131
123
  *
@@ -144,6 +136,14 @@ export interface iFormInput<V extends iFormValue = iFormValue>
144
136
  * Ex: { multiple: true, min:3, max:3 } would make 3 values a requirement
145
137
  */
146
138
  multiple?: boolean;
139
+ /**
140
+ * if muliple is set to true this optional value would be the required minimun amount of values
141
+ */
142
+ min?: number;
143
+ /**
144
+ * if multiple is set to true this optional value would be the mandatory maximun amount of values
145
+ */
146
+ max?: number;
147
147
  }
148
148
 
149
149
  /**
package/src/locale.ts CHANGED
@@ -53,7 +53,11 @@ export type tLocaleBase = {
53
53
  cancel: string;
54
54
  /** @example "Continue" */
55
55
  continue: string;
56
- /** @example "¡Connection error!" */
56
+ /** @example "Error!" */
57
+ error: string;
58
+ /** @example "Something went wrong!" */
59
+ error_message: string;
60
+ /** @example "Connection error!" */
57
61
  connection_error: string;
58
62
  /** @example "The server is not responding. Please check your network or try again later" */
59
63
  connection_error_message: string;
package/src/plugin.ts CHANGED
@@ -108,9 +108,11 @@ export interface iPluginOptions<ComponentType = unknown> {
108
108
  /**
109
109
  * Countries API base endpoint
110
110
  *
111
- * Get better performance with the nuxt module
111
+ * If using nuxt, get better performance with the module
112
112
  * @see https://www.npmjs.com/package/nuxt-countries-api
113
113
  *
114
+ * Using an absolute path will enable the module
115
+ *
114
116
  * @default "https://countries.xamu.com.co/api/v1"
115
117
  */
116
118
  countriesUrl?: string;