ngx-t-forms-types 0.0.1

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.
Files changed (139) hide show
  1. package/dist/Configs/currencies.d.ts +6 -0
  2. package/dist/Configs/currencies.js +1083 -0
  3. package/dist/Configs/datePipes.d.ts +4 -0
  4. package/dist/Configs/datePipes.js +16 -0
  5. package/dist/index.d.ts +8 -0
  6. package/dist/index.js +8 -0
  7. package/dist/interfaces/Form/ArrayFunctions.d.ts +9 -0
  8. package/dist/interfaces/Form/ArrayFunctions.js +7 -0
  9. package/dist/interfaces/Form/CustomeConfigInter.d.ts +10 -0
  10. package/dist/interfaces/Form/CustomeConfigInter.js +1 -0
  11. package/dist/interfaces/Form/FileUploadFn.d.ts +11 -0
  12. package/dist/interfaces/Form/FileUploadFn.js +1 -0
  13. package/dist/interfaces/Form/FormInClassUtils.d.ts +52 -0
  14. package/dist/interfaces/Form/FormInClassUtils.js +1 -0
  15. package/dist/interfaces/Form/IFormsInitStateInterface.d.ts +51 -0
  16. package/dist/interfaces/Form/IFormsInitStateInterface.js +14 -0
  17. package/dist/interfaces/Form/PrePopulateDataInterface.d.ts +4 -0
  18. package/dist/interfaces/Form/PrePopulateDataInterface.js +1 -0
  19. package/dist/interfaces/Form/formChangeHistory.d.ts +5 -0
  20. package/dist/interfaces/Form/formChangeHistory.js +1 -0
  21. package/dist/interfaces/Form/formInterface.d.ts +19 -0
  22. package/dist/interfaces/Form/formInterface.js +1 -0
  23. package/dist/interfaces/Form/formSubmissionHandleInterface.d.ts +7 -0
  24. package/dist/interfaces/Form/formSubmissionHandleInterface.js +1 -0
  25. package/dist/interfaces/Form/index.d.ts +12 -0
  26. package/dist/interfaces/Form/index.js +2 -0
  27. package/dist/interfaces/FormBuilder/DefaultEelement.d.ts +3 -0
  28. package/dist/interfaces/FormBuilder/DefaultEelement.js +741 -0
  29. package/dist/interfaces/FormBuilder/DefaultInputConfigInterface.d.ts +143 -0
  30. package/dist/interfaces/FormBuilder/DefaultInputConfigInterface.js +1 -0
  31. package/dist/interfaces/FormBuilder/ElementEditorTypes.d.ts +31 -0
  32. package/dist/interfaces/FormBuilder/ElementEditorTypes.js +40 -0
  33. package/dist/interfaces/FormBuilder/FormBuilderCallBackFunctions.d.ts +20 -0
  34. package/dist/interfaces/FormBuilder/FormBuilderCallBackFunctions.js +1 -0
  35. package/dist/interfaces/FormBuilder/FormInputKeys.d.ts +86 -0
  36. package/dist/interfaces/FormBuilder/FormInputKeys.js +90 -0
  37. package/dist/interfaces/FormBuilder/elementEditor.d.ts +82 -0
  38. package/dist/interfaces/FormBuilder/elementEditor.js +34 -0
  39. package/dist/interfaces/FormBuilder/index.d.ts +10 -0
  40. package/dist/interfaces/FormBuilder/index.js +6 -0
  41. package/dist/interfaces/FormBuilder/inputConfig/ElementEditConfig.d.ts +3 -0
  42. package/dist/interfaces/FormBuilder/inputConfig/ElementEditConfig.js +644 -0
  43. package/dist/interfaces/FormBuilder/inputConfig/getInputValueFromElement.d.ts +1 -0
  44. package/dist/interfaces/FormBuilder/inputConfig/getInputValueFromElement.js +37 -0
  45. package/dist/interfaces/FormBuilder/postmanCollection.d.ts +126 -0
  46. package/dist/interfaces/FormBuilder/postmanCollection.js +1 -0
  47. package/dist/interfaces/FormBuilder/workflowSelectionConfig.d.ts +7 -0
  48. package/dist/interfaces/FormBuilder/workflowSelectionConfig.js +1 -0
  49. package/dist/interfaces/FormSlide/accessTree.d.ts +23 -0
  50. package/dist/interfaces/FormSlide/accessTree.js +1 -0
  51. package/dist/interfaces/FormSlide/controlValidation.d.ts +12 -0
  52. package/dist/interfaces/FormSlide/controlValidation.js +1 -0
  53. package/dist/interfaces/FormSlide/formSlideInterface.d.ts +22 -0
  54. package/dist/interfaces/FormSlide/formSlideInterface.js +7 -0
  55. package/dist/interfaces/FormSlide/index.d.ts +4 -0
  56. package/dist/interfaces/FormSlide/index.js +2 -0
  57. package/dist/interfaces/Tower/ITowerFormSteps.d.ts +14 -0
  58. package/dist/interfaces/Tower/ITowerFormSteps.js +1 -0
  59. package/dist/interfaces/Tower/index.d.ts +2 -0
  60. package/dist/interfaces/Tower/index.js +1 -0
  61. package/dist/interfaces/environment/IStoreFunctions.d.ts +58 -0
  62. package/dist/interfaces/environment/IStoreFunctions.js +1 -0
  63. package/dist/interfaces/environment/environment.d.ts +6 -0
  64. package/dist/interfaces/environment/environment.js +1 -0
  65. package/dist/interfaces/environment/index.d.ts +2 -0
  66. package/dist/interfaces/environment/index.js +1 -0
  67. package/dist/interfaces/formInput/APIDataFetchingConfigurationInterface.d.ts +54 -0
  68. package/dist/interfaces/formInput/APIDataFetchingConfigurationInterface.js +7 -0
  69. package/dist/interfaces/formInput/BasicFormInputInterface.d.ts +141 -0
  70. package/dist/interfaces/formInput/BasicFormInputInterface.js +99 -0
  71. package/dist/interfaces/formInput/ConditionalInputRule.d.ts +7 -0
  72. package/dist/interfaces/formInput/ConditionalInputRule.js +1 -0
  73. package/dist/interfaces/formInput/DateRangePickerInput.d.ts +9 -0
  74. package/dist/interfaces/formInput/DateRangePickerInput.js +1 -0
  75. package/dist/interfaces/formInput/FileUploadInputInterface.d.ts +49 -0
  76. package/dist/interfaces/formInput/FileUploadInputInterface.js +40 -0
  77. package/dist/interfaces/formInput/FormControlCustomValidatorsInterface.d.ts +10 -0
  78. package/dist/interfaces/formInput/FormControlCustomValidatorsInterface.js +1 -0
  79. package/dist/interfaces/formInput/FormInputBasicOptionInterface.d.ts +4 -0
  80. package/dist/interfaces/formInput/FormInputBasicOptionInterface.js +1 -0
  81. package/dist/interfaces/formInput/FormSectionTitleDescription.d.ts +6 -0
  82. package/dist/interfaces/formInput/FormSectionTitleDescription.js +1 -0
  83. package/dist/interfaces/formInput/IMscoaAccount.d.ts +84 -0
  84. package/dist/interfaces/formInput/IMscoaAccount.js +1 -0
  85. package/dist/interfaces/formInput/MatDataOptionsInterface.d.ts +14 -0
  86. package/dist/interfaces/formInput/MatDataOptionsInterface.js +1 -0
  87. package/dist/interfaces/formInput/MatrixInputInterface.d.ts +8 -0
  88. package/dist/interfaces/formInput/MatrixInputInterface.js +1 -0
  89. package/dist/interfaces/formInput/MinimumInputRequiredInterface.d.ts +33 -0
  90. package/dist/interfaces/formInput/MinimumInputRequiredInterface.js +18 -0
  91. package/dist/interfaces/formInput/MscoaInput.d.ts +16 -0
  92. package/dist/interfaces/formInput/MscoaInput.js +19 -0
  93. package/dist/interfaces/formInput/MultipleInterface.d.ts +15 -0
  94. package/dist/interfaces/formInput/MultipleInterface.js +1 -0
  95. package/dist/interfaces/formInput/RichTextEditorInput.d.ts +8 -0
  96. package/dist/interfaces/formInput/RichTextEditorInput.js +5 -0
  97. package/dist/interfaces/formInput/TableConfigurationsInterface.d.ts +17 -0
  98. package/dist/interfaces/formInput/TableConfigurationsInterface.js +1 -0
  99. package/dist/interfaces/formInput/TableSelectionInput.d.ts +6 -0
  100. package/dist/interfaces/formInput/TableSelectionInput.js +1 -0
  101. package/dist/interfaces/formInput/TextAreaInput.d.ts +5 -0
  102. package/dist/interfaces/formInput/TextAreaInput.js +1 -0
  103. package/dist/interfaces/formInput/ToggleInputInterface.d.ts +8 -0
  104. package/dist/interfaces/formInput/ToggleInputInterface.js +5 -0
  105. package/dist/interfaces/formInput/calculatedFieldRules.d.ts +7 -0
  106. package/dist/interfaces/formInput/calculatedFieldRules.js +1 -0
  107. package/dist/interfaces/formInput/calculationVariableInterface.d.ts +21 -0
  108. package/dist/interfaces/formInput/calculationVariableInterface.js +7 -0
  109. package/dist/interfaces/formInput/index.d.ts +22 -0
  110. package/dist/interfaces/formInput/index.js +7 -0
  111. package/dist/interfaces/formInput/schema.d.ts +9 -0
  112. package/dist/interfaces/formInput/schema.js +1 -0
  113. package/dist/interfaces/formInput/userSignature.d.ts +7 -0
  114. package/dist/interfaces/formInput/userSignature.js +1 -0
  115. package/dist/interfaces/pipeline-builder/index.d.ts +2 -0
  116. package/dist/interfaces/pipeline-builder/index.js +2 -0
  117. package/dist/interfaces/pipeline-builder/pipelineStages.d.ts +47 -0
  118. package/dist/interfaces/pipeline-builder/pipelineStages.js +30 -0
  119. package/dist/interfaces/upgradeFunctions/interfaces/init-form.d.ts +268 -0
  120. package/dist/interfaces/upgradeFunctions/interfaces/init-form.js +6 -0
  121. package/dist/schemas/CalculatedFieldRulesSchema.d.ts +6 -0
  122. package/dist/schemas/CalculatedFieldRulesSchema.js +27 -0
  123. package/dist/schemas/FormInputSchema.d.ts +15 -0
  124. package/dist/schemas/FormInputSchema.js +197 -0
  125. package/dist/schemas/FormSchema.d.ts +26 -0
  126. package/dist/schemas/FormSchema.js +134 -0
  127. package/dist/schemas/MatOptionsSchema.d.ts +8 -0
  128. package/dist/schemas/MatOptionsSchema.js +54 -0
  129. package/dist/schemas/MscoaConfigSchema.d.ts +8 -0
  130. package/dist/schemas/MscoaConfigSchema.js +22 -0
  131. package/dist/schemas/customValidationSchema.d.ts +2 -0
  132. package/dist/schemas/customValidationSchema.js +8 -0
  133. package/dist/schemas/index.d.ts +4 -0
  134. package/dist/schemas/index.js +4 -0
  135. package/dist/schemas/tests/FormInputValidator.spec.d.ts +1 -0
  136. package/dist/schemas/tests/FormInputValidator.spec.js +68 -0
  137. package/dist/schemas/tests/MOCK_DATA.d.ts +49 -0
  138. package/dist/schemas/tests/MOCK_DATA.js +59 -0
  139. package/package.json +61 -0
@@ -0,0 +1,8 @@
1
+ import Joi from 'joi';
2
+ declare const FormInputBasicOptionSchema: Joi.ObjectSchema<any>;
3
+ declare const MinInputMapInputSchema: Joi.ObjectSchema<any>;
4
+ declare const minimumInputRequiredSchema: Joi.ObjectSchema<any>;
5
+ declare const APIDataFetchingConfigurationSchema: Joi.ObjectSchema<any>;
6
+ declare const MongoDbPipeLineConfigSchema: Joi.ObjectSchema<any>;
7
+ declare const MatDataOptionsSchema: Joi.ObjectSchema<any>;
8
+ export { MatDataOptionsSchema, APIDataFetchingConfigurationSchema, MongoDbPipeLineConfigSchema, FormInputBasicOptionSchema, MinInputMapInputSchema, minimumInputRequiredSchema };
@@ -0,0 +1,54 @@
1
+ import Joi from 'joi';
2
+ import { ElementTypes, InputDataTypes, MinInputTypes } from '../interfaces/formInput';
3
+ import { JsDataTypes } from '../interfaces/formInput/MinimumInputRequiredInterface';
4
+ const DynamicObjectSchema = Joi.object().pattern(Joi.alternatives().try(Joi.string(), Joi.number()), Joi.alternatives().try(Joi.number(), Joi.string(), Joi.boolean(), Joi.object()));
5
+ const FormInputBasicOptionSchema = Joi.object({
6
+ label: Joi.string().optional(),
7
+ value: Joi.string().required()
8
+ });
9
+ const MinInputMapInputSchema = Joi.object({
10
+ formControlName: Joi.string().required(),
11
+ dataType: Joi.string().valid(...Object.values(InputDataTypes)).required(),
12
+ element: Joi.string().valid(...Object.values(ElementTypes)).required()
13
+ });
14
+ const minimumInputRequiredSchema = Joi.object({
15
+ name: Joi.string().required(),
16
+ type: Joi.string().valid(...Object.values(MinInputTypes), ...Object.values(JsDataTypes)).required(),
17
+ value: Joi.string().optional(),
18
+ mapTo: Joi.alternatives().try(MinInputMapInputSchema, Joi.array().items(MinInputMapInputSchema)).optional(),
19
+ defaultValue: Joi.string().optional(),
20
+ dataFor: Joi.string().optional(),
21
+ activeChangeId: Joi.string().optional(),
22
+ primaryKey: Joi.boolean().optional()
23
+ });
24
+ const APIDataFetchingConfigurationSchema = Joi.object({
25
+ _id: Joi.string().required(),
26
+ name: Joi.string().required(),
27
+ httpEndPoint: Joi.string().required(),
28
+ inputSourceId: Joi.string().optional(),
29
+ httpMethod: Joi.string().valid('GET', 'POST', 'PUT', 'DELETE').required(),
30
+ postFormData: Joi.boolean().required(),
31
+ backEndConfig: Joi.object({
32
+ minimumInputRequired: Joi.array().items(minimumInputRequiredSchema).required()
33
+ }).optional(),
34
+ valueAccessRules: Joi.alternatives().try(FormInputBasicOptionSchema, Joi.array().items(Joi.object())).optional(),
35
+ source: Joi.string().valid('local', 'api', 'mongoPipeline', 'customOptions').required(),
36
+ projectFormData: Joi.string().optional()
37
+ });
38
+ const MongoDbPipeLineConfigSchema = Joi.object({
39
+ workflowId: Joi.string().required(),
40
+ pipeline: Joi.array().items(Joi.any()).required(),
41
+ valueAccessRules: Joi.alternatives().try(FormInputBasicOptionSchema, Joi.array().items(Joi.object())).required(),
42
+ source: Joi.string().valid('local', 'api', 'mongoPipeline', 'customOptions').required(),
43
+ responseBody: Joi.any().required()
44
+ });
45
+ const MatDataOptionsSchema = Joi.object({
46
+ optionType: Joi.string().valid('user').optional(),
47
+ options: Joi.array().items(Joi.alternatives().try(FormInputBasicOptionSchema, DynamicObjectSchema)).optional(),
48
+ fetchFor: Joi.string().valid('valueForOptions').optional(),
49
+ fetch: Joi.object({
50
+ value: Joi.alternatives().try(APIDataFetchingConfigurationSchema, MongoDbPipeLineConfigSchema, Joi.object()).optional(),
51
+ options: Joi.alternatives().try(APIDataFetchingConfigurationSchema, MongoDbPipeLineConfigSchema, Joi.object()).optional()
52
+ }).required()
53
+ });
54
+ export { MatDataOptionsSchema, APIDataFetchingConfigurationSchema, MongoDbPipeLineConfigSchema, FormInputBasicOptionSchema, MinInputMapInputSchema, minimumInputRequiredSchema };
@@ -0,0 +1,8 @@
1
+ import Joi from 'joi';
2
+ export declare const IncludedSegmentConfigSchema: Joi.ObjectSchema<any>;
3
+ export declare const MscoaInnerInputSchema: Joi.ObjectSchema<any>;
4
+ export declare const MscoaInputConfigSchema: Joi.ObjectSchema<any>;
5
+ export declare function validateMscoaInputConfig(value: any): {
6
+ error: Joi.ValidationError | undefined;
7
+ value: any;
8
+ };
@@ -0,0 +1,22 @@
1
+ import Joi from 'joi';
2
+ export const IncludedSegmentConfigSchema = Joi.object({
3
+ segment: Joi.string().required(),
4
+ label: Joi.string().required(),
5
+ readOnly: Joi.boolean().required(),
6
+ singleSelect: Joi.boolean().required()
7
+ });
8
+ export const MscoaInnerInputSchema = Joi.object({
9
+ segment: Joi.string().required(),
10
+ id: Joi.string().required(),
11
+ label: Joi.string().required(),
12
+ formControlName: Joi.string().required(),
13
+ });
14
+ export const MscoaInputConfigSchema = Joi.object({
15
+ inputs: Joi.array().items(MscoaInnerInputSchema).required(),
16
+ segments: Joi.array().items(IncludedSegmentConfigSchema).min(1).required(),
17
+ showAllSegments: Joi.boolean().required()
18
+ });
19
+ export function validateMscoaInputConfig(value) {
20
+ const { error, value: validatedValue } = MscoaInputConfigSchema.validate(value);
21
+ return { error, value: validatedValue };
22
+ }
@@ -0,0 +1,2 @@
1
+ import * as Joi from 'joi';
2
+ export declare const formControlCustomValidatorSchema: Joi.ObjectSchema<any>;
@@ -0,0 +1,8 @@
1
+ import * as Joi from 'joi';
2
+ export const formControlCustomValidatorSchema = Joi.object({
3
+ id: Joi.string().required(),
4
+ message: Joi.string().required(),
5
+ expression: Joi.string().required(),
6
+ canOverride: Joi.boolean().required(),
7
+ inputsObservedForChanges: Joi.array().items(Joi.string()).required()
8
+ });
@@ -0,0 +1,4 @@
1
+ import { validateCalculatedFieldRules } from "./CalculatedFieldRulesSchema";
2
+ import { formColumnInputsSchema, validateFormColumnInputs, validateFormColumnInputsWithRequired } from "./FormInputSchema";
3
+ import { validateApiDataFetchingConfiguration, validateForm, validateFormSlide } from "./FormSchema";
4
+ export { formColumnInputsSchema, validateCalculatedFieldRules, validateFormColumnInputs, validateFormSlide, validateFormColumnInputsWithRequired, validateForm, validateApiDataFetchingConfiguration };
@@ -0,0 +1,4 @@
1
+ import { validateCalculatedFieldRules } from "./CalculatedFieldRulesSchema";
2
+ import { formColumnInputsSchema, validateFormColumnInputs, validateFormColumnInputsWithRequired } from "./FormInputSchema";
3
+ import { validateApiDataFetchingConfiguration, validateForm, validateFormSlide } from "./FormSchema";
4
+ export { formColumnInputsSchema, validateCalculatedFieldRules, validateFormColumnInputs, validateFormSlide, validateFormColumnInputsWithRequired, validateForm, validateApiDataFetchingConfiguration };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,68 @@
1
+ import { TestBed } from '@angular/core/testing';
2
+ import { AllFormInputPrimaryKeys, } from '../../interfaces/FormBuilder';
3
+ import { ElementTypes, InputDataTypes, InputPipeTypes, InputTypes } from '../../interfaces/formInput';
4
+ import { formColumnInputsSchema } from '../FormInputSchema';
5
+ //ng test ngx-t-forms --include='projects/ngx-t-forms/src/lib/schemas/tests/FormInputValidator.spec.ts'
6
+ describe('FormInputValidator', () => {
7
+ beforeEach(() => {
8
+ TestBed.configureTestingModule({});
9
+ });
10
+ it('should validate a valid form input configuration', () => {
11
+ const validInput = {
12
+ [AllFormInputPrimaryKeys.Element]: ElementTypes.Input,
13
+ [AllFormInputPrimaryKeys.ColSize]: 6,
14
+ [AllFormInputPrimaryKeys.Label]: 'Test Label',
15
+ [AllFormInputPrimaryKeys.FormControlName]: 'testControl',
16
+ [AllFormInputPrimaryKeys.Appearance]: 'outline',
17
+ [AllFormInputPrimaryKeys.Required]: true,
18
+ [AllFormInputPrimaryKeys.DataType]: InputDataTypes.String,
19
+ [AllFormInputPrimaryKeys.Validators]: ['required']
20
+ };
21
+ const result = formColumnInputsSchema.validate(validInput);
22
+ expect(result.error).toBeUndefined();
23
+ });
24
+ it('should fail validation when required fields are missing', () => {
25
+ const invalidInput = {
26
+ [AllFormInputPrimaryKeys.Label]: 'Test Label',
27
+ [AllFormInputPrimaryKeys.FormControlName]: 'testControl'
28
+ };
29
+ const result = formColumnInputsSchema.validate(invalidInput);
30
+ expect(result.error).toBeDefined();
31
+ });
32
+ it('should validate optional fields when provided correctly', () => {
33
+ const inputWithOptionals = {
34
+ [AllFormInputPrimaryKeys.Element]: ElementTypes.Input,
35
+ [AllFormInputPrimaryKeys.ColSize]: 6,
36
+ [AllFormInputPrimaryKeys.Label]: 'Test Label',
37
+ [AllFormInputPrimaryKeys.FormControlName]: 'testControl',
38
+ [AllFormInputPrimaryKeys.Appearance]: 'outline',
39
+ [AllFormInputPrimaryKeys.Required]: true,
40
+ [AllFormInputPrimaryKeys.DataType]: InputDataTypes.String,
41
+ [AllFormInputPrimaryKeys.Validators]: ['required'],
42
+ [AllFormInputPrimaryKeys.Type]: InputTypes.Text,
43
+ [AllFormInputPrimaryKeys.Min]: 0,
44
+ [AllFormInputPrimaryKeys.Max]: 100,
45
+ [AllFormInputPrimaryKeys.Pipe]: {
46
+ pipeType: InputPipeTypes.Currency,
47
+ param: 'USD'
48
+ }
49
+ };
50
+ const result = formColumnInputsSchema.validate(inputWithOptionals);
51
+ console.warn(result, "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy");
52
+ expect(result.error).toBeUndefined();
53
+ });
54
+ it('should fail validation for invalid enum values', () => {
55
+ const invalidEnumInput = {
56
+ [AllFormInputPrimaryKeys.Element]: 'InvalidElement',
57
+ [AllFormInputPrimaryKeys.ColSize]: 6,
58
+ [AllFormInputPrimaryKeys.Label]: 'Test Label',
59
+ [AllFormInputPrimaryKeys.FormControlName]: 'testControl',
60
+ [AllFormInputPrimaryKeys.Appearance]: 'outline',
61
+ [AllFormInputPrimaryKeys.Required]: true,
62
+ [AllFormInputPrimaryKeys.DataType]: InputDataTypes.String,
63
+ [AllFormInputPrimaryKeys.Validators]: ['required']
64
+ };
65
+ const result = formColumnInputsSchema.validate(invalidEnumInput);
66
+ expect(result.error).toBeDefined();
67
+ });
68
+ });
@@ -0,0 +1,49 @@
1
+ export declare const validCalculatedFieldRules: {
2
+ formula: string;
3
+ variables: {
4
+ formControlName: string;
5
+ label: string;
6
+ variable: string;
7
+ inputId: string;
8
+ id: string;
9
+ }[];
10
+ };
11
+ export declare const invalidCalculatedFieldRules: {
12
+ getFormulaFromAFormInput: string;
13
+ formula: string;
14
+ variables: {
15
+ formControlName: string;
16
+ label: string;
17
+ variable: string;
18
+ inputId: string;
19
+ id: string;
20
+ }[];
21
+ };
22
+ export declare const validMscoaConfig: {
23
+ inputs: {
24
+ segment: string;
25
+ id: string;
26
+ label: string;
27
+ formControlName: string;
28
+ }[];
29
+ segments: {
30
+ segment: string;
31
+ label: string;
32
+ readOnly: boolean;
33
+ singleSelect: boolean;
34
+ }[];
35
+ showAllSegments: boolean;
36
+ };
37
+ export declare const invalidMscoaConfig: {
38
+ inputs: {
39
+ segment: string;
40
+ id: string;
41
+ }[];
42
+ segments: {
43
+ segment: string;
44
+ label: string;
45
+ readOnly: boolean;
46
+ singleSelect: boolean;
47
+ }[];
48
+ showAllSegments: boolean;
49
+ };
@@ -0,0 +1,59 @@
1
+ export const validCalculatedFieldRules = {
2
+ formula: 'a + b',
3
+ variables: [
4
+ {
5
+ formControlName: 'control1',
6
+ label: 'label1',
7
+ variable: 'a',
8
+ inputId: 'inputId1',
9
+ id: 'id1',
10
+ },
11
+ {
12
+ formControlName: 'control2',
13
+ label: 'label2',
14
+ inputId: 'inputId2',
15
+ variable: 'b',
16
+ id: 'id2',
17
+ },
18
+ ],
19
+ };
20
+ export const invalidCalculatedFieldRules = {
21
+ ...validCalculatedFieldRules,
22
+ getFormulaFromAFormInput: 'invalid_boolean',
23
+ };
24
+ export const validMscoaConfig = {
25
+ inputs: [
26
+ {
27
+ segment: 'segment1',
28
+ id: 'id1',
29
+ label: 'label1',
30
+ formControlName: 'control1',
31
+ },
32
+ ],
33
+ segments: [
34
+ {
35
+ segment: 'segment1',
36
+ label: 'label1',
37
+ readOnly: true,
38
+ singleSelect: false,
39
+ },
40
+ ],
41
+ showAllSegments: true,
42
+ };
43
+ export const invalidMscoaConfig = {
44
+ inputs: [
45
+ {
46
+ segment: 'segment1',
47
+ id: 'id1',
48
+ },
49
+ ],
50
+ segments: [
51
+ {
52
+ segment: 'segment1',
53
+ label: 'label1',
54
+ readOnly: true,
55
+ singleSelect: false,
56
+ },
57
+ ],
58
+ showAllSegments: true,
59
+ };
package/package.json ADDED
@@ -0,0 +1,61 @@
1
+ {
2
+ "name": "ngx-t-forms-types",
3
+ "version": "0.0.1",
4
+ "description": "Typings and interfaces for the ngx-t-forms library for dynamic forms.",
5
+ "keywords": [
6
+ "typings",
7
+ "typescript"
8
+ ],
9
+ "homepage": "https://github.com/mashegoTerrence/ngx-t-forms-typings#readme",
10
+ "bugs": {
11
+ "url": "https://github.com/mashegoTerrence/ngx-t-forms-typings/issues"
12
+ },
13
+ "publishConfig":{
14
+ "access": "public"
15
+ },
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git+https://github.com/mashegoTerrence/ngx-t-forms-typings.git"
19
+ },
20
+ "license": "ISC",
21
+ "author": "mashegoterrence@gmail.com",
22
+ "type": "commonjs",
23
+ "main": "dist/index.js",
24
+ "types": "dist/index.d.ts",
25
+ "files": [
26
+ "dist"
27
+ ],
28
+ "scripts": {
29
+ "test": "karma start",
30
+ "clean": "rimraf dist",
31
+ "build": "npm run clean && tsc",
32
+ "prepublishOnly": "npm run build",
33
+ "dev": "npm run build --watch"
34
+ },
35
+ "devDependencies": {
36
+ "@angular/cdk": "^19.2.2",
37
+ "@angular/common": "^19.2.1",
38
+ "@angular/core": "^19.2.1",
39
+ "@angular/material": "^19.2.2",
40
+ "@angular/router": "^19.2.1",
41
+ "@types/jasmine": "^5.1.7",
42
+ "@types/joi": "^17.2.2",
43
+ "@types/node": "^22.13.9",
44
+ "jasmine-core": "^5.6.0",
45
+ "karma": "^6.4.4",
46
+ "karma-chrome-launcher": "^3.2.0",
47
+ "karma-jasmine": "^5.1.0",
48
+ "karma-webpack": "^5.0.1",
49
+ "mongoose": "^8.12.1",
50
+ "rimraf": "^6.0.1",
51
+ "rxjs": "^7.8.2",
52
+ "signature_pad": "^5.0.4",
53
+ "ts-loader": "^9.5.2",
54
+ "typescript": "^5.8.2",
55
+ "webpack": "^5.98.0",
56
+ "webpack-dev-server": "^5.2.0"
57
+ },
58
+ "dependencies": {
59
+
60
+ }
61
+ }