From a8eadce81648be09a123ef0d812d0134f0536075 Mon Sep 17 00:00:00 2001 From: brendanjbond Date: Wed, 14 Feb 2024 14:17:52 -0600 Subject: [PATCH] move unused 'experimental' features to a new folder and remove them from build --- config/webpack.config.js | 4 ---- config/webpack.prod.js | 3 --- src/{sdk => experimental}/Plugins.ts | 0 src/{ => experimental}/base/Components.ts | 0 src/{ => experimental}/base/array/ArrayComponent.ts | 2 +- .../base/array/__tests__/ArrayComponent.test.ts | 0 .../base/array/__tests__/fixtures/comp1.ts | 0 .../base/array/__tests__/fixtures/comp2.ts | 0 .../base/array/__tests__/fixtures/index.ts | 0 src/{ => experimental}/base/component/Component.ts | 4 ++-- .../base/component/__tests__/Component.test.ts | 0 src/{ => experimental}/base/data/DataComponent.ts | 2 +- .../base/data/__tests__/DataComponent.test.ts | 0 .../base/data/__tests__/fixtures/comp1.ts | 0 .../base/data/__tests__/fixtures/index.ts | 0 src/{ => experimental}/base/index.ts | 2 +- .../base/nested/NestedComponent.ts | 2 +- .../base/nested/__tests__/NestedComponent.test.ts | 0 .../base/nested/__tests__/fixtures/comp1.ts | 0 .../base/nested/__tests__/fixtures/comp2.ts | 0 .../base/nested/__tests__/fixtures/index.ts | 0 .../components/__tests__/datatable.test.ts | 0 .../components/__tests__/datavalue.test.ts | 0 .../components/__tests__/fixtures/comp1.ts | 0 .../components/__tests__/fixtures/comp2.ts | 0 .../components/__tests__/fixtures/index.ts | 0 .../components/__tests__/html.test.ts | 0 .../components/__tests__/htmlcontainer.test.ts | 0 src/{ => experimental}/components/datatable.ts | 2 +- src/{ => experimental}/components/datavalue.ts | 2 +- src/{ => experimental}/components/html.ts | 2 +- src/{ => experimental}/components/htmlcontainer.ts | 2 +- src/{ => experimental}/components/index.ts | 0 .../components/input/__tests__/fixtures/comp1.ts | 0 .../components/input/__tests__/fixtures/comp2.ts | 0 .../components/input/__tests__/fixtures/index.ts | 0 .../components/input/__tests__/input.test.ts | 0 src/{ => experimental}/components/input/input.ts | 2 +- .../templates/bootstrap/datatable/html.ejs | 0 .../templates/bootstrap/datatable/html.ejs.js | 0 .../templates/bootstrap/datatable/index.ts | 0 .../components/templates/bootstrap/index.ts | 0 src/{ => experimental}/components/templates/index.ts | 0 src/{ => experimental}/components/test.ts | 4 ++-- src/{ => experimental}/core.ts | 6 +++--- src/{ => experimental}/model/EventEmitter.ts | 0 src/{ => experimental}/model/Model.ts | 0 src/{ => experimental}/model/NestedArrayModel.ts | 0 src/{ => experimental}/model/NestedDataModel.ts | 0 src/{ => experimental}/model/NestedModel.ts | 0 src/{ => experimental}/model/__tests__/Model.test.ts | 0 src/{ => experimental}/model/index.ts | 0 src/{ => experimental}/template/Template.ts | 0 src/{ => experimental}/template/index.ts | 0 src/index.ts | 6 +----- src/sdk/Formio.ts | 2 +- src/sdk/package.json | 7 ------- tsconfig.json | 12 ++++++------ 58 files changed, 24 insertions(+), 42 deletions(-) rename src/{sdk => experimental}/Plugins.ts (100%) rename src/{ => experimental}/base/Components.ts (100%) rename src/{ => experimental}/base/array/ArrayComponent.ts (97%) rename src/{ => experimental}/base/array/__tests__/ArrayComponent.test.ts (100%) rename src/{ => experimental}/base/array/__tests__/fixtures/comp1.ts (100%) rename src/{ => experimental}/base/array/__tests__/fixtures/comp2.ts (100%) rename src/{ => experimental}/base/array/__tests__/fixtures/index.ts (100%) rename src/{ => experimental}/base/component/Component.ts (99%) rename src/{ => experimental}/base/component/__tests__/Component.test.ts (100%) rename src/{ => experimental}/base/data/DataComponent.ts (96%) rename src/{ => experimental}/base/data/__tests__/DataComponent.test.ts (100%) rename src/{ => experimental}/base/data/__tests__/fixtures/comp1.ts (100%) rename src/{ => experimental}/base/data/__tests__/fixtures/index.ts (100%) rename src/{ => experimental}/base/index.ts (87%) rename src/{ => experimental}/base/nested/NestedComponent.ts (98%) rename src/{ => experimental}/base/nested/__tests__/NestedComponent.test.ts (100%) rename src/{ => experimental}/base/nested/__tests__/fixtures/comp1.ts (100%) rename src/{ => experimental}/base/nested/__tests__/fixtures/comp2.ts (100%) rename src/{ => experimental}/base/nested/__tests__/fixtures/index.ts (100%) rename src/{ => experimental}/components/__tests__/datatable.test.ts (100%) rename src/{ => experimental}/components/__tests__/datavalue.test.ts (100%) rename src/{ => experimental}/components/__tests__/fixtures/comp1.ts (100%) rename src/{ => experimental}/components/__tests__/fixtures/comp2.ts (100%) rename src/{ => experimental}/components/__tests__/fixtures/index.ts (100%) rename src/{ => experimental}/components/__tests__/html.test.ts (100%) rename src/{ => experimental}/components/__tests__/htmlcontainer.test.ts (100%) rename src/{ => experimental}/components/datatable.ts (94%) rename src/{ => experimental}/components/datavalue.ts (86%) rename src/{ => experimental}/components/html.ts (97%) rename src/{ => experimental}/components/htmlcontainer.ts (89%) rename src/{ => experimental}/components/index.ts (100%) rename src/{ => experimental}/components/input/__tests__/fixtures/comp1.ts (100%) rename src/{ => experimental}/components/input/__tests__/fixtures/comp2.ts (100%) rename src/{ => experimental}/components/input/__tests__/fixtures/index.ts (100%) rename src/{ => experimental}/components/input/__tests__/input.test.ts (100%) rename src/{ => experimental}/components/input/input.ts (96%) rename src/{ => experimental}/components/templates/bootstrap/datatable/html.ejs (100%) rename src/{ => experimental}/components/templates/bootstrap/datatable/html.ejs.js (100%) rename src/{ => experimental}/components/templates/bootstrap/datatable/index.ts (100%) rename src/{ => experimental}/components/templates/bootstrap/index.ts (100%) rename src/{ => experimental}/components/templates/index.ts (100%) rename src/{ => experimental}/components/test.ts (73%) rename src/{ => experimental}/core.ts (96%) rename src/{ => experimental}/model/EventEmitter.ts (100%) rename src/{ => experimental}/model/Model.ts (100%) rename src/{ => experimental}/model/NestedArrayModel.ts (100%) rename src/{ => experimental}/model/NestedDataModel.ts (100%) rename src/{ => experimental}/model/NestedModel.ts (100%) rename src/{ => experimental}/model/__tests__/Model.test.ts (100%) rename src/{ => experimental}/model/index.ts (100%) rename src/{ => experimental}/template/Template.ts (100%) rename src/{ => experimental}/template/index.ts (100%) delete mode 100644 src/sdk/package.json diff --git a/config/webpack.config.js b/config/webpack.config.js index f5563503..33525411 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -4,13 +4,9 @@ module.exports = { mode: 'development', entry: { 'formio.core.js': './src/index.ts', - 'formio.base.js': './src/base/index.ts', - 'formio.components.js': './src/components/index.ts', - 'formio.model.js': './src/model/index.ts', 'formio.modules.js': './src/modules/index.ts', 'formio.js': './src/sdk/index.ts', 'formio.utils.js': './src/utils/index.ts', - 'formio.template.js': './src/template/index.ts', 'formio.process.js': './src/process/index.ts' }, output: { diff --git a/config/webpack.prod.js b/config/webpack.prod.js index d23f97f0..a3ec1f90 100644 --- a/config/webpack.prod.js +++ b/config/webpack.prod.js @@ -3,9 +3,6 @@ const config = require('./webpack.config'); config.mode = 'production'; config.entry = { 'formio.core.min.js': './src/index.ts', - 'formio.base.min.js': './src/base/index.ts', - 'formio.components.min.js': './src/components/index.ts', - 'formio.model.min.js': './src/model/index.ts', 'formio.modules.min.js': './src/modules/index.ts', 'formio.min.js': './src/sdk/index.ts', 'formio.utils.min.js': './src/utils/index.ts', diff --git a/src/sdk/Plugins.ts b/src/experimental/Plugins.ts similarity index 100% rename from src/sdk/Plugins.ts rename to src/experimental/Plugins.ts diff --git a/src/base/Components.ts b/src/experimental/base/Components.ts similarity index 100% rename from src/base/Components.ts rename to src/experimental/base/Components.ts diff --git a/src/base/array/ArrayComponent.ts b/src/experimental/base/array/ArrayComponent.ts similarity index 97% rename from src/base/array/ArrayComponent.ts rename to src/experimental/base/array/ArrayComponent.ts index 66091f64..f4efcf83 100644 --- a/src/base/array/ArrayComponent.ts +++ b/src/experimental/base/array/ArrayComponent.ts @@ -1,5 +1,5 @@ import { Components } from '../Components'; -import { NestedArrayModel, ModelDecoratorInterface, ModelInterface } from 'model'; +import { NestedArrayModel, ModelDecoratorInterface, ModelInterface } from 'src/experimental/model'; import { NestedComponent } from '../nested/NestedComponent'; /** * An array data type component. This provides a nested component that creates "rows" of data diff --git a/src/base/array/__tests__/ArrayComponent.test.ts b/src/experimental/base/array/__tests__/ArrayComponent.test.ts similarity index 100% rename from src/base/array/__tests__/ArrayComponent.test.ts rename to src/experimental/base/array/__tests__/ArrayComponent.test.ts diff --git a/src/base/array/__tests__/fixtures/comp1.ts b/src/experimental/base/array/__tests__/fixtures/comp1.ts similarity index 100% rename from src/base/array/__tests__/fixtures/comp1.ts rename to src/experimental/base/array/__tests__/fixtures/comp1.ts diff --git a/src/base/array/__tests__/fixtures/comp2.ts b/src/experimental/base/array/__tests__/fixtures/comp2.ts similarity index 100% rename from src/base/array/__tests__/fixtures/comp2.ts rename to src/experimental/base/array/__tests__/fixtures/comp2.ts diff --git a/src/base/array/__tests__/fixtures/index.ts b/src/experimental/base/array/__tests__/fixtures/index.ts similarity index 100% rename from src/base/array/__tests__/fixtures/index.ts rename to src/experimental/base/array/__tests__/fixtures/index.ts diff --git a/src/base/component/Component.ts b/src/experimental/base/component/Component.ts similarity index 99% rename from src/base/component/Component.ts rename to src/experimental/base/component/Component.ts index 5790e332..7fb559e3 100644 --- a/src/base/component/Component.ts +++ b/src/experimental/base/component/Component.ts @@ -1,10 +1,10 @@ import { merge } from 'lodash'; import { Components } from '../Components'; -import { Template } from 'template'; +import { Template } from 'src/experimental/template'; import { Evaluator } from 'utils'; import * as dom from 'utils/dom'; import { sanitize } from 'utils/sanitize'; -import { Model, ModelDecoratorInterface, ModelInterface } from 'model'; +import { Model, ModelDecoratorInterface, ModelInterface } from 'src/experimental/model'; /** * The component JSON schema. diff --git a/src/base/component/__tests__/Component.test.ts b/src/experimental/base/component/__tests__/Component.test.ts similarity index 100% rename from src/base/component/__tests__/Component.test.ts rename to src/experimental/base/component/__tests__/Component.test.ts diff --git a/src/base/data/DataComponent.ts b/src/experimental/base/data/DataComponent.ts similarity index 96% rename from src/base/data/DataComponent.ts rename to src/experimental/base/data/DataComponent.ts index 0e7922e9..65f474e5 100644 --- a/src/base/data/DataComponent.ts +++ b/src/experimental/base/data/DataComponent.ts @@ -1,5 +1,5 @@ import { Components } from '../Components'; -import { NestedDataModel, ModelDecoratorInterface, ModelInterface } from 'model'; +import { NestedDataModel, ModelDecoratorInterface, ModelInterface } from 'src/experimental/model'; import { NestedComponent } from '../nested/NestedComponent'; /** diff --git a/src/base/data/__tests__/DataComponent.test.ts b/src/experimental/base/data/__tests__/DataComponent.test.ts similarity index 100% rename from src/base/data/__tests__/DataComponent.test.ts rename to src/experimental/base/data/__tests__/DataComponent.test.ts diff --git a/src/base/data/__tests__/fixtures/comp1.ts b/src/experimental/base/data/__tests__/fixtures/comp1.ts similarity index 100% rename from src/base/data/__tests__/fixtures/comp1.ts rename to src/experimental/base/data/__tests__/fixtures/comp1.ts diff --git a/src/base/data/__tests__/fixtures/index.ts b/src/experimental/base/data/__tests__/fixtures/index.ts similarity index 100% rename from src/base/data/__tests__/fixtures/index.ts rename to src/experimental/base/data/__tests__/fixtures/index.ts diff --git a/src/base/index.ts b/src/experimental/base/index.ts similarity index 87% rename from src/base/index.ts rename to src/experimental/base/index.ts index a450f385..a0df1ed3 100644 --- a/src/base/index.ts +++ b/src/experimental/base/index.ts @@ -3,4 +3,4 @@ export { Component } from './component/Component'; export { NestedComponent } from './nested/NestedComponent'; export { DataComponent } from './data/DataComponent'; export { ArrayComponent } from './array/ArrayComponent'; -export * from 'model'; +export * from 'src/experimental/model'; diff --git a/src/base/nested/NestedComponent.ts b/src/experimental/base/nested/NestedComponent.ts similarity index 98% rename from src/base/nested/NestedComponent.ts rename to src/experimental/base/nested/NestedComponent.ts index c0520ada..62ac69e3 100644 --- a/src/base/nested/NestedComponent.ts +++ b/src/experimental/base/nested/NestedComponent.ts @@ -1,6 +1,6 @@ import { Components } from '../Components'; import { ComponentSchema, Component } from '../component/Component'; -import { NestedModel, ModelDecoratorInterface, ModelInterface } from 'model'; +import { NestedModel, ModelDecoratorInterface, ModelInterface } from 'src/experimental/model'; export interface NestedComponentSchema extends ComponentSchema { components: Array; diff --git a/src/base/nested/__tests__/NestedComponent.test.ts b/src/experimental/base/nested/__tests__/NestedComponent.test.ts similarity index 100% rename from src/base/nested/__tests__/NestedComponent.test.ts rename to src/experimental/base/nested/__tests__/NestedComponent.test.ts diff --git a/src/base/nested/__tests__/fixtures/comp1.ts b/src/experimental/base/nested/__tests__/fixtures/comp1.ts similarity index 100% rename from src/base/nested/__tests__/fixtures/comp1.ts rename to src/experimental/base/nested/__tests__/fixtures/comp1.ts diff --git a/src/base/nested/__tests__/fixtures/comp2.ts b/src/experimental/base/nested/__tests__/fixtures/comp2.ts similarity index 100% rename from src/base/nested/__tests__/fixtures/comp2.ts rename to src/experimental/base/nested/__tests__/fixtures/comp2.ts diff --git a/src/base/nested/__tests__/fixtures/index.ts b/src/experimental/base/nested/__tests__/fixtures/index.ts similarity index 100% rename from src/base/nested/__tests__/fixtures/index.ts rename to src/experimental/base/nested/__tests__/fixtures/index.ts diff --git a/src/components/__tests__/datatable.test.ts b/src/experimental/components/__tests__/datatable.test.ts similarity index 100% rename from src/components/__tests__/datatable.test.ts rename to src/experimental/components/__tests__/datatable.test.ts diff --git a/src/components/__tests__/datavalue.test.ts b/src/experimental/components/__tests__/datavalue.test.ts similarity index 100% rename from src/components/__tests__/datavalue.test.ts rename to src/experimental/components/__tests__/datavalue.test.ts diff --git a/src/components/__tests__/fixtures/comp1.ts b/src/experimental/components/__tests__/fixtures/comp1.ts similarity index 100% rename from src/components/__tests__/fixtures/comp1.ts rename to src/experimental/components/__tests__/fixtures/comp1.ts diff --git a/src/components/__tests__/fixtures/comp2.ts b/src/experimental/components/__tests__/fixtures/comp2.ts similarity index 100% rename from src/components/__tests__/fixtures/comp2.ts rename to src/experimental/components/__tests__/fixtures/comp2.ts diff --git a/src/components/__tests__/fixtures/index.ts b/src/experimental/components/__tests__/fixtures/index.ts similarity index 100% rename from src/components/__tests__/fixtures/index.ts rename to src/experimental/components/__tests__/fixtures/index.ts diff --git a/src/components/__tests__/html.test.ts b/src/experimental/components/__tests__/html.test.ts similarity index 100% rename from src/components/__tests__/html.test.ts rename to src/experimental/components/__tests__/html.test.ts diff --git a/src/components/__tests__/htmlcontainer.test.ts b/src/experimental/components/__tests__/htmlcontainer.test.ts similarity index 100% rename from src/components/__tests__/htmlcontainer.test.ts rename to src/experimental/components/__tests__/htmlcontainer.test.ts diff --git a/src/components/datatable.ts b/src/experimental/components/datatable.ts similarity index 94% rename from src/components/datatable.ts rename to src/experimental/components/datatable.ts index b65a1f06..f9a99b28 100644 --- a/src/components/datatable.ts +++ b/src/experimental/components/datatable.ts @@ -1,4 +1,4 @@ -import { ArrayComponent } from 'base'; +import { ArrayComponent } from 'src/experimental/base'; /** * A base class for a data table. diff --git a/src/components/datavalue.ts b/src/experimental/components/datavalue.ts similarity index 86% rename from src/components/datavalue.ts rename to src/experimental/components/datavalue.ts index cf9af23b..dad79efa 100644 --- a/src/components/datavalue.ts +++ b/src/experimental/components/datavalue.ts @@ -1,4 +1,4 @@ -import { Component } from 'base'; +import { Component } from 'src/experimental/base'; import { HTML } from './html'; @Component({ diff --git a/src/components/html.ts b/src/experimental/components/html.ts similarity index 97% rename from src/components/html.ts rename to src/experimental/components/html.ts index 5d5b7f1f..839df9c8 100644 --- a/src/components/html.ts +++ b/src/experimental/components/html.ts @@ -1,4 +1,4 @@ -import { Component } from 'base'; +import { Component } from 'src/experimental/base'; export const HTMLProperties = { type: 'html', schema: { diff --git a/src/components/htmlcontainer.ts b/src/experimental/components/htmlcontainer.ts similarity index 89% rename from src/components/htmlcontainer.ts rename to src/experimental/components/htmlcontainer.ts index 7f9d8ff2..1920fd86 100644 --- a/src/components/htmlcontainer.ts +++ b/src/experimental/components/htmlcontainer.ts @@ -1,4 +1,4 @@ -import { NestedComponent } from 'base'; +import { NestedComponent } from 'src/experimental/base'; import { HTML, HTMLProperties } from './html'; /** diff --git a/src/components/index.ts b/src/experimental/components/index.ts similarity index 100% rename from src/components/index.ts rename to src/experimental/components/index.ts diff --git a/src/components/input/__tests__/fixtures/comp1.ts b/src/experimental/components/input/__tests__/fixtures/comp1.ts similarity index 100% rename from src/components/input/__tests__/fixtures/comp1.ts rename to src/experimental/components/input/__tests__/fixtures/comp1.ts diff --git a/src/components/input/__tests__/fixtures/comp2.ts b/src/experimental/components/input/__tests__/fixtures/comp2.ts similarity index 100% rename from src/components/input/__tests__/fixtures/comp2.ts rename to src/experimental/components/input/__tests__/fixtures/comp2.ts diff --git a/src/components/input/__tests__/fixtures/index.ts b/src/experimental/components/input/__tests__/fixtures/index.ts similarity index 100% rename from src/components/input/__tests__/fixtures/index.ts rename to src/experimental/components/input/__tests__/fixtures/index.ts diff --git a/src/components/input/__tests__/input.test.ts b/src/experimental/components/input/__tests__/input.test.ts similarity index 100% rename from src/components/input/__tests__/input.test.ts rename to src/experimental/components/input/__tests__/input.test.ts diff --git a/src/components/input/input.ts b/src/experimental/components/input/input.ts similarity index 96% rename from src/components/input/input.ts rename to src/experimental/components/input/input.ts index e699c49d..786252f6 100644 --- a/src/components/input/input.ts +++ b/src/experimental/components/input/input.ts @@ -1,4 +1,4 @@ -import { Component } from 'base'; +import { Component } from 'src/experimental/base'; import { HTML, HTMLProperties } from '../html'; /** diff --git a/src/components/templates/bootstrap/datatable/html.ejs b/src/experimental/components/templates/bootstrap/datatable/html.ejs similarity index 100% rename from src/components/templates/bootstrap/datatable/html.ejs rename to src/experimental/components/templates/bootstrap/datatable/html.ejs diff --git a/src/components/templates/bootstrap/datatable/html.ejs.js b/src/experimental/components/templates/bootstrap/datatable/html.ejs.js similarity index 100% rename from src/components/templates/bootstrap/datatable/html.ejs.js rename to src/experimental/components/templates/bootstrap/datatable/html.ejs.js diff --git a/src/components/templates/bootstrap/datatable/index.ts b/src/experimental/components/templates/bootstrap/datatable/index.ts similarity index 100% rename from src/components/templates/bootstrap/datatable/index.ts rename to src/experimental/components/templates/bootstrap/datatable/index.ts diff --git a/src/components/templates/bootstrap/index.ts b/src/experimental/components/templates/bootstrap/index.ts similarity index 100% rename from src/components/templates/bootstrap/index.ts rename to src/experimental/components/templates/bootstrap/index.ts diff --git a/src/components/templates/index.ts b/src/experimental/components/templates/index.ts similarity index 100% rename from src/components/templates/index.ts rename to src/experimental/components/templates/index.ts diff --git a/src/components/test.ts b/src/experimental/components/test.ts similarity index 73% rename from src/components/test.ts rename to src/experimental/components/test.ts index 107d4000..361a6374 100644 --- a/src/components/test.ts +++ b/src/experimental/components/test.ts @@ -1,5 +1,5 @@ -import { Components } from 'base'; -import { Template } from 'template'; +import { Components } from 'src/experimental/base'; +import { Template } from 'src/experimental/template'; import module from './index'; for (let name in module.components) { if (module.components.hasOwnProperty(name)) { diff --git a/src/core.ts b/src/experimental/core.ts similarity index 96% rename from src/core.ts rename to src/experimental/core.ts index ddb71884..c1429566 100644 --- a/src/core.ts +++ b/src/experimental/core.ts @@ -1,6 +1,6 @@ import 'core-js/features/object/from-entries'; -import { Formio } from './sdk'; -import { Evaluator, Utils } from './utils'; +import { Formio } from '../sdk'; +import { Evaluator, Utils } from '../utils'; import { Components, render } from './base'; import { Template } from './template'; (Formio as any).render = render; @@ -109,6 +109,6 @@ export function use(...mods: any) { (Formio as any).use = use; import components from './components'; (Formio as any).use(components); -import modules from './modules'; +import modules from '../modules'; (Formio as any).use(modules); export { Formio }; diff --git a/src/model/EventEmitter.ts b/src/experimental/model/EventEmitter.ts similarity index 100% rename from src/model/EventEmitter.ts rename to src/experimental/model/EventEmitter.ts diff --git a/src/model/Model.ts b/src/experimental/model/Model.ts similarity index 100% rename from src/model/Model.ts rename to src/experimental/model/Model.ts diff --git a/src/model/NestedArrayModel.ts b/src/experimental/model/NestedArrayModel.ts similarity index 100% rename from src/model/NestedArrayModel.ts rename to src/experimental/model/NestedArrayModel.ts diff --git a/src/model/NestedDataModel.ts b/src/experimental/model/NestedDataModel.ts similarity index 100% rename from src/model/NestedDataModel.ts rename to src/experimental/model/NestedDataModel.ts diff --git a/src/model/NestedModel.ts b/src/experimental/model/NestedModel.ts similarity index 100% rename from src/model/NestedModel.ts rename to src/experimental/model/NestedModel.ts diff --git a/src/model/__tests__/Model.test.ts b/src/experimental/model/__tests__/Model.test.ts similarity index 100% rename from src/model/__tests__/Model.test.ts rename to src/experimental/model/__tests__/Model.test.ts diff --git a/src/model/index.ts b/src/experimental/model/index.ts similarity index 100% rename from src/model/index.ts rename to src/experimental/model/index.ts diff --git a/src/template/Template.ts b/src/experimental/template/Template.ts similarity index 100% rename from src/template/Template.ts rename to src/experimental/template/Template.ts diff --git a/src/template/index.ts b/src/experimental/template/index.ts similarity index 100% rename from src/template/index.ts rename to src/experimental/template/index.ts diff --git a/src/index.ts b/src/index.ts index 90efabc1..622c94ea 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,9 +1,5 @@ -export * from './core'; -export * from './base'; -export * from './model'; export * from './modules'; export * from './utils'; -export * from './components'; export * from './process/validation'; export * from './process'; -export * from './template'; +export * from './sdk'; diff --git a/src/sdk/Formio.ts b/src/sdk/Formio.ts index 82858c03..6aa57921 100644 --- a/src/sdk/Formio.ts +++ b/src/sdk/Formio.ts @@ -6,7 +6,7 @@ import { jwtDecode } from 'utils/jwtDecode'; import EventEmitter from 'eventemitter3'; import cookies from 'browser-cookies'; const { fetch, Headers } = fetchPonyfill(); -import Plugins from './Plugins'; +import Plugins from '../experimental/Plugins'; declare const OktaAuth: any; /** diff --git a/src/sdk/package.json b/src/sdk/package.json deleted file mode 100644 index 8e0850e0..00000000 --- a/src/sdk/package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "@formio/sdk", - "version": "0.1.0", - "description": "An SDK to work with the Form.io APIs", - "main": "index.ts", - "dependencies": {} -} diff --git a/tsconfig.json b/tsconfig.json index 546e2410..1ddbebda 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -67,12 +67,12 @@ "forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */ "resolveJsonModule": true, "paths": { - "base": ["./src/base"], - "base/*": ["./src/base/*"], + "base": ["src/experimental/base"], + "base/*": ["src/experimental/base/*"], "error": ["./src/error"], "error/*": ["./src/error/*"], - "model": ["./src/model"], - "model/*": ["./src/model/*"], + "model": ["src/experimental/model"], + "model/*": ["src/experimental/model/*"], "modules": ["./src/modules"], "modules/*": ["./src/modules/*"], "processes": ["src/process"], @@ -87,8 +87,8 @@ "utils/*": ["./src/utils/*"], "process": ["src/process"], "process/*": ["src/process/*"], - "template": ["src/template"], - "template/*": ["src/template/*"], + "template": ["src/experimental/template"], + "template/*": ["src/experimental/template/*"], } }, "include": [