ngx-t-forms-types 0.0.18 → 0.0.19
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 +1 -0
- package/dist/interfaces/FormBuilder/DefaultInputConfigInterface.d.ts +1 -1
- package/dist/interfaces/FormBuilder/FormInputKeys.d.ts +1 -0
- package/dist/interfaces/FormBuilder/FormInputKeys.js +1 -0
- package/dist/interfaces/FormBuilder/elementEditor.d.ts +1 -0
- package/dist/interfaces/FormBuilder/inputConfig/ElementEditConfig.js +17 -0
- package/dist/interfaces/environment/environment.d.ts +9 -2
- package/dist/interfaces/formInput/MultipleInterface.d.ts +7 -0
- package/dist/interfaces/formInput/MultipleInterface.js +7 -1
- package/dist/interfaces/formInput/index.d.ts +2 -2
- package/dist/interfaces/formInput/index.js +2 -1
- package/dist/schemas/FormInputSchema.js +4 -2
- package/dist/schemas/MatOptionsSchema.js +2 -2
- package/package.json +1 -1
|
@@ -734,6 +734,7 @@ export const DefaultInputConfig = {
|
|
|
734
734
|
AllFormInputPrimaryKeys.MatOptions,
|
|
735
735
|
AllFormInputPrimaryKeys.FormInputs,
|
|
736
736
|
AllFormInputPrimaryKeys.HandleLabel,
|
|
737
|
+
SpecialElementKeys.MultipleInputAvailableOperations
|
|
737
738
|
],
|
|
738
739
|
elementTemplate: {
|
|
739
740
|
element: ElementTypes.MultipleInput,
|
|
@@ -121,7 +121,7 @@ export interface DefaultInputConfigInterface {
|
|
|
121
121
|
label: string;
|
|
122
122
|
disabled: boolean;
|
|
123
123
|
illustration: string;
|
|
124
|
-
properties: Array<FormInputKeys | AllFormInputPrimaryKeys>;
|
|
124
|
+
properties: Array<FormInputKeys | AllFormInputPrimaryKeys | SpecialElementKeys>;
|
|
125
125
|
elementTemplate: IMultiple;
|
|
126
126
|
requiredProperties: Array<FormInputKeys | AllFormInputPrimaryKeys>;
|
|
127
127
|
};
|
|
@@ -7,6 +7,7 @@ export declare enum SpecialElementKeys {
|
|
|
7
7
|
DefaultCalculatedFieldRules = "defaultCalculatedFieldRules",
|
|
8
8
|
MatOptionsItemType = "matOptionsItemType",
|
|
9
9
|
MatOptionsSelectionOptions = "matOptionsSelectionOptions",
|
|
10
|
+
MultipleInputAvailableOperations = "multipleInputAvailableOperations",
|
|
10
11
|
DefaultValuePipe = "defaultValuePipe",
|
|
11
12
|
DefaultCurrencySelect = "defaultCurrencySelect",
|
|
12
13
|
DefaultDecimalNumberInput = "defaultDecimalNumberInput",
|
|
@@ -8,6 +8,7 @@ export var SpecialElementKeys;
|
|
|
8
8
|
SpecialElementKeys["DefaultCalculatedFieldRules"] = "defaultCalculatedFieldRules";
|
|
9
9
|
SpecialElementKeys["MatOptionsItemType"] = "matOptionsItemType";
|
|
10
10
|
SpecialElementKeys["MatOptionsSelectionOptions"] = "matOptionsSelectionOptions";
|
|
11
|
+
SpecialElementKeys["MultipleInputAvailableOperations"] = "multipleInputAvailableOperations";
|
|
11
12
|
SpecialElementKeys["DefaultValuePipe"] = "defaultValuePipe";
|
|
12
13
|
SpecialElementKeys["DefaultCurrencySelect"] = "defaultCurrencySelect";
|
|
13
14
|
SpecialElementKeys["DefaultDecimalNumberInput"] = "defaultDecimalNumberInput";
|
|
@@ -91,4 +91,5 @@ export interface ElementEditorInnerSectionElementInterface {
|
|
|
91
91
|
httpGetDataFunction?: (url: string, options: any) => Observable<any>;
|
|
92
92
|
getWorkflowOptions?: Observable<IWorkflowOption[]> | undefined;
|
|
93
93
|
getMscoaTree?: Observable<IGetTreeResponse> | undefined;
|
|
94
|
+
multipleSelection?: boolean;
|
|
94
95
|
}
|
|
@@ -5,6 +5,7 @@ import { DataSources } from "../../formInput/APIDataFetchingConfigurationInterfa
|
|
|
5
5
|
import { OptionSelectTypes } from "../../formInput/BasicFormInputInterface";
|
|
6
6
|
import { InputFileType } from "../../formInput/FileUploadInputInterface";
|
|
7
7
|
import { AccountingBasis } from "../../formInput/IMscoaAccount";
|
|
8
|
+
import { MultipleInputAvailableOperations } from "../../formInput/MultipleInterface";
|
|
8
9
|
import { RichTextEditorType } from "../../formInput/RichTextEditorInput";
|
|
9
10
|
import { LabelPosition } from "../../formInput/ToggleInputInterface";
|
|
10
11
|
import { AllFormInputPrimaryKeys, SpecialElementKeys } from "../FormInputKeys";
|
|
@@ -165,6 +166,22 @@ export var ElementConfig = {
|
|
|
165
166
|
label: 'Max length of characters',
|
|
166
167
|
id: "9bc50894-5230-46f2-91de-b45673b3a80a"
|
|
167
168
|
},
|
|
169
|
+
{
|
|
170
|
+
name: SpecialElementKeys.MultipleInputAvailableOperations,
|
|
171
|
+
deepBind: [SpecialElementKeys.MultipleInputAvailableOperations],
|
|
172
|
+
editType: ElementEditorTypes.ChipSelect,
|
|
173
|
+
defaultValue: Object.values(MultipleInputAvailableOperations).filter(o => o !== MultipleInputAvailableOperations.LockEditOnFormSubmit),
|
|
174
|
+
multipleSelection: true,
|
|
175
|
+
options: Object.values(MultipleInputAvailableOperations).map(
|
|
176
|
+
//Convert label from camelCase to normal text
|
|
177
|
+
(operation) => ({
|
|
178
|
+
label: operation.replace(/([a-z])([A-Z])/g, '$1 $2'),
|
|
179
|
+
value: operation
|
|
180
|
+
})),
|
|
181
|
+
label: 'Available operations for multiple input',
|
|
182
|
+
hint: 'Select which operations should be available for multiple inputs. This allows you to control how users can manipulate multiple entries, such as adding new ones, removing existing ones, or reordering them.',
|
|
183
|
+
id: "a894e16f-2d7e-4dca-825f-4785-6hjj0"
|
|
184
|
+
},
|
|
168
185
|
{
|
|
169
186
|
name: AllFormInputPrimaryKeys.HandleLabel,
|
|
170
187
|
deepBind: [AllFormInputPrimaryKeys.HandleLabel],
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import { IStoreFunctions } from "./IStoreFunctions";
|
|
2
2
|
import { Moment } from 'moment';
|
|
3
3
|
export interface IFinancialCycles {
|
|
4
|
-
|
|
4
|
+
CURRENT_FINANCIAL_CYCLE: string;
|
|
5
5
|
CURRENT_FINANCIAL_CYCLE_START_DATE: Moment;
|
|
6
|
-
|
|
6
|
+
CURRENT_FINANCIAL_CYCLE_END_DATE: Moment;
|
|
7
7
|
CURRENT_SPRINT_START_DATE: Moment;
|
|
8
|
+
CURRENT_SPRINT_END_DATE: Moment;
|
|
9
|
+
NEXT_FINANCIAL_CYCLE: string;
|
|
10
|
+
NEXT_FINANCIAL_CYCLE_START_DATE: Moment;
|
|
11
|
+
NEXT_FINANCIAL_CYCLE_END_DATE: Moment;
|
|
12
|
+
PREVIOUS_FINANCIAL_CYCLE: string;
|
|
13
|
+
PREVIOUS_FINANCIAL_CYCLE_START_DATE: Moment;
|
|
14
|
+
PREVIOUS_FINANCIAL_CYCLE_END_DATE: Moment;
|
|
8
15
|
}
|
|
9
16
|
export interface NgxTFormsConfig {
|
|
10
17
|
base_url?: string;
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import { FormColumnInputs, IBasicFormInput } from "./BasicFormInputInterface";
|
|
2
2
|
import { CalculationFunctions } from "./calculationVariableInterface";
|
|
3
|
+
export declare enum MultipleInputAvailableOperations {
|
|
4
|
+
Add = "add",
|
|
5
|
+
Remove = "remove",
|
|
6
|
+
Update = "update",
|
|
7
|
+
LockEditOnFormSubmit = "lockEditOnFormSubmit"
|
|
8
|
+
}
|
|
3
9
|
export interface IMultiple extends IBasicFormInput {
|
|
4
10
|
handleLabel: string;
|
|
5
11
|
formIsOpen?: boolean;
|
|
6
12
|
originalId?: string;
|
|
7
13
|
showAsLabel?: boolean;
|
|
8
14
|
formInputs?: Array<FormColumnInputs>;
|
|
15
|
+
multipleInputAvailableOperations?: Array<MultipleInputAvailableOperations>;
|
|
9
16
|
calculateListFunctions: Array<IMultipleInputCal>;
|
|
10
17
|
groupBy?: string[];
|
|
11
18
|
}
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
export
|
|
1
|
+
export var MultipleInputAvailableOperations;
|
|
2
|
+
(function (MultipleInputAvailableOperations) {
|
|
3
|
+
MultipleInputAvailableOperations["Add"] = "add";
|
|
4
|
+
MultipleInputAvailableOperations["Remove"] = "remove";
|
|
5
|
+
MultipleInputAvailableOperations["Update"] = "update";
|
|
6
|
+
MultipleInputAvailableOperations["LockEditOnFormSubmit"] = "lockEditOnFormSubmit";
|
|
7
|
+
})(MultipleInputAvailableOperations || (MultipleInputAvailableOperations = {}));
|
|
@@ -13,7 +13,7 @@ import { MatDataOptionsInterface } from "./MatDataOptionsInterface";
|
|
|
13
13
|
import { IMatrixInput } from "./MatrixInputInterface";
|
|
14
14
|
import { JsDataTypes, MinInputMapInput, MinInputTypes, MinimumInputRequiredInterface } from "./MinimumInputRequiredInterface";
|
|
15
15
|
import { ScoaInnerInput, ScoreSheetItem } from "./MscoaInput";
|
|
16
|
-
import { IMultiple, IMultipleInputCal } from "./MultipleInterface";
|
|
16
|
+
import { IMultiple, IMultipleInputCal, MultipleInputAvailableOperations } from "./MultipleInterface";
|
|
17
17
|
import { TableColumnConfigInterface, TableConfigurationsInterface } from "./TableConfigurationsInterface";
|
|
18
18
|
import { ITextareaProperties } from "./TextAreaInput";
|
|
19
19
|
import { IToggleInput } from "./ToggleInputInterface";
|
|
@@ -23,4 +23,4 @@ import { CalculatedFieldRules } from "./calculatedFieldRules";
|
|
|
23
23
|
import { CalculationFunctions, calculationVariableInterface } from "./calculationVariableInterface";
|
|
24
24
|
import { ValidationError, ValidationOptions } from "./schema";
|
|
25
25
|
import { IUserSignature } from "./userSignature";
|
|
26
|
-
export { ElementTypes, InputTypes, InputPipeTypes, AutocapitalizeOptions, AutocompleteOptions, InputDataTypes, MinInputTypes, IFormElementTemplate, 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, AccountingBasis, ScoaAccountTree, IUserSignature, ValidationOptions, ValidationError, MatDataOptionsInterface, MongoDbPipeLineConfigInterface, InputAPIDataId, FormInputBasicOptionInterface, ScoaInterface, ScoaInnerInput, IAccountSegmentTreeKeys, IWorkflowDocumentPicker, IWorkflowDocumentPickerConfig, workflowStepStatus, IWorkflowDocListCols, JsDataTypes, AdjudicationSteps, IWorkflowAdjudicationInput, WorkflowAdjudicationScoreSheetValue, WorkflowAdjudicationMicroFlowReviewValue, WorkflowAdjudicationResponseElectedSupplierSelectionValue, ScoreSheetItem, AdjResponseReviewColumnMapping, OptionSelectTypes, ISelectInputInterface };
|
|
26
|
+
export { ElementTypes, InputTypes, InputPipeTypes, AutocapitalizeOptions, AutocompleteOptions, InputDataTypes, MinInputTypes, IFormElementTemplate, 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, AccountingBasis, ScoaAccountTree, IUserSignature, ValidationOptions, ValidationError, MatDataOptionsInterface, MongoDbPipeLineConfigInterface, InputAPIDataId, FormInputBasicOptionInterface, ScoaInterface, ScoaInnerInput, IAccountSegmentTreeKeys, IWorkflowDocumentPicker, IWorkflowDocumentPickerConfig, workflowStepStatus, IWorkflowDocListCols, JsDataTypes, AdjudicationSteps, IWorkflowAdjudicationInput, WorkflowAdjudicationScoreSheetValue, WorkflowAdjudicationMicroFlowReviewValue, WorkflowAdjudicationResponseElectedSupplierSelectionValue, ScoreSheetItem, AdjResponseReviewColumnMapping, OptionSelectTypes, ISelectInputInterface, MultipleInputAvailableOperations };
|
|
@@ -2,9 +2,10 @@ import { AutocapitalizeOptions, AutocompleteOptions, ElementTypes, InputDataType
|
|
|
2
2
|
import { AllDocumentFileExtensions, AllImageFileExtensions, InputFileType, UploadTypes } from "./FileUploadInputInterface";
|
|
3
3
|
import { AccountingBasis } from "./IMscoaAccount";
|
|
4
4
|
import { JsDataTypes, MinInputTypes } from "./MinimumInputRequiredInterface";
|
|
5
|
+
import { MultipleInputAvailableOperations } from "./MultipleInterface";
|
|
5
6
|
import { AdjudicationSteps } from "./WorkflowAdjudication";
|
|
6
7
|
import { workflowStepStatus } from "./WorkflowDocumentPicker";
|
|
7
8
|
import { CalculationFunctions } from "./calculationVariableInterface";
|
|
8
9
|
export {
|
|
9
10
|
///ENUMS
|
|
10
|
-
ElementTypes, InputTypes, InputPipeTypes, AutocapitalizeOptions, AutocompleteOptions, InputDataTypes, MinInputTypes, CalculationFunctions, AllDocumentFileExtensions, AllImageFileExtensions, UploadTypes, InputFileType, AccountingBasis, workflowStepStatus, JsDataTypes, AdjudicationSteps, OptionSelectTypes };
|
|
11
|
+
ElementTypes, InputTypes, InputPipeTypes, AutocapitalizeOptions, AutocompleteOptions, InputDataTypes, MinInputTypes, CalculationFunctions, AllDocumentFileExtensions, AllImageFileExtensions, UploadTypes, InputFileType, AccountingBasis, workflowStepStatus, JsDataTypes, AdjudicationSteps, OptionSelectTypes, MultipleInputAvailableOperations };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Joi from 'joi';
|
|
2
|
-
import { AllFormInputPrimaryKeys } from '../interfaces/FormBuilder';
|
|
2
|
+
import { AllFormInputPrimaryKeys, SpecialElementKeys } from '../interfaces/FormBuilder';
|
|
3
3
|
import { AdjudicationSteps, AutocapitalizeOptions, ElementTypes, InputDataTypes, InputPipeTypes, InputTypes } from '../interfaces/formInput';
|
|
4
4
|
// import { InputFileType } from '../interfaces/formInput/FileUploadInputInterface';
|
|
5
5
|
// import { LabelPosition } from '../interfaces/formInput/ToggleInputInterface';
|
|
@@ -15,6 +15,7 @@ import { MatDataOptionsSchema } from './MatOptionsSchema';
|
|
|
15
15
|
import { CalculationFunctions } from '../interfaces/formInput/calculationVariableInterface';
|
|
16
16
|
import { RichTextEditorType } from '../interfaces/formInput/RichTextEditorInput';
|
|
17
17
|
import { InputViewTypes, OptionSelectTypes } from '../interfaces/formInput/BasicFormInputInterface';
|
|
18
|
+
import { MultipleInputAvailableOperations } from '../interfaces/formInput/MultipleInterface';
|
|
18
19
|
import { workflowDocumentPickerConfigSchema } from './DocmentPickerInputSchema';
|
|
19
20
|
export const paginationSelectionConfigSchema = Joi.object({
|
|
20
21
|
useLocalPagination: Joi.boolean().optional(),
|
|
@@ -66,7 +67,7 @@ export const baseFormColumnInputsSchema = Joi.object({
|
|
|
66
67
|
param: Joi.string().required()
|
|
67
68
|
}).optional(),
|
|
68
69
|
[AllFormInputPrimaryKeys.Script]: Joi.object().optional(),
|
|
69
|
-
[AllFormInputPrimaryKeys.Validators]: Joi.array().items(Joi.alternatives().try(Joi.string(), formControlCustomValidatorSchema)).
|
|
70
|
+
[AllFormInputPrimaryKeys.Validators]: Joi.array().items(Joi.alternatives().try(Joi.string(), formControlCustomValidatorSchema)).optional(),
|
|
70
71
|
[AllFormInputPrimaryKeys.Accept]: Joi.string().optional(),
|
|
71
72
|
[AllFormInputPrimaryKeys.CalculateListFunctions]: Joi.array().items(Joi.object({
|
|
72
73
|
id: Joi.string().required(),
|
|
@@ -98,6 +99,7 @@ export const baseFormColumnInputsSchema = Joi.object({
|
|
|
98
99
|
}).optional(),
|
|
99
100
|
[AllFormInputPrimaryKeys.GroupBy]: Joi.array().items(Joi.string()),
|
|
100
101
|
[AllFormInputPrimaryKeys.ConditionalInputConfig]: Joi.any().optional(),
|
|
102
|
+
[SpecialElementKeys.MultipleInputAvailableOperations]: Joi.array().items(Joi.string().valid(...Object.values(MultipleInputAvailableOperations))).optional(),
|
|
101
103
|
[AllFormInputPrimaryKeys.PaginationSelectionConfig]: paginationSelectionConfigSchema.optional()
|
|
102
104
|
}).id('formColumnInputs');
|
|
103
105
|
const formColumnInputsSchema = baseFormColumnInputsSchema.append({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Joi from 'joi';
|
|
2
2
|
import { ElementTypes, InputDataTypes, MinInputTypes } from '../interfaces/formInput';
|
|
3
3
|
import { JsDataTypes } from '../interfaces/formInput/MinimumInputRequiredInterface';
|
|
4
|
-
const DynamicObjectSchema = Joi.object().pattern(Joi.alternatives().try(Joi.string(), Joi.number()), Joi.
|
|
4
|
+
const DynamicObjectSchema = Joi.object().pattern(Joi.alternatives().try(Joi.string(), Joi.number()), Joi.any());
|
|
5
5
|
const FormInputBasicOptionSchema = Joi.object({
|
|
6
6
|
label: Joi.string().optional(),
|
|
7
7
|
value: Joi.string().required()
|
|
@@ -44,7 +44,7 @@ const MongoDbPipeLineConfigSchema = Joi.object({
|
|
|
44
44
|
});
|
|
45
45
|
const MatDataOptionsSchema = Joi.object({
|
|
46
46
|
optionType: Joi.string().valid('user').optional(),
|
|
47
|
-
options: Joi.array().items(Joi.alternatives().try(FormInputBasicOptionSchema, DynamicObjectSchema)).optional(),
|
|
47
|
+
options: Joi.any().optional(), //Joi.array().items(Joi.alternatives().try(FormInputBasicOptionSchema, DynamicObjectSchema)).optional(),
|
|
48
48
|
fetchFor: Joi.string().valid('valueForOptions').optional(),
|
|
49
49
|
fetch: Joi.object({
|
|
50
50
|
value: Joi.alternatives().try(APIDataFetchingConfigurationSchema, MongoDbPipeLineConfigSchema, Joi.object()).optional(),
|