@bimdata/bcf-components 6.0.0-rc.9 → 6.0.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/README.md +0 -6
- package/package.json +15 -20
- package/src/components/bcf-filters/BcfFilters.scss +67 -0
- package/src/components/bcf-filters/BcfFilters.vue +228 -0
- package/src/components/bcf-settings/BcfSettings.scss +28 -0
- package/src/components/bcf-settings/BcfSettings.vue +117 -0
- package/src/components/bcf-settings/setting-card/SettingCard.scss +59 -0
- package/src/components/bcf-settings/setting-card/SettingCard.vue +140 -0
- package/src/components/bcf-settings/setting-card/SettingCardItem.scss +48 -0
- package/src/components/bcf-settings/setting-card/SettingCardItem.vue +151 -0
- package/src/components/bcf-statistics/BcfStatistics.scss +56 -0
- package/src/components/bcf-statistics/BcfStatistics.vue +112 -0
- package/src/components/bcf-topic-card/BcfTopicCard.scss +96 -0
- package/src/components/bcf-topic-card/BcfTopicCard.vue +150 -0
- package/src/components/bcf-topic-card/BcfTopicDefaultImage.vue +90 -0
- package/src/components/bcf-topic-creation-card/BcfTopicCreationCard.scss +15 -0
- package/src/components/bcf-topic-creation-card/BcfTopicCreationCard.vue +37 -0
- package/src/components/bcf-topic-creation-card/BcfTopicCreationCardImage.vue +55 -0
- package/src/components/bcf-topic-form/BcfTopicForm.scss +124 -0
- package/src/components/bcf-topic-form/BcfTopicForm.vue +541 -0
- package/src/components/bcf-topic-form/bcf-topic-images/BcfTopicImages.scss +88 -0
- package/src/components/bcf-topic-form/bcf-topic-images/BcfTopicImages.vue +101 -0
- package/src/components/bcf-topic-form/bcf-topic-snapshots/BcfTopicSnapshots.scss +50 -0
- package/src/components/bcf-topic-form/bcf-topic-snapshots/BcfTopicSnapshots.vue +71 -0
- package/src/components/bcf-topic-form/bcf-topic-snapshots-actions/BcfTopicSnapshotsActions.scss +9 -0
- package/src/components/bcf-topic-form/bcf-topic-snapshots-actions/BcfTopicSnapshotsActions.vue +69 -0
- package/src/components/bcf-topic-overview/BcfTopicOverview.scss +94 -0
- package/src/components/bcf-topic-overview/BcfTopicOverview.vue +350 -0
- package/src/components/bcf-topic-overview/bcf-topic-comments/BcfTopicComments.scss +39 -0
- package/src/components/bcf-topic-overview/bcf-topic-comments/BcfTopicComments.vue +268 -0
- package/src/components/bcf-topic-overview/bcf-topic-comments/topic-comment/TopicComment.scss +79 -0
- package/src/components/bcf-topic-overview/bcf-topic-comments/topic-comment/TopicComment.vue +357 -0
- package/src/components/bcf-topic-overview/bcf-topic-viewpoints/BcfTopicViewpoints.scss +73 -0
- package/src/components/bcf-topic-overview/bcf-topic-viewpoints/BcfTopicViewpoints.vue +84 -0
- package/src/components/bcf-topics-table/BcfTopicsTable.vue +148 -0
- package/src/components/bcf-topics-table/bcf-topic-actions-cell/BcfTopicActionsCell.vue +43 -0
- package/src/components/bcf-topics-table/bcf-topic-index-cell/BcfTopicIndexCell.vue +55 -0
- package/src/components/bcf-topics-table/bcf-topic-priority-cell/BcfTopicPriorityCell.vue +47 -0
- package/src/components/bcf-topics-table/bcf-topic-status-cell/BcfTopicStatusCell.vue +52 -0
- package/src/components/bcf-topics-table/columns.js +38 -0
- package/src/components/user-avatar/UserAvatar.scss +30 -0
- package/src/components/user-avatar/UserAvatar.vue +66 -0
- package/src/composables/filter.js +58 -0
- package/src/composables/search.js +42 -0
- package/src/composables/sort.js +64 -0
- package/src/config.js +87 -0
- package/{dist → src}/i18n/lang/en.json +3 -1
- package/{dist → src}/i18n/lang/fr.json +5 -1
- package/src/index.js +59 -0
- package/src/service.js +206 -0
- package/src/utils/browser.js +12 -0
- package/src/utils/download.js +15 -0
- package/src/utils/extensions.js +14 -0
- package/src/utils/topic.js +23 -0
- package/src/utils/viewer.js +21 -0
- package/src/utils/viewpoints.js +28 -0
- package/vue3-plugin.js +4 -5
- package/dist/bcf-components.mjs +0 -10311
- package/dist/style.css +0 -1
- /package/{dist → src}/i18n/index.js +0 -0
- /package/{dist → src}/i18n/lang/de.json +0 -0
- /package/{dist → src}/i18n/lang/es.json +0 -0
- /package/{dist → src}/i18n/lang/it.json +0 -0
- /package/{dist → src}/i18n/lang/nl.json +0 -0
- /package/{dist → src}/i18n/lang/no.json +0 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="bcf-topic-images">
|
|
3
|
+
<template v-if="viewpoints.length > 0">
|
|
4
|
+
<div class="bcf-topic-images__images">
|
|
5
|
+
<div
|
|
6
|
+
class="image-preview"
|
|
7
|
+
:class="{ single: viewpoints.length === 1 }"
|
|
8
|
+
v-for="(viewpoint, i) in viewpoints.slice(0, 4)"
|
|
9
|
+
:key="viewpoint.guid || i"
|
|
10
|
+
>
|
|
11
|
+
<img v-if="viewpoint.snapshot.snapshot_data" :src="viewpoint.snapshot.snapshot_data" />
|
|
12
|
+
<BIMDataButton class="btn-delete" fill rounded icon @click="$emit('delete-viewpoint', viewpoint)">
|
|
13
|
+
<BIMDataIconDelete size="xs" fill color="high" />
|
|
14
|
+
</BIMDataButton>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
<BIMDataButton
|
|
19
|
+
:disabled="viewpoints.length >= 4"
|
|
20
|
+
class="btn-upload"
|
|
21
|
+
width="100%"
|
|
22
|
+
color="primary"
|
|
23
|
+
fill
|
|
24
|
+
radius
|
|
25
|
+
>
|
|
26
|
+
<label for="files">
|
|
27
|
+
<BIMDataIconCamera size="xs" margin="0 6px 0 0" />
|
|
28
|
+
{{ $t("BcfComponents.BcfTopicForm.addPictureButton") }}
|
|
29
|
+
</label>
|
|
30
|
+
<input
|
|
31
|
+
:disabled="viewpoints.length >= 4"
|
|
32
|
+
hidden
|
|
33
|
+
id="files"
|
|
34
|
+
type="file"
|
|
35
|
+
multiple
|
|
36
|
+
accept="image/png, image/jpeg"
|
|
37
|
+
@change="$emit('upload-viewpoint', $event)"
|
|
38
|
+
/>
|
|
39
|
+
</BIMDataButton>
|
|
40
|
+
</template>
|
|
41
|
+
|
|
42
|
+
<template v-else>
|
|
43
|
+
<div class="bcf-topic-images__upload">
|
|
44
|
+
<span class="icon">
|
|
45
|
+
<BIMDataIconUnarchive size="m" />
|
|
46
|
+
</span>
|
|
47
|
+
<BIMDataButton class="btn-upload" color="primary" outline radius>
|
|
48
|
+
<label v-if="!isTabletOrMobile" for="files">
|
|
49
|
+
{{ $t("BcfComponents.BcfTopicForm.dragDropImageText") }}
|
|
50
|
+
</label>
|
|
51
|
+
<label v-else for="files">
|
|
52
|
+
{{ $t("BcfComponents.BcfTopicForm.dragDropImageTextTablet") }}
|
|
53
|
+
</label>
|
|
54
|
+
<input
|
|
55
|
+
hidden
|
|
56
|
+
id="files"
|
|
57
|
+
type="file"
|
|
58
|
+
multiple
|
|
59
|
+
accept="image/png, image/jpeg"
|
|
60
|
+
@change="$emit('upload-viewpoint', $event)"
|
|
61
|
+
/>
|
|
62
|
+
</BIMDataButton>
|
|
63
|
+
</div>
|
|
64
|
+
</template>
|
|
65
|
+
</div>
|
|
66
|
+
</template>
|
|
67
|
+
|
|
68
|
+
<script>
|
|
69
|
+
import { isTabletOrMobile } from "../../../utils/browser.js";
|
|
70
|
+
// Components
|
|
71
|
+
import BIMDataButton from "@bimdata/design-system/src/BIMDataComponents/BIMDataButton/BIMDataButton.vue";
|
|
72
|
+
import {
|
|
73
|
+
BIMDataIconDelete,
|
|
74
|
+
BIMDataIconCamera,
|
|
75
|
+
BIMDataIconUnarchive,
|
|
76
|
+
} from "@bimdata/design-system/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/index.js";
|
|
77
|
+
|
|
78
|
+
export default {
|
|
79
|
+
components: {
|
|
80
|
+
BIMDataButton,
|
|
81
|
+
BIMDataIconDelete,
|
|
82
|
+
BIMDataIconCamera,
|
|
83
|
+
BIMDataIconUnarchive,
|
|
84
|
+
},
|
|
85
|
+
props: {
|
|
86
|
+
viewpoints: {
|
|
87
|
+
type: Array,
|
|
88
|
+
default: () => [],
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
emits: ["upload-viewpoint", "delete-viewpoint"],
|
|
92
|
+
setup() {
|
|
93
|
+
return {
|
|
94
|
+
// Methods
|
|
95
|
+
isTabletOrMobile,
|
|
96
|
+
};
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
</script>
|
|
100
|
+
|
|
101
|
+
<style scoped lang="scss" src="./BcfTopicImages.scss"></style>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
.bcf-topic-snapshots {
|
|
2
|
+
&__snapshots {
|
|
3
|
+
width: 100%;
|
|
4
|
+
min-height: 180px;
|
|
5
|
+
max-height: 262px;
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-wrap: wrap;
|
|
8
|
+
gap: 10px;
|
|
9
|
+
|
|
10
|
+
.snapshot-preview {
|
|
11
|
+
position: relative;
|
|
12
|
+
|
|
13
|
+
img {
|
|
14
|
+
width: 100%;
|
|
15
|
+
height: 100%;
|
|
16
|
+
object-fit: cover;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.btn-delete {
|
|
20
|
+
position: absolute;
|
|
21
|
+
top: calc(50% - (32px / 2));
|
|
22
|
+
left: calc(50% - (32px / 2));
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&:first-child {
|
|
26
|
+
width: 100%;
|
|
27
|
+
height: 180px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&:not(:first-child) {
|
|
31
|
+
width: 30%;
|
|
32
|
+
height: 72px;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&__create {
|
|
38
|
+
width: 100%;
|
|
39
|
+
height: 180px;
|
|
40
|
+
min-height: 180px;
|
|
41
|
+
display: flex;
|
|
42
|
+
flex-direction: column;
|
|
43
|
+
justify-content: center;
|
|
44
|
+
align-items: center;
|
|
45
|
+
border: 2px dashed var(--color-silver);
|
|
46
|
+
label {
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="bcf-topic-snapshots">
|
|
3
|
+
<template v-if="viewpoints.length > 0">
|
|
4
|
+
<div class="bcf-topic-snapshots__snapshots">
|
|
5
|
+
<div
|
|
6
|
+
class="snapshot-preview"
|
|
7
|
+
:class="{ single: viewpoints.length === 1 }"
|
|
8
|
+
v-for="(viewpoint, i) in viewpoints.slice(0, 4)"
|
|
9
|
+
:key="viewpoint.guid || i"
|
|
10
|
+
>
|
|
11
|
+
<img v-if="viewpoint.snapshot.snapshot_data" :src="viewpoint.snapshot.snapshot_data" />
|
|
12
|
+
<BIMDataButton class="btn-delete" fill rounded icon @click="$emit('delete-viewpoint', viewpoint)">
|
|
13
|
+
<BIMDataIconDelete size="xs" fill color="high" />
|
|
14
|
+
</BIMDataButton>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<template v-else>
|
|
20
|
+
<div class="bcf-topic-snapshots__create">
|
|
21
|
+
<BIMDataButton color="primary" fill radius @click="$emit('create-viewpoint')">
|
|
22
|
+
<BIMDataIconCamera size="s" margin="0 6px 0 0" />
|
|
23
|
+
<span>{{ $t("BcfComponents.BcfTopicForm.takeSnapshot") }}</span>
|
|
24
|
+
</BIMDataButton>
|
|
25
|
+
<BIMDataButton color="primary" outline radius class="m-t-12">
|
|
26
|
+
<label for="files" class="flex items-center">
|
|
27
|
+
<BIMDataIconUnarchive fill color="default" size="s" margin="0 6px 0 0" />
|
|
28
|
+
<span>{{ $t("BcfComponents.BcfTopicForm.importFile") }}</span>
|
|
29
|
+
</label>
|
|
30
|
+
<input
|
|
31
|
+
:disabled="viewpoints.length >= 4"
|
|
32
|
+
hidden
|
|
33
|
+
id="files"
|
|
34
|
+
type="file"
|
|
35
|
+
multiple
|
|
36
|
+
accept="image/png, image/jpeg"
|
|
37
|
+
@change="$emit('upload-viewpoint', $event)"
|
|
38
|
+
/>
|
|
39
|
+
</BIMDataButton>
|
|
40
|
+
</div>
|
|
41
|
+
</template>
|
|
42
|
+
</div>
|
|
43
|
+
</template>
|
|
44
|
+
|
|
45
|
+
<script>
|
|
46
|
+
import BcfTopicSnapshotsActions from "../bcf-topic-snapshots-actions/BcfTopicSnapshotsActions.vue";
|
|
47
|
+
// Components
|
|
48
|
+
import BIMDataButton from "@bimdata/design-system/src/BIMDataComponents/BIMDataButton/BIMDataButton.vue";
|
|
49
|
+
import {
|
|
50
|
+
BIMDataIconDelete,
|
|
51
|
+
BIMDataIconCamera,
|
|
52
|
+
} from "@bimdata/design-system/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/index.js";
|
|
53
|
+
|
|
54
|
+
export default {
|
|
55
|
+
components: {
|
|
56
|
+
BcfTopicSnapshotsActions,
|
|
57
|
+
BIMDataButton,
|
|
58
|
+
BIMDataIconDelete,
|
|
59
|
+
BIMDataIconCamera,
|
|
60
|
+
},
|
|
61
|
+
props: {
|
|
62
|
+
viewpoints: {
|
|
63
|
+
type: Array,
|
|
64
|
+
default: () => [],
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
emits: ["create-viewpoint", "upload-viewpoint", "delete-viewpoint"],
|
|
68
|
+
};
|
|
69
|
+
</script>
|
|
70
|
+
|
|
71
|
+
<style scoped lang="scss" src="./BcfTopicSnapshots.scss"></style>
|
package/src/components/bcf-topic-form/bcf-topic-snapshots-actions/BcfTopicSnapshotsActions.vue
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="bcf-topic-snapshots-actions flex"
|
|
4
|
+
>
|
|
5
|
+
<BIMDataTooltip
|
|
6
|
+
:disabled="snapshotedViewpoints.length > 0"
|
|
7
|
+
:text="$t('BcfComponents.BcfTopicForm.takeSnapshot')"
|
|
8
|
+
color="primary"
|
|
9
|
+
position="right"
|
|
10
|
+
>
|
|
11
|
+
<BIMDataButton
|
|
12
|
+
color="default"
|
|
13
|
+
ghost
|
|
14
|
+
rounded
|
|
15
|
+
icon
|
|
16
|
+
@click="$emit('create-viewpoint')"
|
|
17
|
+
:disabled="snapshotedViewpoints.length > 0"
|
|
18
|
+
>
|
|
19
|
+
<BIMDataIconCamera size="s" />
|
|
20
|
+
</BIMDataButton>
|
|
21
|
+
</BIMDataTooltip>
|
|
22
|
+
<BIMDataTooltip
|
|
23
|
+
:text="$t('BcfComponents.BcfTopicForm.importFile')"
|
|
24
|
+
color="primary"
|
|
25
|
+
position="right"
|
|
26
|
+
>
|
|
27
|
+
<BIMDataButton color="default" ghost rounded icon >
|
|
28
|
+
<label for="files" class="flex items-center">
|
|
29
|
+
<BIMDataIconUnarchive fill color="default" size="s" />
|
|
30
|
+
</label>
|
|
31
|
+
<input
|
|
32
|
+
hidden
|
|
33
|
+
id="files"
|
|
34
|
+
type="file"
|
|
35
|
+
multiple
|
|
36
|
+
accept="image/png, image/jpeg"
|
|
37
|
+
@change="$emit('upload-viewpoint', $event)"
|
|
38
|
+
/>
|
|
39
|
+
</BIMDataButton>
|
|
40
|
+
</BIMDataTooltip>
|
|
41
|
+
</div>
|
|
42
|
+
</template>
|
|
43
|
+
|
|
44
|
+
<script>
|
|
45
|
+
import { computed } from "vue";
|
|
46
|
+
|
|
47
|
+
export default {
|
|
48
|
+
props: {
|
|
49
|
+
viewpoints: {
|
|
50
|
+
type: Array,
|
|
51
|
+
default: () => [],
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
emits: ["create-viewpoint", "upload-viewpoint"],
|
|
55
|
+
setup(props) {
|
|
56
|
+
|
|
57
|
+
// Computed filtering viewpoints on isUpload = false
|
|
58
|
+
const snapshotedViewpoints = computed(() =>
|
|
59
|
+
props.viewpoints.filter((viewpoint) => !viewpoint.isUpload)
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
return {
|
|
63
|
+
snapshotedViewpoints,
|
|
64
|
+
};
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
</script>
|
|
68
|
+
|
|
69
|
+
<style scoped lang="scss" src="./BcfTopicSnapshotsActions.scss"></style>
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
.bcf-topic-overview {
|
|
2
|
+
height: 100%;
|
|
3
|
+
font-size: 12px;
|
|
4
|
+
|
|
5
|
+
&__header {
|
|
6
|
+
height: 32px;
|
|
7
|
+
padding: 0 calc(var(--spacing-unit) / 2);
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
gap: calc(var(--spacing-unit) / 3);
|
|
11
|
+
|
|
12
|
+
&__title {
|
|
13
|
+
flex-grow: 1;
|
|
14
|
+
font-size: 14px;
|
|
15
|
+
font-weight: bold;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&__actions {
|
|
19
|
+
display: flex;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
align-items: center;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&__content {
|
|
26
|
+
height: calc(100% - 32px);
|
|
27
|
+
padding: var(--spacing-unit) calc(var(--spacing-unit) / 2);
|
|
28
|
+
overflow: auto;
|
|
29
|
+
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-direction: column;
|
|
32
|
+
gap: var(--spacing-unit);
|
|
33
|
+
|
|
34
|
+
&__head {
|
|
35
|
+
height: 27px;
|
|
36
|
+
display: flex;
|
|
37
|
+
justify-content: space-between;
|
|
38
|
+
align-items: center;
|
|
39
|
+
|
|
40
|
+
&__index,
|
|
41
|
+
&__date {
|
|
42
|
+
height: 100%;
|
|
43
|
+
padding: calc(var(--spacing-unit) / 2);
|
|
44
|
+
display: flex;
|
|
45
|
+
justify-content: center;
|
|
46
|
+
align-items: center;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&__index {
|
|
50
|
+
min-width: 50px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&__date {
|
|
54
|
+
min-width: 100px;
|
|
55
|
+
background-color: var(--color-silver-light);
|
|
56
|
+
color: var(--color-primary);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&__card {
|
|
61
|
+
padding: var(--spacing-unit);
|
|
62
|
+
box-shadow: var(--box-shadow);
|
|
63
|
+
line-height: 1.5;
|
|
64
|
+
|
|
65
|
+
.title {
|
|
66
|
+
display: flex;
|
|
67
|
+
align-items: center;
|
|
68
|
+
gap: calc(var(--spacing-unit) / 2);
|
|
69
|
+
margin-bottom: var(--spacing-unit);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.line {
|
|
73
|
+
.label {
|
|
74
|
+
margin-right: 4px;
|
|
75
|
+
font-weight: bold;
|
|
76
|
+
color: var(--color-primary);
|
|
77
|
+
|
|
78
|
+
&::after {
|
|
79
|
+
content: ":";
|
|
80
|
+
padding: 0 1px;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.value {
|
|
85
|
+
color: var(--color-granite);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.delete-modal {
|
|
92
|
+
z-index: 10;
|
|
93
|
+
}
|
|
94
|
+
}
|