project-booster-vue 9.3.1 → 9.4.0

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.3.1",
3
+ "version": "9.4.0",
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.21",
85
- "@storybook/addon-essentials": "6.4.21",
84
+ "@storybook/addon-a11y": "6.4.22",
85
+ "@storybook/addon-essentials": "6.4.22",
86
86
  "@storybook/addon-knobs": "6.3.1",
87
- "@storybook/addon-links": "6.4.21",
87
+ "@storybook/addon-links": "6.4.22",
88
88
  "@storybook/addon-postcss": "2.0.0",
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",
89
+ "@storybook/addon-storyshots": "6.4.22",
90
+ "@storybook/addon-storyshots-puppeteer": "6.4.22",
91
+ "@storybook/addon-storysource": "6.4.22",
92
+ "@storybook/addons": "6.4.22",
93
+ "@storybook/builder-webpack5": "6.4.22",
94
+ "@storybook/manager-webpack5": "6.4.22",
95
+ "@storybook/source-loader": "6.4.22",
96
96
  "@storybook/storybook-deployer": "2.8.11",
97
- "@storybook/theming": "6.4.21",
98
- "@storybook/vue3": "6.4.21",
97
+ "@storybook/theming": "6.4.22",
98
+ "@storybook/vue3": "6.4.22",
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,7 +147,7 @@
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.8",
150
+ "eslint-plugin-storybook": "0.5.10",
151
151
  "eslint-plugin-vue": "7.11.1",
152
152
  "fluent-json-schema": "3.0.1",
153
153
  "husky": "6.0.0",
@@ -25,9 +25,14 @@
25
25
  "label": "Un plan d’architecte"
26
26
  },
27
27
  {
28
- "type": "PLAN",
29
- "subtype": "KITCHEN_DESIGNER_PLAN",
30
- "label": "Un plan d’un autre cuisiniste"
28
+ "type": "PHOTO",
29
+ "subtype": "ANY",
30
+ "label": "Une photo"
31
+ },
32
+ {
33
+ "type": "OTHER",
34
+ "subtype": "ANY",
35
+ "label": "Autre"
31
36
  }
32
37
  ]
33
38
  }
@@ -83,7 +83,17 @@
83
83
  </m-flex>
84
84
  <m-flex v-if="isDocumentsDisplayed" class="pb-project-hub__section" direction="column" full-width>
85
85
  <div class="pb-project-hub__section-header">
86
- <div class="pb-project-hub__section-title">{{ titleDocument }}</div>
86
+ <div class="pb-project-hub__section-title-container">
87
+ <div class="pb-project-hub__section-title">{{ titleDocument }}</div>
88
+ <pb-media-upload
89
+ v-if="displayedDocuments && displayedDocuments.length > 0"
90
+ storeModuleName="documents"
91
+ :payload="DOCUMENT_UPLOAD_PAYLOAD"
92
+ acceptedFileTypes="image jpeg, image png, image heif, image heic, image/heif-sequence, image/heic-sequence, application
93
+ pdf"
94
+ @media-uploaded="handleDocumentUploaded"
95
+ />
96
+ </div>
87
97
  </div>
88
98
  <div class="pb-project-hub__section-content">
89
99
  <m-flex
@@ -383,7 +393,15 @@
383
393
  </m-flex>
384
394
  <m-flex v-if="isMediaDisplayed" class="pb-project-hub__section" direction="column" full-width>
385
395
  <div class="pb-project-hub__section-header">
386
- <div class="pb-project-hub__section-title">{{ titlePhotoInspiration }}</div>
396
+ <div class="pb-project-hub__section-title-container">
397
+ <div class="pb-project-hub__section-title">{{ titlePhotoInspiration }}</div>
398
+ <pb-media-upload
399
+ v-if="displayedInspirations && displayedInspirations.length > 0"
400
+ storeModuleName="documents"
401
+ :payload="MEDIA_UPLOAD_PAYLOAD"
402
+ @media-uploaded="handleMediaUploaded"
403
+ />
404
+ </div>
387
405
  </div>
388
406
  <div class="pb-project-hub__section-content">
389
407
  <m-flex
@@ -789,6 +807,9 @@ import { Tool } from '@/types/pb/Tool';
789
807
  import { Configuration } from '@/types/pb/Configuration';
790
808
  import { Estimate } from '@/types/pb/Estimate';
791
809
  import { Task } from '@/types/pb/Task';
810
+ import PbMediaUpload from '@/components/media/upload/PbMediaUpload.vue';
811
+ import DOCUMENT_UPLOAD_PAYLOAD from '@/components/media/upload/document-upload-payload.json';
812
+ import MEDIA_UPLOAD_PAYLOAD from '@/components/media/upload/media-upload-payload.json';
792
813
 
793
814
  const BACK_ICON =
794
815
  'https://storage.googleapis.com/project-booster-media/mozaic-icons/svg/Navigation_Arrow_Arrow--Left_16px.svg';
@@ -830,6 +851,7 @@ export default defineComponent({
830
851
  name: 'PbProjectHub',
831
852
 
832
853
  components: {
854
+ PbMediaUpload,
833
855
  MAccordion,
834
856
  MButton,
835
857
  MContainer,
@@ -917,6 +939,8 @@ export default defineComponent({
917
939
  showMoreButtonAnimationDelay: 0,
918
940
  BACK_ICON,
919
941
  TASK_MODEL,
942
+ DOCUMENT_UPLOAD_PAYLOAD,
943
+ MEDIA_UPLOAD_PAYLOAD,
920
944
  displayCategoriesDialog: false,
921
945
  }),
922
946
 
@@ -1338,6 +1362,14 @@ export default defineComponent({
1338
1362
  behavior: 'smooth',
1339
1363
  });
1340
1364
  },
1365
+
1366
+ handleDocumentUploaded() {
1367
+ this.$store.dispatch('documents/refreshMediaList');
1368
+ },
1369
+
1370
+ handleMediaUploaded() {
1371
+ this.$store.dispatch('media/refreshMediaList');
1372
+ },
1341
1373
  },
1342
1374
  });
1343
1375
  </script>
@@ -1403,6 +1435,11 @@ $appear-duration: 100ms;
1403
1435
 
1404
1436
  &-header {
1405
1437
  padding-bottom: $mu150;
1438
+ width: 100%;
1439
+ }
1440
+
1441
+ &-title-container {
1442
+ display: flex;
1406
1443
  }
1407
1444
 
1408
1445
  &-title {
@@ -1410,6 +1447,7 @@ $appear-duration: 100ms;
1410
1447
  @include set-font-scale('07', 'm');
1411
1448
 
1412
1449
  color: $color-grey-800;
1450
+ flex-grow: 1;
1413
1451
  }
1414
1452
 
1415
1453
  &-subtitle {