PluginProbe
seQura / 3.0.0
seQura v3.0.0
4.3.4 4.3.3 4.3.2 4.3.1 trunk 2.0.0 2.0.10 2.0.11 2.0.12 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 3.0.0 3.0.2 3.0.5 3.0.6 3.0.7 3.1.0 3.1.1 3.2.0 3.2.1 3.2.2 4.0.0 All 30 releases
sequra / assets / js / src / core / FormFactory.js

FormFactory.js in seQura 3.0.0, at assets/js/src/core/FormFactory.js

23 lines 599 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 if (!window.SequraFE) {
2 window.SequraFE = {};
3 }
4
5 (function () {
6 function FormFactory() {
7 /**
8 * Instantiates page controller;
9 *
10 * @param {string} form
11 * @param {Record<string, any>} data
12 * @param {Record<string, any>} configuration
13 */
14 this.getInstance = (form, data, configuration) => {
15 const name = form.charAt(0).toUpperCase() + form.slice(1) + 'Form';
16
17 return SequraFE[name] ? new SequraFE[name](data, configuration) : null;
18 };
19 }
20
21 SequraFE.formFactory = new FormFactory();
22 })();
23