@bimdata/design-system 2.0.0-rc.20 → 2.0.0-rc.22

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 (26) hide show
  1. package/package.json +1 -2
  2. package/src/BIMDataComponents/index.js +0 -3
  3. package/src/assets/css/elements/_submenu.css +8 -6
  4. package/vue3-plugin.js +0 -11
  5. package/src/BIMDataComponents/BIMDataModelPreview/BIMDataModelPreview.vue +0 -58
  6. package/src/BIMDataComponents/BIMDataModelPreview/Preview2D.vue +0 -116
  7. package/src/BIMDataComponents/BIMDataModelPreview/Preview3D.vue +0 -75
  8. package/src/BIMDataComponents/BIMDataPDFViewer/BIMDataPDFViewer.vue +0 -115
  9. package/src/BIMDataComponents/BIMDataSafeZoneModal/BIMDataSafeZoneModal.vue +0 -37
  10. package/src/BIMDataComponents/BIMDataSafeZoneModal/_BIMDataSafeZoneModal.scss +0 -39
  11. package/src/BIMDataSmartComponents/BIMDataFileManager/BIMDataFileManager.scss +0 -123
  12. package/src/BIMDataSmartComponents/BIMDataFileManager/BIMDataFileManager.vue +0 -636
  13. package/src/BIMDataSmartComponents/BIMDataFileManager/components/FileCard.vue +0 -433
  14. package/src/BIMDataSmartComponents/BIMDataFileManager/components/MultiLineTextBox/MultiLineTextBox.vue +0 -151
  15. package/src/BIMDataSmartComponents/BIMDataFileManager/components/MultiLineTextBox/Tooltip.vue +0 -46
  16. package/src/BIMDataSmartComponents/BIMDataFileManager/components/PdfPageSelector.vue +0 -161
  17. package/src/BIMDataSmartComponents/BIMDataFileManager/components/PieProgressSpinner.vue +0 -73
  18. package/src/BIMDataSmartComponents/BIMDataFileManager/components/UploadFileButton.vue +0 -72
  19. package/src/BIMDataSmartComponents/BIMDataFileManager/components/modals/DeleteModal.vue +0 -184
  20. package/src/BIMDataSmartComponents/BIMDataFileManager/components/modals/RenameModal.vue +0 -186
  21. package/src/BIMDataSmartComponents/BIMDataFileManager/components/newFolder/NewFolderButton.vue +0 -117
  22. package/src/BIMDataSmartComponents/BIMDataFileManager/components/newFolder/NewFolderForm.vue +0 -165
  23. package/src/BIMDataSmartComponents/BIMDataFileManager/i18n.js +0 -141
  24. package/src/BIMDataSmartComponents/BIMDataFileManager/utils/files.js +0 -89
  25. package/src/BIMDataSmartComponents/BIMDataFileManager/utils/flattenTree.js +0 -16
  26. package/src/BIMDataSmartComponents/index.js +0 -10
@@ -1,161 +0,0 @@
1
- <template>
2
- <div class="pdf-page-selector">
3
- <div class="head">
4
- <BIMDataButton ghost radius @click="$emit('close')">
5
- <BIMDataIcon name="arrow" size="xxs" />
6
- <span style="margin-left: 6px">
7
- {{ $translate("back") }}
8
- </span>
9
- </BIMDataButton>
10
- <span class="title">
11
- <BIMDataIcon name="filePdfPolychrome" size="m" margin="0 6px 0 0" />
12
- <BIMDataTextbox :text="model.name" />
13
- </span>
14
- <BIMDataButton ghost rounded icon @click="$emit('close')">
15
- <BIMDataIcon name="close" size="xxs" />
16
- </BIMDataButton>
17
- </div>
18
- <div class="body">
19
- <BIMDataResponsiveGrid
20
- style="width: 100%"
21
- itemWidth="157px"
22
- rowGap="6px"
23
- columnGap="6px"
24
- >
25
- <div
26
- v-for="page of pages"
27
- :key="page.id"
28
- class="pdf-page"
29
- :class="{ selected: selectedPage && selectedPage.id === page.id }"
30
- @click="
31
- selectedPage =
32
- selectedPage && selectedPage.id === page.id ? null : page
33
- "
34
- >
35
- <div class="pdf-page__img">
36
- <template v-if="page.map_file">
37
- <img :src="page.map_file" :alt="`page ${page.page_number}`" />
38
- </template>
39
- <template v-else>
40
- <BIMDataIcon name="filePdfPolychrome" size="l" />
41
- </template>
42
- </div>
43
- <div class="pdf-page__num">
44
- {{ page.page_number }}
45
- </div>
46
- </div>
47
- </BIMDataResponsiveGrid>
48
- </div>
49
- <div class="foot">
50
- <BIMDataButton
51
- width="100%"
52
- color="primary"
53
- fill
54
- radius
55
- @click="$emit('select', selectedPage)"
56
- >
57
- {{ $translate("validate") }}
58
- </BIMDataButton>
59
- </div>
60
- </div>
61
- </template>
62
-
63
- <script>
64
- // Components
65
- import BIMDataButton from "../../../BIMDataComponents/BIMDataButton/BIMDataButton.vue";
66
- import BIMDataIcon from "../../../BIMDataComponents/BIMDataIcon/BIMDataIcon.vue";
67
- import BIMDataResponsiveGrid from "../../../BIMDataComponents/BIMDataResponsiveGrid/BIMDataResponsiveGrid.vue";
68
- import BIMDataTextbox from "../../../BIMDataComponents/BIMDataTextbox/BIMDataTextbox.vue";
69
-
70
- export default {
71
- components: {
72
- BIMDataButton,
73
- BIMDataIcon,
74
- BIMDataResponsiveGrid,
75
- BIMDataTextbox,
76
- },
77
- inject: ["$translate"],
78
- props: {
79
- model: {
80
- type: Object,
81
- required: true,
82
- },
83
- },
84
- emits: ["select", "close"],
85
- data() {
86
- return {
87
- selectedPage: null,
88
- };
89
- },
90
- computed: {
91
- pages() {
92
- return [this.model].concat(this.model.children ?? []);
93
- },
94
- },
95
- };
96
- </script>
97
-
98
- <style scoped lang="scss">
99
- .pdf-page-selector {
100
- width: 100%;
101
- height: 100%;
102
- padding: var(--spacing-unit);
103
- background-color: var(--color-white);
104
- display: flex;
105
- flex-direction: column;
106
-
107
- .head {
108
- display: flex;
109
- justify-content: space-between;
110
- align-items: center;
111
- gap: var(--spacing-unit);
112
-
113
- .title {
114
- max-width: calc(100% - 180px);
115
- display: flex;
116
- align-items: center;
117
- }
118
- }
119
-
120
- .body {
121
- flex-grow: 1;
122
- padding: var(--spacing-unit) calc(var(--spacing-unit) / 2);
123
- max-height: calc(100% - 2 * var(--spacing-unit) - 32px);
124
- overflow-y: auto;
125
-
126
- display: flex;
127
- flex-direction: column;
128
- align-items: center;
129
- gap: var(--spacing-unit);
130
-
131
- .pdf-page {
132
- cursor: pointer;
133
-
134
- &__img {
135
- width: 157px;
136
- height: 218px;
137
- background-color: var(--color-white);
138
- box-shadow: var(--box-shadow);
139
-
140
- display: flex;
141
- justify-content: center;
142
- align-items: center;
143
-
144
- img {
145
- width: 100%;
146
- }
147
- }
148
-
149
- &__num {
150
- padding-top: calc(var(--spacing-unit) / 2);
151
- text-align: center;
152
- font-weight: bold;
153
- }
154
-
155
- &.selected .pdf-page__img {
156
- border: 4px solid var(--color-primary);
157
- }
158
- }
159
- }
160
- }
161
- </style>
@@ -1,73 +0,0 @@
1
- <template>
2
- <div class="bimdata-pie-progress-spinner">
3
- <svg
4
- :viewBox="`0 0 ${width} ${width}`"
5
- xmlns="http://www.w3.org/2000/svg"
6
- fill="transparent"
7
- :width="width"
8
- :height="width"
9
- style="transform: rotate(-90deg)"
10
- >
11
- <circle
12
- class="bimdata-pie-progress-spinner__path--back"
13
- :cx="width / 2"
14
- :cy="width / 2"
15
- :r="(width - strokeWidth) / 2"
16
- stroke="lightgray"
17
- :stroke-width="strokeWidth"
18
- />
19
- <circle
20
- class="bimdata-pie-progress-spinner__path"
21
- :cx="width / 2"
22
- :cy="width / 2"
23
- :r="(width - strokeWidth) / 2"
24
- :stroke="color"
25
- :stroke-width="strokeWidth"
26
- :style="`--dashoffset: ${dashoffset};`"
27
- />
28
- </svg>
29
- </div>
30
- </template>
31
-
32
- <script>
33
- export default {
34
- props: {
35
- color: {
36
- type: String,
37
- default: "currentColor",
38
- },
39
- progress: {
40
- type: Number,
41
- default: 0,
42
- validator(value) {
43
- return value >= 0 && value <= 100;
44
- },
45
- },
46
- },
47
- data() {
48
- return {
49
- width: 22,
50
- strokeWidth: 3,
51
- };
52
- },
53
- computed: {
54
- dashoffset() {
55
- return 63 - (this.progress / 100) * 63;
56
- },
57
- },
58
- };
59
- </script>
60
-
61
- <style scoped lang="scss">
62
- .bimdata-pie-progress-spinner {
63
- &__path {
64
- &--back {
65
- position: absolute;
66
- top: 0px;
67
- left: 0px;
68
- }
69
- stroke-dasharray: 63;
70
- stroke-dashoffset: var(--dashoffset, 0);
71
- }
72
- }
73
- </style>
@@ -1,72 +0,0 @@
1
- <template>
2
- <BIMDataButton
3
- class="file-upload-button"
4
- :width="width"
5
- :height="height"
6
- color="primary"
7
- fill
8
- radius
9
- :disabled="disabled"
10
- @click="selectFile"
11
- >
12
- <slot>
13
- <BIMDataIcon name="addFile" size="xs" margin="0 6px 0 0" />
14
- <span>{{ $translate("addFileButtonText") }}</span>
15
- </slot>
16
- <input
17
- hidden
18
- ref="fileInput"
19
- type="file"
20
- :multiple="multiple"
21
- :accept="accept.join(',')"
22
- @change="uploadFile"
23
- />
24
- </BIMDataButton>
25
- </template>
26
-
27
- <script>
28
- import BIMDataButton from "../../../BIMDataComponents/BIMDataButton/BIMDataButton.vue";
29
- import BIMDataIcon from "../../../BIMDataComponents/BIMDataIcon/BIMDataIcon.vue";
30
-
31
- export default {
32
- components: {
33
- BIMDataButton,
34
- BIMDataIcon,
35
- },
36
- inject: ["$translate"],
37
- props: {
38
- width: {
39
- type: String,
40
- default: "32px",
41
- },
42
- height: {
43
- type: String,
44
- default: "32px",
45
- },
46
- multiple: {
47
- type: Boolean,
48
- default: false,
49
- },
50
- accept: {
51
- type: Array,
52
- default: () => [],
53
- },
54
- disabled: {
55
- type: Boolean,
56
- default: false,
57
- },
58
- },
59
- methods: {
60
- selectFile() {
61
- this.$refs.fileInput.click();
62
- },
63
- uploadFile(event) {
64
- const files = Array.from(event.target.files);
65
- if (files.length > 0) {
66
- this.$refs.fileInput.value = "";
67
- this.$emit("upload", files);
68
- }
69
- },
70
- },
71
- };
72
- </script>
@@ -1,184 +0,0 @@
1
- <template>
2
- <div class="delete-modal" v-clickaway="close">
3
- <BIMDataButton
4
- class="delete-modal__close"
5
- color="default"
6
- icon
7
- radius
8
- ghost
9
- width="21px"
10
- height="21px"
11
- @click="close"
12
- :disabled="loading"
13
- >
14
- <BIMDataIcon name="close" />
15
- </BIMDataButton>
16
- <div class="delete-modal__content">
17
- <div class="delete-modal__content__title">
18
- {{ $translate("deleteTitle") }}
19
- </div>
20
- <div class="delete-modal__content__detail">
21
- {{ $translate("deleteDetail") }} :
22
- </div>
23
- <ul>
24
- <li v-for="element of flattenTree" :key="element.id">
25
- - "{{ element.name }}"
26
- </li>
27
- </ul>
28
- <div class="delete-modal__content__btn">
29
- <BIMDataButton
30
- class="delete-modal__content__btn-cancel"
31
- width="80px"
32
- ghost
33
- radius
34
- @click.stop="close"
35
- :disabled="loading"
36
- >
37
- {{ $translate("cancel") }}
38
- </BIMDataButton>
39
- <BIMDataButton
40
- class="delete-modal__content__btn-submit"
41
- width="80px"
42
- color="high"
43
- fill
44
- radius
45
- @click.stop="submit"
46
- :disabled="loading"
47
- >
48
- <BIMDataSpinner v-if="loading" />
49
- <span v-else>{{ $translate("delete") }}</span>
50
- </BIMDataButton>
51
- </div>
52
- </div>
53
- </div>
54
- </template>
55
-
56
- <script>
57
- import BIMDataIcon from "../../../../BIMDataComponents/BIMDataIcon/BIMDataIcon.vue";
58
- import BIMDataButton from "../../../../BIMDataComponents/BIMDataButton/BIMDataButton.vue";
59
- import BIMDataSpinner from "../../../../BIMDataComponents/BIMDataSpinner/BIMDataSpinner.vue";
60
-
61
- import clickaway from "../../../../BIMDataDirectives/click-away.js";
62
-
63
- import getFlattenTree from "../../utils/flattenTree.js";
64
-
65
- export default {
66
- components: {
67
- BIMDataIcon,
68
- BIMDataButton,
69
- BIMDataSpinner,
70
- },
71
- directives: { clickaway },
72
- inject: ["$translate"],
73
- props: {
74
- projectId: {
75
- type: Number,
76
- required: true,
77
- },
78
- spaceId: {
79
- type: Number,
80
- required: true,
81
- },
82
- apiClient: {
83
- type: Object,
84
- required: true,
85
- },
86
- entity: {
87
- type: Object,
88
- },
89
- },
90
- data() {
91
- return {
92
- loading: false,
93
- };
94
- },
95
- computed: {
96
- flattenTree() {
97
- return getFlattenTree(this.entity);
98
- },
99
- },
100
- methods: {
101
- close() {
102
- if (this.loading) return;
103
- this.$emit("close");
104
- },
105
- async submit() {
106
- this.loading = true;
107
- try {
108
- await this.deleteEntity();
109
- this.$emit("success");
110
- } catch (error) {
111
- this.$emit("error", error);
112
- } finally {
113
- this.loading = false;
114
- }
115
- },
116
- deleteEntity() {
117
- const params = [this.spaceId, this.entity.id, this.projectId];
118
- if (this.entity.nature === "Folder") {
119
- return this.apiClient.collaborationApi.deleteFolder(...params);
120
- } else {
121
- return this.apiClient.collaborationApi.deleteDocument(...params);
122
- }
123
- },
124
- },
125
- };
126
- </script>
127
-
128
- <style scoped lang="scss">
129
- .delete-modal {
130
- background-color: var(--color-white);
131
-
132
- display: flex;
133
- position: relative;
134
-
135
- width: 70%;
136
-
137
- &__close {
138
- position: absolute;
139
- right: var(--spacing-unit);
140
- top: var(--spacing-unit);
141
- }
142
-
143
- &__content {
144
- display: flex;
145
- flex-direction: column;
146
- align-items: center;
147
- width: 100%;
148
- margin: 30px auto;
149
-
150
- width: 80%;
151
- max-width: 350px;
152
-
153
- &__title {
154
- font-weight: 700;
155
- font-size: 120%;
156
- }
157
-
158
- &__detail {
159
- font-size: small;
160
- margin-top: calc(var(--spacing-unit) * 2);
161
- }
162
-
163
- ul {
164
- width: 100%;
165
- margin: calc(var(--spacing-unit) * 2) 0;
166
- }
167
-
168
- li {
169
- list-style: none;
170
- font-size: small;
171
- word-break: break-all;
172
- }
173
-
174
- &__btn {
175
- display: flex;
176
- width: 100%;
177
- justify-content: space-between;
178
- &-submit {
179
- margin-left: var(--spacing-unit);
180
- }
181
- }
182
- }
183
- }
184
- </style>
@@ -1,186 +0,0 @@
1
- <template>
2
- <div class="rename-modal" v-clickaway="close">
3
- <BIMDataButton
4
- class="rename-modal__close"
5
- color="default"
6
- icon
7
- radius
8
- ghost
9
- width="21px"
10
- height="21px"
11
- @click="close"
12
- >
13
- <BIMDataIcon name="close" />
14
- </BIMDataButton>
15
- <div class="rename-modal__content">
16
- <div class="rename-modal__content__title">
17
- {{ $translate("rename") }}
18
- </div>
19
- <BIMDataInput
20
- ref="nameInput"
21
- class="rename-modal__content__input"
22
- :placeholder="$translate('renameFormPlaceholder')"
23
- v-model="name"
24
- :error="hasError"
25
- :errorMessage="$translate('nameInputErrorMessage')"
26
- @keyup.esc.stop="close"
27
- @keyup.enter.stop="submit"
28
- margin="30px 0px"
29
- :loading="loading"
30
- />
31
- <div class="rename-modal__content__btn">
32
- <BIMDataButton
33
- class="rename-modal__content__btn-cancel"
34
- width="80px"
35
- ghost
36
- radius
37
- @click.stop="close"
38
- >
39
- {{ $translate("cancel") }}
40
- </BIMDataButton>
41
- <BIMDataButton
42
- class="rename-modal__content__btn-submit"
43
- width="80px"
44
- color="primary"
45
- fill
46
- radius
47
- @click.stop="submit"
48
- >
49
- {{ $translate("submit") }}
50
- </BIMDataButton>
51
- </div>
52
- </div>
53
- </div>
54
- </template>
55
-
56
- <script>
57
- import BIMDataIcon from "../../../../BIMDataComponents/BIMDataIcon/BIMDataIcon.vue";
58
- import BIMDataInput from "../../../../BIMDataComponents/BIMDataInput/BIMDataInput.vue";
59
- import BIMDataButton from "../../../../BIMDataComponents/BIMDataButton/BIMDataButton.vue";
60
-
61
- import clickaway from "../../../../BIMDataDirectives/click-away.js";
62
-
63
- export default {
64
- components: {
65
- BIMDataIcon,
66
- BIMDataInput,
67
- BIMDataButton,
68
- },
69
- directives: { clickaway },
70
- inject: ["$translate"],
71
- props: {
72
- projectId: {
73
- type: Number,
74
- required: true,
75
- },
76
- spaceId: {
77
- type: Number,
78
- required: true,
79
- },
80
- apiClient: {
81
- type: Object,
82
- required: true,
83
- },
84
- entity: {
85
- type: Object,
86
- },
87
- },
88
- data() {
89
- return {
90
- name: "",
91
- hasError: false,
92
- loading: false,
93
- };
94
- },
95
- mounted() {
96
- this.name = this.entity.name;
97
- setTimeout(() => this.$refs.nameInput.focus(), 200);
98
- },
99
- methods: {
100
- reset() {
101
- this.name = "";
102
- this.hasError = false;
103
- },
104
- close() {
105
- this.reset();
106
- this.$emit("close");
107
- },
108
- async submit() {
109
- if (this.name) {
110
- this.loading = true;
111
- try {
112
- await this.renameDocument();
113
- this.entity.name = this.name;
114
- this.$emit("success");
115
- } catch (error) {
116
- this.$emit("error", error);
117
- } finally {
118
- this.reset();
119
- this.loading = false;
120
- }
121
- } else {
122
- this.$refs.nameInput.focus();
123
- this.hasError = true;
124
- }
125
- },
126
- renameDocument() {
127
- const params = [
128
- this.spaceId,
129
- this.entity.id,
130
- this.projectId,
131
- { name: this.name },
132
- ];
133
- if (this.entity.nature === "Folder") {
134
- return this.apiClient.collaborationApi.updateFolder(...params);
135
- } else {
136
- return this.apiClient.collaborationApi.updateDocument(...params);
137
- }
138
- },
139
- },
140
- };
141
- </script>
142
-
143
- <style scoped lang="scss">
144
- .rename-modal {
145
- background-color: var(--color-white);
146
-
147
- display: flex;
148
- position: relative;
149
-
150
- width: 70%;
151
-
152
- &__close {
153
- position: absolute;
154
- right: var(--spacing-unit);
155
- top: var(--spacing-unit);
156
- }
157
-
158
- &__content {
159
- display: flex;
160
- flex-direction: column;
161
- align-items: center;
162
- width: 100%;
163
- margin: 30px auto;
164
-
165
- width: 80%;
166
- max-width: 350px;
167
-
168
- &__title {
169
- font-weight: 700;
170
- font-size: 120%;
171
- }
172
-
173
- &__input {
174
- width: 100%;
175
- }
176
- &__btn {
177
- display: flex;
178
- width: 100%;
179
- justify-content: space-between;
180
- &-submit {
181
- margin-left: var(--spacing-unit);
182
- }
183
- }
184
- }
185
- }
186
- </style>