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,4 @@
1
+ export declare const DatePipeOptions: {
2
+ label: string;
3
+ value: string;
4
+ }[];
@@ -0,0 +1,16 @@
1
+ export const DatePipeOptions = [
2
+ { label: "short- '6/15/15, 9:03 AM'", value: 'short' },
3
+ { label: "medium- 'Jun 15, 2015, 9:03:01 AM'", value: 'medium' },
4
+ {
5
+ label: "long- 'June 15, 2015 at 9:03:01 AM GMT+1'",
6
+ value: 'long',
7
+ },
8
+ {
9
+ label: "full-Monday- 'June 15, 2015 at 9:03:01 AM GMT+01:00'",
10
+ value: 'full',
11
+ },
12
+ { label: 'shortDate- 6/15/15', value: 'shortDate' },
13
+ { label: "mediumDate- 'Jun 15, 2015'", value: 'mediumDate' },
14
+ { label: "longDate- 'June 15, 2015 '", value: 'longDate' },
15
+ { label: "fullDate-Monday- 'June 15, 2015 '", value: 'fullDate' },
16
+ ];
@@ -0,0 +1,8 @@
1
+ export * from './interfaces/Form/index';
2
+ export * from './interfaces/Tower/index';
3
+ export * from './interfaces/FormSlide/index';
4
+ export * from './interfaces/formInput/index';
5
+ export * from './interfaces/FormBuilder/index';
6
+ export * from './interfaces/environment/index';
7
+ export * from './interfaces/pipeline-builder/index';
8
+ export * from './schemas/index';
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
1
+ export * from './interfaces/Form/index';
2
+ export * from './interfaces/Tower/index';
3
+ export * from './interfaces/FormSlide/index';
4
+ export * from './interfaces/formInput/index';
5
+ export * from './interfaces/FormBuilder/index';
6
+ export * from './interfaces/environment/index';
7
+ export * from './interfaces/pipeline-builder/index';
8
+ export * from './schemas/index';
@@ -0,0 +1,9 @@
1
+ export declare enum FunctionTypes {
2
+ Filter = "filter",
3
+ Find = "find",
4
+ Map = "map"
5
+ }
6
+ export interface IArrayFunction {
7
+ function: FunctionTypes;
8
+ expression: string;
9
+ }
@@ -0,0 +1,7 @@
1
+ export var FunctionTypes;
2
+ (function (FunctionTypes) {
3
+ FunctionTypes["Filter"] = "filter";
4
+ FunctionTypes["Find"] = "find";
5
+ FunctionTypes["Map"] = "map";
6
+ // Add more function types here as needed
7
+ })(FunctionTypes || (FunctionTypes = {}));
@@ -0,0 +1,10 @@
1
+ export interface CustomConfigInterface {
2
+ showProgressBar?: boolean;
3
+ formBackground?: string;
4
+ closeAfterSubmission?: string;
5
+ formPrePopulationOption?: {
6
+ listHeading: string;
7
+ matTooltip: string;
8
+ label: string;
9
+ };
10
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,11 @@
1
+ import { Observable } from "rxjs";
2
+ export type FileUploadFn = (file: string, fileName: string, fileType: string) => Observable<{
3
+ url: string;
4
+ }>;
5
+ export interface FileData {
6
+ base64: string;
7
+ fileName: string;
8
+ type: any;
9
+ id: string;
10
+ fileExtension?: string;
11
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,52 @@
1
+ import { Observable } from "rxjs";
2
+ import { IUserSignature } from "../formInput/userSignature";
3
+ import { PointGroup } from "signature_pad";
4
+ import { FileUploadFn, NgxTFormsConfig } from "../../interfaces/Form";
5
+ import { HttpClient } from "@angular/common/http";
6
+ import { FormSubmissionStatus } from "../FormSlide";
7
+ /**
8
+ * Interface for the utility functions used in the in-class form.
9
+ */
10
+ export interface InClassFormUtilsInterface {
11
+ /**
12
+ * Function to perform an HTTP GET request.
13
+ * @param url - The URL to send the request to.
14
+ * @returns A promise that resolves to the response data.
15
+ */
16
+ httpGetDataFunction: (url: string, options: any) => Observable<any>;
17
+ /**
18
+ * Function to perform an HTTP POST request.
19
+ * @param url - The URL to send the request to.
20
+ * @param data - The data to send in the request body.
21
+ * @returns A promise that resolves to the response data.
22
+ */
23
+ httpPostDataFunction: (url: string, data: any, options: any) => Observable<any>;
24
+ submitForm: () => Observable<void>;
25
+ saveFormData: () => Observable<void>;
26
+ runPipeLine: (pipeline: any, workflowId: string) => Observable<{
27
+ results: any;
28
+ message: string;
29
+ }>;
30
+ fileUpload: FileUploadFn;
31
+ getUserSignature: () => Observable<IUserSignature>;
32
+ saveUserSignature: (signature: PointGroup[]) => Observable<void>;
33
+ NGX_T_FORMS_CONFIG?: NgxTFormsConfig;
34
+ httpCall?: HttpClient;
35
+ setSubmissionStatusValue: (status: FormSubmissionStatus) => void;
36
+ }
37
+ /**
38
+ * Interface for the utility functions used in the in-class.
39
+ */
40
+ export interface IFormActions {
41
+ submitForm: (data: {
42
+ [key: string]: any | undefined;
43
+ }) => Observable<void>;
44
+ saveForm: (formId: string, data: {
45
+ [key: string]: any;
46
+ }) => Observable<void>;
47
+ }
48
+ export interface InClassFormUtilsWithSectionsInterface extends InClassFormUtilsInterface {
49
+ getFormValue: () => {
50
+ [key: string]: any;
51
+ };
52
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,51 @@
1
+ import { ActivatedRouteSnapshot } from "@angular/router";
2
+ import { DatabaseFormInterface, FormInterface } from "./formInterface";
3
+ export interface LocalFormStateSelectorInterface extends FormInterface {
4
+ _id: string;
5
+ createdAt: Date;
6
+ updatedAt: Date;
7
+ archived: boolean;
8
+ busy: boolean;
9
+ errors: FormValidationErrorsInterface[];
10
+ }
11
+ export interface LocalFormsStateInterface extends DatabaseFormInterface {
12
+ errors: FormValidationErrorsInterface[];
13
+ busy: boolean;
14
+ }
15
+ export interface FormValidationErrorsInterface {
16
+ key: string;
17
+ message: string;
18
+ }
19
+ export declare enum FormListSection {
20
+ ALL = "ALL",
21
+ ARCHIVED = "ARCHIVED"
22
+ }
23
+ export interface IFormsInitStateInterface {
24
+ forms: LocalFormsStateInterface[];
25
+ initialFormValues: Record<string, any> | null;
26
+ listSection: FormListSection;
27
+ editForm: DatabaseFormInterface | null;
28
+ inputInEdit: string | null;
29
+ formBuilderBusy: boolean;
30
+ loadingForm: boolean;
31
+ loadingForms: boolean;
32
+ submittingForm: boolean;
33
+ formId: string | null;
34
+ routerState: ActivatedRouteSnapshot | null;
35
+ loadFormsError: string | null;
36
+ errors: {
37
+ [FormStateErrors.ArchiveForm]: string | undefined;
38
+ [FormStateErrors.CreateForm]: string | undefined;
39
+ [FormStateErrors.UpdateForm]: string | undefined;
40
+ [FormStateErrors.GetForm]: string | undefined;
41
+ [FormStateErrors.LoadForms]: string | undefined;
42
+ } | null;
43
+ }
44
+ export declare enum FormStateErrors {
45
+ CreateForm = "CreateForm",
46
+ UpdateForm = "UpdateForm",
47
+ ArchiveForm = "ArchiveForm",
48
+ GetForm = "GetForm",
49
+ LoadForms = "LoadForms",
50
+ PrePopulation = "PrePopulation"
51
+ }
@@ -0,0 +1,14 @@
1
+ export var FormListSection;
2
+ (function (FormListSection) {
3
+ FormListSection["ALL"] = "ALL";
4
+ FormListSection["ARCHIVED"] = "ARCHIVED";
5
+ })(FormListSection || (FormListSection = {}));
6
+ export var FormStateErrors;
7
+ (function (FormStateErrors) {
8
+ FormStateErrors["CreateForm"] = "CreateForm";
9
+ FormStateErrors["UpdateForm"] = "UpdateForm";
10
+ FormStateErrors["ArchiveForm"] = "ArchiveForm";
11
+ FormStateErrors["GetForm"] = "GetForm";
12
+ FormStateErrors["LoadForms"] = "LoadForms";
13
+ FormStateErrors["PrePopulation"] = "PrePopulation";
14
+ })(FormStateErrors || (FormStateErrors = {}));
@@ -0,0 +1,4 @@
1
+ export interface PrePopulateDataInterface {
2
+ dbFetchData?: string;
3
+ fetchedInformation?: any;
4
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ export interface IFormChangeHistory {
2
+ date: Date;
3
+ changes: Record<string, any>;
4
+ id: string;
5
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,19 @@
1
+ import { FormSlideInterface } from "../FormSlide/formSlideInterface";
2
+ import { FormSubmissionHandleInterface } from "./formSubmissionHandleInterface";
3
+ export interface FormInterface {
4
+ slides: Array<FormSlideInterface>;
5
+ submissionHandle: FormSubmissionHandleInterface;
6
+ formId: string | any;
7
+ formTitle: string;
8
+ }
9
+ export interface DatabaseFormInterface {
10
+ _id: string;
11
+ systemDefault: boolean;
12
+ archive: boolean;
13
+ userId: string;
14
+ defaultDepartment: string;
15
+ form: FormInterface;
16
+ createdAt: Date;
17
+ updatedAt: Date;
18
+ __v: number;
19
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ import { APIDataFetchingConfigurationInterface } from "../formInput";
2
+ export interface FormSubmissionHandleInterface {
3
+ innerComponentShowSubmitButton?: boolean;
4
+ canSubmitAPI?: Array<APIDataFetchingConfigurationInterface>;
5
+ submissionAPI: Array<APIDataFetchingConfigurationInterface>;
6
+ submissionMessage?: string;
7
+ }
@@ -0,0 +1,12 @@
1
+ import { NgxTFormsConfig } from "../environment/environment";
2
+ import { FormColumnInputs } from "../formInput/BasicFormInputInterface";
3
+ import { IAllInputs, OLD_FormInterface } from "../upgradeFunctions/interfaces/init-form";
4
+ import { IArrayFunction } from "./ArrayFunctions";
5
+ import { CustomConfigInterface } from "./CustomeConfigInter";
6
+ import { FileData, FileUploadFn } from "./FileUploadFn";
7
+ import { IFormChangeHistory } from "./formChangeHistory";
8
+ import { IFormActions, InClassFormUtilsInterface, InClassFormUtilsWithSectionsInterface } from "./FormInClassUtils";
9
+ import { FormInterface, DatabaseFormInterface } from "./formInterface";
10
+ import { FormSubmissionHandleInterface } from "./formSubmissionHandleInterface";
11
+ import { FormListSection, FormStateErrors, IFormsInitStateInterface, LocalFormStateSelectorInterface } from "./IFormsInitStateInterface";
12
+ export { CustomConfigInterface, InClassFormUtilsInterface, InClassFormUtilsWithSectionsInterface, FormInterface, DatabaseFormInterface, FormSubmissionHandleInterface, FormColumnInputs, IFormActions, NgxTFormsConfig, FileUploadFn, FileData, FormListSection, LocalFormStateSelectorInterface, IFormsInitStateInterface, FormStateErrors, IArrayFunction, OLD_FormInterface, IAllInputs, IFormChangeHistory };
@@ -0,0 +1,2 @@
1
+ import { FormListSection, FormStateErrors } from "./IFormsInitStateInterface";
2
+ export { FormListSection, FormStateErrors };
@@ -0,0 +1,3 @@
1
+ import { DefaultInputConfigInterface } from "./DefaultInputConfigInterface";
2
+ export declare function defaultInputs(): string[];
3
+ export declare const DefaultInputConfig: DefaultInputConfigInterface;