leadconduit-trustedform 2.3.1 → 2.3.3

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/CHANGELOG.md CHANGED
@@ -2,6 +2,16 @@
2
2
  All notable changes to this project will be documented in this file.
3
3
  This project adheres to [Semantic Versioning](http://semver.org)
4
4
 
5
+ ## [2.3.3] - 2024-02-05
6
+ ### Added
7
+ - added `amount_required_matched` field to v4 integration for requests with required scans ([sc-65371](https://app.shortcut.com/active-prospect/story/65371/trustedform-v4-page-scan-rule-improvements))
8
+ - PageScan required/forbidden text configuration screen. ([sc-65261](https://app.shortcut.com/active-prospect/story/65261/trustedform-v4-insights-add-on-ui-should-prompt-for-required-and-forbidden-scan-text))
9
+ - Add notice when account has no TF products available ([sc-67604](https://app.shortcut.com/active-prospect/story/67604/trustedform-v4-fix-add-on-ui-to-handle-no-products))
10
+
11
+ ## [2.3.2] - 2024-01-19
12
+ ### Fixed
13
+ - improvements to v4 UI styling ([sc-59650](https://app.shortcut.com/active-prospect/story/59650/trustedform-v4-improve-rich-ui-styling))
14
+
5
15
  ## [2.3.1] - 2024-01-10
6
16
  ### Fixed
7
17
  - v4 `validate` function will properly handle missing `insights` vars ([sc-65226](https://app.shortcut.com/active-prospect/story/65226/trustedform-v4-insights-add-on-with-no-field-mappings-errors-in-validation))
package/README.md CHANGED
@@ -4,3 +4,12 @@ This module is for use on the [LeadConduit](http://activeprospect.com/products/l
4
4
 
5
5
 
6
6
  [![Testing](https://github.com/activeprospect/leadconduit-integration-trustedform/workflows/Node.js%20CI/badge.svg)](https://github.com/activeprospect/leadconduit-integration-trustedform/actions)
7
+
8
+ ## Testing on Development and Staging
9
+
10
+ Certificates for testing on development and staging can be generated by the following form. The cert URL will be output in the browser's console.
11
+
12
+ - for development: https://activeprospect.github.io/trustedform.html?env=api.trustedform-dev.com
13
+ - for staging: https://activeprospect.github.io/trustedform.html?env=api.staging.trustedform.com
14
+
15
+ Consent language management can be found [here for development](https://app.trustedform-dev.com/consent_languages/approved) and [here for staging](https://app.staging.trustedform.com/consent_languages/approved).
package/lib/helpers.js CHANGED
@@ -21,6 +21,7 @@ const formatScanReason = (scannedFor, textArray) => {
21
21
  };
22
22
 
23
23
  const countRequiredMatched = (requiredStrings, scans) => {
24
+ if (!requiredStrings || !scans) return undefined;
24
25
  // normalize data
25
26
  if (!(requiredStrings instanceof Array)) {
26
27
  requiredStrings = [requiredStrings];
@@ -130,7 +130,7 @@ const response = (vars, req, res) => {
130
130
  try {
131
131
  const parsed = JSON.parse(res.body);
132
132
  if (res.status === 200) {
133
- return pickBy({
133
+ const appended = pickBy({
134
134
  outcome: parsed.outcome,
135
135
  reason: parsed.reason,
136
136
 
@@ -176,11 +176,17 @@ const response = (vars, req, res) => {
176
176
  os_name: parsed.insights?.properties?.os?.name,
177
177
  page_url: parsed.insights?.properties?.page_url,
178
178
  parent_page_url: parsed.insights?.properties?.parent_page_url,
179
-
179
+
180
180
  languages: parsed.insights?.properties?.languages,
181
181
  language_approved: parsed.insights?.properties?.language_approved,
182
182
  success: parsed.verify?.result?.success,
183
183
  }, (v) => { return !isUndefined(v); });
184
+ // only include this property if page scan was selected
185
+ if (vars.insights?.page_scan?.valueOf()) {
186
+ appended.amount_required_matched = helpers.countRequiredMatched(parsed.insights?.scans?.required, parsed.insights?.scans?.result?.required?.found);
187
+ appended.amount_forbidden_matched = helpers.countRequiredMatched(parsed.insights?.scans?.forbidden, parsed.insights?.scans?.result?.forbidden?.found);
188
+ }
189
+ return appended;
184
190
  } else {
185
191
  return {
186
192
  outcome: parsed.outcome,
@@ -218,6 +224,8 @@ response.variables = () => [
218
224
  { name: 'required_scans_not_found', type: 'array', description: 'A list of required scan terms that were not found in the recorded content.' },
219
225
  { name: 'forbidden_scans_found', type: 'array', description: 'A list of forbidden scan terms that were found in the recorded content.' },
220
226
  { name: 'forbidden_scans_not_found', type: 'array', description: 'A list of forbidden scan terms that were not found in the recorded content.' },
227
+ { name: 'amount_required_matched', type: 'string', description: 'How many of the required strings were matched? (all, some, none)' },
228
+ { name: 'amount_forbidden_matched', type: 'string', description: 'How many of the forbidden strings were scanned? (all, some, none)' },
221
229
  { name: 'age_in_seconds', type: 'number', description: 'Number of seconds since the last user interaction with the certificate.' },
222
230
  { name: 'city', type: 'string', description: 'City name based on consumer\'s public IP address' },
223
231
  { name: 'country_code', type: 'string', description: 'Country code based on consumer\'s public IP address' },
@@ -1,4 +1,3 @@
1
- const { get } = require('lodash');
2
1
  const request = require('request');
3
2
 
4
3
  module.exports = (req, res) => {
@@ -11,8 +10,7 @@ module.exports = (req, res) => {
11
10
  'test': 'https://app.staging.trustedform.com/account',
12
11
  'development': 'https://app.trustedform-dev.com/account',
13
12
  };
14
- const environment = get(process, 'env.NODE_ENV') || 'development';
15
- const url = trustedFormUrl[environment];
13
+ const url = trustedFormUrl[process.env.NODE_ENV] || trustedFormUrl['development'];
16
14
 
17
15
  const options = {
18
16
  url,
@@ -16,10 +16,10 @@
16
16
  their lead forms.
17
17
  </p>
18
18
  </section>
19
- <Navigation :onNext="onNext"/>
19
+ <Navigation :onConfirm="onConfirm"/>
20
20
  </div>
21
21
  <div v-else-if="!isDataService">
22
- <LoadingScreen :module-name="'TrustedForm ' + moduleName"/>
22
+ <LoadingScreen :onFinish="() => {/* NOOP */}" :module-name="'TrustedForm ' + moduleName"/>
23
23
  </div>
24
24
  </div>
25
25
  </template>
@@ -53,7 +53,7 @@ export default {
53
53
  }
54
54
  },
55
55
  methods: {
56
- onNext () {
56
+ onConfirm () {
57
57
  this.$router.push('/2');
58
58
  }
59
59
  },
@@ -27,7 +27,7 @@
27
27
  </table>
28
28
  </div>
29
29
  </section>
30
- <Navigation :onNext="onNext"/>
30
+ <Navigation :onConfirm="confirm"/>
31
31
  </div>
32
32
  </template>
33
33
 
@@ -44,7 +44,7 @@ export default {
44
44
  Navigation
45
45
  },
46
46
  methods: {
47
- onNext () {
47
+ confirm () {
48
48
  this.$router.push('/3');
49
49
  }
50
50
  }
@@ -8,7 +8,7 @@
8
8
  Now you’re ready to map your fields and set up the associated filters in your LeadConduit flow.
9
9
  </p>
10
10
  </section>
11
- <Navigation :onFinish="finish"/>
11
+ <Navigation :onConfirm="confirm"/>
12
12
  </div>
13
13
  </template>
14
14
 
@@ -17,8 +17,8 @@ import { Navigation } from '@activeprospect/integration-components';
17
17
 
18
18
  export default {
19
19
  methods: {
20
- finish () {
21
- this.$store.dispatch('finish');
20
+ confirm () {
21
+ this.$store.dispatch('confirm');
22
22
  }
23
23
  },
24
24
  components: {
@@ -3,31 +3,46 @@
3
3
  <header>
4
4
  Add TrustedForm Add-On
5
5
  </header>
6
- <section>
6
+ <section v-if="loading">
7
+ <span class="loading"></span> Loading products...
8
+ </section>
9
+ <section v-else-if="!productsAvailable">
10
+ <p>
11
+ Your account does not have access to TrustedForm. Please contact
12
+ <a href="mailto:support@activeprospect.com">support@activeprospect.com</a>
13
+ if this is in error or if you would like to add TrustedForm to your account.
14
+ </p>
15
+ </section>
16
+ <section v-else>
7
17
  <form>
8
18
  <h3>Select the TrustedForm products to add to your flow.</h3>
9
19
  <p>You may select all products that you would like to add to your flow. Each product will be charged depending on your contract. {{errors}}</p>
10
20
  <ul>
11
21
  <li>
12
- <input type="checkbox" :disabled="!products.retain.enabled" v-model="products.retain.selected"><span> Retain</span>
13
- <p class="help-text">Store consent in TrustedForm certificates for legal (TCPA) compliance.</p>
22
+ <label>
23
+ <input type="checkbox" class="fancy-checkbox" :disabled="!products.retain.enabled" v-model="products.retain.selected" id="retain"><label for="retain">Retain</label>
24
+ <p class="help-text">Store consent in TrustedForm certificates for legal (TCPA) compliance.</p>
25
+ </label>
14
26
  </li>
15
27
  <li>
16
- <input type="checkbox" :disabled="!products.insights.enabled" v-model="products.insights.selected"><span> Insights</span>
17
- <p class="help-text">TrustedForm Insights helps buyers identify the leads that are most likely to convert and effectively manage returns and rejections.</p>
28
+ <label>
29
+ <input type="checkbox" class="fancy-checkbox" :disabled="!products.insights.enabled" v-model="products.insights.selected" id="insights"><label for="insights">Insights</label>
30
+ <p class="help-text">TrustedForm Insights helps buyers identify the leads that are most likely to convert and effectively manage returns and rejections.</p>
31
+ </label>
18
32
  </li>
19
33
  <li>
20
- <input type="checkbox" :disabled="!products.verify.enabled" v-model="products.verify.selected"><span> Verify</span>
21
- <p class="help-text">Confirm that your leads were shown consent language that meets your compliance requirements.</p>
34
+ <label>
35
+ <input type="checkbox" class="fancy-checkbox" :disabled="!products.verify.enabled" v-model="products.verify.selected" id="verify"><label for="verify">Verify</label>
36
+ <p class="help-text">Confirm that your leads were shown consent language that meets your compliance requirements.</p>
37
+ </label>
22
38
  </li>
23
39
  </ul>
24
40
  </form>
25
41
  </section>
26
42
  <Navigation
27
43
  :showPrevious="false"
28
- :onNext="!showFinish ? next : undefined"
29
- :onFinish="showFinish ? finish : undefined"
30
- :disableNext="!products.retain.selected && !products.insights.selected && !products.verify.selected"
44
+ :onConfirm="confirm"
45
+ :disableConfirm="!products.retain.selected && !products.insights.selected && !products.verify.selected"
31
46
  />
32
47
  </div>
33
48
  </template>
@@ -37,6 +52,7 @@ import { Navigation } from '@activeprospect/integration-components';
37
52
  export default {
38
53
  data () {
39
54
  return {
55
+ loading: true,
40
56
  products: this.$store.getters.getProducts,
41
57
  errors: this.$store.getters.getErrors
42
58
  };
@@ -45,22 +61,29 @@ export default {
45
61
  Navigation
46
62
  },
47
63
  computed: {
48
- showFinish () {
49
- return (this.products.retain.selected ||this.products.verify.selected ) && !this.products.insights.selected;
64
+ productsAvailable() {
65
+ return this.products.retain.enabled || this.products.insights.enabled || this.products.verify.enabled;
50
66
  }
51
67
  },
52
68
  methods: {
53
- next () {
69
+ confirm () {
54
70
  this.$store.state.products = this.products;
55
- this.$router.push('/5');
56
- },
57
- finish () {
58
- this.$store.state.products = this.products;
59
- this.$store.dispatch('finish');
71
+ if (this.products.insights.selected) {
72
+ this.$router.push('/5');
73
+ } else {
74
+ this.$store.dispatch('confirm');
75
+ }
60
76
  }
61
77
  },
62
- created () {
63
- this.$store.dispatch('getProducts');
78
+ async created () {
79
+ await this.$store.dispatch('getProducts');
80
+ this.loading = false;
64
81
  }
65
82
  };
66
83
  </script>
84
+
85
+ <style scoped>
86
+ ul {
87
+ padding-top: 1em;
88
+ }
89
+ </style>
@@ -1,24 +1,30 @@
1
1
  <template>
2
2
  <div>
3
3
  <header>
4
- TrustedForm Insights Configuration
4
+ Configure TrustedForm Insights
5
5
  </header>
6
6
  <section>
7
7
  <form>
8
- <h3>Select Data Points</h3>
8
+ <h3>Select Insights Data Points</h3>
9
9
  <p>TrustedForm Insights provides the following data related to the lead that filled out the form. Each selection of data points will be charged individually.</p>
10
10
  <table>
11
11
  <thead>
12
12
  <tr>
13
- <th><input type="checkbox" v-model="header" :indeterminate.prop="selected === 'some'" @click="toggleAll"></th>
14
- <th>Select All</th>
15
- <th></th>
13
+ <th>
14
+ <input id="select-all" type="checkbox" class="fancy-checkbox" v-model="header" :indeterminate.prop="selected === 'some'" @click="toggleAll">
15
+ <label for="select-all" class="checkbox-label"></label>
16
+ </th>
17
+ <th><label for="select-all" class="text-label">Data Point</label></th>
18
+ <th>Description</th>
16
19
  </tr>
17
20
  </thead>
18
21
  <tbody>
19
22
  <tr v-for="field in Object.keys(fields)" :key="fields[field].name">
20
- <td><input type="checkbox" v-model="fields[field].selected" @change="updateHeader"></td>
21
- <td>{{fields[field].name}}</td>
23
+ <td>
24
+ <input :id="field" type="checkbox" class="fancy-checkbox" v-model="fields[field].selected" @change="updateHeader">
25
+ <label :for="field" class="checkbox-label"></label>
26
+ </td>
27
+ <td><label :for="field" class="text-label">{{fields[field].name}}</label></td>
22
28
  <td v-html="fields[field].description"></td>
23
29
  </tr>
24
30
  </tbody>
@@ -26,8 +32,8 @@
26
32
  </form>
27
33
  </section>
28
34
  <Navigation
29
- :onFinish="finish"
30
- :disableFinish="selected === 'none'"
35
+ :onConfirm="confirm"
36
+ :disableConfirm="selected === 'none'"
31
37
  />
32
38
  </div>
33
39
  </template>
@@ -67,9 +73,13 @@ export default {
67
73
  this.selected = this.amountSelected();
68
74
  this.header = this.selected === 'all';
69
75
  },
70
- finish () {
76
+ confirm () {
71
77
  this.$store.state.v4Fields = this.fields;
72
- this.$store.dispatch('finish');
78
+ if (this.fields.page_scan?.selected) {
79
+ this.$router.push('/6')
80
+ return
81
+ }
82
+ this.$store.dispatch('confirm');
73
83
  }
74
84
  },
75
85
  mounted () {
@@ -78,3 +88,32 @@ export default {
78
88
  }
79
89
  }
80
90
  </script>
91
+
92
+ <style scoped>
93
+ table {
94
+ position: relative;
95
+ }
96
+
97
+ th {
98
+ position: sticky;
99
+ top: 0;
100
+ background-color: #f4f6f8;
101
+ border-bottom: 1px solid #dfe4e8;
102
+ }
103
+
104
+ /*
105
+ We are using "fancy-checkbox" in an atypical way;
106
+ Typically, the <label> and <input> components are siblings, and there is only 1 label for the checkbox.
107
+ However, since our fancy-checkbox is supposed to be placed in a separate <td> and have additional padding,
108
+ We have to add some additional styling and a second <label> element.
109
+ */
110
+ .checkbox-label {
111
+ /* !important is needed because of this style https://github.com/activeprospect/leadconduit-client/blob/618797873a9fc485bf2d51873043700aae9d496e/public/css/core/forms.styl#L495 */
112
+ padding: 1.2em !important;
113
+ }
114
+
115
+ .text-label {
116
+ /* !important is needed because of this style https://github.com/activeprospect/leadconduit-client/blob/618797873a9fc485bf2d51873043700aae9d496e/public/css/core/forms.styl#L429 */
117
+ margin: 0 !important;
118
+ }
119
+ </style>
@@ -0,0 +1,95 @@
1
+ <template>
2
+ <div>
3
+ <header>
4
+ Configure TrustedForm Insights
5
+ </header>
6
+ <section>
7
+ <h3>Page Scan Forbidden/Required Text</h3>
8
+ <p>
9
+ Please set your required and/or forbidden text for the TrustedForm set in LeadConduit;
10
+ the step will fail if the required term is missing and if the forbidden term is present in the page.
11
+ <a href="https://community.activeprospect.com/posts/4078890">Learn More</a>
12
+ </p>
13
+ <Form :actions="false">
14
+ <SelectField
15
+ name="PageScan Required"
16
+ v-model="requiredTags"
17
+ :options="requiredOptions"
18
+ taggable
19
+ multiple
20
+ @tag="handleRequiredTag"
21
+ openDirection="bottom"
22
+ ></SelectField>
23
+
24
+ <SelectField
25
+ name="PageScan Forbidden"
26
+ v-model="forbiddenTags"
27
+ :options="forbiddenOptions"
28
+ taggable
29
+ multiple
30
+ @tag="handleForbiddenTag"
31
+ openDirection="bottom"
32
+ ></SelectField>
33
+ </Form>
34
+ </section>
35
+ <Navigation
36
+ :onConfirm="confirm"
37
+ :disableConfirm="false"
38
+ />
39
+ </div>
40
+ </template>
41
+
42
+ <script>
43
+ import { Navigation } from '@activeprospect/integration-components';
44
+ import { SelectField, Form } from '@activeprospect/ui-components';
45
+
46
+ export default {
47
+ components: {
48
+ Navigation,
49
+ SelectField,
50
+ Form
51
+ },
52
+ data() {
53
+ return {
54
+ /** @type {string[]} */
55
+ requiredTags: [],
56
+ /** @type {string[]} */
57
+ requiredOptions: [],
58
+ /** @type {string[]} */
59
+ forbiddenTags: [],
60
+ /** @type {string[]} */
61
+ forbiddenOptions: [],
62
+ }
63
+ },
64
+ methods: {
65
+ handleRequiredTag(tag) {
66
+ this.requiredTags.push(tag);
67
+ this.requiredOptions.push(tag);
68
+ },
69
+ handleForbiddenTag(tag) {
70
+ this.forbiddenTags.push(tag);
71
+ this.forbiddenOptions.push(tag);
72
+ },
73
+ confirm() {
74
+ this.$store.commit('setPageScan', {
75
+ required: this.requiredTags,
76
+ forbidden: this.forbiddenTags
77
+ });
78
+ this.$store.dispatch('confirm');
79
+ },
80
+ }
81
+ }
82
+ </script>
83
+
84
+ <style scoped>
85
+ /* All the selectors here use `:deep()` because otherwise the styles can't be scoped, since the classes are added by a library. */
86
+
87
+ /** override this style https://github.com/activeprospect/leadconduit-client/blob/a005d3ac5627aa39d12c64756561ef400b512bf3/public/css/core/forms.styl#L252-L254 */
88
+ :deep(input[type="text"]) {
89
+ min-width: 0 !important;
90
+ }
91
+
92
+ :deep(.formkit-outer) {
93
+ width: 100%;
94
+ }
95
+ </style>
@@ -1,20 +1,18 @@
1
1
  import ui from 'leadconduit-integration-ui';
2
- import Vue from 'vue';
2
+ import { createApp } from 'vue';
3
3
  import Config from './config/Config.vue';
4
- import Vuex from 'vuex';
5
4
  import initStore from './store';
6
5
  import router from './router';
7
-
8
- Vue.use(Vuex);
6
+ import { plugin } from '@activeprospect/ui-components';
9
7
 
10
8
  function init (config) {
11
- const store = initStore(config, ui);
9
+ const app = createApp(Config);
10
+
11
+ app.use(initStore(config, ui));
12
+ app.use(router);
13
+ app.use(plugin);
12
14
 
13
- new Vue({
14
- render: h => h(Config),
15
- store,
16
- router
17
- }).$mount('#app');
15
+ app.mount('#app');
18
16
  }
19
17
 
20
18
  ui.init(init);
@@ -1,15 +1,14 @@
1
- import Vue from 'vue';
2
- import Router from 'vue-router';
1
+ import { createMemoryHistory, createRouter } from 'vue-router';
3
2
  import Config from './config/Config.vue';
4
3
  import PageOne from './config/Page1.vue';
5
4
  import PageTwo from './config/Page2.vue';
6
5
  import PageThree from './config/Page3.vue';
7
6
  import PageFour from './config/Page4.vue';
8
7
  import PageFive from './config/Page5.vue';
8
+ import PageSix from './config/Page6.vue';
9
9
 
10
- Vue.use(Router);
11
-
12
- export default new Router({
10
+ export default createRouter({
11
+ history: createMemoryHistory(),
13
12
  routes: [
14
13
  {
15
14
  path: '/',
@@ -41,6 +40,11 @@ export default new Router({
41
40
  path: '5',
42
41
  name: 'PageFive',
43
42
  component: PageFive
43
+ },
44
+ {
45
+ path: '6',
46
+ name: 'PageSix',
47
+ component: PageSix
44
48
  }
45
49
  ]
46
50
  }
@@ -1,10 +1,11 @@
1
- import Vuex from 'vuex';
1
+ import { createStore } from 'vuex';
2
2
  import fieldData from './fieldData';
3
3
  import v4Fields from './v4fields';
4
4
  import axios from 'axios';
5
- import { get } from 'lodash';
5
+ import { castArray, get } from 'lodash';
6
+ import { toRaw } from 'vue';
6
7
 
7
- const initStore = (config, ui) => new Vuex.Store({
8
+ const initStore = (config, ui) => createStore({
8
9
  state: {
9
10
  // field descriptions
10
11
  fieldData,
@@ -19,7 +20,9 @@ const initStore = (config, ui) => new Vuex.Store({
19
20
  insights: { enabled: false, selected: false },
20
21
  verify: { enabled: false, selected: false }
21
22
  },
22
- filters: []
23
+ filters: [],
24
+ pageScanForbidden: [],
25
+ pageScanRequired: [],
23
26
  },
24
27
  mutations: {
25
28
  setErrors (state, errors) {
@@ -30,6 +33,10 @@ const initStore = (config, ui) => new Vuex.Store({
30
33
  },
31
34
  setFilters(state, filters) {
32
35
  state.filters = filters;
36
+ },
37
+ setPageScan(state, { required, forbidden }) {
38
+ state.pageScanRequired = required;
39
+ state.pageScanForbidden = forbidden;
33
40
  }
34
41
  },
35
42
  getters: {
@@ -45,7 +52,7 @@ const initStore = (config, ui) => new Vuex.Store({
45
52
  context.state.ui.cancel();
46
53
  },
47
54
  getProducts (context) {
48
- axios
55
+ return axios
49
56
  .get(`account?apiKey=${config.credential.token}`)
50
57
  .then(function (response) {
51
58
  const availableProducts = [
@@ -87,8 +94,8 @@ const initStore = (config, ui) => new Vuex.Store({
87
94
  };
88
95
  context.commit('setFilters', [...context.state.filters, filter]);
89
96
  },
90
- async finish (context) {
91
- const { products, v4Fields } = context.state;
97
+ async confirm (context) {
98
+ const { products, v4Fields, pageScanForbidden, pageScanRequired } = context.state;
92
99
  const flow = {
93
100
  steps: [{
94
101
  type: 'recipient',
@@ -120,6 +127,20 @@ const initStore = (config, ui) => new Vuex.Store({
120
127
  });
121
128
  }
122
129
 
130
+ if (castArray(pageScanRequired).length > 0) {
131
+ flow.steps[0].integration.mappings.push({
132
+ property: 'trustedform.scan_required_text',
133
+ value: toRaw(pageScanRequired)
134
+ });
135
+ }
136
+
137
+ if (castArray(pageScanForbidden).length > 0) {
138
+ flow.steps[0].integration.mappings.push({
139
+ property: 'trustedform.scan_forbidden_text',
140
+ value: toRaw(pageScanForbidden)
141
+ });
142
+ }
143
+
123
144
  if (products.verify.selected) {
124
145
  const filterConfig = {
125
146
  reason: '{{trustedform.reason}}',
@@ -132,8 +153,10 @@ const initStore = (config, ui) => new Vuex.Store({
132
153
  await context.dispatch('createFilter', filterConfig);
133
154
  }
134
155
  context.state.filters.forEach(filter => {
135
- flow.steps.push(filter);
136
- });
156
+ // the flow gets passed back to the app via a window.postMessage call, which clones objects passed in the message.
157
+ // As of Vuex 4, state items are Proxy objects, which cannot be cloned, so we have to use `toRaw()`.
158
+ flow.steps.push(toRaw(filter));
159
+ });
137
160
  }
138
161
  context.state.ui.create({ flow });
139
162
  }