project-booster-vue 9.17.3 → 9.18.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 +7 -4
- package/src/components/configurations/section/PbConfigurationsSection.vue +2 -4
- package/src/components/projects/project-hub/PbProjectHub.vue +4 -1
- package/src/components/question/dimensions-input/PbDimensionsInput.vue +2 -2
- package/src/components/scenario/PbScenario-Demo-Project.stories.js +47 -35
- package/tsconfig.json +3 -0
package/package.json
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "project-booster-vue",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.18.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"serve": "vue-cli-service serve",
|
|
7
7
|
"test:unit": "vue-cli-service test:unit --forceExit --detectOpenHandles",
|
|
8
8
|
"kozikaza-tokens-build": "env PB_THEME=kozikaza mozaic-tokens-build",
|
|
9
|
-
"
|
|
9
|
+
"check-types": "vue-tsc --noemit",
|
|
10
|
+
"eslint": "eslint",
|
|
11
|
+
"lint:js": "yarn eslint && npm run check-types",
|
|
10
12
|
"lint:js:fix": "vue-cli-service lint --fix -- ./",
|
|
11
13
|
"lint:style": "stylelint '**/*.vue' '**/*.scss'",
|
|
12
14
|
"lint:style:fix": "stylelint '**/*.vue' '**/*.scss' --fix",
|
|
@@ -118,13 +120,13 @@
|
|
|
118
120
|
"@typescript-eslint/eslint-plugin": "4.18.0",
|
|
119
121
|
"@typescript-eslint/parser": "4.18.0",
|
|
120
122
|
"@vue/babel-preset-app": "4.5.13",
|
|
121
|
-
"@vue/compat": "3.2.6",
|
|
122
123
|
"@vue/cli": "5.0.4",
|
|
123
124
|
"@vue/cli-plugin-babel": "5.0.4",
|
|
124
125
|
"@vue/cli-plugin-eslint": "5.0.4",
|
|
125
126
|
"@vue/cli-plugin-typescript": "5.0.4",
|
|
126
127
|
"@vue/cli-plugin-unit-jest": "4.5.16",
|
|
127
128
|
"@vue/cli-service": "5.0.4",
|
|
129
|
+
"@vue/compat": "3.2.6",
|
|
128
130
|
"@vue/compiler-sfc": "3.2.31",
|
|
129
131
|
"@vue/eslint-config-prettier": "6.0.0",
|
|
130
132
|
"@vue/eslint-config-standard": "6.0.0",
|
|
@@ -174,7 +176,8 @@
|
|
|
174
176
|
"tsconfig-paths-webpack-plugin": "3.5.2",
|
|
175
177
|
"typescript": "4.1.6",
|
|
176
178
|
"vue-jest": "5.0.0-alpha.10",
|
|
177
|
-
"vue-loader": "17.0.0"
|
|
179
|
+
"vue-loader": "17.0.0",
|
|
180
|
+
"vue-tsc": "0.34.13"
|
|
178
181
|
},
|
|
179
182
|
"eslintConfig": {
|
|
180
183
|
"fix": false,
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
<m-flex class="pb-configurations-section__link-container" v-if="readOnly && project">
|
|
57
57
|
<m-link
|
|
58
58
|
class="pb-configurations-section__link-portal-oaa"
|
|
59
|
-
label="
|
|
59
|
+
label="Accéder au portail des OAA"
|
|
60
60
|
size="s"
|
|
61
61
|
@click="window.open(linkPortalOaa, '_blank')"
|
|
62
62
|
/>
|
|
@@ -111,9 +111,7 @@ export default defineComponent({
|
|
|
111
111
|
project: 'getProject',
|
|
112
112
|
}),
|
|
113
113
|
linkPortalOaa() {
|
|
114
|
-
return this.project
|
|
115
|
-
? `http://rcloset.fr.corp.leroymerlin.com:81/page_tunnel_oaa/?mag=${this.project.store}`
|
|
116
|
-
: null;
|
|
114
|
+
return this.project ? `https://portailoaa.fr.corp.leroymerlin.com/search?store=${this.project.store}` : null;
|
|
117
115
|
},
|
|
118
116
|
},
|
|
119
117
|
|
|
@@ -186,7 +186,10 @@
|
|
|
186
186
|
</div>
|
|
187
187
|
</m-flex>
|
|
188
188
|
<m-flex
|
|
189
|
-
v-if="
|
|
189
|
+
v-if="
|
|
190
|
+
isEstimatesDisplayed &&
|
|
191
|
+
(isLoadingEstimates || estimatesLoadError || (estimates && estimates.length > 0))
|
|
192
|
+
"
|
|
190
193
|
class="pb-project-hub__section"
|
|
191
194
|
direction="column"
|
|
192
195
|
full-width
|
|
@@ -117,13 +117,13 @@ const initValidation = (componentId: string, computedPayload: ComputedRef<Dimens
|
|
|
117
117
|
[`text-input-length-${componentId}`]: yup
|
|
118
118
|
.number()
|
|
119
119
|
.typeError(validation.requiredErrorMessage ?? 'Veuillez remplir ce champ')
|
|
120
|
-
.required(
|
|
120
|
+
.required()
|
|
121
121
|
.min(
|
|
122
122
|
(validation.lengthMinValue ?? 0) + (!validation.thresholdsIncluded ? 0.1 : 0) ?? 0,
|
|
123
123
|
validation.lengthMinErrorMessage ?? 'Veuillez saisir un nombre plus grand que ${min}',
|
|
124
124
|
)
|
|
125
125
|
.max(
|
|
126
|
-
(validation.
|
|
126
|
+
(validation.lengthMaxValue ?? 1000000000) - (!validation.thresholdsIncluded ? 0.1 : 0) ?? 1000000000,
|
|
127
127
|
validation.lengthMaxErrorMessage ?? 'Veuillez saisir un nombre plus petit que ${max}',
|
|
128
128
|
),
|
|
129
129
|
[`text-input-width-${componentId}`]: yup
|
|
@@ -16,72 +16,84 @@ export default {
|
|
|
16
16
|
parameters: { storyshots: { disable: true }, layout: 'fullscreen' },
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
const generateStory =
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
runtimeOptions: {
|
|
25
|
-
type: Object,
|
|
26
|
-
default: () => object('Runtime options', { projectMode: true }),
|
|
19
|
+
const generateStory =
|
|
20
|
+
(jsonLocation, headers = {}) =>
|
|
21
|
+
() => ({
|
|
22
|
+
components: {
|
|
23
|
+
PbScenario,
|
|
27
24
|
},
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
25
|
+
props: {
|
|
26
|
+
runtimeOptions: {
|
|
27
|
+
type: Object,
|
|
28
|
+
default: () => object('Runtime options', { projectMode: true }),
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
setup() {
|
|
32
|
+
const store = useStore();
|
|
33
|
+
store.dispatch('documentsPlans/updateContext', { type: 'DOCUMENT', subType: 'PLAN' });
|
|
34
|
+
store.dispatch('documentsPictures/updateContext', { type: 'DOCUMENT', subType: 'PHOTO' });
|
|
35
|
+
store.dispatch('estimates/setSummary', {
|
|
36
|
+
cost: {},
|
|
37
|
+
});
|
|
38
|
+
const scenarios = ref(null);
|
|
39
|
+
const hasScenario = ref(false);
|
|
40
|
+
axios.get(jsonLocation, { headers }).then((result) => {
|
|
41
|
+
scenarios.value = result.data.scenario ?? result.data;
|
|
42
|
+
hasScenario.value = true;
|
|
43
|
+
});
|
|
44
|
+
const handleScenarioEvent = (event) => {
|
|
45
|
+
console.log('Event', event);
|
|
46
|
+
};
|
|
47
|
+
return {
|
|
48
|
+
scenarios,
|
|
49
|
+
hasScenario,
|
|
50
|
+
handleScenarioEvent,
|
|
51
|
+
};
|
|
52
|
+
},
|
|
53
|
+
// eslint-disable-next-line
|
|
54
|
+
template:
|
|
55
|
+
'<pb-scenario v-if="hasScenario" :scenarios="scenarios" :runtime-options="runtimeOptions" @scenario-event="handleScenarioEvent" />',
|
|
56
|
+
});
|
|
55
57
|
|
|
56
58
|
export const estimateNewConstructionPrep = generateStory(
|
|
57
59
|
'https://api-prep.adeo.cloud/api-project-booster-budget-estimate/v1/scenarios/6e3e9d6d-a019-4c1c-8d25-002a4ebfcb46',
|
|
60
|
+
{ 'X-gateway-apikey': 'nII0D8gvbudmDONHRJo0wbYKJAytn97x' },
|
|
58
61
|
);
|
|
59
62
|
export const estimateDressingPrep = generateStory(
|
|
60
63
|
'https://api-prep.adeo.cloud/api-project-booster-budget-estimate/v1/scenarios/10df6aa4-4ae0-41a0-93e3-dc66eb9d39c8',
|
|
64
|
+
{ 'X-gateway-apikey': 'nII0D8gvbudmDONHRJo0wbYKJAytn97x' },
|
|
61
65
|
);
|
|
62
66
|
export const estimateBookcasePrep = generateStory(
|
|
63
67
|
'https://api-prep.adeo.cloud/api-project-booster-budget-estimate/v1/scenarios/88d96e4c-685b-4275-8eae-f50828fe4755',
|
|
68
|
+
{ 'X-gateway-apikey': 'nII0D8gvbudmDONHRJo0wbYKJAytn97x' },
|
|
64
69
|
);
|
|
65
70
|
export const estimateKitchenPrep = generateStory(
|
|
66
71
|
'https://api-prep.adeo.cloud/api-project-booster-budget-estimate/v1/scenarios/068160b2-b28a-46fa-8fd6-4775450fa7b4',
|
|
72
|
+
{ 'X-gateway-apikey': 'nII0D8gvbudmDONHRJo0wbYKJAytn97x' },
|
|
67
73
|
);
|
|
68
74
|
export const estimateInsulationPrep = generateStory(
|
|
69
75
|
'https://api-prep.adeo.cloud/api-project-booster-budget-estimate/v1/scenarios/60100496-92ea-49ab-8a43-c08afa57cd60',
|
|
76
|
+
{ 'X-gateway-apikey': 'nII0D8gvbudmDONHRJo0wbYKJAytn97x' },
|
|
70
77
|
);
|
|
71
78
|
export const estimateTvPrep = generateStory(
|
|
72
79
|
'https://api-prep.adeo.cloud/api-project-booster-budget-estimate/v1/scenarios/dc5370cf-0761-43a0-8309-ced76be08d8b',
|
|
80
|
+
{ 'X-gateway-apikey': 'nII0D8gvbudmDONHRJo0wbYKJAytn97x' },
|
|
73
81
|
);
|
|
74
82
|
export const estimateStoragePrep = generateStory(
|
|
75
83
|
'https://api-prep.adeo.cloud/api-project-booster-budget-estimate/v1/scenarios/e39126db-03f7-4b07-975a-97b4cf603ef1',
|
|
84
|
+
{ 'X-gateway-apikey': 'nII0D8gvbudmDONHRJo0wbYKJAytn97x' },
|
|
76
85
|
);
|
|
77
86
|
export const estimateHeatingPrep = generateStory(
|
|
78
87
|
'https://api-prep.adeo.cloud/api-project-booster-budget-estimate/v1/scenarios/eaba8264-620d-475e-830f-89166b49a667',
|
|
88
|
+
{ 'X-gateway-apikey': 'nII0D8gvbudmDONHRJo0wbYKJAytn97x' },
|
|
79
89
|
);
|
|
80
90
|
export const estimateBathroomPrep = generateStory(
|
|
81
91
|
'https://api-prep.adeo.cloud/api-project-booster-budget-estimate/v1/scenarios/c9c4df50-cbcb-4265-b9a7-6645d3adb03b',
|
|
92
|
+
{ 'X-gateway-apikey': 'nII0D8gvbudmDONHRJo0wbYKJAytn97x' },
|
|
82
93
|
);
|
|
83
94
|
export const estimateFloorPrep = generateStory(
|
|
84
95
|
'https://api-prep.adeo.cloud/api-project-booster-budget-estimate/v1/scenarios/LMFR_FLOOR',
|
|
96
|
+
{ 'X-gateway-apikey': 'nII0D8gvbudmDONHRJo0wbYKJAytn97x' },
|
|
85
97
|
);
|
|
86
98
|
|
|
87
99
|
export const projectDeclarationGenericPrep = generateStory(
|