project-booster-vue 9.44.3 → 9.44.5

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.44.3",
3
+ "version": "9.44.5",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -0,0 +1,59 @@
1
+ import { nestedAppDecorator } from '../../../.storybook/nested-app-decorator';
2
+ import { Story, Preview, Meta, Props, ArgsTable, Source, Canvas } from '@storybook/addon-docs';
3
+ import PbQuestion from './PbQuestion';
4
+ import { TemplateSandbox } from './PbQuestion.stories.mdx';
5
+ import DEFAULT_PAYLOAD from './default-payload-modal.json';
6
+
7
+ <Meta
8
+ title="Project Booster/Scenario/Questions/PbQuestion 🦠/Features/Question/Modal Link"
9
+ component={PbQuestion}
10
+ argTypes={{
11
+ onStepCompleted: {
12
+ action: 'Step completed',
13
+ table: { disable: true },
14
+ },
15
+ }}
16
+ decorators={[
17
+ nestedAppDecorator(
18
+ {
19
+ actions: {
20
+ sendEventToBus({}, payload) {
21
+ console.log('Event sent to bus', payload);
22
+ },
23
+ },
24
+ },
25
+ [],
26
+ ),
27
+ ]}
28
+ parameters={{
29
+ layout: 'fullscreen',
30
+ }}
31
+ />
32
+
33
+ # `PbQuestion` - Modal Link 101
34
+
35
+ ## Definition
36
+
37
+ It is possible to customize the component behaviour by defining properties in the provided `payload` property.
38
+
39
+ Here is a simple payload:
40
+
41
+ <Source language="json" code={JSON.stringify(DEFAULT_PAYLOAD, null, ' ')} />
42
+
43
+ where:
44
+
45
+ - `viewModel` is the question view model, it defines the question `label` and the answers component type, and if `forceBackButton` is set to true, will always display the back button
46
+ - `answers` is the list of answers for the question. They have a `code` to identify them and a `viewModel` to
47
+ inflate the component previously defined.
48
+
49
+ <Canvas>
50
+ <Story
51
+ name="101"
52
+ inline={false}
53
+ height="862px"
54
+ parameters={{ controls: { disable: true } }}
55
+ args={{ payload: DEFAULT_PAYLOAD, minHeight: 'auto' }}
56
+ >
57
+ {TemplateSandbox.bind({})}
58
+ </Story>
59
+ </Canvas>
@@ -1273,15 +1273,26 @@ $answers-apparition-duration: '0.5s';
1273
1273
 
1274
1274
  <style lang="scss">
1275
1275
  @import 'pb-variables';
1276
+ $responsive-breakpoint: 'm';
1276
1277
 
1277
1278
  .pb-question {
1278
1279
  &__dialog-help {
1279
1280
  &__title {
1280
- padding: $mu250 $mu250 $mu050 $mu250;
1281
+ @include set-font-scale('06', 'm');
1282
+ padding: $mu100 $mu250 $mu050 $mu250;
1283
+
1284
+ @include set-from-screen($responsive-breakpoint) {
1285
+ padding: $mu200 $mu250 $mu050 $mu250;
1286
+ }
1281
1287
 
1282
1288
  h2 {
1283
- @include set-font-scale('06', 'm');
1284
- margin-bottom: 0;
1289
+ @include set-font-scale('08', 'm');
1290
+ @include set-font-face('semi-bold');
1291
+ margin-bottom: $mu025;
1292
+ }
1293
+
1294
+ p {
1295
+ margin-top: 0;
1285
1296
  }
1286
1297
  }
1287
1298
 
@@ -0,0 +1,51 @@
1
+ {
2
+ "viewModel": {
3
+ "label": "Quel est votre revenu fiscal de référence annuel de votre foyer fiscal ?",
4
+ "subtitle": "Posez la question à votre propritétaire, cette information est utile pour le calcul des aides.",
5
+ "answersComponent": "PbCard"
6
+ },
7
+ "answers": {
8
+ "LOW_IDF_1": {
9
+ "code": "LOW",
10
+ "viewModel": {
11
+ "title": "0 - 20 593 €",
12
+ "borderColor": "#0FB5FC"
13
+ }
14
+ },
15
+ "MIDDLE_IDF_1": {
16
+ "code": "MIDDLE",
17
+ "viewModel": {
18
+ "title": "20 593 - 25 068 €",
19
+ "borderColor": "#FFDD2D"
20
+ }
21
+ },
22
+ "HIGH_IDF_1": {
23
+ "code": "HIGH",
24
+ "viewModel": {
25
+ "title": "25 068 - 38 184 €",
26
+ "borderColor": "#B073FF"
27
+ }
28
+ },
29
+ "VERYHIGH_IDF_1": {
30
+ "code": "VERY-HIGH",
31
+ "viewModel": {
32
+ "title": "Plus de 38 184 €",
33
+ "borderColor": "#FF8CF4"
34
+ }
35
+ }
36
+ },
37
+ "helpArea": [
38
+ {
39
+ "type": "link",
40
+ "label": "Voir l’aide pour trouver votre revenu fiscal",
41
+ "action": {
42
+ "type": "MODAL",
43
+ "viewModelDialog": {
44
+ "headerTitle": "Ou trouver votre revenu fiscal de référence ?",
45
+ "subTitle": "Sur votre dernier avis d’imposition disponible dans votre espace impots-gouv.fr",
46
+ "imgUrl": "https://storage.googleapis.com/project-booster-media/energyrenovation/reference_tax_income.png"
47
+ }
48
+ }
49
+ }
50
+ ]
51
+ }
@@ -383,12 +383,19 @@ $responsive-breakpoint: 'm';
383
383
  &__dialog-help {
384
384
  &__title {
385
385
  padding: $mu250 $mu250 0 $mu250;
386
- @include set-font-scale('06', 'm');
386
+
387
+ h2 {
388
+ @include set-font-scale('08', 'm');
389
+ }
387
390
  }
388
391
 
389
392
  &__body {
390
393
  padding: 0 $mu250;
391
- @include set-font-scale('06', 'm');
394
+
395
+ p {
396
+ @include set-font-scale('06', 'm');
397
+ }
398
+
392
399
  &__image {
393
400
  background-size: cover;
394
401
  padding: 120px 0;
@@ -9,8 +9,8 @@
9
9
  "label": "Comment faire des travaux de rénovation énergétique en tant que locataire ?",
10
10
  "action": {
11
11
  "viewModelDialog": {
12
- "headerTitle": "Votre travaux dans un appartement",
13
- "contentHtml": "Mon contenu de modal ici"
12
+ "headerTitle": "Les précautions avant d’installer une pompe à chaleur en appartement",
13
+ "contentHtml": "<p>Avant d'installer un pompe à chaleur air-eau dans un appartement, voici quelques précautions à prendre :</p><p>- informez-vous sur le <strong>système de chauffage</strong> de votre immeuble : est-il collectif ou individuel ?</p><p>- vérifiez si <strong>votre commune autorise l'installation</strong> de groupes extérieurs sur votre balcon ou façade dans le plan local d'urbanisme</p><p>- <strong>informez les voisins</strong> de votre projet, et notamment du bruit que peut générer le groupe extérieur</p>"
14
14
  }
15
15
  }
16
16
  },