1.0.0 • Published 9 months ago

fixed_form_builder v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
9 months ago

npm run start:editor || npm run start:viewer

@bpmn-io/form-js

CI

View, visually edit and simulate JSON-based forms.

Usage

This library exports a form viewer, editor and playground.

Display a form

Renders a form based on [a form schema](./docs/FORM_SCHEMA.md) and existing data:

import { Form } from "@bpmn-io/form-js";

const form = new Form({
  container: document.querySelector("#form"),
});

await form.importSchema(schema, data);

form.on("submit", (event) => {
  console.log(event.data, event.errors);
});

See [viewer documentation](./packages/form-js-viewer) for further details.

Create and edit a form

Create a new form or edit an exsting one:

import { FormEditor } from "@bpmn-io/form-js";

const formEditor = new FormEditor({
  container: document.querySelector("#form-editor"),
});

await formEditor.importSchema(schema);

See [editor documentation](./packages/form-js-editor) for further details.

Create and simulate a form with input and output data

Create and simulate a form with input and output data:

import { FormPlayground } from "@bpmn-io/form-js";

const formPlayground = new FormPlayground({
  container: document.querySelector("#form-playground"),
  schema,
  data,
});

See [playground documentation](./packages/form-js-playground) for further details.

Resources

  • [Demo](https://demo.bpmn.io/form)
  • [Issues](https://github.com/bpmn-io/form-js/issues)
  • [Changelog](./packages/form-js/CHANGELOG.md)
  • [Contributing guide](https://github.com/bpmn-io/.github/blob/master/.github/CONTRIBUTING.md#create-a-pull-request)
  • [Form schema](./docs/FORM_SCHEMA.md)

Build and run

Build the project in a Posix environment. On Windows, that is [Git Bash](https://gitforwindows.org/) or WSL.

Note we currently support development environments with Node.js version 16 (and npm version 8). We encourage you to use a Node.js version manager (e.g., [nvm](https://github.com/nvm-sh/nvm) or [n](https://github.com/tj/n)) to set up the needed versions.

Prepare the project by installing all dependencies:

npm install

Then, depending on your use-case you may run any of the following commands:

# build the library and run all tests
npm run all

# spin up a single local form-js instance
npm start

# spin up a specific instance

## viewer
npm run start:viewer

## editor
npm run start:editor

## playground
npm run start:playground

To run the visual regression tests, read the docs [here](./e2e/README.md)

License

Use under the terms of the [bpmn.io license](http://bpmn.io/license).

JSONStreamabababbrevabort-controlleracceptsacornacorn-import-assertionsacorn-jsxadd-streamagent-baseagentkeepaliveaggregate-errorajvajv-formatsajv-keywordsansi-colorsansi-escapesansi-regexansi-stylesanymatchaprobaare-we-there-yetargparsearia-queryarray-buffer-byte-lengtharray-differarray-ifyarray-includesarray-movearray-unionarray.prototype.findlastindexarray.prototype.flatarray.prototype.flatmaparray.prototype.tosortedarraybuffer.prototype.slicearrifyassertion-errorast-typesasyncasynciterator.prototypeasynckitat-least-nodeatoaavailable-typed-arraysaxiosb4ababel-plugin-polyfill-corejs2babel-plugin-polyfill-corejs3babel-plugin-polyfill-regeneratorbalanced-matchbase64-jsbase64idbasic-ftpbefore-after-hookbig.jsbin-linksbinary-extensionsblbody-parserboolbasebrace-expansionbracesbrowser-stdoutbrowserslistbufferbuffer-crc32buffer-frombuiltin-modulesbuiltinsbyte-sizebytescacachecall-bindcallsitescamelcasecamelcase-keyscamelizecaniuse-litechalkchardetcheck-errorchokidarchownrchrome-trace-eventchromium-bidici-infoclassnamesclean-stackcli-cursorcli-spinnerscli-widthcliuicloneclone-deepclsxcmd-shimcodemirrorcolorcolor-convertcolor-namecolor-stringcolor-supportcolorettecolumnifycombined-streamcommandercommon-ancestor-pathcommon-path-prefixcommondircompare-funccomponent-eventcompute-scroll-into-viewconcat-mapconcat-streamconfig-chainconnectconsole-control-stringscontent-typecontraconventional-changelog-angularconventional-changelog-coreconventional-changelog-preset-loaderconventional-changelog-writerconventional-commits-filterconventional-commits-parserconventional-recommended-bumpconvert-source-mapcookiecopy-to-clipboardcore-js-compatcore-util-iscorscosmiconfigcreltcross-fetchcross-spawncrossventcrypto-random-stringcss-color-keywordscss-selectcss-to-react-nativecss-treecss-whatcssesccssocsstypecustom-eventdargsdata-uri-to-bufferdate-formatdateformatdebugdecamelizedecamelize-keysdedentdeep-eqldeep-equaldeep-isdeepmergedefaultsdefine-lazy-propdefine-propertiesdegeneratordeldelayed-streamdelegatesdepddeprecationdestroydetect-indentdevtools-protocoldidiffdir-globdoctrinedom-accessibility-apidom-serializedom-serializerdomelementtypedomhandlerdomifydomutilsdot-casedot-propdotenvdownloadjsdownshiftduplexereastasianwidthee-firstejselectron-to-chromiumemoji-regexemojis-listencodeurlencodingend-of-streamengine.ioengine.io-parserenhanced-resolveenquirerententitiesenv-pathsenvinfoerr-codeerror-exes-abstractes-get-iteratores-iterator-helperses-module-lexeres-set-tostringtages-shim-unscopableses-to-primitiveesbuildescaladeescape-htmlescape-string-regexpescodegeneslint-import-resolver-nodeeslint-module-utilseslint-plugin-mochaeslint-plugin-reacteslint-scopeeslint-utilseslint-visitor-keysespreeesprimaesqueryesrecurseestraverseestree-walkeresutilsevent-target-shimeventemitter3eventsexecaexponential-backoffextendexternal-editorextract-zipfast-deep-equalfast-fifofast-globfast-json-stable-stringifyfast-levenshteinfastqfd-slicerfeelersfeelinfiguresfile-dropsfile-entry-cachefile-urlfilelistfill-rangefinalhandlerfind-cache-dirfind-upflatflat-cacheflatpickrflattedfocus-trapfollow-redirectsfor-eachforeground-childform-datafs-constantsfs-extrafs-minipassfs-readdir-recursivefs.realpathfunction-bindfunction.prototype.namefunctions-have-namesgaugegensyncget-caller-fileget-func-nameget-intrinsicget-package-typeget-pkg-repoget-portget-streamget-symbol-descriptionget-urigit-raw-commitsgit-remote-origin-urlgit-semver-tagsgit-upgit-url-parsegitconfiglocalglobglob-parentglob-to-regexpglobalsglobalthisglobbygopdgraceful-fsgraphemerhammerjshandlebarshard-rejectionhashas-bigintshas-flaghas-property-descriptorshas-protohas-symbolshas-tostringtaghas-unicodehehoist-non-react-staticshosted-git-infohtmhtml-escaperhttp-cache-semanticshttp-errorshttp-proxyhttp-proxy-agenthttps-proxy-agenthuman-signalshumanize-msiconv-liteicss-utilsidsieee754ignoreignore-walkimmutableimport-freshimport-localimurmurhashindent-stringindexofinfer-ownerinflightinheritsinherits-browseriniinit-package-jsoninquirerinternal-slotinvariantipis-argumentsis-array-bufferis-arrayishis-async-functionis-bigintis-binary-pathis-boolean-objectis-builtin-moduleis-callableis-ciis-core-moduleis-date-objectis-dockeris-extglobis-finalizationregistryis-fullwidth-code-pointis-generator-functionis-globis-interactiveis-lambdais-mapis-moduleis-negative-zerois-numberis-number-objectis-objis-path-cwdis-path-insideis-plain-objis-plain-objectis-referenceis-regexis-setis-shared-array-bufferis-sshis-streamis-stringis-symbolis-text-pathis-typed-arrayis-unicode-supportedis-weakmapis-weakrefis-weaksetis-wslisarrayisbinaryfileisexeisobjectistanbul-lib-coverageistanbul-lib-instrumentistanbul-lib-reportistanbul-lib-source-mapsistanbul-reportsiterator.prototypejackspeakjakejest-workerjs-tokensjs-yamljsescjson-bufferjson-parse-better-errorsjson-parse-even-better-errorsjson-schema-traversejson-stable-stringify-without-jsonifyjson-stringify-nicejson-stringify-safejson5jsonc-parserjsonfilejsonparsejsx-ast-utilsjust-diffjust-diff-applyjust-extendkeyvkind-oflang-feellevnlezer-feellibnpmaccesslibnpmpublishlines-and-columnsload-json-fileloader-runnerloader-utilslocate-pathlodashlodash.debouncelodash.findlastlodash.getlodash.isequallodash.ismatchlodash.mergelodash.omitlodash.throttlelog-symbolslog4jsloose-envifyloupelower-caselru-cacheluxonlz-stringmagic-stringmake-dirmake-fetch-happenmap-objmatches-selectormdn-datamedia-typermemorystreammeowmerge-streammerge2micromatchmimemime-dbmime-typesmimic-fnmin-dashmin-dommin-indentminimatchminimistminimist-optionsminipassminipass-collectminipass-fetchminipass-flushminipass-json-streamminipass-pipelineminipass-sizedminizlibmittmkdirpmkdirp-classicmkdirp-infer-ownermodify-valuesmsmultimatchmute-streamnanoidnatural-comparenegotiatorneo-asyncnetmasknice-tryniseno-casenode-addon-apinode-fetchnode-gypnode-gyp-buildnode-releasesnomsnoptnormalize-package-datanormalize-pathnpm-bundlednpm-install-checksnpm-normalize-package-binnpm-package-argnpm-packlistnpm-pick-manifestnpm-registry-fetchnpm-run-pathnpmlognth-checknxobject-assignobject-inspectobject-isobject-keysobject-refsobject.assignobject.entriesobject.fromentriesobject.groupbyobject.hasownobject.valueson-finishedonceonetimeopenoptionatororaos-tmpdirp-finallyp-limitp-locatep-mapp-map-seriesp-pipep-queuep-reducep-timeoutp-tryp-waterfallpac-proxy-agentpac-resolverpacoteparent-moduleparse-conflict-jsonparse-jsonparse-pathparse-urlparseurlpath-existspath-intersectionpath-is-absolutepath-keypath-parsepath-scurrypath-to-regexppath-typepathvalpendpicocolorspicomatchpidtreepifypkg-dirplaywright-corepostcsspostcss-modules-extract-importspostcss-modules-local-by-defaultpostcss-modules-scopepostcss-modules-valuespostcss-selector-parserpostcss-value-parserpreact-markupprelude-lspretty-formatproc-logprocessprocess-nextick-argsprogresspromise-all-reject-latepromise-call-limitpromise-inflightpromise-retrypromzardprop-typesproto-listprotocolsproxy-agentproxy-from-envpumppunycodepuppeteer-coreqqjobsqsqueue-microtaskqueue-tickquick-lrurambdarandombytesrange-parserraw-bodyreactreact-domreact-isreadread-cmd-shimread-package-jsonread-package-json-fastread-pkgread-pkg-upreadable-streamreaddirpredentreflect.getprototypeofregenerateregenerate-unicode-propertiesregenerator-runtimeregenerator-transformregexp.prototype.flagsregexpu-coreregjsparserrequire-directoryrequire-from-stringrequires-portresize-observer-polyfillresolveresolve-cwdresolve-fromrestore-cursorretryreusifyrfdcrimrafrollup-plugin-css-onlyrun-asyncrun-parallelrxjssafe-array-concatsafe-buffersafe-regex-testsafer-bufferschedulerschema-utilssemverserialize-javascriptset-blockingsetprototypeofshallow-cloneshallowequalshebang-commandshebang-regexshell-quoteshowdownside-channelsignal-exitsigstoresimple-swizzleslashsmart-buffersnake-casesocket.iosocket.io-adaptersocket.io-parsersockssocks-proxy-agentsort-keyssource-mapsource-map-jssource-map-supportspdx-correctspdx-exceptionsspdx-expression-parsespdx-license-idssplitsplit2sprintf-jsssristatusesstop-iteration-iteratorstreamrollerstreamxstring-widthstring.prototype.matchallstring.prototype.padendstring.prototype.trimstring.prototype.trimendstring.prototype.trimstartstring_decoderstrip-ansistrip-bomstrip-final-newlinestrip-indentstrip-json-commentsstrong-log-transformerstyle-modstyled-componentsstylissupports-colorsupports-preserve-symlinks-flagsvg-parsersvgotabbabletapabletartar-fstar-streamtemp-dirtempyterserterser-webpack-plugintest-excludetext-extensionstext-tablethroughthrough2tickytiny-svgtmpto-fast-propertiesto-regex-rangetoggle-selectiontoidentifiertr46treeversetrim-newlinestsconfig-pathstslibtuf-jstype-checktype-detecttype-festtype-istyped-array-buffertyped-array-byte-lengthtyped-array-byte-offsettyped-array-lengthtypedarrayua-parser-jsuglify-jsunbox-primitiveunbzip2-streamunicode-canonical-property-names-ecmascriptunicode-match-property-ecmascriptunicode-match-property-value-ecmascriptunicode-property-aliases-ecmascriptunique-filenameunique-slugunique-stringuniversal-user-agentuniversalifyunpipeuntildifyupathupdate-browserslist-dburi-jsuse-resize-observerutil-deprecateutils-mergeuuidv8-compile-cachevalidate-npm-package-licensevalidate-npm-package-namevaryvoid-elementsw3c-keynamewalk-up-pathwatchpackwcwidthwebidl-conversionswebpack-mergewebpack-sourceswhatwg-urlwhichwhich-boxed-primitivewhich-builtin-typewhich-collectionwhich-typed-arraywicg-inertwide-alignwindow-or-globalwordwrapworkerpoolwrap-ansiwrappywrite-file-atomicwrite-json-filewrite-pkgwsxtendy18nyallistyamlyargsyargs-parseryargs-unparseryauzlyocto-queue
1.0.0

9 months ago