project-booster-vue 9.14.2 → 9.16.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.
Files changed (11) hide show
  1. package/package.json +1 -1
  2. package/src/components/configurations/list/PbConfigurationsList.vue +8 -0
  3. package/src/components/configurations/section/PbConfigurationsSection.vue +11 -0
  4. package/src/components/projects/project-hub/PbProjectHub.vue +2 -2
  5. package/src/components/projects/project-hub/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-projects-pb-project-hub-/360/237/246/240-features-planner-showcase-1-snap.png +0 -0
  6. package/src/components/projects/project-hub/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-projects-pb-project-hub-/360/237/246/240-features-planner-showcase-empty-state-1-snap.png +0 -0
  7. package/src/components/projects/projects/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-projects-pb-projects-/360/237/246/240-showcase-autoscroll-to-estimates-1-snap.png +0 -0
  8. package/src/components/question/PbQuestion.vue +98 -0
  9. package/src/components/question/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-scenario-questions-pb-question-/360/237/246/240-features-question-101-101-1-snap.png +0 -0
  10. package/src/components/question/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-scenario-questions-pb-question-/360/237/246/240-features-question-custom-back-button-hide-back-button-1-snap.png +0 -0
  11. package/src/components/question/default-payload.json +6 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "project-booster-vue",
3
- "version": "9.14.2",
3
+ "version": "9.16.1",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -34,6 +34,7 @@
34
34
  class="pb-configurations-list__card"
35
35
  :flag-label="configuration.type"
36
36
  :hero="configuration.label"
37
+ :flattened="readOnly"
37
38
  :title="
38
39
  configuration.prices && configuration.prices['20.0'] !== undefined
39
40
  ? `${configuration.prices['20.0']}€`
@@ -126,6 +127,13 @@ export default defineComponent({
126
127
  type: String,
127
128
  default: '1of3',
128
129
  },
130
+ /**
131
+ * Indicates whether the UI is read only (Collaborators mode)
132
+ */
133
+ readOnly: {
134
+ type: Boolean,
135
+ default: false,
136
+ },
129
137
  },
130
138
 
131
139
  data: () => ({
@@ -17,6 +17,7 @@
17
17
  :configurations="configurations"
18
18
  :is-loading-configurations="isLoadingConfigurations"
19
19
  :show-load-more-button="hasStillConfigurations"
20
+ :readOnly="readOnly"
20
21
  @configuration-click="handleConfigurationClickEvent"
21
22
  @load-more="handleLoadMoreEvent"
22
23
  @refresh-configuration="handleRefreshConfigurationEvent"
@@ -74,6 +75,16 @@ export default defineComponent({
74
75
  PbConfigurationsList,
75
76
  },
76
77
 
78
+ props: {
79
+ /**
80
+ * Indicates whether the UI is read only (Collaborators mode)
81
+ */
82
+ readOnly: {
83
+ type: Boolean,
84
+ default: false,
85
+ },
86
+ },
87
+
77
88
  data: () => ({
78
89
  CONFIGURATION_ANIMATION_DURATION,
79
90
  }),
@@ -291,7 +291,7 @@
291
291
  </m-accordion>
292
292
  </div>
293
293
  <div class="pb-project-hub__section-content">
294
- <pb-configurations-section @configuration-click="handleConfigurationClickEvent" />
294
+ <pb-configurations-section @configuration-click="handleConfigurationClickEvent" :readOnly="readOnly" />
295
295
  </div>
296
296
  </m-flex>
297
297
  <m-flex
@@ -908,7 +908,7 @@ export default defineComponent({
908
908
  default: () => PROJECT_LOAD_PAYLOAD,
909
909
  },
910
910
  /**
911
- * Indicates whether the UI is read only
911
+ * Indicates whether the UI is read only (Collaborators mode)
912
912
  */
913
913
  readOnly: {
914
914
  type: Boolean,
@@ -30,6 +30,25 @@
30
30
  @click="displayVideoGuide('')"
31
31
  />
32
32
  </div>
33
+ <div v-if="payload.viewModel.videoBlock" class="pb-question__video-block-container">
34
+ <div v-if="payload.viewModel.videoBlock" class="pb-question__video-block">
35
+ <div class="pb-question__video-block-image-container">
36
+ <m-image
37
+ class="pb-question__video-block-image"
38
+ :src="decorate(payload.viewModel.videoBlock.image)"
39
+ cover
40
+ />
41
+ </div>
42
+ <div class="pb-question__video-block-buttons-container">
43
+ <m-button
44
+ :label="decorate(payload.viewModel.videoBlock.buttonLabel)"
45
+ :left-icon="decorate(payload.viewModel.videoBlock.icon)"
46
+ theme="bordered-neutral"
47
+ @click="displayVideoGuide('')"
48
+ />
49
+ </div>
50
+ </div>
51
+ </div>
33
52
  </div>
34
53
  <m-container fluid class="pb-question__answers-container">
35
54
  <m-flexy class="pb-question__answers-container-flexy">
@@ -783,6 +802,85 @@ $answers-apparition-duration: '0.5s';
783
802
  }
784
803
  }
785
804
 
805
+ &__video-block {
806
+ @include set-border-radius('m');
807
+
808
+ border: 1px solid $color-grey-300;
809
+ display: flex;
810
+ flex-direction: column;
811
+ margin-top: $mu200;
812
+ max-height: 112px;
813
+ overflow: hidden;
814
+ position: relative;
815
+ width: 100%;
816
+
817
+ @include set-from-screen('s') {
818
+ flex-direction: column;
819
+ width: 100%;
820
+ }
821
+
822
+ @include set-from-screen('m') {
823
+ flex-direction: row;
824
+ max-height: unset;
825
+ width: 80%;
826
+ }
827
+
828
+ @include set-from-screen('l') {
829
+ flex-direction: row;
830
+ width: 75%;
831
+ }
832
+
833
+ @include set-from-screen('xl') {
834
+ flex-direction: row;
835
+ max-width: 768px;
836
+ width: 50%;
837
+ }
838
+
839
+ &-container {
840
+ align-items: center;
841
+ display: flex;
842
+ justify-content: center;
843
+ }
844
+
845
+ &-image-container {
846
+ width: 100%;
847
+
848
+ @include set-from-screen('s') {
849
+ width: 100%;
850
+ }
851
+
852
+ @include set-from-screen('m') {
853
+ width: 33%;
854
+ }
855
+ }
856
+
857
+ &-buttons-container {
858
+ align-items: center;
859
+ display: flex;
860
+ flex-grow: 1;
861
+ justify-content: center;
862
+ padding: $mu200 $mu100;
863
+ position: absolute;
864
+ width: 100%;
865
+
866
+ @include set-from-screen('s') {
867
+ padding: $mu200 $mu100;
868
+ width: 100%;
869
+ }
870
+
871
+ @include set-from-screen('m') {
872
+ padding: 0 $mu200;
873
+ position: static;
874
+ width: 66%;
875
+ }
876
+
877
+ @include set-from-screen('xl') {
878
+ padding: 0 $mu200;
879
+ width: 66%;
880
+ }
881
+ }
882
+ }
883
+
786
884
  &__answers-container {
787
885
  margin: 0 auto;
788
886
  max-width: 100%;
@@ -3,7 +3,12 @@
3
3
  "hero": "The question hero",
4
4
  "label": "The question title",
5
5
  "subtitle": "The question subtitle",
6
- "answersComponent": "PbCard"
6
+ "answersComponent": "PbCard",
7
+ "videoBlock": {
8
+ "buttonLabel": "Voir le guide en vidéo (1min)",
9
+ "icon": "https://storage.googleapis.com/project-booster-media/mozaic-icons/svg/Media_Play_24px.svg",
10
+ "image": "https://images.unsplash.com/photo-1577106777018-886191d770b2?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1868&q=80"
11
+ }
7
12
  },
8
13
  "answers": {
9
14
  "ANSWER-1": {