project-booster-vue 9.2.0 → 9.2.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.2.0",
3
+ "version": "9.2.1",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -81,21 +81,21 @@
81
81
  "@mswjs/interceptors": "0.12.7",
82
82
  "@semantic-release/changelog": "5.0.1",
83
83
  "@semantic-release/git": "9.0.0",
84
- "@storybook/addon-a11y": "6.4.20",
85
- "@storybook/addon-essentials": "6.4.20",
84
+ "@storybook/addon-a11y": "6.4.21",
85
+ "@storybook/addon-essentials": "6.4.21",
86
86
  "@storybook/addon-knobs": "6.3.1",
87
- "@storybook/addon-links": "6.4.20",
87
+ "@storybook/addon-links": "6.4.21",
88
88
  "@storybook/addon-postcss": "2.0.0",
89
- "@storybook/addon-storyshots": "6.4.20",
90
- "@storybook/addon-storyshots-puppeteer": "6.4.20",
91
- "@storybook/addon-storysource": "6.4.20",
92
- "@storybook/addons": "6.4.20",
93
- "@storybook/builder-webpack5": "6.4.20",
94
- "@storybook/manager-webpack5": "6.4.20",
95
- "@storybook/source-loader": "6.4.20",
89
+ "@storybook/addon-storyshots": "6.4.21",
90
+ "@storybook/addon-storyshots-puppeteer": "6.4.21",
91
+ "@storybook/addon-storysource": "6.4.21",
92
+ "@storybook/addons": "6.4.21",
93
+ "@storybook/builder-webpack5": "6.4.21",
94
+ "@storybook/manager-webpack5": "6.4.21",
95
+ "@storybook/source-loader": "6.4.21",
96
96
  "@storybook/storybook-deployer": "2.8.11",
97
- "@storybook/theming": "6.4.20",
98
- "@storybook/vue3": "6.4.20",
97
+ "@storybook/theming": "6.4.21",
98
+ "@storybook/vue3": "6.4.21",
99
99
  "@testing-library/jest-dom": "5.16.2",
100
100
  "@testing-library/vue": "6.5.1",
101
101
  "@types/axios": "0.14.0",
@@ -147,13 +147,13 @@
147
147
  "eslint-plugin-import": "2.25.4",
148
148
  "eslint-plugin-mdx": "1.16.0",
149
149
  "eslint-plugin-prettier": "4.0.0",
150
- "eslint-plugin-storybook": "0.5.7",
150
+ "eslint-plugin-storybook": "0.5.8",
151
151
  "eslint-plugin-vue": "7.11.1",
152
152
  "fluent-json-schema": "3.0.1",
153
153
  "husky": "6.0.0",
154
154
  "jest": "26.6.3",
155
155
  "msw": "0.39.1",
156
- "msw-storybook-addon": "1.6.1",
156
+ "msw-storybook-addon": "1.6.3",
157
157
  "mutationobserver-shim": "0.3.7",
158
158
  "postcss": "8.3.11",
159
159
  "postcss-loader": "4.2.0",
@@ -16,9 +16,11 @@
16
16
  {{ payload.viewModel.hero }}
17
17
  </div>
18
18
  <div class="pb-question__title-container">
19
- <div v-if="payload.viewModel.label" class="pb-question__title">
20
- {{ decorate(payload.viewModel.label, payload.defaultDecoratorValue) }}
21
- </div>
19
+ <div
20
+ v-if="payload.viewModel.label"
21
+ class="pb-question__title"
22
+ v-html="decorate(payload.viewModel.label, payload.defaultDecoratorValue)"
23
+ />
22
24
  <div v-if="payload.viewModel.subtitle" class="pb-question__subtitle">
23
25
  {{ decorate(payload.viewModel.subtitle, payload.defaultDecoratorValue) }}
24
26
  <m-link
@@ -452,7 +454,12 @@ export default defineComponent({
452
454
  decorate(valueToDecorate: string, defaultValue = '') {
453
455
  if (valueToDecorate) {
454
456
  valueToDecorate = `\`${valueToDecorate}\``;
455
- return this.doEval(valueToDecorate, defaultValue);
457
+ try {
458
+ return this.doEval(valueToDecorate, defaultValue);
459
+ } catch (e) {
460
+ console.error(e);
461
+ return valueToDecorate;
462
+ }
456
463
  }
457
464
  return valueToDecorate;
458
465
  },
@@ -606,6 +606,9 @@ export default defineComponent({
606
606
  (newValue) => {
607
607
  if (newValue && scenarios) {
608
608
  state.value = newValue;
609
+ if (state.value.answers && !(state.value.answers instanceof Map)) {
610
+ state.value.answers = new Map<string, ScenarioStepAnswer[]>(Object.entries(state.value.answers));
611
+ }
609
612
  goToStep(state.value.history.stepIndex);
610
613
  }
611
614
  },
@@ -30,11 +30,7 @@ const getAppointmentQualification = async (
30
30
  : `/appointment-qualifications?range=${start}-${end}&groupId=${groupId}&appointmentId=${appointmentId}`;
31
31
  const response = await clientApi.get(url);
32
32
 
33
- return JSON.parse(
34
- JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
35
- return `: "${he.escape($1)}"`;
36
- }),
37
- );
33
+ return response.data;
38
34
  };
39
35
 
40
36
  const saveAnswersByAppointmentQualificationId = async (appointmentQualificationId: string, data: any) => {
@@ -7,7 +7,7 @@ const Condition = (
7
7
  ) => {
8
8
  const isAnswerMatching = (questionCode: string, answerCode: string) => {
9
9
  const questionAnswers = answers.get(questionCode)!;
10
- return questionAnswers[0]?.code === answerCode;
10
+ return questionAnswers ? questionAnswers[0]?.code === answerCode : false;
11
11
  };
12
12
  const isAnswerContaining = (questionCode: string, answerCode: string) => {
13
13
  const questionAnswers = answers.get(questionCode)!;