@piserve-tech/form-submission 1.2.7 → 1.2.8
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/element-type/form-elements/form-elements.component.d.ts +4 -1
- package/esm2022/element-type/form-elements/form-elements.component.mjs +10 -4
- package/esm2022/form-fields/slider-fields/slider-fields.component.mjs +2 -2
- package/esm2022/form-fields/text-fields/text-fields.component.mjs +1 -1
- package/esm2022/form-submission/navigation-tabs/navigation-tabs.component.mjs +9 -3
- package/esm2022/form-submission/next-prev-navigation/next-prev-navigation.component.mjs +9 -3
- package/esm2022/form-submission/submit-form/submit-form.component.mjs +113 -14
- package/esm2022/models/answer.model.mjs +2 -0
- package/esm2022/models/subForm.model.mjs +1 -1
- package/esm2022/models/submission.model.mjs +2 -0
- package/esm2022/services/mapper.service.mjs +17 -1
- package/esm2022/sub-form/multiple-subform/multiple-subform.component.mjs +125 -0
- package/esm2022/sub-form/sub-form/sub-form.component.mjs +39 -4
- package/esm2022/sub-form/sub-form.module.mjs +11 -5
- package/esm2022/sub-form/submission-modal/submission-modal.component.mjs +51 -0
- package/fesm2022/piserve-tech-form-submission.mjs +343 -27
- package/fesm2022/piserve-tech-form-submission.mjs.map +1 -1
- package/form-submission/navigation-tabs/navigation-tabs.component.d.ts +3 -1
- package/form-submission/next-prev-navigation/next-prev-navigation.component.d.ts +3 -1
- package/form-submission/submit-form/submit-form.component.d.ts +2 -0
- package/models/answer.model.d.ts +7 -0
- package/models/subForm.model.d.ts +4 -1
- package/models/submission.model.d.ts +5 -0
- package/package.json +1 -1
- package/sub-form/multiple-subform/multiple-subform.component.d.ts +34 -0
- package/sub-form/sub-form/sub-form.component.d.ts +8 -2
- package/sub-form/sub-form.module.d.ts +7 -4
- package/sub-form/submission-modal/submission-modal.component.d.ts +13 -0
|
@@ -6,8 +6,10 @@ export declare class NavigationTabsComponent {
|
|
|
6
6
|
pageChanged: EventEmitter<number>;
|
|
7
7
|
submitEmit: EventEmitter<any>;
|
|
8
8
|
edit: boolean;
|
|
9
|
+
subFormChange: EventEmitter<any>;
|
|
10
|
+
updateSubFormWithSubmissions(event: any): void;
|
|
9
11
|
setCurrentPage(index: number): void;
|
|
10
12
|
submitForm(): void;
|
|
11
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<NavigationTabsComponent, never>;
|
|
12
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NavigationTabsComponent, "lib-navigation-tabs", never, { "pages": { "alias": "pages"; "required": false; }; "currentPageIndex": { "alias": "currentPageIndex"; "required": false; }; "edit": { "alias": "edit"; "required": false; }; }, { "pageChanged": "pageChanged"; "submitEmit": "submitEmit"; }, never, never, false, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NavigationTabsComponent, "lib-navigation-tabs", never, { "pages": { "alias": "pages"; "required": false; }; "currentPageIndex": { "alias": "currentPageIndex"; "required": false; }; "edit": { "alias": "edit"; "required": false; }; }, { "pageChanged": "pageChanged"; "submitEmit": "submitEmit"; "subFormChange": "subFormChange"; }, never, never, false, never>;
|
|
13
15
|
}
|
|
@@ -10,9 +10,11 @@ export declare class NextPrevNavigationComponent {
|
|
|
10
10
|
navigatePrevious: EventEmitter<void>;
|
|
11
11
|
submitEmit: EventEmitter<any>;
|
|
12
12
|
edit: boolean;
|
|
13
|
+
subFormChange: EventEmitter<any>;
|
|
14
|
+
updateSubFormWithSubmissions(event: any): void;
|
|
13
15
|
onNavigateNext(): void;
|
|
14
16
|
onNavigatePrevious(): void;
|
|
15
17
|
submitForm(): void;
|
|
16
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<NextPrevNavigationComponent, never>;
|
|
17
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NextPrevNavigationComponent, "lib-next-prev-navigation", never, { "currentPageIndex": { "alias": "currentPageIndex"; "required": false; }; "pages": { "alias": "pages"; "required": false; }; "previousPage": { "alias": "previousPage"; "required": false; }; "nextPage": { "alias": "nextPage"; "required": false; }; "currentPage": { "alias": "currentPage"; "required": false; }; "edit": { "alias": "edit"; "required": false; }; }, { "navigateNext": "navigateNext"; "navigatePrevious": "navigatePrevious"; "submitEmit": "submitEmit"; }, never, never, false, never>;
|
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NextPrevNavigationComponent, "lib-next-prev-navigation", never, { "currentPageIndex": { "alias": "currentPageIndex"; "required": false; }; "pages": { "alias": "pages"; "required": false; }; "previousPage": { "alias": "previousPage"; "required": false; }; "nextPage": { "alias": "nextPage"; "required": false; }; "currentPage": { "alias": "currentPage"; "required": false; }; "edit": { "alias": "edit"; "required": false; }; }, { "navigateNext": "navigateNext"; "navigatePrevious": "navigatePrevious"; "submitEmit": "submitEmit"; "subFormChange": "subFormChange"; }, never, never, false, never>;
|
|
18
20
|
}
|
|
@@ -80,6 +80,8 @@ export declare class SubmitFormComponent implements OnInit {
|
|
|
80
80
|
isValid: boolean;
|
|
81
81
|
message: string;
|
|
82
82
|
};
|
|
83
|
+
updateSubFormWithSubmissions(event: any): void;
|
|
84
|
+
updateSubForm: (pages: any[], updatedSubForm: any) => void;
|
|
83
85
|
static ɵfac: i0.ɵɵFactoryDeclaration<SubmitFormComponent, never>;
|
|
84
86
|
static ɵcmp: i0.ɵɵComponentDeclaration<SubmitFormComponent, "lib-submit-form", never, { "moduleName": { "alias": "moduleName"; "required": false; }; "edit": { "alias": "edit"; "required": false; }; "submissionId": { "alias": "submissionId"; "required": false; }; }, { "submit": "submit"; }, never, never, false, never>;
|
|
85
87
|
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { FormElementType } from './formElementType.model';
|
|
2
|
+
import { Submission } from './submission.model';
|
|
2
3
|
export interface SubForm {
|
|
3
4
|
id: string;
|
|
5
|
+
count: number;
|
|
4
6
|
title: string;
|
|
5
7
|
description: string;
|
|
6
|
-
subFormStructure:
|
|
8
|
+
subFormStructure: string;
|
|
9
|
+
submissions: Submission[];
|
|
7
10
|
formElements: FormElementType<any>[];
|
|
8
11
|
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { MatDialog } from '@angular/material/dialog';
|
|
3
|
+
import { Attachment } from '../../models/attachment.model';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
interface Answer {
|
|
6
|
+
questionId: string;
|
|
7
|
+
answer: any;
|
|
8
|
+
answerId?: string;
|
|
9
|
+
deleteFiles?: string[];
|
|
10
|
+
attachments: Attachment[];
|
|
11
|
+
}
|
|
12
|
+
interface Submission {
|
|
13
|
+
submissionId: string;
|
|
14
|
+
answers: Answer[];
|
|
15
|
+
}
|
|
16
|
+
export declare class MultipleSubformComponent {
|
|
17
|
+
dialog: MatDialog;
|
|
18
|
+
subForm: any;
|
|
19
|
+
subFormChange: EventEmitter<any>;
|
|
20
|
+
submissions: Submission[];
|
|
21
|
+
deletedSubmissions: string[];
|
|
22
|
+
constructor(dialog: MatDialog);
|
|
23
|
+
ngOnInit(): void;
|
|
24
|
+
subFormSubmission(subForm: any): void;
|
|
25
|
+
editSubFormSubmission(index: number, submission: Submission): void;
|
|
26
|
+
bindAnswers(subForm: any, submission: Submission): any;
|
|
27
|
+
deleteSubForm(index: number): void;
|
|
28
|
+
addNewSubmission(): void;
|
|
29
|
+
updateSubmission(result: any, index: number): void;
|
|
30
|
+
updateSubFormWithSubmissions(): void;
|
|
31
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MultipleSubformComponent, never>;
|
|
32
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MultipleSubformComponent, "lib-multiple-subform", never, { "subForm": { "alias": "subForm"; "required": false; }; }, { "subFormChange": "subFormChange"; }, never, never, false, never>;
|
|
33
|
+
}
|
|
34
|
+
export {};
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
1
2
|
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class SubFormComponent {
|
|
3
|
+
export declare class SubFormComponent implements OnInit {
|
|
3
4
|
subForm: any;
|
|
5
|
+
edit: boolean;
|
|
6
|
+
subFormChange: EventEmitter<any>;
|
|
7
|
+
ngOnInit(): void;
|
|
8
|
+
bindAnswersToFormElements(): void;
|
|
9
|
+
updateSubFormWithSubmissions(event: any): void;
|
|
4
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<SubFormComponent, never>;
|
|
5
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SubFormComponent, "lib-sub-form", never, { "subForm": { "alias": "subForm"; "required": false; }; }, {}, never, never, false, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SubFormComponent, "lib-sub-form", never, { "subForm": { "alias": "subForm"; "required": false; }; "edit": { "alias": "edit"; "required": false; }; }, { "subFormChange": "subFormChange"; }, never, never, false, never>;
|
|
6
12
|
}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import * as i1 from "./sub-form/sub-form.component";
|
|
3
|
-
import * as i2 from "
|
|
4
|
-
import * as i3 from "
|
|
5
|
-
import * as i4 from "
|
|
3
|
+
import * as i2 from "./multiple-subform/multiple-subform.component";
|
|
4
|
+
import * as i3 from "./submission-modal/submission-modal.component";
|
|
5
|
+
import * as i4 from "@angular/common";
|
|
6
|
+
import * as i5 from "../form-fields/form-fields.module";
|
|
7
|
+
import * as i6 from "../logic/logic.module";
|
|
8
|
+
import * as i7 from "@angular/material/dialog";
|
|
6
9
|
export declare class SubFormModule {
|
|
7
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<SubFormModule, never>;
|
|
8
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<SubFormModule, [typeof i1.SubFormComponent], [typeof
|
|
11
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SubFormModule, [typeof i1.SubFormComponent, typeof i2.MultipleSubformComponent, typeof i3.SubmissionModalComponent], [typeof i4.CommonModule, typeof i5.FormFieldsModule, typeof i6.LogicModule, typeof i7.MatDialogModule], [typeof i1.SubFormComponent]>;
|
|
9
12
|
static ɵinj: i0.ɵɵInjectorDeclaration<SubFormModule>;
|
|
10
13
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { MatDialogRef } from '@angular/material/dialog';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class SubmissionModalComponent {
|
|
4
|
+
data: any;
|
|
5
|
+
private dialogRef;
|
|
6
|
+
subForm: any;
|
|
7
|
+
constructor(data: any, dialogRef: MatDialogRef<SubmissionModalComponent>);
|
|
8
|
+
ngOnInit(): void;
|
|
9
|
+
closeModal(): void;
|
|
10
|
+
saveSubmission(): void;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SubmissionModalComponent, never>;
|
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SubmissionModalComponent, "lib-submission-modal", never, {}, {}, never, never, false, never>;
|
|
13
|
+
}
|