project-booster-vue 9.10.1 → 9.10.4

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.10.1",
3
+ "version": "9.10.4",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -79,7 +79,7 @@ export const TemplateSandbox = (args, { argTypes }) => {
79
79
  :show-more-button-label="args.showMoreButtonLabel"
80
80
  :padding="args.padding"
81
81
  :separator="args.separator"
82
- v-model="args.modelValue"
82
+ :model-value="args.modelValue"
83
83
  @click="args.click"
84
84
  @update:model-value="args.update"
85
85
  />`,
@@ -23,7 +23,7 @@
23
23
  :image="item.viewModel.image"
24
24
  :image-size="item.viewModel.imageSize"
25
25
  :selectable="selectType"
26
- v-model="selectedItems[item.code]"
26
+ :model-value="selectedItems.get(item.code)"
27
27
  :disabled="item.disabled"
28
28
  :padding="padding"
29
29
  :icon="icon"
@@ -203,7 +203,7 @@ export default defineComponent({
203
203
  }
204
204
  }
205
205
  selectedItems.value.set(code, value);
206
- emit('update:modelValue', selectedItems.value);
206
+ emit('update:modelValue', Object.fromEntries(selectedItems.value));
207
207
  };
208
208
  const handleClick = (event: Event) => {
209
209
  emit('click', event);
@@ -100,11 +100,11 @@ export const answerGettersMappers: Map<string, (param: any) => void> = new Map<s
100
100
  }),
101
101
  );
102
102
 
103
- function adaptAnswers(answers: Map<string, ScenarioStepAnswer[]>, scenario: Scenario) {
103
+ function adaptAnswers(answers: Record<string, ScenarioStepAnswer[]>, scenario: Scenario) {
104
104
  let adaptedAnswers: ScenarioAnswer[] = [];
105
105
 
106
106
  if (answers) {
107
- adaptedAnswers = Object.entries(Object.fromEntries(answers))
107
+ adaptedAnswers = Object.entries(answers)
108
108
  .filter(([code]) => !['PbRestitution'].includes(scenario?.get(code)?.component ?? ''))
109
109
  .filter(([code]) => code !== 'SUBPROJECT_FORM_ID')
110
110
  .map(([questionId, answerData]) => ({
@@ -175,14 +175,14 @@ export default defineComponent({
175
175
  .filter((answer) => !!answer.selected)
176
176
  .map((answer) => ({ key: answer.code, value: answer.selected }));
177
177
  };
178
- const handleSelectionChange = (items: Item[]) => {
178
+ const handleSelectionChange = (items: Record<string, string | boolean>) => {
179
179
  selectedAnswers.value = Object.entries(items)
180
180
  .filter(([, value]) => !!value)
181
181
  .map(([key, value]) => ({ key, value }));
182
182
  Object.entries(items).map(([key, value]) => {
183
183
  displayedAnswers.value.map((answer) => {
184
184
  if (answer.code === key) {
185
- answer.selected = value.selected;
185
+ answer.selected = value;
186
186
  }
187
187
  });
188
188
  });
@@ -69,7 +69,7 @@ export const TemplateSandbox = (args, { argTypes }) => {
69
69
  store.dispatch('configurations/defineConfiguratorTypes', [DEFAULT_PAYLOAD.__START__.meta.configuratorType]);
70
70
  store.dispatch('configurations/searchConfigurations', '001');
71
71
  store.dispatch('inhabitants/loadInhabitant', '123456');
72
- store.dispatch('appointmentQualification/loadClicRDVBaseUrl');
72
+ store.dispatch('appointmentQualification/loadClicRDVBaseUrl', 'https://sandbox-user.clicrdv.com');
73
73
  store.dispatch('appointmentQualification/initSessions', {
74
74
  formId: 'appointment-qualification-kitchen',
75
75
  correlationId: uuidv4(),
@@ -195,9 +195,9 @@ export default {
195
195
  initSessions({ commit }: AppointmentQualificationContext, sessions: any) {
196
196
  commit('setSession', sessions);
197
197
  },
198
- loadClicRDVBaseUrl({ commit }: AppointmentQualificationContext) {
199
- if ((<any>window).config) {
200
- commit('setClicRDVBaseUrl', (<any>window).config.VUE_APP_CLICRDV_BASE_URL);
198
+ loadClicRDVBaseUrl({ commit }: AppointmentQualificationContext, baseUrl: string) {
199
+ if (baseUrl) {
200
+ commit('setClicRDVBaseUrl', baseUrl);
201
201
  } else {
202
202
  commit('setClicRDVBaseUrl', 'https://www.clicrdv.com');
203
203
  }
@@ -55,7 +55,7 @@ export interface ScenarioStepAnswerViewModel {
55
55
 
56
56
  export interface ScenarioStepAnswer {
57
57
  code: string;
58
- selected?: boolean;
58
+ selected?: boolean | string;
59
59
  viewModel?: ScenarioStepAnswerViewModel;
60
60
  conditions?: string[];
61
61
  nextStep?: ScenarioStepNextStep;