![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@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
816px
height: number
1056px
view: 'mobile' | undefined
width: <screen_width>
, view: 'mobile'
, and mode: 'fill
properties enables filling out of forms in responsive web view.lazyload: boolean
false
doc: 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
fieldOptions: [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.onBlur
onChange
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
onBlur
onChange
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
onBlur
onChange
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
onBlur
onChange
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.onBlur
onChange
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
onBlur
onChange
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={{ 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: { 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.fontColor
theme.fontColorPrimary
const fontColor = field.fontColor || theme.field.fontColor || theme.fontColor || internal.fontColor
fontFamily: string
fontColorPrimary: string(HEX Code)
fontColorSecondary: string(HEX Code)
primaryColor: string(HEX Code)
dangerColor: string(HEX Code)
warningColor: string(HEX Code)
backgroundColor: string(Hex Code)
borderColor: string(Hex Code)
borderRadius: number
field: 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: (doc: object)
Environment Versions
yarn
18+
Commands
yarn run test
yarn run coverage
yarn run lint-fix
yarn run lint
yarn coverage-report -- filename
FAQs
Joyfill UI Components
The npm package @joyfill/components receives a total of 7,455 weekly downloads. As such, @joyfill/components popularity was classified as 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 0 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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.