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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/mjs/Wizard.js CHANGED
@@ -769,22 +769,21 @@ export default class Wizard extends Webform {
769
769
  }
770
770
  }
771
771
  setValue(submission, flags = {}, ignoreEstablishment) {
772
- this._submission = submission;
773
- if ((flags && flags.fromSubmission && (this.options.readOnly || this.editMode) && !this.isHtmlRenderMode()) ||
774
- (flags && flags.fromSubmission && (this.prefixComps.length || this.suffixComps.length) && submission._id) ||
775
- (this.options.server && (this.prefixComps.length || this.suffixComps.length))) {
776
- this._data = submission.data;
777
- }
778
- if (!ignoreEstablishment) {
779
- this.establishPages(submission.data);
780
- }
781
772
  const changed = this.getPages({ all: true }).reduce((changed, page) => {
782
773
  return this.setNestedValue(page, submission.data, flags, changed) || changed;
783
774
  }, false);
775
+ if (!flags.sanitize) {
776
+ this.mergeData(this.data, submission.data);
777
+ }
784
778
  if (changed) {
785
779
  this.pageFieldLogic(this.page);
786
780
  }
787
781
  this.setEditMode(submission);
782
+ submission.data = this.data;
783
+ this._submission = submission;
784
+ if (!ignoreEstablishment) {
785
+ this.establishPages(submission.data);
786
+ }
788
787
  return changed;
789
788
  }
790
789
  isClickable(page, index) {
@@ -39,6 +39,7 @@ if (thisScript) {
39
39
  config: {},
40
40
  redirect: (query.return || query.redirect),
41
41
  embedCSS: (`${config.updatePath ? config.updatePath() : scriptSrc}/formio.embed.css`),
42
+ success: query.success || 'Thank you for your submission!',
42
43
  before: null,
43
44
  after: null
44
45
  }, config);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/js",
3
- "version": "5.0.0-rc.25",
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,6 +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": "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 ..",
50
51
  "deploy-s3": "$(node -e 'process.stdout.write(`aws s3 cp _site s3://formiojs.test-form.io/` + require(`./package.json`).version + `/ --recursive`)')",
51
52
  "invalidate": "VERSION=$(yarn version);aws cloudfront create-invalidation --distribution-id E1MXNA5A4ZKRMZ --paths \"/$VERSION/*\"",
52
53
  "release": "yarn build-app && yarn deploy-s3",