project-booster-vue 9.0.3 → 9.0.6

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # project-booster-vue
2
2
 
3
- **project-booster-vue** is the [vue.js](https://vuejs.org) implementation of the Project Booster design system.
3
+ **project-booster-vue** is the [typescript / vue3](https://vuejs.org) implementation of the Project Booster components library.
4
4
 
5
5
  It is based on the [mozaic design system](https://mozaic.appspot.com/).
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "project-booster-vue",
3
- "version": "9.0.3",
3
+ "version": "9.0.6",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -217,7 +217,7 @@ export default defineComponent({
217
217
  try {
218
218
  await store.dispatch('projects/saveProjectForItem', {
219
219
  projectToSave,
220
- metaData: store.getters['metaData/metaData'](cookies),
220
+ metaData: store.getters['metaData/metaData'],
221
221
  });
222
222
  projectId = store.getters['projects/getCurrentProjectId'];
223
223
  } catch (err) {
@@ -180,7 +180,7 @@ export const mediaDocumentsUploadStoreOptions = {
180
180
  uploadFile.documentType ? uploadFile.documentType : 'ROOM_PHOTO',
181
181
  trackProgress,
182
182
  uploadFile.fileName,
183
- state.context.subType,
183
+ 'PLAN',
184
184
  );
185
185
  }
186
186
  const location = response.headers.location;
@@ -436,7 +436,7 @@ export const mediaDocumentsListStoreOptions = {
436
436
  commit('setMediaList', []);
437
437
  commit('setIsLoadingMedia', false);
438
438
  commit('setCurrentMediaPage', 0);
439
- commit('setHasStillMedia', true);
439
+ commit('setHasStillMedia', false);
440
440
  commit('setAddedMediaNumber', 0);
441
441
  commit('setMediaLoadError', null);
442
442
  },
@@ -487,7 +487,7 @@ export const mediaDocumentsListStoreOptions = {
487
487
  state.context.subType,
488
488
  );
489
489
  }
490
- commit('addMedia', media.results);
490
+ commit('addMedia', media.results ? media.results : []);
491
491
 
492
492
  if (media.total >= 30) {
493
493
  commit('setIsAddPhotoDisabled', true);
@@ -1,4 +1,3 @@
1
- import { getMetaDataFromCookies } from '../../services/metadata';
2
1
  import { ActionContext } from 'vuex';
3
2
  import { State } from '@/stores/state';
4
3
 
@@ -10,13 +9,14 @@ type MetaDataContext = ActionContext<MetaDataState, State>;
10
9
 
11
10
  export default {
12
11
  namespaced: true,
12
+
13
13
  state: {
14
14
  metaDataFromCookies: null,
15
15
  },
16
16
 
17
17
  getters: {
18
- metaData() {
19
- return (cookies: any) => getMetaDataFromCookies(cookies);
18
+ metaData(state: MetaDataState) {
19
+ return state.metaDataFromCookies;
20
20
  },
21
21
  },
22
22
 
@@ -1,33 +0,0 @@
1
- export function getMetaDataFromCookies(cookies: any) {
2
- let metaData = {
3
- userAgent: window.navigator.userAgent,
4
- viewPortHeightPx: window.innerHeight !== 0 ? window.innerHeight : null,
5
- viewPortWidthPx: window.innerWidth !== 0 ? window.innerWidth : null,
6
- };
7
-
8
- if (process.env.VUE_APP_BUILD_FOR_KOBI) {
9
- metaData = { ...metaData, ...getMetaDataFromKobiCookies(cookies) };
10
- }
11
- return metaData;
12
- }
13
-
14
- function getMetaDataFromKobiCookies(kobiCookies: any) {
15
- const userDoesConsentToTracking =
16
- kobiCookies.get('OptanonConsent') && kobiCookies.get('OptanonConsent').includes('C0002:1');
17
- if (userDoesConsentToTracking) {
18
- const metadata: Record<string, any> = {};
19
- const addIfNotNull = (name: string, cookieName: string) => {
20
- const value = kobiCookies.get(cookieName);
21
- if (value !== null && value !== undefined) {
22
- metadata[name] = value;
23
- }
24
- };
25
-
26
- addIfNotNull('googleAnalyticsClientId', '_ga');
27
- addIfNotNull('tagCommanderId', 'TCID');
28
- addIfNotNull('storeId', 'lmfr_store_id');
29
-
30
- return metadata;
31
- }
32
- return {};
33
- }