df-ae-forms-package 1.0.38 → 1.0.40

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/index.d.ts CHANGED
@@ -413,6 +413,8 @@ interface DfFormPreviewProps {
413
413
  firstName?: string;
414
414
  lastName?: string;
415
415
  };
416
+ onCreateIssue?: (issueData: any, attachments: File[]) => Promise<any>;
417
+ onUpdateIssue?: (issueId: string, updateData: any) => Promise<void>;
416
418
  }
417
419
  declare const DfFormPreview: React.FC<DfFormPreviewProps>;
418
420
 
@@ -698,6 +700,8 @@ interface DfFormSectionProps {
698
700
  firstName?: string;
699
701
  lastName?: string;
700
702
  };
703
+ onCreateIssue?: (issueData: any, attachments: File[]) => Promise<any>;
704
+ onUpdateIssue?: (issueId: string, updateData: any) => Promise<void>;
701
705
  }
702
706
  declare const DfFormSection: React.FC<DfFormSectionProps>;
703
707
 
@@ -737,6 +741,8 @@ interface DfFormDataGridProps {
737
741
  onAttachmentChange?: (componentId: string, attachments: File[] | null) => void;
738
742
  workOrderNumber?: string;
739
743
  assetNumber?: string;
744
+ onCreateIssue?: (issueData: any, attachments: File[]) => Promise<any>;
745
+ onUpdateIssue?: (issueId: string, updateData: any) => Promise<void>;
740
746
  }
741
747
  declare const DfFormDataGrid: React.FC<DfFormDataGridProps>;
742
748
 
@@ -783,6 +789,8 @@ interface DfFormTableProps {
783
789
  firstName?: string;
784
790
  lastName?: string;
785
791
  };
792
+ onCreateIssue?: (issueData: any, attachments: File[]) => Promise<any>;
793
+ onUpdateIssue?: (issueId: string, updateData: any) => Promise<void>;
786
794
  }
787
795
  declare const DfFormTable: React.FC<DfFormTableProps>;
788
796
 
@@ -805,6 +813,8 @@ interface IComponentActionFeaturesProps {
805
813
  firstName?: string;
806
814
  lastName?: string;
807
815
  };
816
+ onCreateIssue?: (issueData: any, attachments: File[]) => Promise<any>;
817
+ onUpdateIssue?: (issueId: string, updateData: any) => Promise<void>;
808
818
  }
809
819
  declare const ComponentActionFeatures: React.FC<IComponentActionFeaturesProps>;
810
820
 
@@ -990,6 +1000,22 @@ declare class ToastService {
990
1000
  }
991
1001
  declare const toastService: ToastService;
992
1002
 
1003
+ interface GeneratePdfOptions {
1004
+ formTitle: string;
1005
+ formDescription?: string;
1006
+ userName?: string;
1007
+ components: any[];
1008
+ }
1009
+ /**
1010
+ * Generates a PDF blob from the form submission data using the FormSubmissionPdf component.
1011
+ * This function renders the component to a hidden DOM element, captures it as an image,
1012
+ * and converts it to a PDF.
1013
+ *
1014
+ * @param options configuration for the PDF content
1015
+ * @returns Promise resolving to a PDF Blob
1016
+ */
1017
+ declare const generateFormPdf: (options: GeneratePdfOptions) => Promise<Blob>;
1018
+
993
1019
  type TComponentCategory = 'Basic' | 'Advanced' | 'Layout' | 'Custom';
994
1020
  type TBasicComponentName = 'text-input' | 'number-input' | 'email-input' | 'textarea' | 'select' | 'checkbox' | 'radio' | 'segment' | 'date-picker' | 'datetime-picker' | 'info' | 'signature' | 'heading' | 'instructions' | 'section' | 'table' | 'datagrid' | 'file' | 'location';
995
1021
  type TComponentName = TBasicComponentName;
@@ -1047,5 +1073,5 @@ interface IBaseStyleProps {
1047
1073
  }
1048
1074
  type TFormComponent = FormComponentType;
1049
1075
 
1050
- export { ComponentActionFeatures, ComponentSubmissionActions, DfFormCheckbox, DfFormComments, DfFormDataGrid, DfFormDateTime, DfFormErrorMsg, DfFormFileUpload, DfFormHeading, DfFormInput, DfFormInstruction, DfFormLocation, DfFormPreview, DfFormRadio, DfFormSection, DfFormSegment, DfFormSelect, DfFormSignature, DfFormTable, DfFormTextarea, ELabelAlignment, FormSubmissionPdf, RaiseIssueModal, ThresholdAlert, conditionalLogicService, toastService };
1076
+ export { ComponentActionFeatures, ComponentSubmissionActions, DfFormCheckbox, DfFormComments, DfFormDataGrid, DfFormDateTime, DfFormErrorMsg, DfFormFileUpload, DfFormHeading, DfFormInput, DfFormInstruction, DfFormLocation, DfFormPreview, DfFormRadio, DfFormSection, DfFormSegment, DfFormSelect, DfFormSignature, DfFormTable, DfFormTextarea, ELabelAlignment, FormSubmissionPdf, RaiseIssueModal, ThresholdAlert, conditionalLogicService, generateFormPdf, toastService };
1051
1077
  export type { DataGridEntry, DeviceType, DfFormPreviewProps, ErrorMessageProps, FormComponentProps, FormComponentType, IAvailableComponent, IBaseFormComponent, IBaseProps, IBaseStyleProps, IBaseValidationProps, ICheckboxComponent, ICondition, IConditionalEvaluationResult, IConditionalLogic, IDataGridComponent, IDateComponent, IDatePickerComponent, IDateTimePickerComponent, IDividerComponent, IEmailInputComponent, IFileComponent, IFileUploadComponent, IFormControlChange, IFormValidationErrors, IHeadingComponent, IInstructionComponent, ILocationComponent, INumberInputComponent, IOption, IRadioComponent, ISectionComponent, ISegmentComponent, ISelectComponent, ISignatureComponent, ITableComponent, ITextInputComponent, ITextareaComponent, IToast, TBasicComponentName, TCheckboxValue, TComponentCategory, TComponentName, TFormComponent, TInputComponentType, TableCell, ValidationResult, ValidationRule };