project-booster-vue 9.18.6 → 9.19.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "project-booster-vue",
3
- "version": "9.18.6",
3
+ "version": "9.19.1",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -45,7 +45,6 @@
45
45
  "core-js": "3.21.1",
46
46
  "date-fns": "2.22.1",
47
47
  "firebase": "8.6.7",
48
- "he": "1.2.0",
49
48
  "hooper": "nicoinch/hooper#1.0.5",
50
49
  "lodash.clonedeep": "4.5.0",
51
50
  "lodash.debounce": "4.0.8",
@@ -1,6 +1,11 @@
1
1
  <template>
2
2
  <m-flex class="pb-appointment-form__container">
3
- <iframe v-if="appointmentFormUrl" :src="appointmentFormUrl" style="border: 0; min-height: 110rem; width: 100%">
3
+ <iframe
4
+ v-if="appointmentFormUrl"
5
+ :src="appointmentFormUrl"
6
+ style="border: 0; min-height: 110rem; width: 100%"
7
+ id="clickrdv"
8
+ >
4
9
  <p>
5
10
  Your browser doesn't support iframes. To book an appointment, please follow this link :
6
11
  <a :href="appointmentFormUrl">{{ appointmentFormUrl }}</a>
@@ -44,6 +49,13 @@ export default defineComponent({
44
49
  appointmentFormUrl,
45
50
  };
46
51
  },
52
+ mounted() {
53
+ window.addEventListener('message', (event) => {
54
+ if (event.origin.indexOf('clicrdv.com') > -1) {
55
+ window.scrollTo(0, 0);
56
+ }
57
+ });
58
+ },
47
59
  });
48
60
  </script>
49
61
 
@@ -5,7 +5,7 @@
5
5
  "minValue": 0,
6
6
  "minErrorMessage": "Veuillez saisir un nombre entier plus grand que 0",
7
7
  "maxValue": 1500000,
8
- "maxErrorMessage": "Veuillez saisir un nombre plus petit que 50"
8
+ "maxErrorMessage": "Veuillez saisir un nombre plus petit"
9
9
  },
10
10
  "backLabel": "Question précédente",
11
11
  "label": "Quel est votre budget ?",
@@ -1,5 +1,5 @@
1
1
  import axios from 'axios';
2
- import he from 'he';
2
+ import { escape } from '../../services/htmlEscape';
3
3
 
4
4
  export const clientApi = axios.create({
5
5
  baseURL: '/project-booster/api',
@@ -41,7 +41,7 @@ const saveAnswersByAppointmentQualificationId = async (appointmentQualificationI
41
41
 
42
42
  return JSON.parse(
43
43
  JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
44
- return `: "${he.escape($1)}"`;
44
+ return `: "${escape($1)}"`;
45
45
  }),
46
46
  );
47
47
  };
@@ -53,7 +53,7 @@ const declarationsWithAppointment = async (data: any) => {
53
53
 
54
54
  return JSON.parse(
55
55
  JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
56
- return `: "${he.escape($1)}"`;
56
+ return `: "${escape($1)}"`;
57
57
  }),
58
58
  );
59
59
  };
@@ -65,7 +65,7 @@ const declarationsWithoutAppointment = async (data: any) => {
65
65
 
66
66
  return JSON.parse(
67
67
  JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
68
- return `: "${he.escape($1)}"`;
68
+ return `: "${escape($1)}"`;
69
69
  }),
70
70
  );
71
71
  };
@@ -81,7 +81,7 @@ const linkInhabitantProjectToAppointmentQualification = async (data: any, inhabi
81
81
 
82
82
  return JSON.parse(
83
83
  JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
84
- return `: "${he.escape($1)}"`;
84
+ return `: "${escape($1)}"`;
85
85
  }),
86
86
  );
87
87
  };
@@ -1,5 +1,5 @@
1
1
  import axios from 'axios';
2
- import he from 'he';
2
+ import { escape } from '../../services/htmlEscape';
3
3
 
4
4
  export const clientApi = axios.create({
5
5
  baseURL: '/project-booster/api',
@@ -23,7 +23,7 @@ const getConfiguration = async () => {
23
23
 
24
24
  return JSON.parse(
25
25
  JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
26
- return `: "${he.escape($1)}"`;
26
+ return `: "${escape($1)}"`;
27
27
  }),
28
28
  );
29
29
  };
@@ -1,5 +1,5 @@
1
1
  import axios from 'axios';
2
- import he from 'he';
2
+ import { escape } from '../../services/htmlEscape';
3
3
 
4
4
  export const clientApi = axios.create({
5
5
  baseURL: '/project-booster/api',
@@ -39,7 +39,7 @@ const getProjectConfigurationsForProjectType = async (
39
39
 
40
40
  return JSON.parse(
41
41
  JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
42
- return `: "${he.escape($1)}"`;
42
+ return `: "${escape($1)}"`;
43
43
  }),
44
44
  );
45
45
  };
@@ -56,7 +56,7 @@ const getAllProjectConfigurations = async (inhabitantProjectId: string, forceNoP
56
56
 
57
57
  return JSON.parse(
58
58
  JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
59
- return `: "${he.escape($1)}"`;
59
+ return `: "${escape($1)}"`;
60
60
  }),
61
61
  );
62
62
  };
@@ -66,7 +66,7 @@ const linkConfiguration = async (id: string, inhabitantProjectId: string) => {
66
66
 
67
67
  return JSON.parse(
68
68
  JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
69
- return `: "${he.escape($1)}"`;
69
+ return `: "${escape($1)}"`;
70
70
  }),
71
71
  );
72
72
  };
@@ -1,5 +1,5 @@
1
1
  import axios from 'axios';
2
- import he from 'he';
2
+ import { escape } from '../../services/htmlEscape';
3
3
 
4
4
  export const clientApi = axios.create({
5
5
  baseURL: '/project-booster/api',
@@ -23,7 +23,7 @@ export const getConsents = async () => {
23
23
 
24
24
  return JSON.parse(
25
25
  JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
26
- return `: "${he.escape($1)}"`;
26
+ return `: "${escape($1)}"`;
27
27
  }),
28
28
  );
29
29
  };
@@ -1,5 +1,5 @@
1
1
  import axios from 'axios';
2
- import he from 'he';
2
+ import { escape } from '../../services/htmlEscape';
3
3
 
4
4
  export const clientApi = axios.create({
5
5
  baseURL: '/project-booster/api',
@@ -53,7 +53,7 @@ const getDocumentsByInhabitantProjectId = async (
53
53
 
54
54
  return JSON.parse(
55
55
  JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
56
- return `: "${he.escape($1)}"`;
56
+ return `: "${escape($1)}"`;
57
57
  }),
58
58
  );
59
59
  };
@@ -63,7 +63,7 @@ const getDocumentById = async (inhabitantProjectId: string, documentId: string)
63
63
 
64
64
  return JSON.parse(
65
65
  JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
66
- return `: "${he.escape($1)}"`;
66
+ return `: "${escape($1)}"`;
67
67
  }),
68
68
  );
69
69
  };
@@ -1,5 +1,5 @@
1
1
  import axios from 'axios';
2
- import he from 'he';
2
+ import { escape } from '../../services/htmlEscape';
3
3
  import { Estimate } from '@/types/pb/Estimate';
4
4
  import { ScenarioAnswer } from '@/types/pb/Scenario';
5
5
 
@@ -31,7 +31,7 @@ export const getAllEstimates = async (
31
31
 
32
32
  return JSON.parse(
33
33
  JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
34
- return `: "${he.escape($1)}"`;
34
+ return `: "${escape($1)}"`;
35
35
  }),
36
36
  );
37
37
  };
@@ -41,7 +41,7 @@ export const getEstimateById = async (id: string) => {
41
41
 
42
42
  return JSON.parse(
43
43
  JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
44
- return `: "${he.escape($1)}"`;
44
+ return `: "${escape($1)}"`;
45
45
  }),
46
46
  );
47
47
  };
@@ -51,7 +51,7 @@ export const deleteEstimateById = async (id: string) => {
51
51
 
52
52
  return JSON.parse(
53
53
  JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
54
- return `: "${he.escape($1)}"`;
54
+ return `: "${escape($1)}"`;
55
55
  }),
56
56
  );
57
57
  };
@@ -65,7 +65,7 @@ export const saveEstimate = async (estimate: Estimate) => {
65
65
 
66
66
  return JSON.parse(
67
67
  JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
68
- return `: "${he.escape($1)}"`;
68
+ return `: "${escape($1)}"`;
69
69
  }),
70
70
  );
71
71
  };
@@ -80,7 +80,7 @@ export const estimate = async (
80
80
 
81
81
  return JSON.parse(
82
82
  JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
83
- return `: "${he.escape($1)}"`;
83
+ return `: "${escape($1)}"`;
84
84
  }),
85
85
  );
86
86
  };
@@ -1,5 +1,5 @@
1
1
  import axios from 'axios';
2
- import he from 'he';
2
+ import { escape } from '../../services/htmlEscape';
3
3
 
4
4
  export const clientApi = axios.create({
5
5
  baseURL: '/project-booster/api',
@@ -25,7 +25,7 @@ export const buildEventApi = (target: string) => async (event: any) => {
25
25
 
26
26
  return JSON.parse(
27
27
  JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
28
- return `: "${he.escape($1)}"`;
28
+ return `: "${escape($1)}"`;
29
29
  }),
30
30
  );
31
31
  };
@@ -37,7 +37,7 @@ export const sendAppointmentQualificationEvent = async (event: any) => {
37
37
 
38
38
  return JSON.parse(
39
39
  JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
40
- return `: "${he.escape($1)}"`;
40
+ return `: "${escape($1)}"`;
41
41
  }),
42
42
  );
43
43
  };
@@ -49,7 +49,7 @@ export const sendAppointmentQualificationAnswers = async (event: any) => {
49
49
 
50
50
  return JSON.parse(
51
51
  JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
52
- return `: "${he.escape($1)}"`;
52
+ return `: "${escape($1)}"`;
53
53
  }),
54
54
  );
55
55
  };
@@ -76,7 +76,7 @@ export const sendDocumentsEvent = async (event: {
76
76
 
77
77
  return JSON.parse(
78
78
  JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
79
- return `: "${he.escape($1)}"`;
79
+ return `: "${escape($1)}"`;
80
80
  }),
81
81
  );
82
82
  };
@@ -100,7 +100,7 @@ export const sendMediaEvent = async (event: {
100
100
 
101
101
  return JSON.parse(
102
102
  JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
103
- return `: "${he.escape($1)}"`;
103
+ return `: "${escape($1)}"`;
104
104
  }),
105
105
  );
106
106
  };
@@ -112,7 +112,7 @@ export const sendCardClickEvent = async (event: any) => {
112
112
 
113
113
  return JSON.parse(
114
114
  JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
115
- return `: "${he.escape($1)}"`;
115
+ return `: "${escape($1)}"`;
116
116
  }),
117
117
  );
118
118
  };
@@ -124,7 +124,7 @@ export const sendDeclarationEvent = async (event: any) => {
124
124
 
125
125
  return JSON.parse(
126
126
  JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
127
- return `: "${he.escape($1)}"`;
127
+ return `: "${escape($1)}"`;
128
128
  }),
129
129
  );
130
130
  };
@@ -136,7 +136,7 @@ export const sendSimulationEvent = async (event: any) => {
136
136
 
137
137
  return JSON.parse(
138
138
  JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
139
- return `: "${he.escape($1)}"`;
139
+ return `: "${escape($1)}"`;
140
140
  }),
141
141
  );
142
142
  };
@@ -1,5 +1,5 @@
1
1
  import axios from 'axios';
2
- import he from 'he';
2
+ import { escape } from '../../services/htmlEscape';
3
3
 
4
4
  export const clientApi = axios.create({
5
5
  baseURL: '/project-booster/api',
@@ -23,7 +23,7 @@ export const getInhabitantById = async (inhabitantId: string, buId = '001') => {
23
23
 
24
24
  return JSON.parse(
25
25
  JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
26
- return `: "${he.escape($1)}"`;
26
+ return `: "${escape($1)}"`;
27
27
  }),
28
28
  );
29
29
  };
@@ -1,5 +1,5 @@
1
1
  import axios from 'axios';
2
- import he from 'he';
2
+ import { escape } from '../../services/htmlEscape';
3
3
 
4
4
  export const clientApi = axios.create({
5
5
  baseURL: '/project-booster/api',
@@ -23,7 +23,7 @@ const getAllMedia = async (start: number, end: number, inhabitantProjectId: stri
23
23
 
24
24
  return JSON.parse(
25
25
  JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
26
- return `: "${he.escape($1)}"`;
26
+ return `: "${escape($1)}"`;
27
27
  }),
28
28
  );
29
29
  };
@@ -33,7 +33,7 @@ const getMediumById = async (mediumId: string) => {
33
33
 
34
34
  return JSON.parse(
35
35
  JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
36
- return `: "${he.escape($1)}"`;
36
+ return `: "${escape($1)}"`;
37
37
  }),
38
38
  );
39
39
  };
@@ -1,5 +1,5 @@
1
1
  import axios from 'axios';
2
- import he from 'he';
2
+ import { escape } from '../../services/htmlEscape';
3
3
 
4
4
  export const clientApi = axios.create({
5
5
  baseURL: '/project-booster/api',
@@ -24,7 +24,7 @@ export const getWorkKindsByProjectTypeId = async (projectTypeId: string) => {
24
24
 
25
25
  return JSON.parse(
26
26
  JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
27
- return `: "${he.escape($1)}"`;
27
+ return `: "${escape($1)}"`;
28
28
  }),
29
29
  );
30
30
  };
@@ -34,7 +34,7 @@ export const getProductsByWorkKind = async (workKindId: string, storeId: string)
34
34
 
35
35
  return JSON.parse(
36
36
  JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
37
- return `: "${he.escape($1)}"`;
37
+ return `: "${escape($1)}"`;
38
38
  }),
39
39
  );
40
40
  };
@@ -44,7 +44,7 @@ export const getProductsFeatureFlag = async (projectTypeId: string) => {
44
44
 
45
45
  return JSON.parse(
46
46
  JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
47
- return `: "${he.escape($1)}"`;
47
+ return `: "${escape($1)}"`;
48
48
  }),
49
49
  );
50
50
  };
@@ -56,7 +56,7 @@ export const saveWorkKinds = async (inhabitantProjectId: string, workKinds: any)
56
56
 
57
57
  return JSON.parse(
58
58
  JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
59
- return `: "${he.escape($1)}"`;
59
+ return `: "${escape($1)}"`;
60
60
  }),
61
61
  );
62
62
  };
@@ -66,7 +66,7 @@ export const getWorkKindsByProjectId = async (inhabitantProjectId: string) => {
66
66
 
67
67
  return JSON.parse(
68
68
  JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
69
- return `: "${he.escape($1)}"`;
69
+ return `: "${escape($1)}"`;
70
70
  }),
71
71
  );
72
72
  };
@@ -1,5 +1,5 @@
1
1
  import axios from 'axios';
2
- import he from 'he';
2
+ import { escape } from '../../services/htmlEscape';
3
3
  import { Project, ProjectToSave } from '@/types/pb/Project';
4
4
 
5
5
  export const clientApi = axios.create({
@@ -26,7 +26,7 @@ export const getAllProjects = async (currentProjectsPage: number, projectsPerPag
26
26
 
27
27
  return JSON.parse(
28
28
  JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
29
- return `: "${he.escape($1)}"`;
29
+ return `: "${escape($1)}"`;
30
30
  }),
31
31
  );
32
32
  };
@@ -42,7 +42,7 @@ export const getAllProjectsForUserId = async (
42
42
 
43
43
  return JSON.parse(
44
44
  JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
45
- return `: "${he.escape($1)}"`;
45
+ return `: "${escape($1)}"`;
46
46
  }),
47
47
  );
48
48
  };
@@ -52,7 +52,7 @@ export const getProjectById = async (id: string) => {
52
52
 
53
53
  return JSON.parse(
54
54
  JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
55
- return `: "${he.escape($1)}"`;
55
+ return `: "${escape($1)}"`;
56
56
  }),
57
57
  );
58
58
  };
@@ -62,7 +62,7 @@ export const deleteProjectById = async (id: string) => {
62
62
 
63
63
  return JSON.parse(
64
64
  JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
65
- return `: "${he.escape($1)}"`;
65
+ return `: "${escape($1)}"`;
66
66
  }),
67
67
  );
68
68
  };
@@ -81,7 +81,7 @@ export const saveProjectDeclaration = async (projectDeclaration: ProjectToSave)
81
81
 
82
82
  return JSON.parse(
83
83
  JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
84
- return `: "${he.escape($1)}"`;
84
+ return `: "${escape($1)}"`;
85
85
  }),
86
86
  );
87
87
  };
@@ -91,7 +91,7 @@ export const getProjectAttributesById = async (id: string) => {
91
91
 
92
92
  return JSON.parse(
93
93
  JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
94
- return `: "${he.escape($1)}"`;
94
+ return `: "${escape($1)}"`;
95
95
  }),
96
96
  );
97
97
  };
@@ -101,7 +101,7 @@ export const getAppointmentById = async (id: string) => {
101
101
 
102
102
  return JSON.parse(
103
103
  JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
104
- return `: "${he.escape($1)}"`;
104
+ return `: "${escape($1)}"`;
105
105
  }),
106
106
  );
107
107
  };
@@ -1,5 +1,5 @@
1
1
  import axios from 'axios';
2
- import he from 'he';
2
+ import { escape } from '../../services/htmlEscape';
3
3
 
4
4
  export const clientApi = axios.create({});
5
5
 
@@ -17,7 +17,7 @@ export const getAllTools = async (projectType: string) => {
17
17
 
18
18
  return JSON.parse(
19
19
  JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
20
- return `: "${he.escape($1)}"`;
20
+ return `: "${escape($1)}"`;
21
21
  }),
22
22
  );
23
23
  };
@@ -0,0 +1,27 @@
1
+ // Issue with kobi rewriting the lib we extract the part that we need here
2
+
3
+ const regexEscape: RegExp = /["&'<>`]/g;
4
+
5
+ const escapeMap: Record<string, string> = {
6
+ '"': '&quot;',
7
+ '&': '&amp;',
8
+ "'": '&#x27;',
9
+ '<': '&lt;',
10
+ // See https://mathiasbynens.be/notes/ambiguous-ampersands: in HTML, the
11
+ // following is not strictly necessary unless it’s part of a tag or an
12
+ // unquoted attribute value. We’re only escaping it to support those
13
+ // situations, and for XML support.
14
+ '>': '&gt;',
15
+ // In Internet Explorer ≤ 8, the backtick character can be used
16
+ // to break out of (un)quoted attribute values or HTML comments.
17
+ // See http://html5sec.org/#102, http://html5sec.org/#108, and
18
+ // http://html5sec.org/#133.
19
+ '`': '&#x60;',
20
+ };
21
+
22
+ export const escape = (string: string) => {
23
+ return string.replace(regexEscape, function ($0) {
24
+ // Note: there is no need to check `has(escapeMap, $0)` here.
25
+ return escapeMap[$0];
26
+ });
27
+ };