
Product
Socket MCP Adds Org Alerts, Threat Feed Review, and Package Inspection
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.
@isoftdata/svelte-report-job-modal
Advanced tools
This component is a modal for selecting a report, and printing, emailing, and previewing said report.
This component is a modal for selecting a report, and printing, emailing, and previewing said report.

You should use it by calling the component's open or prompt method with a print job or array of print jobs, and any options that may apply.

pnpm i @isoftdata/svelte-report-job-modal
| Name | Type | Description | Default Value |
|---|---|---|---|
| favoriteReportNames | Array<string> | Array of favorite report names. Clicking on the star icon in the modal will add to/subtract from this list. | [] |
| showPrint | boolean | Whether to show the print option | true |
| showEmail | boolean | Whether to show the email option | true |
| showPreview | boolean | Whether to show the preview option | true |
| showFavoriteButton | boolean | Whether to show the favorite report button | true |
| loadReports | (reportType: string) => Promise<Array<Report>> | Function to load reports based on the report type. Returns a Promise that resolves to a Report | Required |
| loadPrinters | (reportType: string) => Promise<Array<Printer>> | Function to load printers based on the report type. Returns a Promise that resolves to a Printer | Required |
| loadDefaultPrinter | (reportType: string) => Promise<string> | Function to load the default printer name based on the report type | Required |
| generatePdfPreview | (args: { id: number; name: string; type: string; parameters: Record<string, string> }) => Promise<{ data: string; mimeType: string; }> | Function to generate a PDF preview for a report | Required |
| saveReportJobs | (printJobs: Array<ReportJob>) => Promise<void> | Function to save report jobs. Takes an array of ReportJobs as input. | Required |
| savePrinterPreference | (printerName: string, reportType: string) => Promise<void> | Function to save the printer preference for a report type | Required |
EMAIL or PRINTopen - Opens the modal with a print job or array of print jobs, and any options that may apply. Takes the following arguments:
printJobOrJobs - A ReportJob or array of ReportJobs to print/email/previewoptions - An object with the following optional properties:export type OpenOptions = {
emails?: Array<string>
disablePrintQuantity?: boolean
showPrint?: boolean
showEmail?: boolean
showPreview?: boolean
showFavoriteButton?: boolean
}
prompt(...args: Parameters<typeof open>) => Promise<boolean> - Accepts the exact same arguments as the open method. This method opens the modal and returns a promise that resolves once the user has completed their work. Return is true if the Print/Download/Email button is clicked, or false if the modal is closed/cancelled.There's some types you might need to use. They're declared at the top of ReportJobModal.svelte
export type Report = {
id: number
type: string
name: string
}
export type Printer = {
name: string
displayName?: string | null
reportType?: string | null
}
export type ReportJob = {
reportId?: number
type: string
name: string
quantity: number
sourceType: 'CRYSTAL' | 'QUERY'
destinationType: 'DIRECTORY' | 'EMAIL' | 'EMAILCSV' | 'PRINTER'
destination: string
parameters: Record<string, string>
// email
title?: string
emailBcc?: string
emailSubject?: string
emailBody?: string
emailFrom?: string
}
<script lang="ts">
import ReportJobModal from '@isoftdata/svelte-report-job-modal'
let reportJobModal: ReportJobModal
function print() {
reportJobModal.open({
type: 'Work Order',
parameters: {
workorderid: '29760',
},
})
}
</script>
<Button
class="w-100"
iconClass="print"
on:click={() => print()}>Print</Button
>
<ReportJobModal
loadReports={reportType => Promise.resolve(reports.filter(report => report.type === reportType))}
loadPrinters={() => Promise.resolve(printers)}
loadDefaultPrinter={() => Promise.resolve(printers[0].name)}
saveReportJobs={() => Promise.resolve()}
savePrinterPreference={() => Promise.resolve()}
{generatePdfPreview}
bind:favoriteReportNames
bind:this={reportJobModal}
close={() => console.log('close')}
confirm={type => console.log(type)}
></ReportJobModal>
FAQs
This component is a modal for selecting a report, and printing, emailing, and previewing said report.
The npm package @isoftdata/svelte-report-job-modal receives a total of 65 weekly downloads. As such, @isoftdata/svelte-report-job-modal popularity was classified as not popular.
We found that @isoftdata/svelte-report-job-modal demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 12 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.

Research
More than 140 Mastra npm packages were compromised in a supply chain attack that used a typosquatted dependency to deliver a cross-platform infostealer during installation.