@fluxhub/fluxhub-lib 19.0.242 → 19.0.243

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.
@@ -18,7 +18,10 @@ export type WkfFieldType = 'string' | 'int' | 'decimal' | 'date' | 'datetime' |
18
18
  * gia' oggi (vedi wkf-form-data.ts, il ramo `if (arr[i].types == '...')` per
19
19
  * ciascun tipo chiama uti_s.sql_date/sql_date_time o fa un cast a stringa, e
20
20
  * se il valore era gia' una stringa nel formato giusto la passa cosi' com'e').
21
- * `| null` copre i campi non valorizzati (save_agg() li manda come 'dbnull').
21
+ * `| null | undefined` copre i campi non valorizzati (save_agg() li manda
22
+ * come 'dbnull' con `== null`, che in JS e' vero per entrambi): `undefined`
23
+ * non e' un caso raro, e' cio' che produce `this.qualcheControllo?.getValue()`
24
+ * su un campo non ancora renderizzato, pattern usatissimo nei form concreti.
22
25
  *
23
26
  * Discriminato su `types`: assegnare `values: true` a un campo `types: 'datetime'`
24
27
  * e' un errore di compilazione. Non e' un vincolo nuovo, e' quello che
@@ -27,19 +30,19 @@ export type WkfFieldType = 'string' | 'int' | 'decimal' | 'date' | 'datetime' |
27
30
  export type WkfFieldValue = {
28
31
  types: 'string' | 'cblob';
29
32
  names: string;
30
- values: string | null;
33
+ values: string | null | undefined;
31
34
  } | {
32
35
  types: 'int' | 'decimal';
33
36
  names: string;
34
- values: number | string | null;
37
+ values: number | string | null | undefined;
35
38
  } | {
36
39
  types: 'boolean';
37
40
  names: string;
38
- values: boolean | string | null;
41
+ values: boolean | string | null | undefined;
39
42
  } | {
40
43
  types: 'date' | 'datetime';
41
44
  names: string;
42
- values: Date | string | null;
45
+ values: Date | string | null | undefined;
43
46
  };
44
47
  /**
45
48
  * Costruisce un WkfFieldValue, con `values` vincolato al ramo giusto in base
@@ -60,7 +63,7 @@ export type WkfFieldValue = {
60
63
  *
61
64
  * p.push(wkfField('boolean', 'verifica_tecnico', this.m_obj.verifica_tecnico));
62
65
  */
63
- export declare function wkfField(types: 'string' | 'cblob', names: string, values: string | null): WkfFieldValue;
64
- export declare function wkfField(types: 'int' | 'decimal', names: string, values: number | string | null): WkfFieldValue;
65
- export declare function wkfField(types: 'boolean', names: string, values: boolean | string | null): WkfFieldValue;
66
- export declare function wkfField(types: 'date' | 'datetime', names: string, values: Date | string | null): WkfFieldValue;
66
+ export declare function wkfField(types: 'string' | 'cblob', names: string, values: string | null | undefined): WkfFieldValue;
67
+ export declare function wkfField(types: 'int' | 'decimal', names: string, values: number | string | null | undefined): WkfFieldValue;
68
+ export declare function wkfField(types: 'boolean', names: string, values: boolean | string | null | undefined): WkfFieldValue;
69
+ export declare function wkfField(types: 'date' | 'datetime', names: string, values: Date | string | null | undefined): WkfFieldValue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluxhub/fluxhub-lib",
3
- "version": "19.0.242",
3
+ "version": "19.0.243",
4
4
  "description": "FluxHub components and workflow library",
5
5
  "main": "dist/index.js",
6
6
  "typings": "index.d.ts",