ngx-t-forms-types 0.0.12 → 0.0.13
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/dist/interfaces/FormBuilder/DefaultEelement.js +7 -1
- package/dist/interfaces/FormBuilder/DefaultInputConfigInterface.d.ts +2 -1
- package/dist/interfaces/FormBuilder/FormInputKeys.d.ts +3 -1
- package/dist/interfaces/FormBuilder/FormInputKeys.js +2 -0
- package/dist/interfaces/FormBuilder/inputConfig/ElementEditConfig.js +19 -1
- package/dist/interfaces/formInput/BasicFormInputInterface.d.ts +7 -1
- package/dist/interfaces/formInput/BasicFormInputInterface.js +6 -0
- package/dist/interfaces/formInput/ISelectInputInterface.d.ts +6 -0
- package/dist/interfaces/formInput/ISelectInputInterface.js +1 -0
- package/dist/interfaces/formInput/index.d.ts +3 -2
- package/dist/interfaces/formInput/index.js +2 -2
- package/dist/schemas/FormInputSchema.js +3 -1
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AutocapitalizeOptions, ElementTypes, InputDataTypes, InputTypes } from "../formInput";
|
|
2
|
+
import { OptionSelectTypes } from "../formInput/BasicFormInputInterface";
|
|
2
3
|
import { InputFileType } from "../formInput/FileUploadInputInterface";
|
|
3
4
|
import { MSCOA_INPUT_DEFAULT_MAT_OPTIONS } from "../formInput/MscoaInput";
|
|
4
5
|
import { RichTextEditorType } from "../formInput/RichTextEditorInput";
|
|
@@ -154,6 +155,7 @@ export const DefaultInputConfig = {
|
|
|
154
155
|
AllFormInputPrimaryKeys.DataType,
|
|
155
156
|
AllFormInputPrimaryKeys.FormControlName,
|
|
156
157
|
AllFormInputPrimaryKeys.MatOptions,
|
|
158
|
+
AllFormInputPrimaryKeys.OptionSelectType
|
|
157
159
|
],
|
|
158
160
|
properties: [
|
|
159
161
|
AllFormInputPrimaryKeys.Label,
|
|
@@ -170,7 +172,9 @@ export const DefaultInputConfig = {
|
|
|
170
172
|
FormInputKeys.PrefixText,
|
|
171
173
|
FormInputKeys.SuffixText,
|
|
172
174
|
AllFormInputPrimaryKeys.DataType,
|
|
173
|
-
SpecialElementKeys.MatOptionsApiCall
|
|
175
|
+
SpecialElementKeys.MatOptionsApiCall,
|
|
176
|
+
AllFormInputPrimaryKeys.OptionSelectType,
|
|
177
|
+
AllFormInputPrimaryKeys.AllowMultipleSelection
|
|
174
178
|
],
|
|
175
179
|
elementTemplate: {
|
|
176
180
|
element: ElementTypes.Select,
|
|
@@ -181,6 +185,8 @@ export const DefaultInputConfig = {
|
|
|
181
185
|
appearance: 'outline',
|
|
182
186
|
isCalculatedField: false,
|
|
183
187
|
dataType: InputDataTypes.String,
|
|
188
|
+
optionSelectType: OptionSelectTypes.DropDown, // Default to dropdown,
|
|
189
|
+
allowMultipleSelection: false,
|
|
184
190
|
},
|
|
185
191
|
},
|
|
186
192
|
[ElementTypes.IconSelect]: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ElementTypes, IToggleInput, ITextareaProperties, IDateRangePickerInput, IFileUploadInput, IMultiple, IWorkflowAdjudicationInput } from "../formInput";
|
|
2
2
|
import { IFormElementTemplate } from "../formInput/BasicFormInputInterface";
|
|
3
|
+
import { ISelectInputInterface } from "../formInput/ISelectInputInterface";
|
|
3
4
|
import { IMscoaFormInput } from "../formInput/MscoaInput";
|
|
4
5
|
import { IRichTextEditor } from "../formInput/RichTextEditorInput";
|
|
5
6
|
import { IWorkflowDocumentPicker } from "../formInput/WorkflowDocumentPicker";
|
|
@@ -42,7 +43,7 @@ export interface DefaultInputConfigInterface {
|
|
|
42
43
|
disabled: boolean;
|
|
43
44
|
illustration: string;
|
|
44
45
|
properties: Array<FormInputKeys | SpecialElementKeys | AllFormInputPrimaryKeys>;
|
|
45
|
-
elementTemplate:
|
|
46
|
+
elementTemplate: ISelectInputInterface;
|
|
46
47
|
requiredProperties: Array<FormInputKeys | AllFormInputPrimaryKeys>;
|
|
47
48
|
};
|
|
48
49
|
[ElementTypes.IconSelect]: {
|
|
@@ -92,5 +92,7 @@ export declare enum AllFormInputPrimaryKeys {
|
|
|
92
92
|
AdjudicationPointTypes = "adjudicationPointTypes",
|
|
93
93
|
AdjudicationReviewFeedbackTemplate = "adjudicationReviewFeedbackTemplate",
|
|
94
94
|
TrueLabel = "trueLabel",
|
|
95
|
-
FalseLabel = "falseLabel"
|
|
95
|
+
FalseLabel = "falseLabel",
|
|
96
|
+
OptionSelectType = "optionSelectType",
|
|
97
|
+
AllowMultipleSelection = "allowMultipleSelection"
|
|
96
98
|
}
|
|
@@ -97,4 +97,6 @@ export var AllFormInputPrimaryKeys;
|
|
|
97
97
|
AllFormInputPrimaryKeys["AdjudicationReviewFeedbackTemplate"] = "adjudicationReviewFeedbackTemplate";
|
|
98
98
|
AllFormInputPrimaryKeys["TrueLabel"] = "trueLabel";
|
|
99
99
|
AllFormInputPrimaryKeys["FalseLabel"] = "falseLabel";
|
|
100
|
+
AllFormInputPrimaryKeys["OptionSelectType"] = "optionSelectType";
|
|
101
|
+
AllFormInputPrimaryKeys["AllowMultipleSelection"] = "allowMultipleSelection";
|
|
100
102
|
})(AllFormInputPrimaryKeys || (AllFormInputPrimaryKeys = {}));
|
|
@@ -2,6 +2,7 @@ import { CurrenciesList } from "../../../Configs/currencies";
|
|
|
2
2
|
import { DatePipeOptions } from "../../../Configs/datePipes";
|
|
3
3
|
import { AdjudicationSteps, ElementTypes, InputDataTypes, InputPipeTypes, InputTypes } from "../../formInput";
|
|
4
4
|
import { DataSources } from "../../formInput/APIDataFetchingConfigurationInterface";
|
|
5
|
+
import { OptionSelectTypes } from "../../formInput/BasicFormInputInterface";
|
|
5
6
|
import { InputFileType } from "../../formInput/FileUploadInputInterface";
|
|
6
7
|
import { RichTextEditorType } from "../../formInput/RichTextEditorInput";
|
|
7
8
|
import { LabelPosition } from "../../formInput/ToggleInputInterface";
|
|
@@ -85,6 +86,23 @@ export var ElementConfig = {
|
|
|
85
86
|
hint: 'The type of input determines the type of data that can be entered into the input',
|
|
86
87
|
options: Object.values(InputTypes).map((type) => ({ label: type, value: type })),
|
|
87
88
|
},
|
|
89
|
+
{
|
|
90
|
+
name: AllFormInputPrimaryKeys.OptionSelectType,
|
|
91
|
+
editType: ElementEditorTypes.ChipSelect,
|
|
92
|
+
deepBind: [AllFormInputPrimaryKeys.OptionSelectType],
|
|
93
|
+
options: Object.values(OptionSelectTypes).map((type) => ({ label: type, value: type })),
|
|
94
|
+
id: "4c781244-dcbe-4f21-b01b-a5e813c62f2e",
|
|
95
|
+
label: 'Options select input type',
|
|
96
|
+
hint: `It can either be a dropdown, radio buttons, or chip select.For long options list a dropdown is recommended, while for short lists radio buttons or chips can be used.`,
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: AllFormInputPrimaryKeys.AllowMultipleSelection,
|
|
100
|
+
editType: ElementEditorTypes.Toggle,
|
|
101
|
+
deepBind: [AllFormInputPrimaryKeys.AllowMultipleSelection],
|
|
102
|
+
id: "19466cd6-9716-4d66-9213-a458528f76f6",
|
|
103
|
+
label: 'Allow multiple selection',
|
|
104
|
+
hint: `When enabled, users can select multiple options from the list. This is useful for inputs like tags or categories.`,
|
|
105
|
+
},
|
|
88
106
|
{
|
|
89
107
|
name: AllFormInputPrimaryKeys.FileType,
|
|
90
108
|
editType: ElementEditorTypes.OptionSelect,
|
|
@@ -436,7 +454,7 @@ export var ElementConfig = {
|
|
|
436
454
|
id: "d4d792af-c983-4587-a94f-781d7b963b4d",
|
|
437
455
|
elements: [
|
|
438
456
|
{
|
|
439
|
-
name:
|
|
457
|
+
name: SpecialElementKeys.Default,
|
|
440
458
|
deepBind: ['matOptions', 'fetch', 'value', 'source'],
|
|
441
459
|
hint: `Choose where input values come from: 'Form Input' links to another field, 'Postman API' fetches from an external API, 'Data Pipeline' pulls from MongoDB.`,
|
|
442
460
|
editType: ElementEditorTypes.ChipSelect,
|
|
@@ -8,7 +8,8 @@ import { ITextareaProperties } from "./TextAreaInput";
|
|
|
8
8
|
import { CalculatedFieldRules } from "./calculatedFieldRules";
|
|
9
9
|
import { IRichTextEditor } from "./RichTextEditorInput";
|
|
10
10
|
import { IWorkflowDocumentPicker } from "./WorkflowDocumentPicker";
|
|
11
|
-
|
|
11
|
+
import { ISelectInputInterface } from "./ISelectInputInterface";
|
|
12
|
+
export type FormColumnInputs = IBasicFormInput & ISelectInputInterface & IWorkflowDocumentPicker & IFileUploadInput & IDateRangePickerInput & ITextareaProperties & IToggleInput & IMatrixInput & IMultiple & IScoaInput & IRichTextEditor & IWorkflowAdjudicationInput;
|
|
12
13
|
export declare enum ElementTypes {
|
|
13
14
|
Input = "input",
|
|
14
15
|
Location = "location",
|
|
@@ -102,6 +103,11 @@ export declare enum maxMinCustomScripts {
|
|
|
102
103
|
IServeBudgetPeriods = "IServePeriods",
|
|
103
104
|
IServeDateLimiter = "IServeDateLimitter"
|
|
104
105
|
}
|
|
106
|
+
export declare enum OptionSelectTypes {
|
|
107
|
+
DropDown = "dropDown",
|
|
108
|
+
ChipSelect = "chipSelect",
|
|
109
|
+
RadioButton = "radioButton"
|
|
110
|
+
}
|
|
105
111
|
export interface IBasicFormInput extends IFormElementTemplate {
|
|
106
112
|
label: string;
|
|
107
113
|
readonly formControlName: string;
|
|
@@ -98,3 +98,9 @@ export var maxMinCustomScripts;
|
|
|
98
98
|
maxMinCustomScripts["IServeBudgetPeriods"] = "IServePeriods";
|
|
99
99
|
maxMinCustomScripts["IServeDateLimiter"] = "IServeDateLimitter";
|
|
100
100
|
})(maxMinCustomScripts || (maxMinCustomScripts = {}));
|
|
101
|
+
export var OptionSelectTypes;
|
|
102
|
+
(function (OptionSelectTypes) {
|
|
103
|
+
OptionSelectTypes["DropDown"] = "dropDown";
|
|
104
|
+
OptionSelectTypes["ChipSelect"] = "chipSelect";
|
|
105
|
+
OptionSelectTypes["RadioButton"] = "radioButton";
|
|
106
|
+
})(OptionSelectTypes || (OptionSelectTypes = {}));
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AllFormInputPrimaryKeys } from "../FormBuilder/FormInputKeys";
|
|
2
|
+
import { IBasicFormInput, OptionSelectTypes } from "./BasicFormInputInterface";
|
|
3
|
+
export interface ISelectInputInterface extends IBasicFormInput {
|
|
4
|
+
[AllFormInputPrimaryKeys.OptionSelectType]: OptionSelectTypes;
|
|
5
|
+
[AllFormInputPrimaryKeys.AllowMultipleSelection]: boolean;
|
|
6
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { AllFormInputPrimaryKeys } from "../FormBuilder/FormInputKeys";
|
|
@@ -2,12 +2,13 @@ import { IFolderItem, IPostmanCollection } from "../FormBuilder/postmanCollectio
|
|
|
2
2
|
import { IWorkflowDocListCols } from "../FormBuilder/workflowSelectionConfig";
|
|
3
3
|
import { TreeNode } from "../FormSlide/accessTree";
|
|
4
4
|
import { APIDataFetchingConfigurationInterface, InputAPIDataId, MongoDbPipeLineConfigInterface } from "./APIDataFetchingConfigurationInterface";
|
|
5
|
-
import { AutocapitalizeOptions, AutocompleteOptions, ElementTypes, IBasicFormInput, InputDataTypes, InputPipeTypes, InputTypes } from "./BasicFormInputInterface";
|
|
5
|
+
import { AutocapitalizeOptions, AutocompleteOptions, ElementTypes, IBasicFormInput, InputDataTypes, InputPipeTypes, InputTypes, OptionSelectTypes } from "./BasicFormInputInterface";
|
|
6
6
|
import { IDateRangePickerInput } from "./DateRangePickerInput";
|
|
7
7
|
import { AllDocumentFileExtensions, AllImageFileExtensions, FileUploadInputValueInterface, IFileUploadInput, InputFileType, UploadTypes } from "./FileUploadInputInterface";
|
|
8
8
|
import { FormControlCustomValidatorsInterface } from "./FormControlCustomValidatorsInterface";
|
|
9
9
|
import { FormInputBasicOptionInterface } from "./FormInputBasicOptionInterface";
|
|
10
10
|
import { IAccountSegmentTreeKeys, IGetTreeResponse, IIncludedSegmentConfig, IScoaAccount, IScoaInput, IScoaInputConfig, ITableScoaSelectionRow, ScoaAccountTree, ScoaInterface, ScoaSegmentValue } from "./IMscoaAccount";
|
|
11
|
+
import { ISelectInputInterface } from "./ISelectInputInterface";
|
|
11
12
|
import { MatDataOptionsInterface } from "./MatDataOptionsInterface";
|
|
12
13
|
import { IMatrixInput } from "./MatrixInputInterface";
|
|
13
14
|
import { MinInputMapInput, MinInputTypes, MinimumInputRequiredInterface } from "./MinimumInputRequiredInterface";
|
|
@@ -22,4 +23,4 @@ import { CalculatedFieldRules } from "./calculatedFieldRules";
|
|
|
22
23
|
import { CalculationFunctions, calculationVariableInterface } from "./calculationVariableInterface";
|
|
23
24
|
import { ValidationError, ValidationOptions } from "./schema";
|
|
24
25
|
import { IUserSignature } from "./userSignature";
|
|
25
|
-
export { ElementTypes, InputTypes, InputPipeTypes, AutocapitalizeOptions, AutocompleteOptions, InputDataTypes, MinInputTypes, IBasicFormInput, IFileUploadInput, IDateRangePickerInput, ITextareaProperties, IToggleInput, IMatrixInput, IMultiple, IMultipleInputCal, IScoaInput, TableConfigurationsInterface, TableColumnConfigInterface, FormControlCustomValidatorsInterface, MinimumInputRequiredInterface, MinInputMapInput, CalculatedFieldRules, calculationVariableInterface, APIDataFetchingConfigurationInterface, IGetTreeResponse, CalculationFunctions, TreeNode, IPostmanCollection, IFolderItem, FileUploadInputValueInterface, AllDocumentFileExtensions, AllImageFileExtensions, UploadTypes, InputFileType, IScoaAccount, IScoaInputConfig, ITableScoaSelectionRow, ScoaSegmentValue, IIncludedSegmentConfig, ScoaAccountTree, IUserSignature, ValidationOptions, ValidationError, MatDataOptionsInterface, MongoDbPipeLineConfigInterface, InputAPIDataId, FormInputBasicOptionInterface, ScoaInterface, ScoaInnerInput, IAccountSegmentTreeKeys, IWorkflowDocumentPicker, IWorkflowDocumentPickerConfig, workflowStepStatus, IWorkflowDocListCols, AdjudicationSteps, IWorkflowAdjudicationInput, WorkflowAdjudicationScoreSheetValue, WorkflowAdjudicationMicroFlowReviewValue, WorkflowAdjudicationResponseElectedSupplierSelectionValue, ScoreSheetItem, AdjResponseReviewColumnMapping };
|
|
26
|
+
export { ElementTypes, InputTypes, InputPipeTypes, AutocapitalizeOptions, AutocompleteOptions, InputDataTypes, MinInputTypes, IBasicFormInput, IFileUploadInput, IDateRangePickerInput, ITextareaProperties, IToggleInput, IMatrixInput, IMultiple, IMultipleInputCal, IScoaInput, TableConfigurationsInterface, TableColumnConfigInterface, FormControlCustomValidatorsInterface, MinimumInputRequiredInterface, MinInputMapInput, CalculatedFieldRules, calculationVariableInterface, APIDataFetchingConfigurationInterface, IGetTreeResponse, CalculationFunctions, TreeNode, IPostmanCollection, IFolderItem, FileUploadInputValueInterface, AllDocumentFileExtensions, AllImageFileExtensions, UploadTypes, InputFileType, IScoaAccount, IScoaInputConfig, ITableScoaSelectionRow, ScoaSegmentValue, IIncludedSegmentConfig, ScoaAccountTree, IUserSignature, ValidationOptions, ValidationError, MatDataOptionsInterface, MongoDbPipeLineConfigInterface, InputAPIDataId, FormInputBasicOptionInterface, ScoaInterface, ScoaInnerInput, IAccountSegmentTreeKeys, IWorkflowDocumentPicker, IWorkflowDocumentPickerConfig, workflowStepStatus, IWorkflowDocListCols, AdjudicationSteps, IWorkflowAdjudicationInput, WorkflowAdjudicationScoreSheetValue, WorkflowAdjudicationMicroFlowReviewValue, WorkflowAdjudicationResponseElectedSupplierSelectionValue, ScoreSheetItem, AdjResponseReviewColumnMapping, OptionSelectTypes, ISelectInputInterface };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AutocapitalizeOptions, AutocompleteOptions, ElementTypes, InputDataTypes, InputPipeTypes, InputTypes } from "./BasicFormInputInterface";
|
|
1
|
+
import { AutocapitalizeOptions, AutocompleteOptions, ElementTypes, InputDataTypes, InputPipeTypes, InputTypes, OptionSelectTypes } from "./BasicFormInputInterface";
|
|
2
2
|
import { AllDocumentFileExtensions, AllImageFileExtensions, InputFileType, UploadTypes } from "./FileUploadInputInterface";
|
|
3
3
|
import { MinInputTypes } from "./MinimumInputRequiredInterface";
|
|
4
4
|
import { AdjudicationSteps } from "./WorkflowAdjudication";
|
|
@@ -6,4 +6,4 @@ import { workflowStepStatus } from "./WorkflowDocumentPicker";
|
|
|
6
6
|
import { CalculationFunctions } from "./calculationVariableInterface";
|
|
7
7
|
export {
|
|
8
8
|
///ENUMS
|
|
9
|
-
ElementTypes, InputTypes, InputPipeTypes, AutocapitalizeOptions, AutocompleteOptions, InputDataTypes, MinInputTypes, CalculationFunctions, AllDocumentFileExtensions, AllImageFileExtensions, UploadTypes, InputFileType, workflowStepStatus, AdjudicationSteps };
|
|
9
|
+
ElementTypes, InputTypes, InputPipeTypes, AutocapitalizeOptions, AutocompleteOptions, InputDataTypes, MinInputTypes, CalculationFunctions, AllDocumentFileExtensions, AllImageFileExtensions, UploadTypes, InputFileType, workflowStepStatus, AdjudicationSteps, OptionSelectTypes };
|
|
@@ -14,7 +14,7 @@ import { MscoaInputConfigSchema } from './MscoaConfigSchema';
|
|
|
14
14
|
import { MatDataOptionsSchema } from './MatOptionsSchema';
|
|
15
15
|
import { CalculationFunctions } from '../interfaces/formInput/calculationVariableInterface';
|
|
16
16
|
import { RichTextEditorType } from '../interfaces/formInput/RichTextEditorInput';
|
|
17
|
-
import { InputViewTypes } from '../interfaces/formInput/BasicFormInputInterface';
|
|
17
|
+
import { InputViewTypes, OptionSelectTypes } from '../interfaces/formInput/BasicFormInputInterface';
|
|
18
18
|
import { workflowDocumentPickerConfigSchema } from './DocmentPickerInputSchema';
|
|
19
19
|
export const baseFormColumnInputsSchema = Joi.object({
|
|
20
20
|
[AllFormInputPrimaryKeys.Id]: Joi.string().optional(),
|
|
@@ -33,6 +33,8 @@ export const baseFormColumnInputsSchema = Joi.object({
|
|
|
33
33
|
[AllFormInputPrimaryKeys.LabelPosition]: Joi.string().valid(...Object.values(LabelPosition)).optional(),
|
|
34
34
|
[AllFormInputPrimaryKeys.FalseLabel]: Joi.string().optional(),
|
|
35
35
|
[AllFormInputPrimaryKeys.TrueLabel]: Joi.string().optional(),
|
|
36
|
+
[AllFormInputPrimaryKeys.OptionSelectType]: Joi.string().valid(...Object.values(OptionSelectTypes)).optional(),
|
|
37
|
+
[AllFormInputPrimaryKeys.AllowMultipleSelection]: Joi.boolean().optional(),
|
|
36
38
|
[AllFormInputPrimaryKeys.Min]: Joi.alternatives().try(Joi.number(), Joi.string(), Joi.date()).optional(),
|
|
37
39
|
[AllFormInputPrimaryKeys.Max]: Joi.alternatives().try(Joi.number(), Joi.string(), Joi.date()).optional(),
|
|
38
40
|
[AllFormInputPrimaryKeys.MinLength]: Joi.alternatives().try(Joi.number(), Joi.string()).optional(),
|