@formio/js 5.0.0-rc.26 → 5.0.0-rc.27

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  /*! @license DOMPurify 3.0.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.5/LICENSE */
2
2
 
3
- /*! formiojs v5.0.0-rc.25 | https://unpkg.com/formiojs@5.0.0-rc.25/LICENSE.txt */
3
+ /*! formiojs v5.0.0-rc.27 | https://unpkg.com/formiojs@5.0.0-rc.27/LICENSE.txt */
4
4
 
5
5
  /**
6
6
  * @license
@@ -12,7 +12,7 @@
12
12
 
13
13
  /*! @license DOMPurify 3.0.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.5/LICENSE */
14
14
 
15
- /*! formiojs v5.0.0-rc.25 | https://unpkg.com/formiojs@5.0.0-rc.25/LICENSE.txt */
15
+ /*! formiojs v5.0.0-rc.27 | https://unpkg.com/formiojs@5.0.0-rc.27/LICENSE.txt */
16
16
 
17
17
  /**
18
18
  * @license
@@ -5,6 +5,7 @@ export class Formio {
5
5
  static config: {};
6
6
  static cdn: null;
7
7
  static proxy: boolean;
8
+ static version: string;
8
9
  static setBaseUrl(url: any): Promise<void>;
9
10
  static setProjectUrl(url: any): Promise<void>;
10
11
  static debug(...args: any[]): void;
package/lib/cjs/Embed.js CHANGED
@@ -136,7 +136,11 @@ class Formio {
136
136
  }
137
137
  // Return the full script if the builder is being used.
138
138
  static formioScript(script, builder) {
139
- return builder ? script.replace('formio.form', 'formio.full') : script;
139
+ if (Formio.fullAdded || builder) {
140
+ Formio.fullAdded = true;
141
+ return script.replace('formio.form', 'formio.full');
142
+ }
143
+ return script;
140
144
  }
141
145
  // eslint-disable-next-line max-statements
142
146
  static init(element, builder = false) {
@@ -276,6 +280,7 @@ class Formio {
276
280
  Formio.config = {};
277
281
  Formio.cdn = null;
278
282
  Formio.proxy = true;
283
+ Formio.version = 'FORMIO_VERSION';
279
284
  exports.Formio = Formio;
280
285
  class Form {
281
286
  constructor(element, form, options) {
@@ -5,6 +5,7 @@ export class Formio {
5
5
  static config: {};
6
6
  static cdn: null;
7
7
  static proxy: boolean;
8
+ static version: string;
8
9
  static setBaseUrl(url: any): Promise<void>;
9
10
  static setProjectUrl(url: any): Promise<void>;
10
11
  static debug(...args: any[]): void;
package/lib/mjs/Embed.js CHANGED
@@ -6,6 +6,7 @@ class Formio {
6
6
  static config = {};
7
7
  static cdn = null;
8
8
  static proxy = true;
9
+ static version = 'FORMIO_VERSION';
9
10
  static async setBaseUrl(url) {
10
11
  Formio.baseUrl = url;
11
12
  }
@@ -117,7 +118,11 @@ class Formio {
117
118
  }
118
119
  // Return the full script if the builder is being used.
119
120
  static formioScript(script, builder) {
120
- return builder ? script.replace('formio.form', 'formio.full') : script;
121
+ if (Formio.fullAdded || builder) {
122
+ Formio.fullAdded = true;
123
+ return script.replace('formio.form', 'formio.full');
124
+ }
125
+ return script;
121
126
  }
122
127
  // eslint-disable-next-line max-statements
123
128
  static async init(element, builder = false) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/js",
3
- "version": "5.0.0-rc.26",
3
+ "version": "5.0.0-rc.27",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -47,7 +47,7 @@
47
47
  "build-app:create-app": "node -e 'var fs=require(`fs`);fs.writeFileSync(`./_config.app.yml`, `baseurl: /` + require(`./package.json`).version + `/`);'",
48
48
  "build-app:remove-app": "rm ./_config.app.yml",
49
49
  "build-app:jekyll": "jekyll build --config _config.yml,_config.app.yml",
50
- "gh-pages": "npm run build && jekyll build --config _config.yml && cd _site && git init && git remote add origin git@github.com:formio/formio.js.git && git checkout -b gh-pages && git add . && git commit -m \"Deploy to GitHub Pages\" && git push origin gh-pages --force && cd ..",
50
+ "gh-pages": "rm -rf _site && npm run build && jekyll build --config _config.yml && cd _site && git init && git remote add origin git@github.com:formio/formio.js.git && git checkout -b gh-pages && git add . && git commit -m \"Deploy to GitHub Pages\" && git push origin gh-pages --force && cd ..",
51
51
  "deploy-s3": "$(node -e 'process.stdout.write(`aws s3 cp _site s3://formiojs.test-form.io/` + require(`./package.json`).version + `/ --recursive`)')",
52
52
  "invalidate": "VERSION=$(yarn version);aws cloudfront create-invalidation --distribution-id E1MXNA5A4ZKRMZ --paths \"/$VERSION/*\"",
53
53
  "release": "yarn build-app && yarn deploy-s3",