@bimdata/bcf-components 6.5.1 → 6.5.3

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": "@bimdata/bcf-components",
3
- "version": "6.5.1",
3
+ "version": "6.5.3",
4
4
  "files": [
5
5
  "src",
6
6
  "vue3-plugin.js"
@@ -23,7 +23,7 @@
23
23
  "@semantic-release/changelog": "^6.0.3",
24
24
  "@semantic-release/commit-analyzer": "^13.0.1",
25
25
  "@semantic-release/git": "^10.0.1",
26
- "@semantic-release/github": "^11.0.1",
26
+ "@semantic-release/github": "^11.0.2",
27
27
  "@semantic-release/npm": "^12.0.1",
28
28
  "@semantic-release/release-notes-generator": "^14.0.3",
29
29
  "conventional-changelog-eslint": "^6.0.0",
@@ -44,6 +44,15 @@
44
44
  v-model="filters.statuses"
45
45
  />
46
46
 
47
+ <BIMDataSelect
48
+ width="100%"
49
+ :multi="true"
50
+ :label="$t('BcfComponents.BcfFilters.stageLabel')"
51
+ :nullLabel="$t('BcfComponents.BcfFilters.undefined')"
52
+ :options="stageOptions"
53
+ v-model="filters.stages"
54
+ />
55
+
47
56
  <div class="bcf-filters__container__date">
48
57
  <BIMDataDatePicker
49
58
  v-model="filters.startDate"
@@ -158,6 +167,10 @@ export default {
158
167
  getSelectOptions(props.topics.map((topic) => topic.topic_status))
159
168
  );
160
169
 
170
+ const stageOptions = computed(() =>
171
+ getSelectOptions(props.topics.map((topic) => topic.stage))
172
+ );
173
+
161
174
  const userOptions = computed(() =>
162
175
  getSelectOptions(props.topics.map((topic) => topic.assigned_to))
163
176
  );
@@ -195,6 +208,7 @@ export default {
195
208
  labelOptions,
196
209
  priorityOptions,
197
210
  statusOptions,
211
+ stageOptions,
198
212
  userOptions,
199
213
  // Methods
200
214
  close,
@@ -94,7 +94,7 @@
94
94
  </template>
95
95
 
96
96
  <script>
97
- import { onMounted, inject, ref, watch, onBeforeUnmount } from "vue";
97
+ import { onMounted, inject, ref, watch, onBeforeUnmount, shallowRef } from "vue";
98
98
  import service from "../../../service.js";
99
99
  import { getViewerOptions, getViewerViewpoint, highlightViewer, unhighlightViewer } from "../../../utils/viewer.js";
100
100
 
@@ -136,7 +136,7 @@ export default {
136
136
  const text = ref("");
137
137
  const viewpoint = ref(null);
138
138
  const viewerSelectVisible = ref(false);
139
- const viewerSelectOptions = ref([]);
139
+ const viewerSelectOptions = shallowRef([]);
140
140
 
141
141
  const loadComments = async () => {
142
142
  comments.value = await service.fetchTopicComments(props.project, props.topic);
@@ -3,6 +3,7 @@ import { computed, reactive } from "vue";
3
3
  const EMPTY_FILTERS = {
4
4
  priorities: [],
5
5
  statuses: [],
6
+ stages: [],
6
7
  users: [],
7
8
  creators: [],
8
9
  labels: [],
@@ -21,6 +22,9 @@ function useBcfFilter(topics) {
21
22
  if (filters.statuses.length > 0) {
22
23
  list = list.filter(t => filters.statuses.includes(t.topic_status));
23
24
  }
25
+ if (filters.stages.length > 0) {
26
+ list = list.filter(t => filters.stages.includes(t.stage));
27
+ }
24
28
  if (filters.users.length > 0) {
25
29
  list = list.filter(t => filters.users.includes(t.assigned_to));
26
30
  }
@@ -5,9 +5,10 @@
5
5
  "filtersTitle": "Filtres",
6
6
  "priorityLabel": "Priorité",
7
7
  "statusLabel": "Statut",
8
+ "stageLabel": "Phase",
8
9
  "assignedToLabel": "Assigné à",
9
10
  "creatorsLabel": "Créé par",
10
- "tagsLabel": "Tags",
11
+ "tagsLabel": "Tags",
11
12
  "resetButton": "Réinitialiser",
12
13
  "searchButton": "Rechercher",
13
14
  "undefined": "Non défini",
@@ -1,7 +1,9 @@
1
+ import { markRaw } from "vue";
2
+
1
3
  export function getViewerOptions($viewer) {
2
4
  return $viewer.globalContext.localContexts
3
5
  .filter(ctx => ctx.viewer && ctx.loadedModels.length > 0)
4
- .map((ctx, i) => ({ key: ctx.id, index: i, name: ctx.viewer.$plugin.name, context: ctx }));
6
+ .map((ctx, i) => ({ key: ctx.id, index: i, name: ctx.viewer.$plugin.name, context: markRaw(ctx) }));
5
7
  }
6
8
 
7
9
  export async function getViewerViewpoint(context) {