
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
@joyfill/components
Advanced tools
npm install @joyfill/components
or
yarn add @joyfill/components
Head over to Joyfill developer docs to learn more, find guided tutorials and much more.
import { JoyDoc, getDefaultDocument } from '@joyfill/components';
const App = () => {
return (
<JoyDoc
doc={getDefaultDocument()}
mode="edit"
onChange={(changelogs, doc) => console.log(changelogs, doc)}
/>
);
}
<!DOCTYPE html>
<html>
<head>
<title>Joyfill for Javascript Example</title>
<base href=".">
<meta charset="UTF-8" />
<script src=" https://cdn.jsdelivr.net/npm/@joyfill/components@latest/dist/joyfill.min.js"></script>
</head>
<body>
<div id="joyfill"></div>
<script>
Joyfill.JoyDoc(
document.getElementById('joyfill'),
{
mode: 'edit',
onChange: (changelogs, doc) => console.log('onChange: ', changelogs, doc),
}
);
</script>
</body>
</html>
//index.html
<!DOCTYPE html>
<html>
<head>
<title>Joyfill for Javascript Example</title>
<base href=".">
<meta charset="UTF-8" />
</head>
<body>
<div id="joyfill"></div>
<script type="module" src="./index.js"></script>
</body>
</html>
//index.js
import Joyfill from "@joyfill/components/dist/joyfill.min.js";
Joyfill.JoyDoc(
document.getElementById('joyfill'),
{
mode: 'edit',
onChange: (changelogs, doc) => console.log('onChange: ', changelogs, doc),
}
);
mode: 'edit' | 'fill' | 'readonly'
edit is the mode where the form/pdf is desinged, styled, and configured.fill is the mode where you simply input the field data into the built form/pdf.readonly is the mode where everything is locked down and you're simply viewing the form/pdf and the inputed data.width: number
816pxheight: number
1056pxview: 'mobile' | undefined
width: <screen_width>, view: 'mobile', and mode: 'fill properties enables filling out of forms in responsive web view.lazyload: boolean
falsedoc: object
initialPageId: string
_id property of a Page object. For instance, page._id.doc it will fallback to displaying the first page in the pages array.theme: object
features: object
readableIds: boolean (beta)
falseformulas: boolean (beta)
falserepeatingHeaderAndFooter: boolean (beta)
falsevalidateSchema: boolean
truefieldOptions: [object, ...]
fieldSettings: object
onChange: (changelogs: object_array, doc: object) => {}
changelogs: object_array
doc: object
onUploadAsync: (params: object, fileUploads) => Promise
{ url: string }.
url must be a valid image url or image base64 uri.params: object
target: ('file.update' | 'page.update' | 'field.update') Determines the object within the doc (JoyDoc JSON structure) that was targeted with the change event._id The _id of the document|template.identifier The identifier of the document|template.fileId The id of the file that the change happened.pageId The id of the page that the change happened.fieldId The id of the field that the change happened.fieldIdentifier The custom id of the field that the change happened.Image
onFocus(params: object, e: object)
* Empty - Triggers onFocus when file upload is initiated (click or file drop)
* Populated - Triggers onFocus when when upload is clicked or image is deleted.onUploadAsync
* When user selects file(s) from the file system.
* When files are dragged and dropped onto the field.onChange is fired when an option is selected.
* Triggers when onUploadAsync has successfully responded with image urls.Text, Textarea, Number, Date
onFocus(params: object, e: object) is fired when the field is focused.
e.blur
onChange for any pending changes.onBluronChange is fired when the field value is modified.onBlur is fired when the field is blurred.Dropdown
onFocus(params: object, e: object) is fired when the field is focused.
e.blur
onBluronChange is fired when an option is selected or unselected in the field.onBlur is fired when the field is blurred.MultiSelect
onFocus is fired when an option is selected or unselected for the first time on the field.onChange is fired when an option is selected or unselected in the field.Selector (Checkbox/Circle etc)
onFocus(params: object, e: object) is fired when an option is selected or unselected.onChange is fired when an option is selected or unselected.Signature
onFocus(params: object, e: object) is fired when sign button is clicked.
e.blur
onChange is fired when the submit button is clicked.onBlur is fired when the modal is closed.Chart
onFocus(params: object, e: object) is fired when edit button is clicked.
e.blur
onChange is fired when the submit button is clicked.onBlur is fired when the modal is closed.Table / Input Group
Text Cell
onFocus(params: object, e: object) is fired when cell is focused.
e.blur
onBluronChange is fired when the text cell is blurred.onBlur is fired when the cell is blurred.Dropdown Cell
onFocus(params: object, e: object) is fired when cell is focused.
e.blur
onBluronChange is fired when an option is selected.onBlur is fired when the cell is blurred.Image Cell
onFocus(params: object, e: object)
* Empty - Triggers onFocus when file upload is initiated (click or file drop)
* Populated - Triggers onFocus when when upload is clicked or image is deleted.onUploadAsync
* When user selects file(s) from the file system.
* When files are dragged and dropped onto the field.onChange is fired when an option is selected.
Individual Table / Input Group Cell Field
Text Cell
onFocus(params: object, e: object) is fired when the field is focused.
e.blur
onChange for any pending changes.onBluronChange is fired when the field value is modified.onBlur is fired when the field is blurred.Dropdown Cell
onFocus(params: object, e: object) is fired when the field is focused.
e.blur
onBluronChange is fired when the field value is modified.onBlur is fired when the field is blurred.Dropdown Selector Cell
onFocus(params: object, e: object) is fired when an option is chosen.onChange is fired when an option is chosen.Image Cell
onFocus(params: object, e: object)
* Empty - Triggers onFocus when file upload is initiated (click or file drop)
* Populated - Triggers onFocus when when upload is clicked or image is deleted.onUploadAsync
* When user selects file(s) from the file system.
* When files are dragged and dropped onto the field.onChange is fired when an option is selected.
The JoyDocExporter can be used along with a browser's PDF capabilities to convert the doc to a downloadable PDF.
Important Note: There is an initial field measuring cycle that happens inside of the JoyDocExporter and a PDF should not be generated during
that time. An element will be added to the DOM with the pdf-capture-ready class and id that can be used with headless browser libraries. You
should only generate the PDF once this DOM node is present.
import { JoyDocExporter, getDefaultDocument } from '@joyfill/components';
const App = () => {
return (
<JoyDocExporter
doc={getDefaultDocument()}
config={{ page: { height: 1056, width: 816, padding: 0 }}}
/>
);
}
<!DOCTYPE html>
<html>
<head>
<title>Joyfill for Javascript Example</title>
<base href=".">
<meta charset="UTF-8" />
<script src=" https://cdn.jsdelivr.net/npm/@joyfill/components@latest/dist/joyfill.min.js"></script>
</head>
<body>
<div id="joyfill"></div>
<script>
Joyfill.JoyDocExporter(
document.getElementById('joyfill'),
{
doc: Joyfill.getDefaultDocument(),
config: { page: { height: 1056, width: 816, padding: 0 } }
}
);
</script>
</body>
</html>
doc: object
config: object
page: object
height: number
width: number
padding: number
theme: object
#fffff.px) sizing.theme.field.fontColortheme.fontColorPrimaryconst fontColor = field.fontColor || theme.field.fontColor || theme.fontColor || internal.fontColorfontFamily: stringfontColorPrimary: string(HEX Code)fontColorSecondary: string(HEX Code)primaryColor: string(HEX Code)primaryOpaqueColor: string(RGBA)dangerColor: string(HEX Code)warningColor: string(HEX Code)backgroundColor: string(Hex Code)borderColor: string(Hex Code)borderRadius: numberfield: object
titleFontSize: number,
titleFontColor: string(HEX Code),
titleFontStyle: string('italic' | 'normal'),
titleFontWeight: string('bold' | 'normal'),
titleTextAlign: string('left' | 'center' | 'right'),
titleTextTransform: string('uppercase' | 'none'),
titleTextDecoration: string('underline' | 'none'),
fontSize: number,
fontColor: string(HEX Code),
fontStyle: string('italic' | 'normal'),
fontWeight: string('bold' | 'normal'),
textAlign: string('left' | 'center' | 'right'),
textTransform: string('uppercase' | 'none'),
textDecoration: string('underline' | 'none'),
textOverflow: string('ellipsis'),
padding: number,
borderRadius: number,
borderWidth: number,
borderColor: string(HEX Code),
backgroundColor: string(HEX Code)
getDefaultDocument
getDefaultTemplate
getDocumentFromTemplate: ( template: object )
getDefaultPage: ( defaults: object )
duplicate: ( original: object, defaults: object )
duplicatePage: ( original: object, fileId: string, pageId: string )
{ doc: object, changelogs: array }
doc fully updated Document or Template with the page addedchangelogs array of changelogs for new duplicate page.applyLogic: ( items: object_array, fields: object_array, fieldLookupKey: string )
@joyfill/conditional-logic library. View libraryvalidator: object
validate: (doc: object)
validateSchema: (doc: object)
replaceLegacyDateTimeFormats: (doc: object, replacementsLookup: object)
MM/DD/YYYY, MM/DD/YYYY hh:mma, & hh:mma with custom options to support different timezone preferences.doc the full Joyfill document or template JSON.replacementsLookupObject is the object you define to overwrite the legacy options. It supports date, dateTime, time, and defaultFormat. For instance, if you wanted to overwrite the old US formats to the UK preferred formats you could specify the following object: { date: 'DD-MM-YYYY', dateTime: 'DD-MM-YYYY HH:mm', time: 'HH:mm', defaultFormat: 'DD-MM-YYYY' }
date matches and replaces the legacy MM/DD/YYYY.dateTime matches and replaces the legacy MM/DD/YYYY hh:mma.time matches and replaces the legacy hh:mmadefaultFormat overwrites the internal default of MM/DD/YYYY that is used when no format is specified in the data.updatedDoc: objectEnvironment Versions
yarn20+Commands
yarn run testyarn run coverageyarn run lint-fixyarn run lintyarn coverage-report -- filenameFAQs
Joyfill UI Components
The npm package @joyfill/components receives a total of 638 weekly downloads. As such, @joyfill/components popularity was classified as not popular.
We found that @joyfill/components demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 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.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.