Skip to content

Commit

Permalink
move unused 'experimental' features to a new folder and remove them f…
Browse files Browse the repository at this point in the history
…rom build
  • Loading branch information
brendanbond committed Feb 14, 2024
1 parent 7a1feb4 commit a8eadce
Show file tree
Hide file tree
Showing 58 changed files with 24 additions and 42 deletions.
4 changes: 0 additions & 4 deletions config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
3 changes: 0 additions & 3 deletions config/webpack.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -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';

/**
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/base/index.ts → src/experimental/base/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Original file line number Diff line number Diff line change
@@ -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<ComponentSchema | any>;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ArrayComponent } from 'base';
import { ArrayComponent } from 'src/experimental/base';

/**
* A base class for a data table.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component } from 'base';
import { Component } from 'src/experimental/base';
import { HTML } from './html';

@Component({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component } from 'base';
import { Component } from 'src/experimental/base';
export const HTMLProperties = {
type: 'html',
schema: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { NestedComponent } from 'base';
import { NestedComponent } from 'src/experimental/base';
import { HTML, HTMLProperties } from './html';

/**
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component } from 'base';
import { Component } from 'src/experimental/base';
import { HTML, HTMLProperties } from '../html';

/**
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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)) {
Expand Down
6 changes: 3 additions & 3 deletions src/core.ts → src/experimental/core.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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 };
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 1 addition & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -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';
2 changes: 1 addition & 1 deletion src/sdk/Formio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down
7 changes: 0 additions & 7 deletions src/sdk/package.json

This file was deleted.

12 changes: 6 additions & 6 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand All @@ -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": [
Expand Down

0 comments on commit a8eadce

Please sign in to comment.