How to use the formiojs/components/Components.setComponents function in formiojs

To help you get started, we’ve selected a few formiojs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github formio / vue-formio / src / components / FormBuilder.ts View on Github external
/* globals console, Promise */
import Vue from 'vue';
import { Component, Prop, Watch } from 'vue-property-decorator'
import FormioFormBuilder from 'formiojs/FormBuilder';
import AllComponents from 'formiojs/components';
import Components from 'formiojs/components/Components';
Components.setComponents(AllComponents);

@Component
export class FormBuilder extends Vue {
  builder?: any;
  builderReady?: Promise;

  @Prop()
  form?: any;

  @Prop()
  options?: any;

  @Watch('form')
  formChange(value: object) {
    if (this.builder) {
      this.builder.instance.form = value;
github formio / vue-formio / src / components / Form.ts View on Github external
/* globals console, Promise */
import Vue from 'vue';
import { Component, Prop, Watch } from 'vue-property-decorator';
import AllComponents from 'formiojs/components';
import Components from 'formiojs/components/Components';
Components.setComponents(AllComponents);
import FormioForm from 'formiojs/Form';
import Formio from 'formiojs/Formio';

@Component
export class Form extends Vue {
  formio?: any;

  @Prop()
  src?: string;

  @Prop()
  url?: string;

  @Prop()
  form?: object;
github formio / react-formio / src / components / FormBuilder.jsx View on Github external
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import AllComponents from 'formiojs/components';
import Components from 'formiojs/components/Components';
import FormioFormBuilder from 'formiojs/FormBuilder';

Components.setComponents(AllComponents);

export default class FormBuilder extends Component {
  static defaultProps = {
    options: {},
    Builder: FormioFormBuilder
  };

  static propTypes = {
    form: PropTypes.object,
    options: PropTypes.object,
    onSaveComponent: PropTypes.func,
    onUpdateComponent: PropTypes.func,
    onDeleteComponent: PropTypes.func,
    onCancelComponent: PropTypes.func,
    onEditComponent: PropTypes.func,
    Builder: PropTypes.any
github formio / react-formio / src / components / FormBuilder.js View on Github external
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import AllComponents from 'formiojs/components';
import Components from 'formiojs/components/Components';
Components.setComponents(AllComponents);
import FormBuilder from 'formiojs/FormBuilder';

export default class extends Component {
  static defaultProps = {
    options: {},
    Builder: FormBuilder,
  };

  static propTypes = {
    form: PropTypes.object,
    options: PropTypes.object,
    onSaveComponent: PropTypes.func,
    onUpdateComponent: PropTypes.func,
    onDeleteComponent: PropTypes.func,
    onCancelComponent: PropTypes.func,
    onEditComponent: PropTypes.func,
github formio / react-formio / src / components / Form.jsx View on Github external
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import EventEmitter from 'eventemitter2';
import AllComponents from 'formiojs/components';
import Components from 'formiojs/components/Components';
Components.setComponents(AllComponents);
import FormioForm from 'formiojs/Form';

export default class Form extends Component {
  static propTypes = {
    src: PropTypes.string,
    url: PropTypes.string,
    form: PropTypes.object,
    submission: PropTypes.object,
    options: PropTypes.shape({
      readOnly: PropTypes.boolean,
      noAlerts: PropTypes.boolean,
      i18n: PropTypes.object,
      template: PropTypes.string,
      saveDraft: PropTypes.boolean,
    }),
    onPrevPage: PropTypes.func,