@ram_28/kf-ai-sdk 2.0.1 → 2.0.3
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/README.md +36 -39
- package/dist/BaseField-B6da88U7.js +40 -0
- package/dist/BaseField-Drp0-OxL.cjs +1 -0
- package/dist/api/client.d.ts +7 -0
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/metadata.d.ts +26 -22
- package/dist/api/metadata.d.ts.map +1 -1
- package/dist/api.cjs +1 -1
- package/dist/api.mjs +3 -3
- package/dist/auth.cjs +1 -1
- package/dist/auth.mjs +2 -2
- package/dist/base-types.d.ts +1 -1
- package/dist/base-types.d.ts.map +1 -1
- package/dist/bdo/core/BaseBdo.d.ts +12 -20
- package/dist/bdo/core/BaseBdo.d.ts.map +1 -1
- package/dist/bdo/core/Item.d.ts +8 -44
- package/dist/bdo/core/Item.d.ts.map +1 -1
- package/dist/bdo/core/types.d.ts +124 -41
- package/dist/bdo/core/types.d.ts.map +1 -1
- package/dist/bdo/fields/ArrayField.d.ts +5 -4
- package/dist/bdo/fields/ArrayField.d.ts.map +1 -1
- package/dist/bdo/fields/BaseField.d.ts +14 -19
- package/dist/bdo/fields/BaseField.d.ts.map +1 -1
- package/dist/bdo/fields/BooleanField.d.ts +3 -4
- package/dist/bdo/fields/BooleanField.d.ts.map +1 -1
- package/dist/bdo/fields/DateField.d.ts +3 -4
- package/dist/bdo/fields/DateField.d.ts.map +1 -1
- package/dist/bdo/fields/DateTimeField.d.ts +5 -4
- package/dist/bdo/fields/DateTimeField.d.ts.map +1 -1
- package/dist/bdo/fields/FileField.d.ts +18 -0
- package/dist/bdo/fields/FileField.d.ts.map +1 -0
- package/dist/bdo/fields/NumberField.d.ts +6 -4
- package/dist/bdo/fields/NumberField.d.ts.map +1 -1
- package/dist/bdo/fields/ObjectField.d.ts +5 -4
- package/dist/bdo/fields/ObjectField.d.ts.map +1 -1
- package/dist/bdo/fields/ReferenceField.d.ts +13 -14
- package/dist/bdo/fields/ReferenceField.d.ts.map +1 -1
- package/dist/bdo/fields/SelectField.d.ts +9 -16
- package/dist/bdo/fields/SelectField.d.ts.map +1 -1
- package/dist/bdo/fields/StringField.d.ts +6 -4
- package/dist/bdo/fields/StringField.d.ts.map +1 -1
- package/dist/bdo/fields/TextAreaField.d.ts +1 -18
- package/dist/bdo/fields/TextAreaField.d.ts.map +1 -1
- package/dist/bdo/fields/TextField.d.ts +22 -0
- package/dist/bdo/fields/TextField.d.ts.map +1 -0
- package/dist/bdo/fields/UserField.d.ts +20 -0
- package/dist/bdo/fields/UserField.d.ts.map +1 -0
- package/dist/bdo/fields/index.d.ts +5 -2
- package/dist/bdo/fields/index.d.ts.map +1 -1
- package/dist/bdo/index.d.ts +2 -2
- package/dist/bdo/index.d.ts.map +1 -1
- package/dist/bdo.cjs +1 -1
- package/dist/bdo.d.ts +1 -5
- package/dist/bdo.d.ts.map +1 -1
- package/dist/bdo.mjs +286 -243
- package/dist/bdo.types.d.ts +2 -3
- package/dist/bdo.types.d.ts.map +1 -1
- package/dist/{client-BIkaIr2y.js → client-BULEEaCP.js} +84 -79
- package/dist/client-DtPpfJc1.cjs +1 -0
- package/dist/components/hooks/useFilter/useFilter.d.ts.map +1 -1
- package/dist/components/hooks/useForm/createItemProxy.d.ts.map +1 -1
- package/dist/components/hooks/useForm/createResolver.d.ts +12 -2
- package/dist/components/hooks/useForm/createResolver.d.ts.map +1 -1
- package/dist/components/hooks/useForm/index.d.ts +1 -1
- package/dist/components/hooks/useForm/index.d.ts.map +1 -1
- package/dist/components/hooks/useForm/types.d.ts +77 -8
- package/dist/components/hooks/useForm/types.d.ts.map +1 -1
- package/dist/components/hooks/useForm/useDraftInteraction.d.ts +26 -0
- package/dist/components/hooks/useForm/useDraftInteraction.d.ts.map +1 -0
- package/dist/components/hooks/useForm/useForm.d.ts +2 -27
- package/dist/components/hooks/useForm/useForm.d.ts.map +1 -1
- package/dist/components/hooks/useTable/useTable.d.ts.map +1 -1
- package/dist/{constants-DaX7GLgl.js → constants-BQrBcCON.js} +37 -13
- package/dist/constants-D0J69if5.cjs +1 -0
- package/dist/error-handling-CAoD0Kwb.cjs +1 -0
- package/dist/error-handling-CrhTtD88.js +14 -0
- package/dist/filter.cjs +1 -1
- package/dist/filter.mjs +2 -2
- package/dist/form.cjs +1 -1
- package/dist/form.d.ts +1 -1
- package/dist/form.d.ts.map +1 -1
- package/dist/form.mjs +333 -1142
- package/dist/form.types.d.ts +1 -1
- package/dist/form.types.d.ts.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm-Cj63v5ny.js +1014 -0
- package/dist/index.esm-DuwT11sx.cjs +1 -0
- package/dist/{metadata-Bz8zJqC1.cjs → metadata-BJWukIqS.cjs} +1 -1
- package/dist/{metadata-VbQzyD2C.js → metadata-CJuFxytC.js} +1 -1
- package/dist/table.cjs +1 -1
- package/dist/table.mjs +116 -122
- package/dist/types/base-fields.d.ts +24 -59
- package/dist/types/base-fields.d.ts.map +1 -1
- package/dist/types/constants.d.ts +2 -2
- package/dist/types/constants.d.ts.map +1 -1
- package/dist/useFilter-Bg0jvIL6.cjs +1 -0
- package/dist/useFilter-DPNLKY3H.js +118 -0
- package/dist/utils/formatting.d.ts +10 -1
- package/dist/utils/formatting.d.ts.map +1 -1
- package/dist/workflow/Activity.d.ts +85 -0
- package/dist/workflow/Activity.d.ts.map +1 -0
- package/dist/workflow/ActivityInstance.d.ts +96 -0
- package/dist/workflow/ActivityInstance.d.ts.map +1 -0
- package/dist/workflow/client.d.ts +39 -0
- package/dist/workflow/client.d.ts.map +1 -0
- package/dist/workflow/components/useActivityForm/createActivityItemProxy.d.ts +16 -0
- package/dist/workflow/components/useActivityForm/createActivityItemProxy.d.ts.map +1 -0
- package/dist/workflow/components/useActivityForm/createActivityResolver.d.ts +22 -0
- package/dist/workflow/components/useActivityForm/createActivityResolver.d.ts.map +1 -0
- package/dist/workflow/components/useActivityForm/index.d.ts +3 -0
- package/dist/workflow/components/useActivityForm/index.d.ts.map +1 -0
- package/dist/workflow/components/useActivityForm/types.d.ts +80 -0
- package/dist/workflow/components/useActivityForm/types.d.ts.map +1 -0
- package/dist/workflow/components/useActivityForm/useActivityForm.d.ts +4 -0
- package/dist/workflow/components/useActivityForm/useActivityForm.d.ts.map +1 -0
- package/dist/workflow/index.d.ts +8 -0
- package/dist/workflow/index.d.ts.map +1 -0
- package/dist/workflow/types.d.ts +53 -0
- package/dist/workflow/types.d.ts.map +1 -0
- package/dist/workflow.cjs +1 -0
- package/dist/workflow.d.ts +8 -0
- package/dist/workflow.d.ts.map +1 -0
- package/dist/workflow.mjs +565 -0
- package/dist/workflow.types.cjs +1 -0
- package/dist/workflow.types.d.ts +2 -0
- package/dist/workflow.types.d.ts.map +1 -0
- package/dist/workflow.types.mjs +1 -0
- package/docs/api.md +140 -572
- package/docs/bdo.md +742 -0
- package/docs/useAuth.md +10 -4
- package/docs/useFilter.md +40 -40
- package/docs/useForm.md +91 -62
- package/docs/useTable.md +38 -38
- package/docs/workflow.md +703 -0
- package/package.json +21 -1
- package/sdk/api/client.ts +77 -57
- package/sdk/api/index.ts +1 -0
- package/sdk/api/metadata.ts +22 -20
- package/sdk/base-types.ts +5 -9
- package/sdk/bdo/core/BaseBdo.ts +23 -38
- package/sdk/bdo/core/Item.ts +34 -56
- package/sdk/bdo/core/types.ts +147 -45
- package/sdk/bdo/fields/ArrayField.ts +9 -5
- package/sdk/bdo/fields/BaseField.ts +19 -29
- package/sdk/bdo/fields/BooleanField.ts +4 -5
- package/sdk/bdo/fields/DateField.ts +4 -5
- package/sdk/bdo/fields/DateTimeField.ts +9 -5
- package/sdk/bdo/fields/FileField.ts +39 -0
- package/sdk/bdo/fields/NumberField.ts +8 -5
- package/sdk/bdo/fields/ObjectField.ts +9 -5
- package/sdk/bdo/fields/ReferenceField.ts +22 -28
- package/sdk/bdo/fields/SelectField.ts +13 -26
- package/sdk/bdo/fields/StringField.ts +10 -5
- package/sdk/bdo/fields/TextAreaField.ts +3 -32
- package/sdk/bdo/fields/TextField.ts +42 -0
- package/sdk/bdo/fields/UserField.ts +52 -0
- package/sdk/bdo/fields/index.ts +5 -2
- package/sdk/bdo/index.ts +19 -4
- package/sdk/bdo.ts +4 -31
- package/sdk/bdo.types.ts +26 -21
- package/sdk/components/hooks/useFilter/useFilter.ts +13 -30
- package/sdk/components/hooks/useForm/createItemProxy.ts +47 -11
- package/sdk/components/hooks/useForm/createResolver.ts +65 -6
- package/sdk/components/hooks/useForm/index.ts +4 -0
- package/sdk/components/hooks/useForm/types.ts +92 -9
- package/sdk/components/hooks/useForm/useDraftInteraction.ts +251 -0
- package/sdk/components/hooks/useForm/useForm.ts +132 -60
- package/sdk/components/hooks/useTable/useTable.ts +10 -2
- package/sdk/form.ts +1 -12
- package/sdk/form.types.ts +1 -0
- package/sdk/index.ts +9 -3
- package/sdk/types/base-fields.ts +28 -72
- package/sdk/types/constants.ts +2 -2
- package/sdk/utils/formatting.ts +13 -1
- package/sdk/workflow/Activity.ts +181 -0
- package/sdk/workflow/ActivityInstance.ts +339 -0
- package/sdk/workflow/client.ts +208 -0
- package/sdk/workflow/components/useActivityForm/createActivityItemProxy.ts +126 -0
- package/sdk/workflow/components/useActivityForm/createActivityResolver.ts +61 -0
- package/sdk/workflow/components/useActivityForm/index.ts +5 -0
- package/sdk/workflow/components/useActivityForm/types.ts +166 -0
- package/sdk/workflow/components/useActivityForm/useActivityForm.ts +386 -0
- package/sdk/workflow/index.ts +20 -0
- package/sdk/workflow/types.ts +84 -0
- package/sdk/workflow.ts +25 -0
- package/sdk/workflow.types.ts +11 -0
- package/dist/client-DxjRcEtN.cjs +0 -1
- package/dist/constants-C49b9Exc.cjs +0 -1
- package/dist/useFilter-DzpP_ag0.cjs +0 -1
- package/dist/useFilter-H5bgAZQF.js +0 -120
package/dist/bdo/core/types.d.ts
CHANGED
|
@@ -12,30 +12,134 @@ export interface ValidationResultType {
|
|
|
12
12
|
valid: boolean;
|
|
13
13
|
errors: string[];
|
|
14
14
|
}
|
|
15
|
-
/**
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
readonly id: string;
|
|
21
|
-
readonly label: string;
|
|
22
|
-
readonly isEditable: boolean;
|
|
15
|
+
/** Base constraint shape shared by all field types */
|
|
16
|
+
export interface BaseConstraintType {
|
|
17
|
+
Required?: boolean;
|
|
18
|
+
PrimaryKey?: boolean;
|
|
19
|
+
DefaultValue?: unknown;
|
|
23
20
|
}
|
|
24
|
-
/**
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
/** Base field meta — raw backend shape + injected _id */
|
|
22
|
+
export interface BaseFieldMetaType {
|
|
23
|
+
_id: string;
|
|
24
|
+
Name: string;
|
|
25
|
+
Type: string;
|
|
26
|
+
ReadOnly?: boolean;
|
|
27
|
+
Required?: boolean;
|
|
28
|
+
Constraint?: BaseConstraintType;
|
|
29
|
+
DefaultValue?: unknown;
|
|
29
30
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
export interface StringFieldMetaType extends BaseFieldMetaType {
|
|
32
|
+
Type: "String";
|
|
33
|
+
Constraint?: BaseConstraintType & {
|
|
34
|
+
Length?: number;
|
|
35
|
+
Enum?: string[];
|
|
36
|
+
};
|
|
37
|
+
DefaultValue?: string;
|
|
38
|
+
View?: {
|
|
39
|
+
DataObject?: {
|
|
40
|
+
Type: string;
|
|
41
|
+
Id: string;
|
|
42
|
+
};
|
|
43
|
+
Fields?: string[];
|
|
44
|
+
Search?: string[];
|
|
45
|
+
Filter?: Record<string, unknown>;
|
|
46
|
+
Sort?: unknown[];
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
export interface TextFieldMetaType extends BaseFieldMetaType {
|
|
50
|
+
Type: "Text";
|
|
51
|
+
Constraint?: BaseConstraintType & {
|
|
52
|
+
Format?: "Plain" | "Markdown";
|
|
53
|
+
};
|
|
54
|
+
DefaultValue?: string;
|
|
55
|
+
}
|
|
56
|
+
export interface NumberFieldMetaType extends BaseFieldMetaType {
|
|
57
|
+
Type: "Number";
|
|
58
|
+
Constraint?: BaseConstraintType & {
|
|
59
|
+
IntegerPart?: number;
|
|
60
|
+
FractionPart?: number;
|
|
61
|
+
};
|
|
62
|
+
DefaultValue?: number;
|
|
63
|
+
}
|
|
64
|
+
export interface BooleanFieldMetaType extends BaseFieldMetaType {
|
|
65
|
+
Type: "Boolean";
|
|
66
|
+
Constraint?: BaseConstraintType;
|
|
67
|
+
DefaultValue?: boolean;
|
|
68
|
+
}
|
|
69
|
+
export interface DateFieldMetaType extends BaseFieldMetaType {
|
|
70
|
+
Type: "Date";
|
|
71
|
+
Constraint?: BaseConstraintType;
|
|
72
|
+
DefaultValue?: string;
|
|
73
|
+
}
|
|
74
|
+
export interface DateTimeFieldMetaType extends BaseFieldMetaType {
|
|
75
|
+
Type: "DateTime";
|
|
76
|
+
Constraint?: BaseConstraintType & {
|
|
77
|
+
Precision?: "Second" | "Millisecond";
|
|
78
|
+
};
|
|
79
|
+
DefaultValue?: string;
|
|
80
|
+
}
|
|
81
|
+
export interface SelectFieldMetaType extends BaseFieldMetaType {
|
|
82
|
+
Type: "String";
|
|
83
|
+
Constraint?: BaseConstraintType & {
|
|
84
|
+
Enum: string[];
|
|
85
|
+
};
|
|
86
|
+
DefaultValue?: string;
|
|
87
|
+
}
|
|
88
|
+
export interface ReferenceFieldMetaType extends BaseFieldMetaType {
|
|
89
|
+
Type: "Reference";
|
|
90
|
+
Constraint?: BaseConstraintType;
|
|
91
|
+
View?: {
|
|
92
|
+
DataObject: {
|
|
93
|
+
Type: string;
|
|
94
|
+
Id: string;
|
|
95
|
+
};
|
|
96
|
+
Fields?: string[];
|
|
97
|
+
Search?: string[];
|
|
98
|
+
Filter?: Record<string, unknown>;
|
|
99
|
+
Sort?: unknown[];
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
export interface UserFieldMetaType extends BaseFieldMetaType {
|
|
103
|
+
Type: "User";
|
|
104
|
+
Constraint?: BaseConstraintType;
|
|
105
|
+
View?: {
|
|
106
|
+
Filter?: Record<string, unknown>;
|
|
107
|
+
Sort?: unknown[];
|
|
108
|
+
BusinessEntity?: string;
|
|
37
109
|
};
|
|
38
110
|
}
|
|
111
|
+
export interface ArrayFieldMetaType extends BaseFieldMetaType {
|
|
112
|
+
Type: "Array";
|
|
113
|
+
Constraint?: BaseConstraintType;
|
|
114
|
+
Property?: BaseFieldMetaType;
|
|
115
|
+
}
|
|
116
|
+
export interface ObjectFieldMetaType extends BaseFieldMetaType {
|
|
117
|
+
Type: "Object";
|
|
118
|
+
Constraint?: BaseConstraintType;
|
|
119
|
+
Property?: Record<string, BaseFieldMetaType>;
|
|
120
|
+
}
|
|
121
|
+
export interface FileFieldMetaType extends BaseFieldMetaType {
|
|
122
|
+
Type: "File";
|
|
123
|
+
Constraint?: BaseConstraintType;
|
|
124
|
+
}
|
|
125
|
+
/** Base runtime accessor — every field accessor has these */
|
|
126
|
+
export interface BaseFieldAccessorType<T> {
|
|
127
|
+
readonly label: string;
|
|
128
|
+
readonly required: boolean;
|
|
129
|
+
readonly readOnly: boolean;
|
|
130
|
+
readonly defaultValue: unknown;
|
|
131
|
+
readonly meta: BaseFieldMetaType;
|
|
132
|
+
get(): T | undefined;
|
|
133
|
+
validate(): ValidationResultType;
|
|
134
|
+
}
|
|
135
|
+
/** Editable accessor adds set() */
|
|
136
|
+
export interface EditableFieldAccessorType<T> extends BaseFieldAccessorType<T> {
|
|
137
|
+
set(value: T): void;
|
|
138
|
+
}
|
|
139
|
+
/** Readonly accessor has no set() */
|
|
140
|
+
export type ReadonlyFieldAccessorType<T> = BaseFieldAccessorType<T>;
|
|
141
|
+
/** Union of editable or readonly accessor */
|
|
142
|
+
export type FieldAccessorType<T> = EditableFieldAccessorType<T> | ReadonlyFieldAccessorType<T>;
|
|
39
143
|
/**
|
|
40
144
|
* Option for select fields
|
|
41
145
|
*/
|
|
@@ -44,25 +148,4 @@ export interface SelectOptionType<T = string> {
|
|
|
44
148
|
label: string;
|
|
45
149
|
disabled?: boolean;
|
|
46
150
|
}
|
|
47
|
-
/**
|
|
48
|
-
* Base configuration for all fields
|
|
49
|
-
*/
|
|
50
|
-
export interface FieldConfigType {
|
|
51
|
-
id: string;
|
|
52
|
-
label: string;
|
|
53
|
-
editable?: boolean;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Configuration for select fields with predefined options
|
|
57
|
-
*/
|
|
58
|
-
export interface SelectFieldConfigType<T extends string | number = string> extends FieldConfigType {
|
|
59
|
-
options: readonly SelectOptionType<T>[];
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Configuration for reference fields that link to other BDOs
|
|
63
|
-
*/
|
|
64
|
-
export interface ReferenceFieldConfigType<_TRef = unknown> extends FieldConfigType {
|
|
65
|
-
referenceBdo: string;
|
|
66
|
-
referenceFields?: readonly string[];
|
|
67
|
-
}
|
|
68
151
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../sdk/bdo/core/types.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../sdk/bdo/core/types.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,GAAG,E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Q,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;IACjC,GAAG,IAAI,CAAC,GAAG,SAAS,CAAC;IACrB,QAAQ,IAAI,oBAAoB,CAAC;CAClC;AAED,mCAAmC;AACnC,MAAM,WAAW,yBAAyB,CAAC,CAAC,CAAE,SAAQ,qBAAqB,CAAC,CAAC,CAAC;IAC5E,GAAG,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC;CACrB;AAED,qCAAqC;AACrC,MAAM,MAAM,yBAAyB,CAAC,CAAC,IAAI,qBAAqB,CAAC,CAAC,CAAC,CAAC;AAEpE,6CAA6C;AAC7C,MAAM,MAAM,iBAAiB,CAAC,CAAC,IAAI,yBAAyB,CAAC,CAAC,CAAC,GAAG,yBAAyB,CAAC,CAAC,CAAC,CAAC;AAM/F;;GAEG;AACH,MAAM,WAAW,gBAAgB,CAAC,CAAC,GAAG,MAAM;IAC1C,KAAK,EAAE,CAAC,CAAC;IACT,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ArrayFieldType } from "../../types/base-fields";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ArrayFieldMetaType, BaseFieldMetaType, ValidationResultType } from "../core/types";
|
|
3
3
|
import { BaseField } from "./BaseField";
|
|
4
4
|
/**
|
|
5
5
|
* Field definition for array/multi-value fields
|
|
@@ -9,13 +9,14 @@ import { BaseField } from "./BaseField";
|
|
|
9
9
|
* @example
|
|
10
10
|
* ```typescript
|
|
11
11
|
* readonly Tags = new ArrayField<string>({
|
|
12
|
-
*
|
|
13
|
-
* label: "Tags"
|
|
12
|
+
* _id: "Tags", Name: "Tags", Type: "Array",
|
|
14
13
|
* });
|
|
15
14
|
* ```
|
|
16
15
|
*/
|
|
17
16
|
export declare class ArrayField<T = unknown> extends BaseField<ArrayFieldType<T>> {
|
|
18
|
-
constructor(
|
|
17
|
+
constructor(meta: ArrayFieldMetaType);
|
|
18
|
+
/** Element type descriptor for array items */
|
|
19
|
+
get elementType(): BaseFieldMetaType | undefined;
|
|
19
20
|
validate(value: ArrayFieldType<T> | undefined): ValidationResultType;
|
|
20
21
|
}
|
|
21
22
|
//# sourceMappingURL=ArrayField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrayField.d.ts","sourceRoot":"","sources":["../../../sdk/bdo/fields/ArrayField.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"ArrayField.d.ts","sourceRoot":"","sources":["../../../sdk/bdo/fields/ArrayField.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACjG,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC;;;;;;;;;;;GAWG;AACH,qBAAa,UAAU,CAAC,CAAC,GAAG,OAAO,CAAE,SAAQ,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;gBAC3D,IAAI,EAAE,kBAAkB;IAIpC,8CAA8C;IAC9C,IAAI,WAAW,IAAI,iBAAiB,GAAG,SAAS,CAE/C;IAED,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,SAAS,GAAG,oBAAoB;CASrE"}
|
|
@@ -1,32 +1,27 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { BaseFieldMetaType, ValidationResultType } from "../core/types";
|
|
2
2
|
/**
|
|
3
|
-
* Abstract base class for all field definitions
|
|
3
|
+
* Abstract base class for all field definitions.
|
|
4
|
+
* Stores the raw backend meta JSON and exposes convenience getters.
|
|
4
5
|
*
|
|
5
6
|
* @template T - The TypeScript type of the field value
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* ```typescript
|
|
9
|
-
* class CustomField extends BaseField<MyType> {
|
|
10
|
-
* validate(value: MyType | undefined): ValidationResult {
|
|
11
|
-
* // Custom validation logic
|
|
12
|
-
* }
|
|
13
|
-
* }
|
|
14
|
-
* ```
|
|
15
7
|
*/
|
|
16
8
|
export declare abstract class BaseField<T> {
|
|
17
|
-
|
|
18
|
-
protected readonly
|
|
19
|
-
protected readonly editable: boolean;
|
|
9
|
+
/** Full raw backend meta */
|
|
10
|
+
protected readonly _meta: BaseFieldMetaType;
|
|
20
11
|
protected _parentBoId?: string;
|
|
21
|
-
constructor(
|
|
12
|
+
constructor(meta: BaseFieldMetaType);
|
|
13
|
+
get id(): string;
|
|
14
|
+
get label(): string;
|
|
15
|
+
get readOnly(): boolean;
|
|
16
|
+
get required(): boolean;
|
|
17
|
+
get defaultValue(): unknown;
|
|
18
|
+
get primaryKey(): boolean;
|
|
19
|
+
/** Full raw meta (the exact JSON passed to constructor) */
|
|
20
|
+
get meta(): BaseFieldMetaType;
|
|
22
21
|
/**
|
|
23
22
|
* Validate a value for this field
|
|
24
23
|
* Override in subclasses for custom validation
|
|
25
24
|
*/
|
|
26
25
|
abstract validate(value: T | undefined): ValidationResultType;
|
|
27
|
-
/**
|
|
28
|
-
* Get field metadata (id, label, and field-specific info)
|
|
29
|
-
*/
|
|
30
|
-
get meta(): FieldMetaType;
|
|
31
26
|
}
|
|
32
27
|
//# sourceMappingURL=BaseField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseField.d.ts","sourceRoot":"","sources":["../../../sdk/bdo/fields/BaseField.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"BaseField.d.ts","sourceRoot":"","sources":["../../../sdk/bdo/fields/BaseField.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAE7E;;;;;GAKG;AACH,8BAAsB,SAAS,CAAC,CAAC;IAC/B,4BAA4B;IAC5B,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAC;IAC5C,SAAS,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;gBAEnB,IAAI,EAAE,iBAAiB;IAMnC,IAAI,EAAE,IAAI,MAAM,CAA2B;IAC3C,IAAI,KAAK,IAAI,MAAM,CAA8C;IACjE,IAAI,QAAQ,IAAI,OAAO,CAAyC;IAChE,IAAI,QAAQ,IAAI,OAAO,CAA4E;IACnG,IAAI,YAAY,IAAI,OAAO,CAA2E;IACtG,IAAI,UAAU,IAAI,OAAO,CAAuD;IAEhF,2DAA2D;IAC3D,IAAI,IAAI,IAAI,iBAAiB,CAAuB;IAEpD;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,GAAG,SAAS,GAAG,oBAAoB;CAC9D"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BooleanFieldType } from "../../types/base-fields";
|
|
2
|
-
import type {
|
|
2
|
+
import type { BooleanFieldMetaType, ValidationResultType } from "../core/types";
|
|
3
3
|
import { BaseField } from "./BaseField";
|
|
4
4
|
/**
|
|
5
5
|
* Field definition for boolean fields
|
|
@@ -7,13 +7,12 @@ import { BaseField } from "./BaseField";
|
|
|
7
7
|
* @example
|
|
8
8
|
* ```typescript
|
|
9
9
|
* readonly IsActive = new BooleanField({
|
|
10
|
-
*
|
|
11
|
-
* label: "Is Active"
|
|
10
|
+
* _id: "IsActive", Name: "Is Active", Type: "Boolean",
|
|
12
11
|
* });
|
|
13
12
|
* ```
|
|
14
13
|
*/
|
|
15
14
|
export declare class BooleanField extends BaseField<BooleanFieldType> {
|
|
16
|
-
constructor(
|
|
15
|
+
constructor(meta: BooleanFieldMetaType);
|
|
17
16
|
validate(value: BooleanFieldType | undefined): ValidationResultType;
|
|
18
17
|
}
|
|
19
18
|
//# sourceMappingURL=BooleanField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BooleanField.d.ts","sourceRoot":"","sources":["../../../sdk/bdo/fields/BooleanField.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"BooleanField.d.ts","sourceRoot":"","sources":["../../../sdk/bdo/fields/BooleanField.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC;;;;;;;;;GASG;AACH,qBAAa,YAAa,SAAQ,SAAS,CAAC,gBAAgB,CAAC;gBAC/C,IAAI,EAAE,oBAAoB;IAItC,QAAQ,CAAC,KAAK,EAAE,gBAAgB,GAAG,SAAS,GAAG,oBAAoB;CASpE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DateFieldType } from "../../types/base-fields";
|
|
2
|
-
import type {
|
|
2
|
+
import type { DateFieldMetaType, ValidationResultType } from "../core/types";
|
|
3
3
|
import { BaseField } from "./BaseField";
|
|
4
4
|
/**
|
|
5
5
|
* Field definition for date-only fields (YYYY-MM-DD)
|
|
@@ -7,13 +7,12 @@ import { BaseField } from "./BaseField";
|
|
|
7
7
|
* @example
|
|
8
8
|
* ```typescript
|
|
9
9
|
* readonly BirthDate = new DateField({
|
|
10
|
-
*
|
|
11
|
-
* label: "Birth Date"
|
|
10
|
+
* _id: "BirthDate", Name: "Birth Date", Type: "Date",
|
|
12
11
|
* });
|
|
13
12
|
* ```
|
|
14
13
|
*/
|
|
15
14
|
export declare class DateField extends BaseField<DateFieldType> {
|
|
16
|
-
constructor(
|
|
15
|
+
constructor(meta: DateFieldMetaType);
|
|
17
16
|
validate(value: DateFieldType | undefined): ValidationResultType;
|
|
18
17
|
}
|
|
19
18
|
//# sourceMappingURL=DateField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateField.d.ts","sourceRoot":"","sources":["../../../sdk/bdo/fields/DateField.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"DateField.d.ts","sourceRoot":"","sources":["../../../sdk/bdo/fields/DateField.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAC7E,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC;;;;;;;;;GASG;AACH,qBAAa,SAAU,SAAQ,SAAS,CAAC,aAAa,CAAC;gBACzC,IAAI,EAAE,iBAAiB;IAInC,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,GAAG,oBAAoB;CA8BjE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { DateTimeFieldMetaType, ValidationResultType } from "../core/types";
|
|
2
2
|
import { BaseField } from "./BaseField";
|
|
3
3
|
/**
|
|
4
4
|
* Date/DateTime field value type
|
|
@@ -10,13 +10,14 @@ type DateTimeValue = string;
|
|
|
10
10
|
* @example
|
|
11
11
|
* ```typescript
|
|
12
12
|
* readonly CreatedAt = new DateTimeField({
|
|
13
|
-
*
|
|
14
|
-
* label: "Created At"
|
|
13
|
+
* _id: "_created_at", Name: "Created At", Type: "DateTime", ReadOnly: true,
|
|
15
14
|
* });
|
|
16
15
|
* ```
|
|
17
16
|
*/
|
|
18
17
|
export declare class DateTimeField extends BaseField<DateTimeValue> {
|
|
19
|
-
constructor(
|
|
18
|
+
constructor(meta: DateTimeFieldMetaType);
|
|
19
|
+
/** DateTime-specific: precision */
|
|
20
|
+
get precision(): "Second" | "Millisecond";
|
|
20
21
|
validate(value: DateTimeValue | undefined): ValidationResultType;
|
|
21
22
|
}
|
|
22
23
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateTimeField.d.ts","sourceRoot":"","sources":["../../../sdk/bdo/fields/DateTimeField.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"DateTimeField.d.ts","sourceRoot":"","sources":["../../../sdk/bdo/fields/DateTimeField.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACjF,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC;;GAEG;AACH,KAAK,aAAa,GAAG,MAAM,CAAC;AAE5B;;;;;;;;;GASG;AACH,qBAAa,aAAc,SAAQ,SAAS,CAAC,aAAa,CAAC;gBAC7C,IAAI,EAAE,qBAAqB;IAIvC,mCAAmC;IACnC,IAAI,SAAS,IAAI,QAAQ,GAAG,aAAa,CAExC;IAED,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,GAAG,oBAAoB;CAsBjE"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { FileFieldType } from "../../types/base-fields";
|
|
2
|
+
import type { FileFieldMetaType, ValidationResultType } from "../core/types";
|
|
3
|
+
import { BaseField } from "./BaseField";
|
|
4
|
+
/**
|
|
5
|
+
* Field definition for file attachment fields
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* readonly Attachment = new FileField({
|
|
10
|
+
* _id: "Attachment", Name: "Attachment", Type: "File",
|
|
11
|
+
* });
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export declare class FileField extends BaseField<FileFieldType> {
|
|
15
|
+
constructor(meta: FileFieldMetaType);
|
|
16
|
+
validate(value: FileFieldType | undefined): ValidationResultType;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=FileField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileField.d.ts","sourceRoot":"","sources":["../../../sdk/bdo/fields/FileField.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAC7E,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC;;;;;;;;;GASG;AACH,qBAAa,SAAU,SAAQ,SAAS,CAAC,aAAa,CAAC;gBACzC,IAAI,EAAE,iBAAiB;IAInC,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,GAAG,oBAAoB;CAcjE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { NumberFieldType } from "../../types/base-fields";
|
|
2
|
-
import type {
|
|
2
|
+
import type { NumberFieldMetaType, ValidationResultType } from "../core/types";
|
|
3
3
|
import { BaseField } from "./BaseField";
|
|
4
4
|
/**
|
|
5
5
|
* Field definition for numeric fields
|
|
@@ -7,13 +7,15 @@ import { BaseField } from "./BaseField";
|
|
|
7
7
|
* @example
|
|
8
8
|
* ```typescript
|
|
9
9
|
* readonly Price = new NumberField({
|
|
10
|
-
*
|
|
11
|
-
*
|
|
10
|
+
* _id: "Price", Name: "Price", Type: "Number",
|
|
11
|
+
* Constraint: { IntegerPart: 9, FractionPart: 2 },
|
|
12
12
|
* });
|
|
13
13
|
* ```
|
|
14
14
|
*/
|
|
15
15
|
export declare class NumberField extends BaseField<NumberFieldType> {
|
|
16
|
-
constructor(
|
|
16
|
+
constructor(meta: NumberFieldMetaType);
|
|
17
|
+
get integerPart(): number;
|
|
18
|
+
get fractionPart(): number | undefined;
|
|
17
19
|
validate(value: NumberFieldType | undefined): ValidationResultType;
|
|
18
20
|
}
|
|
19
21
|
//# sourceMappingURL=NumberField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberField.d.ts","sourceRoot":"","sources":["../../../sdk/bdo/fields/NumberField.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"NumberField.d.ts","sourceRoot":"","sources":["../../../sdk/bdo/fields/NumberField.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC;;;;;;;;;;GAUG;AACH,qBAAa,WAAY,SAAQ,SAAS,CAAC,eAAe,CAAC;gBAC7C,IAAI,EAAE,mBAAmB;IAIrC,IAAI,WAAW,IAAI,MAAM,CAA6E;IACtG,IAAI,YAAY,IAAI,MAAM,GAAG,SAAS,CAAyE;IAE/G,QAAQ,CAAC,KAAK,EAAE,eAAe,GAAG,SAAS,GAAG,oBAAoB;CASnE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ObjectFieldType } from "../../types/base-fields";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ObjectFieldMetaType, ValidationResultType } from "../core/types";
|
|
3
3
|
import { BaseField } from "./BaseField";
|
|
4
4
|
/**
|
|
5
5
|
* Field definition for nested object fields
|
|
@@ -7,13 +7,14 @@ import { BaseField } from "./BaseField";
|
|
|
7
7
|
* @example
|
|
8
8
|
* ```typescript
|
|
9
9
|
* readonly Config = new ObjectField({
|
|
10
|
-
*
|
|
11
|
-
* label: "Configuration"
|
|
10
|
+
* _id: "Config", Name: "Configuration", Type: "Object",
|
|
12
11
|
* });
|
|
13
12
|
* ```
|
|
14
13
|
*/
|
|
15
14
|
export declare class ObjectField<T extends Record<string, unknown> = Record<string, unknown>> extends BaseField<ObjectFieldType<T>> {
|
|
16
|
-
constructor(
|
|
15
|
+
constructor(meta: ObjectFieldMetaType);
|
|
16
|
+
/** Nested property definitions */
|
|
17
|
+
get properties(): Record<string, unknown> | undefined;
|
|
17
18
|
validate(value: ObjectFieldType<T> | undefined): ValidationResultType;
|
|
18
19
|
}
|
|
19
20
|
//# sourceMappingURL=ObjectField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObjectField.d.ts","sourceRoot":"","sources":["../../../sdk/bdo/fields/ObjectField.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"ObjectField.d.ts","sourceRoot":"","sources":["../../../sdk/bdo/fields/ObjectField.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC;;;;;;;;;GASG;AACH,qBAAa,WAAW,CACtB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAC3D,SAAQ,SAAS,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;gBACzB,IAAI,EAAE,mBAAmB;IAIrC,kCAAkC;IAClC,IAAI,UAAU,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAEpD;IAED,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,SAAS,GAAG,oBAAoB;CActE"}
|
|
@@ -1,33 +1,32 @@
|
|
|
1
1
|
import type { ReferenceFieldType } from "../../types/base-fields";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ReferenceFieldMetaType as ReferenceFieldMetaRawType, ValidationResultType } from "../core/types";
|
|
3
3
|
import { BaseField } from "./BaseField";
|
|
4
4
|
/**
|
|
5
|
-
* Field definition for reference/lookup fields
|
|
5
|
+
* Field definition for reference/lookup fields.
|
|
6
|
+
* Config is derived from View.DataObject in the raw meta.
|
|
6
7
|
*
|
|
7
8
|
* @template TRef - The type of the referenced record
|
|
8
9
|
*
|
|
9
10
|
* @example
|
|
10
11
|
* ```typescript
|
|
11
|
-
* readonly SupplierInfo = new ReferenceField<
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
12
|
+
* readonly SupplierInfo = new ReferenceField<SupplierRefType>({
|
|
13
|
+
* _id: "SupplierInfo", Name: "Supplier", Type: "Reference",
|
|
14
|
+
* View: {
|
|
15
|
+
* DataObject: { Type: "BO", Id: "BDO_Supplier" },
|
|
16
|
+
* Fields: ["_id", "SupplierName", "Email"],
|
|
17
|
+
* },
|
|
16
18
|
* });
|
|
17
19
|
* ```
|
|
18
20
|
*/
|
|
19
21
|
export declare class ReferenceField<TRef = unknown> extends BaseField<ReferenceFieldType<TRef>> {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
constructor(meta: ReferenceFieldMetaRawType);
|
|
23
|
+
get referenceBdo(): string;
|
|
24
|
+
get referenceFields(): readonly string[];
|
|
25
|
+
get searchFields(): readonly string[];
|
|
23
26
|
validate(value: ReferenceFieldType<TRef> | undefined): ValidationResultType;
|
|
24
27
|
/**
|
|
25
28
|
* Fetch referenced records from the backend, returned as typed TRef[]
|
|
26
29
|
*/
|
|
27
30
|
fetchOptions(instanceId?: string): Promise<TRef[]>;
|
|
28
|
-
/**
|
|
29
|
-
* Get field metadata including reference info
|
|
30
|
-
*/
|
|
31
|
-
get meta(): ReferenceFieldMetaType;
|
|
32
31
|
}
|
|
33
32
|
//# sourceMappingURL=ReferenceField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReferenceField.d.ts","sourceRoot":"","sources":["../../../sdk/bdo/fields/ReferenceField.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"ReferenceField.d.ts","sourceRoot":"","sources":["../../../sdk/bdo/fields/ReferenceField.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,sBAAsB,IAAI,yBAAyB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAE/G,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,cAAc,CAAC,IAAI,GAAG,OAAO,CAAE,SAAQ,SAAS,CAC3D,kBAAkB,CAAC,IAAI,CAAC,CACzB;gBACa,IAAI,EAAE,yBAAyB;IAI3C,IAAI,YAAY,IAAI,MAAM,CAEzB;IAED,IAAI,eAAe,IAAI,SAAS,MAAM,EAAE,CAEvC;IAED,IAAI,YAAY,IAAI,SAAS,MAAM,EAAE,CAEpC;IAED,QAAQ,CAAC,KAAK,EAAE,kBAAkB,CAAC,IAAI,CAAC,GAAG,SAAS,GAAG,oBAAoB;IAuB3E;;OAEG;IACG,YAAY,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;CAQzD"}
|
|
@@ -1,34 +1,27 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SelectFieldMetaType as SelectFieldMetaRawType, SelectOptionType, ValidationResultType } from "../core/types";
|
|
2
2
|
import { BaseField } from "./BaseField";
|
|
3
3
|
/**
|
|
4
|
-
* Field definition for select fields
|
|
4
|
+
* Field definition for select fields.
|
|
5
|
+
* Options are derived from Constraint.Enum in the raw meta.
|
|
5
6
|
*
|
|
6
7
|
* @template T - Union type of allowed option values
|
|
7
8
|
*
|
|
8
9
|
* @example
|
|
9
10
|
* ```typescript
|
|
10
|
-
* readonly Status = new SelectField<"active" | "inactive"
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* options: [
|
|
14
|
-
* { value: "active", label: "Active" },
|
|
15
|
-
* { value: "inactive", label: "Inactive" },
|
|
16
|
-
* { value: "pending", label: "Pending" }
|
|
17
|
-
* ]
|
|
11
|
+
* readonly Status = new SelectField<"active" | "inactive">({
|
|
12
|
+
* _id: "Status", Name: "Status", Type: "String",
|
|
13
|
+
* Constraint: { Enum: ["active", "inactive"] },
|
|
18
14
|
* });
|
|
19
15
|
* ```
|
|
20
16
|
*/
|
|
21
17
|
export declare class SelectField<T extends string | number = string> extends BaseField<T> {
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
constructor(meta: SelectFieldMetaRawType);
|
|
19
|
+
/** Static options derived from Constraint.Enum */
|
|
20
|
+
get options(): readonly SelectOptionType<T>[];
|
|
24
21
|
validate(value: T | undefined): ValidationResultType;
|
|
25
22
|
/**
|
|
26
23
|
* Fetch dynamic options from the backend, returned as typed SelectOption[]
|
|
27
24
|
*/
|
|
28
25
|
fetchOptions(instanceId?: string): Promise<SelectOptionType<T>[]>;
|
|
29
|
-
/**
|
|
30
|
-
* Get field metadata including static options
|
|
31
|
-
*/
|
|
32
|
-
get meta(): SelectFieldMetaType<T>;
|
|
33
26
|
}
|
|
34
27
|
//# sourceMappingURL=SelectField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectField.d.ts","sourceRoot":"","sources":["../../../sdk/bdo/fields/SelectField.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"SelectField.d.ts","sourceRoot":"","sources":["../../../sdk/bdo/fields/SelectField.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,mBAAmB,IAAI,sBAAsB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAG3H,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC;;;;;;;;;;;;;GAaG;AACH,qBAAa,WAAW,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,CAAE,SAAQ,SAAS,CAAC,CAAC,CAAC;gBACnE,IAAI,EAAE,sBAAsB;IAIxC,kDAAkD;IAClD,IAAI,OAAO,IAAI,SAAS,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAG5C;IAED,QAAQ,CAAC,KAAK,EAAE,CAAC,GAAG,SAAS,GAAG,oBAAoB;IAqBpD;;OAEG;IACG,YAAY,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC;CAexE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { StringFieldType } from "../../types/base-fields";
|
|
2
|
-
import type {
|
|
2
|
+
import type { StringFieldMetaType, ValidationResultType } from "../core/types";
|
|
3
3
|
import { BaseField } from "./BaseField";
|
|
4
4
|
/**
|
|
5
5
|
* Field definition for string/text fields
|
|
@@ -7,13 +7,15 @@ import { BaseField } from "./BaseField";
|
|
|
7
7
|
* @example
|
|
8
8
|
* ```typescript
|
|
9
9
|
* readonly Title = new StringField({
|
|
10
|
-
*
|
|
11
|
-
*
|
|
10
|
+
* _id: "Title", Name: "Title", Type: "String",
|
|
11
|
+
* Constraint: { Length: 255 },
|
|
12
12
|
* });
|
|
13
13
|
* ```
|
|
14
14
|
*/
|
|
15
15
|
export declare class StringField extends BaseField<StringFieldType> {
|
|
16
|
-
constructor(
|
|
16
|
+
constructor(meta: StringFieldMetaType);
|
|
17
|
+
/** String-specific: max length constraint */
|
|
18
|
+
get length(): number | undefined;
|
|
17
19
|
validate(value: StringFieldType | undefined): ValidationResultType;
|
|
18
20
|
}
|
|
19
21
|
//# sourceMappingURL=StringField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StringField.d.ts","sourceRoot":"","sources":["../../../sdk/bdo/fields/StringField.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"StringField.d.ts","sourceRoot":"","sources":["../../../sdk/bdo/fields/StringField.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC;;;;;;;;;;GAUG;AACH,qBAAa,WAAY,SAAQ,SAAS,CAAC,eAAe,CAAC;gBAC7C,IAAI,EAAE,mBAAmB;IAIrC,6CAA6C;IAC7C,IAAI,MAAM,IAAI,MAAM,GAAG,SAAS,CAE/B;IAED,QAAQ,CAAC,KAAK,EAAE,eAAe,GAAG,SAAS,GAAG,oBAAoB;CASnE"}
|
|
@@ -1,19 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import type { FieldConfigType, ValidationResultType } from "../core/types";
|
|
3
|
-
import { BaseField } from "./BaseField";
|
|
4
|
-
/**
|
|
5
|
-
* Field definition for multi-line text fields
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* ```typescript
|
|
9
|
-
* readonly Description = new TextAreaField({
|
|
10
|
-
* id: "Description",
|
|
11
|
-
* label: "Description"
|
|
12
|
-
* });
|
|
13
|
-
* ```
|
|
14
|
-
*/
|
|
15
|
-
export declare class TextAreaField extends BaseField<TextAreaFieldType> {
|
|
16
|
-
constructor(config: FieldConfigType);
|
|
17
|
-
validate(value: TextAreaFieldType | undefined): ValidationResultType;
|
|
18
|
-
}
|
|
1
|
+
export { TextField as TextAreaField } from "./TextField";
|
|
19
2
|
//# sourceMappingURL=TextAreaField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextAreaField.d.ts","sourceRoot":"","sources":["../../../sdk/bdo/fields/TextAreaField.ts"],"names":[],"mappings":"AAKA,OAAO,
|
|
1
|
+
{"version":3,"file":"TextAreaField.d.ts","sourceRoot":"","sources":["../../../sdk/bdo/fields/TextAreaField.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,aAAa,CAAC"}
|