@bodynarf/react.components 1.4.21 → 1.4.22
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/index.d.ts +12 -9
- package/index.d.ts.map +1 -1
- package/index.js +12 -9
- package/package.json +2 -5
- package/components/form/component/index.d.ts +0 -16
- package/components/form/component/index.d.ts.map +0 -1
- package/components/form/component/index.js +0 -13
- package/components/form/component/styles.scss +0 -33
- package/components/form/components/cell/index.d.ts +0 -13
- package/components/form/components/cell/index.d.ts.map +0 -1
- package/components/form/components/cell/index.js +0 -8
- package/components/form/components/container/index.d.ts +0 -24
- package/components/form/components/container/index.d.ts.map +0 -1
- package/components/form/components/container/index.js +0 -27
- package/components/form/components/form/index.d.ts +0 -10
- package/components/form/components/form/index.d.ts.map +0 -1
- package/components/form/components/form/index.js +0 -11
- package/components/form/components/inputs/checkbox/index.d.ts +0 -6
- package/components/form/components/inputs/checkbox/index.d.ts.map +0 -1
- package/components/form/components/inputs/checkbox/index.js +0 -19
- package/components/form/components/inputs/date/index.d.ts +0 -7
- package/components/form/components/inputs/date/index.d.ts.map +0 -1
- package/components/form/components/inputs/date/index.js +0 -19
- package/components/form/components/inputs/lookup/index.d.ts +0 -6
- package/components/form/components/inputs/lookup/index.d.ts.map +0 -1
- package/components/form/components/inputs/lookup/index.js +0 -19
- package/components/form/components/inputs/multiline/index.d.ts +0 -6
- package/components/form/components/inputs/multiline/index.d.ts.map +0 -1
- package/components/form/components/inputs/multiline/index.js +0 -19
- package/components/form/components/inputs/number/index.d.ts +0 -6
- package/components/form/components/inputs/number/index.d.ts.map +0 -1
- package/components/form/components/inputs/number/index.js +0 -19
- package/components/form/components/inputs/password/index.d.ts +0 -6
- package/components/form/components/inputs/password/index.d.ts.map +0 -1
- package/components/form/components/inputs/password/index.js +0 -19
- package/components/form/components/inputs/text/index.d.ts +0 -6
- package/components/form/components/inputs/text/index.d.ts.map +0 -1
- package/components/form/components/inputs/text/index.js +0 -23
- package/components/form/components/item/index.d.ts +0 -4
- package/components/form/components/item/index.d.ts.map +0 -1
- package/components/form/components/item/index.js +0 -28
- package/components/form/components/row/index.d.ts +0 -10
- package/components/form/components/row/index.d.ts.map +0 -1
- package/components/form/components/row/index.js +0 -27
- package/components/form/index.d.ts +0 -3
- package/components/form/index.d.ts.map +0 -1
- package/components/form/index.js +0 -2
- package/components/form/redux/actionCreators/index.d.ts +0 -7
- package/components/form/redux/actionCreators/index.d.ts.map +0 -1
- package/components/form/redux/actionCreators/index.js +0 -6
- package/components/form/redux/actionCreators/initForm.d.ts +0 -9
- package/components/form/redux/actionCreators/initForm.d.ts.map +0 -1
- package/components/form/redux/actionCreators/initForm.js +0 -12
- package/components/form/redux/actionCreators/setFieldValue.d.ts +0 -9
- package/components/form/redux/actionCreators/setFieldValue.d.ts.map +0 -1
- package/components/form/redux/actionCreators/setFieldValue.js +0 -18
- package/components/form/redux/actionCreators/setFormState.d.ts +0 -8
- package/components/form/redux/actionCreators/setFormState.d.ts.map +0 -1
- package/components/form/redux/actionCreators/setFormState.js +0 -14
- package/components/form/redux/actionCreators/setValidationResult.d.ts +0 -9
- package/components/form/redux/actionCreators/setValidationResult.d.ts.map +0 -1
- package/components/form/redux/actionCreators/setValidationResult.js +0 -14
- package/components/form/redux/actionCreators/submitForm.d.ts +0 -7
- package/components/form/redux/actionCreators/submitForm.d.ts.map +0 -1
- package/components/form/redux/actionCreators/submitForm.js +0 -10
- package/components/form/redux/actionCreators/validateField.d.ts +0 -8
- package/components/form/redux/actionCreators/validateField.d.ts.map +0 -1
- package/components/form/redux/actionCreators/validateField.js +0 -12
- package/components/form/redux/actionTypes.d.ts +0 -13
- package/components/form/redux/actionTypes.d.ts.map +0 -1
- package/components/form/redux/actionTypes.js +0 -12
- package/components/form/redux/actions/index.d.ts +0 -2
- package/components/form/redux/actions/index.d.ts.map +0 -1
- package/components/form/redux/actions/index.js +0 -1
- package/components/form/redux/actions/submitForm.d.ts +0 -9
- package/components/form/redux/actions/submitForm.d.ts.map +0 -1
- package/components/form/redux/actions/submitForm.js +0 -16
- package/components/form/redux/index.d.ts +0 -8
- package/components/form/redux/index.d.ts.map +0 -1
- package/components/form/redux/index.js +0 -7
- package/components/form/redux/reducer.d.ts +0 -4
- package/components/form/redux/reducer.d.ts.map +0 -1
- package/components/form/redux/reducer.js +0 -103
- package/components/form/redux/store.d.ts +0 -5
- package/components/form/redux/store.d.ts.map +0 -1
- package/components/form/redux/store.js +0 -4
- package/components/form/redux/types/base/types.d.ts +0 -9
- package/components/form/redux/types/base/types.d.ts.map +0 -1
- package/components/form/redux/types/base/types.js +0 -2
- package/components/form/redux/types/fieldValue.d.ts +0 -10
- package/components/form/redux/types/fieldValue.d.ts.map +0 -1
- package/components/form/redux/types/fieldValue.js +0 -1
- package/components/form/redux/types/index.d.ts +0 -4
- package/components/form/redux/types/index.d.ts.map +0 -1
- package/components/form/redux/types/index.js +0 -3
- package/components/form/redux/types/state.d.ts +0 -37
- package/components/form/redux/types/state.d.ts.map +0 -1
- package/components/form/redux/types/state.js +0 -12
- package/components/form/redux/utils/index.d.ts +0 -3
- package/components/form/redux/utils/index.d.ts.map +0 -1
- package/components/form/redux/utils/index.js +0 -2
- package/components/form/redux/utils/mapper.d.ts +0 -16
- package/components/form/redux/utils/mapper.d.ts.map +0 -1
- package/components/form/redux/utils/mapper.js +0 -107
- package/components/form/redux/utils/validate.d.ts +0 -9
- package/components/form/redux/utils/validate.d.ts.map +0 -1
- package/components/form/redux/utils/validate.js +0 -33
- package/components/form/types/index.d.ts +0 -3
- package/components/form/types/index.d.ts.map +0 -1
- package/components/form/types/index.js +0 -2
- package/components/form/types/model/extensions/extendedField.d.ts +0 -7
- package/components/form/types/model/extensions/extendedField.d.ts.map +0 -1
- package/components/form/types/model/extensions/extendedField.js +0 -1
- package/components/form/types/model/extensions/extendedFormItem.d.ts +0 -7
- package/components/form/types/model/extensions/extendedFormItem.d.ts.map +0 -1
- package/components/form/types/model/extensions/extendedFormItem.js +0 -2
- package/components/form/types/model/extensions/index.d.ts +0 -4
- package/components/form/types/model/extensions/index.d.ts.map +0 -1
- package/components/form/types/model/extensions/index.js +0 -3
- package/components/form/types/model/extensions/items/checkbox.d.ts +0 -17
- package/components/form/types/model/extensions/items/checkbox.d.ts.map +0 -1
- package/components/form/types/model/extensions/items/checkbox.js +0 -14
- package/components/form/types/model/extensions/items/getExtension.d.ts +0 -9
- package/components/form/types/model/extensions/items/getExtension.d.ts.map +0 -1
- package/components/form/types/model/extensions/items/getExtension.js +0 -18
- package/components/form/types/model/extensions/items/index.d.ts +0 -5
- package/components/form/types/model/extensions/items/index.d.ts.map +0 -1
- package/components/form/types/model/extensions/items/index.js +0 -4
- package/components/form/types/model/extensions/items/lookup.d.ts +0 -20
- package/components/form/types/model/extensions/items/lookup.d.ts.map +0 -1
- package/components/form/types/model/extensions/items/lookup.js +0 -15
- package/components/form/types/model/extensions/items/multiline.d.ts +0 -17
- package/components/form/types/model/extensions/items/multiline.d.ts.map +0 -1
- package/components/form/types/model/extensions/items/multiline.js +0 -14
- package/components/form/types/model/form.config.d.ts +0 -20
- package/components/form/types/model/form.config.d.ts.map +0 -1
- package/components/form/types/model/form.config.js +0 -2
- package/components/form/types/model/form.submitButtonCfg.d.ts +0 -26
- package/components/form/types/model/form.submitButtonCfg.d.ts.map +0 -1
- package/components/form/types/model/form.submitButtonCfg.js +0 -1
- package/components/form/types/model/formItem.d.ts +0 -12
- package/components/form/types/model/formItem.d.ts.map +0 -1
- package/components/form/types/model/formItem.js +0 -1
- package/components/form/types/model/formItem.modelConfig.d.ts +0 -20
- package/components/form/types/model/formItem.modelConfig.d.ts.map +0 -1
- package/components/form/types/model/formItem.modelConfig.js +0 -1
- package/components/form/types/model/formItem.viewConfig.d.ts +0 -15
- package/components/form/types/model/formItem.viewConfig.d.ts.map +0 -1
- package/components/form/types/model/formItem.viewConfig.js +0 -1
- package/components/form/types/model/formItemValidationState.d.ts +0 -10
- package/components/form/types/model/formItemValidationState.d.ts.map +0 -1
- package/components/form/types/model/formItemValidationState.js +0 -11
- package/components/form/types/model/in/baseField.d.ts +0 -21
- package/components/form/types/model/in/baseField.d.ts.map +0 -1
- package/components/form/types/model/in/baseField.js +0 -1
- package/components/form/types/model/in/captionConfig.d.ts +0 -14
- package/components/form/types/model/in/captionConfig.d.ts.map +0 -1
- package/components/form/types/model/in/captionConfig.js +0 -1
- package/components/form/types/model/in/fieldType.d.ts +0 -3
- package/components/form/types/model/in/fieldType.d.ts.map +0 -1
- package/components/form/types/model/in/fieldType.js +0 -1
- package/components/form/types/model/in/fieldValidator.d.ts +0 -3
- package/components/form/types/model/in/fieldValidator.d.ts.map +0 -1
- package/components/form/types/model/in/fieldValidator.js +0 -1
- package/components/form/types/model/in/index.d.ts +0 -6
- package/components/form/types/model/in/index.d.ts.map +0 -1
- package/components/form/types/model/in/index.js +0 -5
- package/components/form/types/model/in/viewConfig.d.ts +0 -24
- package/components/form/types/model/in/viewConfig.d.ts.map +0 -1
- package/components/form/types/model/in/viewConfig.js +0 -1
- package/components/form/types/model/index.d.ts +0 -10
- package/components/form/types/model/index.d.ts.map +0 -1
- package/components/form/types/model/index.js +0 -9
- package/components/form/types/model/validationResult.d.ts +0 -11
- package/components/form/types/model/validationResult.d.ts.map +0 -1
- package/components/form/types/model/validationResult.js +0 -2
- package/components/form/types/view/gridCell.d.ts +0 -15
- package/components/form/types/view/gridCell.d.ts.map +0 -1
- package/components/form/types/view/gridCell.js +0 -1
- package/components/form/types/view/index.d.ts +0 -2
- package/components/form/types/view/index.d.ts.map +0 -1
- package/components/form/types/view/index.js +0 -1
- package/components/form/utils/component.d.ts +0 -9
- package/components/form/utils/component.d.ts.map +0 -1
- package/components/form/utils/component.js +0 -16
- package/components/form/utils/grid.d.ts +0 -17
- package/components/form/utils/grid.d.ts.map +0 -1
- package/components/form/utils/grid.js +0 -75
- package/components/form/utils/index.d.ts +0 -4
- package/components/form/utils/index.d.ts.map +0 -1
- package/components/form/utils/index.js +0 -3
- package/components/form/utils/validators/index.d.ts +0 -4
- package/components/form/utils/validators/index.d.ts.map +0 -1
- package/components/form/utils/validators/index.js +0 -3
- package/components/form/utils/validators/number/greaterThanZero.d.ts +0 -7
- package/components/form/utils/validators/number/greaterThanZero.d.ts.map +0 -1
- package/components/form/utils/validators/number/greaterThanZero.js +0 -7
- package/components/form/utils/validators/number/index.d.ts +0 -4
- package/components/form/utils/validators/number/index.d.ts.map +0 -1
- package/components/form/utils/validators/number/index.js +0 -3
- package/components/form/utils/validators/number/lessThanZero.d.ts +0 -7
- package/components/form/utils/validators/number/lessThanZero.d.ts.map +0 -1
- package/components/form/utils/validators/number/lessThanZero.js +0 -7
- package/components/form/utils/validators/number/notZero.d.ts +0 -7
- package/components/form/utils/validators/number/notZero.d.ts.map +0 -1
- package/components/form/utils/validators/number/notZero.js +0 -7
- package/components/form/utils/validators/required.d.ts +0 -7
- package/components/form/utils/validators/required.d.ts.map +0 -1
- package/components/form/utils/validators/required.js +0 -8
- package/components/form/utils/validators/string/index.d.ts +0 -2
- package/components/form/utils/validators/string/index.d.ts.map +0 -1
- package/components/form/utils/validators/string/index.js +0 -1
- package/components/form/utils/validators/string/length.d.ts +0 -8
- package/components/form/utils/validators/string/length.d.ts.map +0 -1
- package/components/form/utils/validators/string/length.js +0 -12
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { getClassName } from "@bodynarf/utils";
|
|
2
|
-
import { getLookupExt, getCheckboxExt, getMultilineExt, } from "../../types";
|
|
3
|
-
import { FormItemValidationState } from "../../types/model/formItemValidationState";
|
|
4
|
-
import { required } from "../../utils/validators";
|
|
5
|
-
/**
|
|
6
|
-
* @public
|
|
7
|
-
* Map external config to internal model
|
|
8
|
-
* @param items Form items from external config
|
|
9
|
-
* @returns Form items for internal use
|
|
10
|
-
*/
|
|
11
|
-
export const map = (items) => {
|
|
12
|
-
return items.map(mapItem);
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* @private
|
|
16
|
-
* View item type (see FieldType) mapping to stringified data value type
|
|
17
|
-
*/
|
|
18
|
-
const viewItemTypeToDataTypeMap = new Map([
|
|
19
|
-
["text", "string"],
|
|
20
|
-
["multiline", "string"],
|
|
21
|
-
["checkbox", "boolean"],
|
|
22
|
-
["number", "number"],
|
|
23
|
-
["date", "date"],
|
|
24
|
-
["lookup", "selectItem"],
|
|
25
|
-
["password", "string"],
|
|
26
|
-
]);
|
|
27
|
-
/**
|
|
28
|
-
* BaseField model property names.
|
|
29
|
-
* Used for select extended configuration props in item config
|
|
30
|
-
*/
|
|
31
|
-
const defaultKeys = [
|
|
32
|
-
"name",
|
|
33
|
-
"type",
|
|
34
|
-
"viewConfig",
|
|
35
|
-
"label",
|
|
36
|
-
"validators",
|
|
37
|
-
"defaultValue",
|
|
38
|
-
"readonly",
|
|
39
|
-
"required"
|
|
40
|
-
]
|
|
41
|
-
.map(x => x);
|
|
42
|
-
/**
|
|
43
|
-
* @public
|
|
44
|
-
* Map external config to internal model
|
|
45
|
-
* @param item Form item from external config
|
|
46
|
-
* @returns Form item for internal use
|
|
47
|
-
*/
|
|
48
|
-
export const mapItem = (item) => {
|
|
49
|
-
const className = getClassName(item.viewConfig.classNames || []);
|
|
50
|
-
const isRequired = item.required === true;
|
|
51
|
-
const validators = item.validators ?? [];
|
|
52
|
-
if (isRequired) {
|
|
53
|
-
const hasValidator = validators.some(x => x === required);
|
|
54
|
-
if (!hasValidator) {
|
|
55
|
-
validators.push(required);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
const keys = Object.keys(item);
|
|
59
|
-
const hasExtraKeys = keys.some(key => !defaultKeys.includes(key));
|
|
60
|
-
const extension = hasExtraKeys ? getExtension(item) : undefined;
|
|
61
|
-
const result = {
|
|
62
|
-
name: item.name,
|
|
63
|
-
viewConfig: {
|
|
64
|
-
className: className,
|
|
65
|
-
caption: item.label.caption,
|
|
66
|
-
layoutConfig: item.viewConfig.layout,
|
|
67
|
-
disabled: item.readonly === true,
|
|
68
|
-
type: item.type,
|
|
69
|
-
},
|
|
70
|
-
modelConfig: {
|
|
71
|
-
type: viewItemTypeToDataTypeMap.get(item.type),
|
|
72
|
-
defaultValue: item.defaultValue,
|
|
73
|
-
value: null,
|
|
74
|
-
validators: validators,
|
|
75
|
-
required: isRequired,
|
|
76
|
-
validationMessages: [],
|
|
77
|
-
validationState: FormItemValidationState.None,
|
|
78
|
-
},
|
|
79
|
-
extension: extension,
|
|
80
|
-
};
|
|
81
|
-
return result;
|
|
82
|
-
};
|
|
83
|
-
/**
|
|
84
|
-
* Get specific component extension if item has extended properties
|
|
85
|
-
* @param item Form item configuration
|
|
86
|
-
* @returns Custom extended configuration if extra props are found; otherwise `undefined`
|
|
87
|
-
*/
|
|
88
|
-
const getExtension = (item) => {
|
|
89
|
-
let extension = undefined;
|
|
90
|
-
switch (item.type) {
|
|
91
|
-
case "date":
|
|
92
|
-
case "number":
|
|
93
|
-
case "password":
|
|
94
|
-
case "text":
|
|
95
|
-
break;
|
|
96
|
-
case "checkbox":
|
|
97
|
-
extension = getCheckboxExt(item);
|
|
98
|
-
break;
|
|
99
|
-
case "lookup":
|
|
100
|
-
extension = getLookupExt(item);
|
|
101
|
-
break;
|
|
102
|
-
case "multiline":
|
|
103
|
-
extension = getMultilineExt(item);
|
|
104
|
-
break;
|
|
105
|
-
}
|
|
106
|
-
return extension;
|
|
107
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { FormItem, ValidationResult } from "../../types";
|
|
2
|
-
/**
|
|
3
|
-
* Validate form item by it's own validators
|
|
4
|
-
* @param item Form item to validate
|
|
5
|
-
* @param value Form item last value
|
|
6
|
-
* @returns Instance of @see ValidationResult with result of validation
|
|
7
|
-
*/
|
|
8
|
-
export declare const validateItem: (item: FormItem<any>, value: any) => ValidationResult;
|
|
9
|
-
//# sourceMappingURL=validate.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/redux/utils/validate.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAA2B,MAAM,aAAa,CAAC;AAElF;;;;;GAKG;AACH,eAAO,MAAM,YAAY,SAAU,SAAS,GAAG,CAAC,SAAS,GAAG,KAAG,gBA8B9D,CAAC"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { isNullOrUndefined, isStringEmpty } from "@bodynarf/utils";
|
|
2
|
-
import { FormItemValidationState } from "../../types";
|
|
3
|
-
/**
|
|
4
|
-
* Validate form item by it's own validators
|
|
5
|
-
* @param item Form item to validate
|
|
6
|
-
* @param value Form item last value
|
|
7
|
-
* @returns Instance of @see ValidationResult with result of validation
|
|
8
|
-
*/
|
|
9
|
-
export const validateItem = (item, value) => {
|
|
10
|
-
if (item.modelConfig.validators.length === 0) {
|
|
11
|
-
return {
|
|
12
|
-
fieldName: item.name,
|
|
13
|
-
messages: [],
|
|
14
|
-
state: FormItemValidationState.None,
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
const messages = [];
|
|
18
|
-
item.modelConfig.validators.forEach(validator => {
|
|
19
|
-
const error = validator(value);
|
|
20
|
-
if (isNullOrUndefined(error) || isStringEmpty(error)) {
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
messages.push(error);
|
|
24
|
-
});
|
|
25
|
-
const status = messages.length > 0
|
|
26
|
-
? FormItemValidationState.Invalid
|
|
27
|
-
: FormItemValidationState.Valid;
|
|
28
|
-
return {
|
|
29
|
-
fieldName: item.name,
|
|
30
|
-
messages: messages,
|
|
31
|
-
state: status
|
|
32
|
-
};
|
|
33
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"extendedField.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/types/model/extensions/extendedField.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAE/B,qCAAqC;AACrC,MAAM,WAAW,KAAK,CAAC,MAAM,CAAE,SAAQ,SAAS,CAAC,MAAM,CAAC;IACpD,0BAA0B;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { FormItem } from "..";
|
|
2
|
-
/** Form item extended with extra values for component rendering */
|
|
3
|
-
export interface ExtendedFormItem<TValue, TExtension> extends FormItem<TValue> {
|
|
4
|
-
/** Additional configuration for specific component */
|
|
5
|
-
extension?: TExtension;
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=extendedFormItem.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"extendedFormItem.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/types/model/extensions/extendedFormItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AAE9B,mEAAmE;AACnE,MAAM,WAAW,gBAAgB,CAAC,MAAM,EAAE,UAAU,CAAE,SAAQ,QAAQ,CAAC,MAAM,CAAC;IAC1E,sDAAsD;IACtD,SAAS,CAAC,EAAE,UAAU,CAAC;CAC1B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/types/model/extensions/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Field } from "..";
|
|
2
|
-
import { ExtendedFormItem } from "../extendedFormItem";
|
|
3
|
-
/** Extra configuration for checkbox form item */
|
|
4
|
-
export interface CheckboxItemExtension {
|
|
5
|
-
/** Render checkbox without border */
|
|
6
|
-
withoutBorder?: boolean;
|
|
7
|
-
}
|
|
8
|
-
/** Extended checkbox form item */
|
|
9
|
-
export interface CheckboxFormItem extends ExtendedFormItem<boolean, CheckboxItemExtension> {
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Get checkbox extension if item has one
|
|
13
|
-
* @param item Form item configuration
|
|
14
|
-
* @returns Checkbox custom configuration if these props are found; otherwise `undefined`
|
|
15
|
-
*/
|
|
16
|
-
export declare function getCheckboxExt(item: Field<any>): CheckboxItemExtension | undefined;
|
|
17
|
-
//# sourceMappingURL=checkbox.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/form/types/model/extensions/items/checkbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,IAAI,CAAC;AAC3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAGvD,iDAAiD;AACjD,MAAM,WAAW,qBAAqB;IAClC,qCAAqC;IACrC,aAAa,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,kCAAkC;AAClC,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB,CAAC,OAAO,EAAE,qBAAqB,CAAC;CAAI;AAO9F;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,qBAAqB,GAAG,SAAS,CAElF"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { getExtensionConfig } from "./getExtension";
|
|
2
|
-
/** Extension model property names */
|
|
3
|
-
const extensionKeys = [
|
|
4
|
-
"withoutBorder",
|
|
5
|
-
];
|
|
6
|
-
/**
|
|
7
|
-
* Get checkbox extension if item has one
|
|
8
|
-
* @param item Form item configuration
|
|
9
|
-
* @returns Checkbox custom configuration if these props are found; otherwise `undefined`
|
|
10
|
-
*/
|
|
11
|
-
export function getCheckboxExt(item) {
|
|
12
|
-
return getExtensionConfig(item, extensionKeys);
|
|
13
|
-
}
|
|
14
|
-
;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Field } from "..";
|
|
2
|
-
/**
|
|
3
|
-
* Get extended component configuration from item configuration
|
|
4
|
-
* @param item Form item configuration
|
|
5
|
-
* @param extensionKeys Array of keys of extend component config model
|
|
6
|
-
* @returns Custom configuration if extension props are found; otherwise `undefined`
|
|
7
|
-
*/
|
|
8
|
-
export declare const getExtensionConfig: <TExtension>(item: Field<any>, extensionKeys: (keyof TExtension)[]) => TExtension | undefined;
|
|
9
|
-
//# sourceMappingURL=getExtension.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getExtension.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/form/types/model/extensions/items/getExtension.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,IAAI,CAAC;AAE3B;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,qBAAsB,MAAM,GAAG,CAAC,gEAgB9D,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Get extended component configuration from item configuration
|
|
3
|
-
* @param item Form item configuration
|
|
4
|
-
* @param extensionKeys Array of keys of extend component config model
|
|
5
|
-
* @returns Custom configuration if extension props are found; otherwise `undefined`
|
|
6
|
-
*/
|
|
7
|
-
export const getExtensionConfig = (item, extensionKeys) => {
|
|
8
|
-
const keys = Object.keys(item);
|
|
9
|
-
const definedExtraKeys = extensionKeys.filter(key => keys.includes(key)).map(x => x);
|
|
10
|
-
if (definedExtraKeys.length <= 0) {
|
|
11
|
-
return undefined;
|
|
12
|
-
}
|
|
13
|
-
const config = {};
|
|
14
|
-
definedExtraKeys.forEach(key => {
|
|
15
|
-
config[key] = item[key];
|
|
16
|
-
});
|
|
17
|
-
return config;
|
|
18
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/form/types/model/extensions/items/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { SelectableItem } from "../../../../../../components/dropdown/types";
|
|
2
|
-
import { Field } from "..";
|
|
3
|
-
import { ExtendedFormItem } from "../extendedFormItem";
|
|
4
|
-
/** Extra configuration for lookup form item */
|
|
5
|
-
export interface LookupItemExtension {
|
|
6
|
-
/** Items which can be selected */
|
|
7
|
-
items: Array<SelectableItem>;
|
|
8
|
-
/** Max height of dropdown list */
|
|
9
|
-
listMaxHeight?: number;
|
|
10
|
-
}
|
|
11
|
-
/** Extended lookup form item */
|
|
12
|
-
export interface LookupFormItem extends ExtendedFormItem<SelectableItem, LookupItemExtension> {
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Get lookup extension if item has one
|
|
16
|
-
* @param item Form item configuration
|
|
17
|
-
* @returns Lookup custom configuration if these props are found; otherwise `undefined`
|
|
18
|
-
*/
|
|
19
|
-
export declare function getLookupExt(item: Field<any>): LookupItemExtension | undefined;
|
|
20
|
-
//# sourceMappingURL=lookup.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lookup.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/form/types/model/extensions/items/lookup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAE7E,OAAO,EAAE,KAAK,EAAE,MAAM,IAAI,CAAC;AAC3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAGvD,+CAA+C;AAC/C,MAAM,WAAW,mBAAmB;IAChC,kCAAkC;IAClC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IAE7B,kCAAkC;IAClC,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,gCAAgC;AAChC,MAAM,WAAW,cAAe,SAAQ,gBAAgB,CAAC,cAAc,EAAE,mBAAmB,CAAC;CAAI;AAQjG;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,mBAAmB,GAAG,SAAS,CAE9E"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { getExtensionConfig } from "./getExtension";
|
|
2
|
-
/** Extension model property names */
|
|
3
|
-
const extensionKeys = [
|
|
4
|
-
"items",
|
|
5
|
-
"listMaxHeight",
|
|
6
|
-
];
|
|
7
|
-
/**
|
|
8
|
-
* Get lookup extension if item has one
|
|
9
|
-
* @param item Form item configuration
|
|
10
|
-
* @returns Lookup custom configuration if these props are found; otherwise `undefined`
|
|
11
|
-
*/
|
|
12
|
-
export function getLookupExt(item) {
|
|
13
|
-
return getExtensionConfig(item, extensionKeys);
|
|
14
|
-
}
|
|
15
|
-
;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Field } from "..";
|
|
2
|
-
import { ExtendedFormItem } from "../extendedFormItem";
|
|
3
|
-
/** Extra configuration for multiline form item */
|
|
4
|
-
export interface MultilineItemExtension {
|
|
5
|
-
/** Initial rows number */
|
|
6
|
-
rows?: number;
|
|
7
|
-
}
|
|
8
|
-
/** Extended multiline form item */
|
|
9
|
-
export interface MultilineFormItem extends ExtendedFormItem<string, MultilineItemExtension> {
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Get multiline extension if item has one
|
|
13
|
-
* @param item Form item configuration
|
|
14
|
-
* @returns Multiline custom configuration if these props are found; otherwise `undefined`
|
|
15
|
-
*/
|
|
16
|
-
export declare function getMultilineExt(item: Field<any>): MultilineItemExtension | undefined;
|
|
17
|
-
//# sourceMappingURL=multiline.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"multiline.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/form/types/model/extensions/items/multiline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,IAAI,CAAC;AAC3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAGvD,kDAAkD;AAClD,MAAM,WAAW,sBAAsB;IACnC,0BAA0B;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,mCAAmC;AACnC,MAAM,WAAW,iBAAkB,SAAQ,gBAAgB,CAAC,MAAM,EAAE,sBAAsB,CAAC;CAAI;AAO/F;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,sBAAsB,GAAG,SAAS,CAEpF"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { getExtensionConfig } from "./getExtension";
|
|
2
|
-
/** Extension model property names */
|
|
3
|
-
const extensionKeys = [
|
|
4
|
-
"rows",
|
|
5
|
-
];
|
|
6
|
-
/**
|
|
7
|
-
* Get multiline extension if item has one
|
|
8
|
-
* @param item Form item configuration
|
|
9
|
-
* @returns Multiline custom configuration if these props are found; otherwise `undefined`
|
|
10
|
-
*/
|
|
11
|
-
export function getMultilineExt(item) {
|
|
12
|
-
return getExtensionConfig(item, extensionKeys);
|
|
13
|
-
}
|
|
14
|
-
;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Field, SubmitButtonConfiguration } from ".";
|
|
2
|
-
/** Form configuration */
|
|
3
|
-
export interface FormConfig {
|
|
4
|
-
/** Form name */
|
|
5
|
-
name: string;
|
|
6
|
-
/** Form caption */
|
|
7
|
-
caption?: string;
|
|
8
|
-
/**
|
|
9
|
-
* Fields configuration.
|
|
10
|
-
* Items can be configurated with default values or with extensions.
|
|
11
|
-
* To use extensions just provide extra arguments in configuration.
|
|
12
|
-
* To see possible extensions - see `model/extensions/items` interfaces with `..Extension` name template
|
|
13
|
-
*/
|
|
14
|
-
items: Array<Field<any>>;
|
|
15
|
-
/**
|
|
16
|
-
* Configuration for submit button
|
|
17
|
-
*/
|
|
18
|
-
submitButtonConfiguration: SubmitButtonConfiguration;
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=form.config.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form.config.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/types/model/form.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,yBAAyB,EAAE,MAAM,GAAG,CAAC;AAErD,yBAAyB;AACzB,MAAM,WAAW,UAAU;IACvB,gBAAgB;IAChB,IAAI,EAAE,MAAM,CAAC;IAEb,mBAAmB;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;;MAKE;IACF,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;IAEzB;;OAEG;IACH,yBAAyB,EAAE,yBAAyB,CAAC;CACxD"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { ButtonType } from "../../../button/types";
|
|
2
|
-
import { ElementIcon, ElementSize } from "../../../types";
|
|
3
|
-
/** Form submit button configuration */
|
|
4
|
-
export interface SubmitButtonConfiguration {
|
|
5
|
-
/** Button displaying text */
|
|
6
|
-
caption?: string;
|
|
7
|
-
/** Type of button (color) */
|
|
8
|
-
type: ButtonType;
|
|
9
|
-
/** Configuration of inner icon */
|
|
10
|
-
icon?: ElementIcon;
|
|
11
|
-
/** Button size */
|
|
12
|
-
size?: ElementSize;
|
|
13
|
-
/** Title on hover */
|
|
14
|
-
title?: string;
|
|
15
|
-
/** Is button uses light version of color */
|
|
16
|
-
light?: boolean;
|
|
17
|
-
/** Is button outlined */
|
|
18
|
-
outlined?: boolean;
|
|
19
|
-
/** Should button corners be rounded */
|
|
20
|
-
rounded?: boolean;
|
|
21
|
-
/** Display loading icon */
|
|
22
|
-
isLoading?: boolean;
|
|
23
|
-
/** Is button disabled */
|
|
24
|
-
disabled?: boolean;
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=form.submitButtonCfg.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form.submitButtonCfg.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/types/model/form.submitButtonCfg.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE1D,uCAAuC;AACvC,MAAM,WAAW,yBAAyB;IACtC,6BAA6B;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,8BAA8B;IAC9B,IAAI,EAAE,UAAU,CAAC;IAEjB,kCAAkC;IAClC,IAAI,CAAC,EAAE,WAAW,CAAC;IAEnB,mBAAmB;IACnB,IAAI,CAAC,EAAE,WAAW,CAAC;IAEnB,qBAAqB;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,6CAA6C;IAC7C,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB,yBAAyB;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,wCAAwC;IACxC,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,2BAA2B;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,yBAAyB;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { FormItemModelConfig } from "./formItem.modelConfig";
|
|
2
|
-
import { FormItemViewConfig } from "./formItem.viewConfig";
|
|
3
|
-
/** Single form item */
|
|
4
|
-
export interface FormItem<TValue> {
|
|
5
|
-
/** Name of form item (will be key in value storage) */
|
|
6
|
-
name: string;
|
|
7
|
-
/** Configuration for view component */
|
|
8
|
-
viewConfig: FormItemViewConfig;
|
|
9
|
-
/** Configuration for model data */
|
|
10
|
-
modelConfig: FormItemModelConfig<TValue>;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=formItem.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/types/model/formItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,uBAAuB;AACvB,MAAM,WAAW,QAAQ,CAAC,MAAM;IAC5B,uDAAuD;IACvD,IAAI,EAAE,MAAM,CAAC;IAEb,uCAAuC;IACvC,UAAU,EAAE,kBAAkB,CAAC;IAE/B,mCAAmC;IACnC,WAAW,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAC;CAC5C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { FormItemValidationState } from "./formItemValidationState";
|
|
2
|
-
import { FieldValidator } from "./in";
|
|
3
|
-
/** Model configuration for form item */
|
|
4
|
-
export interface FormItemModelConfig<TValue> {
|
|
5
|
-
/** Data value type */
|
|
6
|
-
type: string;
|
|
7
|
-
/** Current value */
|
|
8
|
-
value: TValue;
|
|
9
|
-
/** Default value */
|
|
10
|
-
defaultValue?: TValue;
|
|
11
|
-
/** Is value required */
|
|
12
|
-
required: boolean;
|
|
13
|
-
/** Value validators */
|
|
14
|
-
validators: Array<FieldValidator<TValue>>;
|
|
15
|
-
/** Last validation messages */
|
|
16
|
-
validationMessages: Array<string>;
|
|
17
|
-
/** Validation state after last validation */
|
|
18
|
-
validationState: FormItemValidationState;
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=formItem.modelConfig.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formItem.modelConfig.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/types/model/formItem.modelConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAEtC,wCAAwC;AACxC,MAAM,WAAW,mBAAmB,CAAC,MAAM;IACvC,sBAAsB;IACtB,IAAI,EAAE,MAAM,CAAC;IAEb,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAC;IAEd,oBAAoB;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,wBAAwB;IACxB,QAAQ,EAAE,OAAO,CAAC;IAElB,uBAAuB;IACvB,UAAU,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;IAE1C,+BAA+B;IAC/B,kBAAkB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAElC,6CAA6C;IAC7C,eAAe,EAAE,uBAAuB,CAAC;CAC5C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { LayoutConfig } from "./in";
|
|
2
|
-
/** Form item config for visual appearance */
|
|
3
|
-
export interface FormItemViewConfig {
|
|
4
|
-
/** Html class name list */
|
|
5
|
-
className: string;
|
|
6
|
-
/** Is item disabled */
|
|
7
|
-
disabled: boolean;
|
|
8
|
-
/** Item caption */
|
|
9
|
-
caption: string;
|
|
10
|
-
/** Item grid layout configuration */
|
|
11
|
-
layoutConfig: LayoutConfig;
|
|
12
|
-
/** Form item view component */
|
|
13
|
-
type: string;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=formItem.viewConfig.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formItem.viewConfig.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/types/model/formItem.viewConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAEpC,6CAA6C;AAC7C,MAAM,WAAW,kBAAkB;IAC/B,2BAA2B;IAC3B,SAAS,EAAE,MAAM,CAAC;IAElB,uBAAuB;IACvB,QAAQ,EAAE,OAAO,CAAC;IAElB,mBAAmB;IACnB,OAAO,EAAE,MAAM,CAAC;IAEhB,qCAAqC;IACrC,YAAY,EAAE,YAAY,CAAC;IAE3B,+BAA+B;IAC/B,IAAI,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/** Form item validation status */
|
|
2
|
-
export declare enum FormItemValidationState {
|
|
3
|
-
/** Not validated or not applicable */
|
|
4
|
-
None = "none",
|
|
5
|
-
/** Item have a valid value*/
|
|
6
|
-
Valid = "valid",
|
|
7
|
-
/** Item have an invalid value */
|
|
8
|
-
Invalid = "invalid"
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=formItemValidationState.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formItemValidationState.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/types/model/formItemValidationState.ts"],"names":[],"mappings":"AAAA,kCAAkC;AAClC,oBAAY,uBAAuB;IAC/B,sCAAsC;IACtC,IAAI,SAAS;IAEb,6BAA6B;IAC7B,KAAK,UAAU;IAEf,iCAAiC;IACjC,OAAO,YAAY;CACtB"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/** Form item validation status */
|
|
2
|
-
export var FormItemValidationState;
|
|
3
|
-
(function (FormItemValidationState) {
|
|
4
|
-
/** Not validated or not applicable */
|
|
5
|
-
FormItemValidationState["None"] = "none";
|
|
6
|
-
/** Item have a valid value*/
|
|
7
|
-
FormItemValidationState["Valid"] = "valid";
|
|
8
|
-
/** Item have an invalid value */
|
|
9
|
-
FormItemValidationState["Invalid"] = "invalid";
|
|
10
|
-
})(FormItemValidationState || (FormItemValidationState = {}));
|
|
11
|
-
;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { LabelConfig, FieldType, FieldValidator, ViewConfig } from "./";
|
|
2
|
-
/** Base field configuration */
|
|
3
|
-
export interface BaseField<TValue> {
|
|
4
|
-
/** Name */
|
|
5
|
-
name: string;
|
|
6
|
-
/** Type */
|
|
7
|
-
type: FieldType;
|
|
8
|
-
/** View configuration for rendering */
|
|
9
|
-
viewConfig: ViewConfig;
|
|
10
|
-
/** Caption configuration */
|
|
11
|
-
label: LabelConfig;
|
|
12
|
-
/** Field validators */
|
|
13
|
-
validators?: Array<FieldValidator<TValue>>;
|
|
14
|
-
/** Default value on first render */
|
|
15
|
-
defaultValue?: TValue;
|
|
16
|
-
/** Is field should be readonly */
|
|
17
|
-
readonly?: boolean;
|
|
18
|
-
/** Is field value should be required*/
|
|
19
|
-
required?: boolean;
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=baseField.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"baseField.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/types/model/in/baseField.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAExE,+BAA+B;AAC/B,MAAM,WAAW,SAAS,CAAC,MAAM;IAC7B,WAAW;IACX,IAAI,EAAE,MAAM,CAAC;IAEb,WAAW;IACX,IAAI,EAAE,SAAS,CAAC;IAEhB,uCAAuC;IACvC,UAAU,EAAE,UAAU,CAAC;IAEvB,4BAA4B;IAC5B,KAAK,EAAE,WAAW,CAAC;IAEnB,uBAAuB;IACvB,UAAU,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;IAE3C,oCAAoC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,kCAAkC;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,uCAAuC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/** Item label configuration */
|
|
2
|
-
export interface LabelConfig {
|
|
3
|
-
/**
|
|
4
|
-
* Label value.
|
|
5
|
-
* Caption for form item
|
|
6
|
-
*/
|
|
7
|
-
caption: string;
|
|
8
|
-
/**
|
|
9
|
-
* Is form item horizontal.
|
|
10
|
-
* Displays label and item in single line
|
|
11
|
-
*/
|
|
12
|
-
horizontal?: boolean;
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=captionConfig.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"captionConfig.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/types/model/in/captionConfig.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,MAAM,WAAW,WAAW;IACxB;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fieldType.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/types/model/in/fieldType.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,oBAAY,SAAS,GACf,MAAM,GACN,WAAW,GACX,UAAU,GACV,QAAQ,GACR,MAAM,GACN,QAAQ,GACR,UAAU,CACX"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fieldValidator.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/types/model/in/fieldValidator.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,oBAAY,cAAc,CAAC,MAAM,IAAI,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC"}
|