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

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 (25) hide show
  1. package/package.json +1 -2
  2. package/src/BIMDataComponents/index.js +0 -3
  3. package/vue3-plugin.js +0 -11
  4. package/src/BIMDataComponents/BIMDataModelPreview/BIMDataModelPreview.vue +0 -58
  5. package/src/BIMDataComponents/BIMDataModelPreview/Preview2D.vue +0 -116
  6. package/src/BIMDataComponents/BIMDataModelPreview/Preview3D.vue +0 -75
  7. package/src/BIMDataComponents/BIMDataPDFViewer/BIMDataPDFViewer.vue +0 -115
  8. package/src/BIMDataComponents/BIMDataSafeZoneModal/BIMDataSafeZoneModal.vue +0 -37
  9. package/src/BIMDataComponents/BIMDataSafeZoneModal/_BIMDataSafeZoneModal.scss +0 -39
  10. package/src/BIMDataSmartComponents/BIMDataFileManager/BIMDataFileManager.scss +0 -123
  11. package/src/BIMDataSmartComponents/BIMDataFileManager/BIMDataFileManager.vue +0 -636
  12. package/src/BIMDataSmartComponents/BIMDataFileManager/components/FileCard.vue +0 -433
  13. package/src/BIMDataSmartComponents/BIMDataFileManager/components/MultiLineTextBox/MultiLineTextBox.vue +0 -151
  14. package/src/BIMDataSmartComponents/BIMDataFileManager/components/MultiLineTextBox/Tooltip.vue +0 -46
  15. package/src/BIMDataSmartComponents/BIMDataFileManager/components/PdfPageSelector.vue +0 -161
  16. package/src/BIMDataSmartComponents/BIMDataFileManager/components/PieProgressSpinner.vue +0 -73
  17. package/src/BIMDataSmartComponents/BIMDataFileManager/components/UploadFileButton.vue +0 -72
  18. package/src/BIMDataSmartComponents/BIMDataFileManager/components/modals/DeleteModal.vue +0 -184
  19. package/src/BIMDataSmartComponents/BIMDataFileManager/components/modals/RenameModal.vue +0 -186
  20. package/src/BIMDataSmartComponents/BIMDataFileManager/components/newFolder/NewFolderButton.vue +0 -117
  21. package/src/BIMDataSmartComponents/BIMDataFileManager/components/newFolder/NewFolderForm.vue +0 -165
  22. package/src/BIMDataSmartComponents/BIMDataFileManager/i18n.js +0 -141
  23. package/src/BIMDataSmartComponents/BIMDataFileManager/utils/files.js +0 -89
  24. package/src/BIMDataSmartComponents/BIMDataFileManager/utils/flattenTree.js +0 -16
  25. package/src/BIMDataSmartComponents/index.js +0 -10
package/package.json CHANGED
@@ -1,13 +1,12 @@
1
1
  {
2
2
  "name": "@bimdata/design-system",
3
- "version": "2.0.0-rc.20",
3
+ "version": "2.0.0-rc.21",
4
4
  "main": "./src/BIMDataComponents/index.js",
5
5
  "module": "./src/BIMDataComponents/index.js",
6
6
  "files": [
7
7
  "src/assets",
8
8
  "src/BIMDataComponents",
9
9
  "src/BIMDataDirectives",
10
- "src/BIMDataSmartComponents",
11
10
  "design-system.png",
12
11
  "vue3-plugin.js"
13
12
  ],
@@ -24,14 +24,12 @@ export { default as BIMDataInput } from "./BIMDataInput/BIMDataInput.vue";
24
24
  export { default as BIMDataLoading } from "./BIMDataLoading/BIMDataLoading.vue";
25
25
  export { default as BIMDataMenu } from "./BIMDataMenu/BIMDataMenu.vue";
26
26
  export { default as BIMDataMenuInline } from "./BIMDataMenuInline/BIMDataMenuInline.vue";
27
- export { default as BIMDataModelPreview } from "./BIMDataModelPreview/BIMDataModelPreview.vue";
28
27
  export { default as BIMDataMultiplePieChart } from "./BIMDataMultiplePieChart/BIMDataMultiplePieChart.vue";
29
28
  export { default as BIMDataPaginatedList } from "./BIMDataPaginatedList/BIMDataPaginatedList.vue";
30
29
  export { default as BIMDataPieSpinner } from "./BIMDataPieSpinner/BIMDataPieSpinner.vue";
31
30
  export { default as BIMDataRadio } from "./BIMDataRadio/BIMDataRadio.vue";
32
31
  export { default as BIMDataResponsiveGrid } from "./BIMDataResponsiveGrid/BIMDataResponsiveGrid.vue";
33
32
  export { default as BIMDataSafeZoneInline } from "./BIMDataSafeZoneInline/BIMDataSafeZoneInline.vue";
34
- export { default as BIMDataSafeZoneModal } from "./BIMDataSafeZoneModal/BIMDataSafeZoneModal.vue";
35
33
  export { default as BIMDataSearch } from "./BIMDataSearch/BIMDataSearch.vue";
36
34
  export { default as BIMDataSearchAutocomplete } from "./BIMDataSearchAutocomplete/BIMDataSearchAutocomplete.vue";
37
35
  export { default as BIMDataSelect } from "./BIMDataSelect/BIMDataSelect.vue";
@@ -44,4 +42,3 @@ export { default as BIMDataTextarea } from "./BIMDataTextarea/BIMDataTextarea.vu
44
42
  export { default as BIMDataTextbox } from "./BIMDataTextbox/BIMDataTextbox.vue";
45
43
  export { default as BIMDataToggle } from "./BIMDataToggle/BIMDataToggle.vue";
46
44
  export { default as BIMDataTooltip } from "./BIMDataTooltip/BIMDataTooltip.vue";
47
- export { default as BIMDataPDFViewer } from "./BIMDataPDFViewer/BIMDataPDFViewer.vue";
package/vue3-plugin.js CHANGED
@@ -1,5 +1,4 @@
1
1
  import * as Components from "./src/BIMDataComponents/index.js";
2
- import * as SmartComponents from "./src/BIMDataSmartComponents/index.js";
3
2
  import * as Directives from "./src/BIMDataDirectives/index.js";
4
3
 
5
4
  /**
@@ -9,7 +8,6 @@ import * as Directives from "./src/BIMDataDirectives/index.js";
9
8
  * {
10
9
  * includedComponents?: string[],
11
10
  * excludedComponents?: string[],
12
- * smartComponents?: boolean,
13
11
  * directives?: boolean,
14
12
  * }
15
13
  * } [cfg]
@@ -37,15 +35,6 @@ const pluginFactory = cfg => {
37
35
  }
38
36
  });
39
37
 
40
- // SMART COMPONENTS
41
- if (cfg?.smartComponents) {
42
- Object.entries(SmartComponents).forEach(
43
- ([componentName, component]) => {
44
- app.component(componentName, component);
45
- }
46
- );
47
- }
48
-
49
38
  // DIRECTIVES
50
39
  if (!cfg || cfg.directives !== false) {
51
40
  Object.entries(Directives).forEach(([directiveName, directive]) =>
@@ -1,58 +0,0 @@
1
- <template>
2
- <component
3
- :is="previewComponent"
4
- class="bimdata-model-preview"
5
- :style="{
6
- width: `${width}px`,
7
- height: `${height}px`,
8
- backgroundColor,
9
- }"
10
- v-bind="$props"
11
- />
12
- </template>
13
-
14
- <script>
15
- import Preview2D from "./Preview2D.vue";
16
- import Preview3D from "./Preview3D.vue";
17
-
18
- export default {
19
- components: {
20
- Preview2D,
21
- Preview3D,
22
- },
23
- props: {
24
- type: {
25
- type: String,
26
- default: "3d",
27
- validator: v => ["2d", "3d"].includes(v),
28
- },
29
- width: {
30
- type: Number,
31
- default: 240,
32
- },
33
- height: {
34
- type: Number,
35
- default: 240,
36
- },
37
- previewUrl: {
38
- type: String,
39
- },
40
- defaultUrl: {
41
- type: String,
42
- },
43
- backgroundColor: {
44
- type: String,
45
- default: "var(--color-silver-light)",
46
- },
47
- zoomFactor: {
48
- type: Number,
49
- default: 3,
50
- },
51
- },
52
- computed: {
53
- previewComponent() {
54
- return this.type === "3d" ? "Preview3D" : "Preview2D";
55
- },
56
- },
57
- };
58
- </script>
@@ -1,116 +0,0 @@
1
- <template>
2
- <div
3
- class="preview-2d"
4
- @mouseenter="hover = true"
5
- @mouseleave="hover = false"
6
- @mousemove="onMouseMove"
7
- >
8
- <img loading="lazy" :src="imgUrl" />
9
-
10
- <div
11
- v-show="hover"
12
- class="zoom"
13
- :style="{
14
- transform: zoomTransform,
15
- }"
16
- >
17
- <div
18
- class="zoomImage"
19
- :style="{
20
- width: `${width}px`,
21
- height: `${height}px`,
22
- transform: zoomImageTransform,
23
- }"
24
- >
25
- <img loading="lazy" :src="imgUrl" />
26
- </div>
27
- </div>
28
- </div>
29
- </template>
30
-
31
- <script>
32
- export default {
33
- props: {
34
- width: {
35
- type: Number,
36
- },
37
- height: {
38
- type: Number,
39
- },
40
- previewUrl: {
41
- type: String,
42
- },
43
- defaultUrl: {
44
- type: String,
45
- },
46
- zoomFactor: {
47
- type: Number,
48
- },
49
- },
50
- data() {
51
- return {
52
- hover: false,
53
- zoomX: 0,
54
- zoomY: 0,
55
- };
56
- },
57
- computed: {
58
- imgUrl() {
59
- return this.previewUrl || this.defaultUrl;
60
- },
61
- zoomTransform() {
62
- return `
63
- translate(${this.zoomX}px, ${this.zoomY}px)
64
- `;
65
- },
66
- zoomImageTransform() {
67
- return `
68
- scale(${this.zoomFactor})
69
- translate(-${this.zoomX}px, -${this.zoomY}px)
70
- `;
71
- },
72
- },
73
- methods: {
74
- onMouseMove({ offsetX, offsetY }) {
75
- this.zoomX = offsetX;
76
- this.zoomY = offsetY;
77
- },
78
- },
79
- };
80
- </script>
81
-
82
- <style scoped lang="scss">
83
- .preview-2d {
84
- position: relative;
85
- height: 100%;
86
- user-select: none;
87
- overflow: hidden;
88
-
89
- img {
90
- width: 100%;
91
- height: 100%;
92
- object-fit: contain;
93
- }
94
-
95
- .zoom {
96
- position: absolute;
97
- top: -50px;
98
- left: -50px;
99
- width: 100px;
100
- height: 100px;
101
- border-radius: 50%;
102
- box-shadow: var(--box-shadow);
103
- background-color: var(--color-white);
104
- overflow: hidden;
105
-
106
- pointer-events: none;
107
- }
108
-
109
- .zoomImage {
110
- position: absolute;
111
- top: 50px;
112
- left: 50px;
113
- transform-origin: top left;
114
- }
115
- }
116
- </style>
@@ -1,75 +0,0 @@
1
- <template>
2
- <div class="preview-3d" @mousemove="onMouseMove">
3
- <div
4
- class="viewport"
5
- :style="{ width: `${viewportWidth}px`, height: `${height}px` }"
6
- >
7
- <img
8
- loading="lazy"
9
- :src="previewUrl || defaultUrl"
10
- :style="{ transform: `translateX(-${translation}px)` }"
11
- />
12
- </div>
13
- </div>
14
- </template>
15
-
16
- <script>
17
- /**
18
- * Note:
19
- * 3D model preview images should be composed of *15 SQUARE SLICES* to be displayed properly.
20
- */
21
- const NB_SLICES = 15;
22
-
23
- export default {
24
- props: {
25
- width: {
26
- type: Number,
27
- },
28
- height: {
29
- type: Number,
30
- },
31
- previewUrl: {
32
- type: String,
33
- },
34
- defaultUrl: {
35
- type: String,
36
- },
37
- },
38
- data() {
39
- return {
40
- translation: 0,
41
- };
42
- },
43
- computed: {
44
- viewportWidth() {
45
- return Math.min(this.width, this.height);
46
- },
47
- },
48
- methods: {
49
- onMouseMove({ offsetX }) {
50
- let offset = Math.ceil(NB_SLICES * (1 - offsetX / this.width));
51
- offset = Math.abs(offset);
52
- offset = Math.min(offset, NB_SLICES);
53
-
54
- this.translation = (offset - 1) * this.viewportWidth;
55
- },
56
- },
57
- };
58
- </script>
59
-
60
- <style scoped lang="scss">
61
- .preview-3d {
62
- user-select: none;
63
-
64
- .viewport {
65
- margin: auto;
66
- overflow: hidden;
67
- pointer-events: none;
68
-
69
- img {
70
- width: auto;
71
- height: 100%;
72
- }
73
- }
74
- }
75
- </style>
@@ -1,115 +0,0 @@
1
- <template>
2
- <div class="pdf-viewer">
3
- <template v-if="loading">
4
- <BIMDataLoading />
5
- </template>
6
-
7
- <template v-else>
8
- <div v-if="header" class="pdf-viewer__header">
9
- <div class="pdf-viewer__header--left">
10
- <slot name="header-left"></slot>
11
- </div>
12
- <div class="pdf-viewer__header--title">
13
- <BIMDataTextbox :text="pdf.name" />
14
- </div>
15
- <div class="pdf-viewer__header--right">
16
- <slot name="header-right"></slot>
17
- </div>
18
- </div>
19
-
20
- <object
21
- v-if="pdfUrl"
22
- width="100%"
23
- height="100%"
24
- type="application/pdf"
25
- :data="pdfUrl"
26
- ></object>
27
- </template>
28
- </div>
29
- </template>
30
-
31
- <script>
32
- import { ref, watch } from "vue";
33
- import BIMDataLoading from "../BIMDataLoading/BIMDataLoading.vue";
34
- import BIMDataTextbox from "../BIMDataTextbox/BIMDataTextbox.vue";
35
-
36
- export default {
37
- components: {
38
- BIMDataLoading,
39
- BIMDataTextbox,
40
- },
41
- props: {
42
- header: {
43
- type: Boolean,
44
- default: false,
45
- },
46
- pdf: {
47
- type: [Object, File],
48
- },
49
- },
50
- setup(props) {
51
- const loading = ref(false);
52
- const pdfUrl = ref(null);
53
-
54
- watch(
55
- () => props.pdf,
56
- async pdf => {
57
- loading.value = true;
58
- if (pdf.file) {
59
- try {
60
- const blob = await fetch(pdf.file).then(res => res.blob());
61
- pdfUrl.value = URL.createObjectURL(blob);
62
- } catch (error) {
63
- console.err(
64
- "[BIMDataPDFViewer] Error fetching the pdf file.",
65
- error
66
- );
67
- }
68
- } else {
69
- pdfUrl.value = URL.createObjectURL(pdf);
70
- }
71
- loading.value = false;
72
- },
73
- { immediate: true }
74
- );
75
-
76
- return {
77
- loading,
78
- pdfUrl,
79
- };
80
- },
81
- };
82
- </script>
83
-
84
- <style scoped lang="scss">
85
- .pdf-viewer {
86
- width: 100%;
87
- height: 100%;
88
- background-color: var(--color-white);
89
- overflow: hidden;
90
-
91
- &__header {
92
- height: 42px;
93
- display: flex;
94
- justify-content: center;
95
- align-items: center;
96
- font-size: 12px;
97
-
98
- &--title {
99
- width: 0;
100
- flex-grow: 1;
101
- display: flex;
102
- justify-content: center;
103
- padding: 0 var(--spacing-unit);
104
- }
105
- }
106
-
107
- object {
108
- height: 100%;
109
- }
110
-
111
- &__header ~ object {
112
- height: calc(100% - 42px);
113
- }
114
- }
115
- </style>
@@ -1,37 +0,0 @@
1
- <template>
2
- <div class="overlay flex items-center justify-center">
3
- <div class="safe-zone" :style="{ width }">
4
- <div
5
- class="safe-zone__content flex flex-col items-center justify-center p-18"
6
- >
7
- <BIMDataIcon :name="iconName" size="l" fill color="high" />
8
- <p><slot name="text"></slot></p>
9
- </div>
10
- <div class="safe-zone__actions flex items-center p-x-18">
11
- <slot name="actions"></slot>
12
- </div>
13
- </div>
14
- </div>
15
- </template>
16
-
17
- <script>
18
- import BIMDataIcon from "../BIMDataIcon/BIMDataIcon.vue";
19
-
20
- export default {
21
- components: {
22
- BIMDataIcon,
23
- },
24
- props: {
25
- iconName: {
26
- type: String,
27
- default: "warning",
28
- },
29
- width: {
30
- type: String,
31
- default: "350px",
32
- },
33
- },
34
- };
35
- </script>
36
-
37
- <style scoped lang="scss" src="./_BIMDataSafeZoneModal.scss"></style>
@@ -1,39 +0,0 @@
1
- .overlay {
2
- position: absolute;
3
- left: 0;
4
- top: 0;
5
- height: 100%;
6
- width: 100%;
7
-
8
- &::before {
9
- content: "";
10
- position: absolute;
11
- left: 0;
12
- top: 0;
13
- height: 100%;
14
- width: 100%;
15
- background-color: var(--color-primary);
16
- opacity: 0.9;
17
- }
18
-
19
- .safe-zone {
20
- z-index: 1;
21
-
22
- &__content {
23
- background-color: var(--color-white);
24
- font-size: 1.2rem;
25
- text-align: center;
26
- color: var(--color-high);
27
- p {
28
- margin-bottom: 0;
29
- }
30
- }
31
-
32
- &__actions {
33
- height: 75px;
34
- justify-content: space-evenly;
35
- background-color: var(--color-silver-light);
36
- border-top: 1px solid var(--color-silver);
37
- }
38
- }
39
- }
@@ -1,123 +0,0 @@
1
- .bimdata-file-manager {
2
- width: 100%;
3
-
4
- display: flex;
5
- flex-direction: column;
6
- gap: var(--spacing-unit);
7
- position: relative;
8
-
9
- &__pdf-viewer {
10
- position: absolute;
11
- z-index: 2;
12
- right: 0;
13
- top: 0;
14
- }
15
-
16
- &__header {
17
- display: flex;
18
- padding: 0 var(--spacing-unit);
19
-
20
- &--xs {
21
- flex-direction: column;
22
-
23
- .bimdata-file-manager__header__upload {
24
- margin: var(--spacing-unit) 0;
25
- }
26
- }
27
-
28
- &--s,
29
- &--m {
30
- flex-wrap: wrap;
31
- * {
32
- flex-shrink: 1;
33
- flex-basis: calc(50% - (var(--spacing-unit) / 2));
34
- }
35
- .bimdata-file-manager__search {
36
- flex-basis: 100%;
37
- margin-top: var(--spacing-unit);
38
- }
39
- .bimdata-file-manager__header__upload {
40
- margin-left: var(--spacing-unit);
41
- }
42
- }
43
-
44
- &--l {
45
- .bimdata-file-manager__header__upload {
46
- margin: 0 var(--spacing-unit);
47
- }
48
- }
49
- }
50
-
51
- &__navigation {
52
- padding: 0 var(--spacing-unit);
53
- height: 31px;
54
- flex-shrink: 0;
55
- font-weight: bold;
56
- margin-top: 12px;
57
- &__content {
58
- display: flex;
59
- align-items: center;
60
- justify-content: space-between;
61
- &--empty {
62
- display: flex;
63
- align-items: center;
64
- height: 100%;
65
- }
66
- }
67
- }
68
-
69
- &__pdf-page-selector {
70
- position: absolute;
71
- top: 0;
72
- left: 0;
73
- width: 100%;
74
- height: 100%;
75
- }
76
-
77
- &__modal {
78
- position: absolute;
79
- top: 0px;
80
- left: 0px;
81
- right: 0px;
82
- bottom: 0px;
83
- display: flex;
84
- justify-content: center;
85
- align-items: center;
86
- &::before {
87
- content: "";
88
- height: 100%;
89
- width: 100%;
90
- position: absolute;
91
- left: 0;
92
- right: 0;
93
- background-color: var(--color-primary);
94
- opacity: 0.9;
95
- }
96
- }
97
-
98
- &__container {
99
- overflow-y: auto;
100
- height: 100%;
101
-
102
- &--empty {
103
- margin: var(--spacing-unit);
104
- background-color: var(--color-silver-light);
105
- display: flex;
106
- justify-content: center;
107
- align-content: center;
108
- height: 100%;
109
-
110
- div {
111
- display: flex;
112
- flex-direction: column;
113
- align-items: center;
114
- justify-content: center;
115
- font-size: small;
116
- color: var(--color-granite);
117
- span {
118
- margin-top: calc(var(--spacing-unit) * 2);
119
- }
120
- }
121
- }
122
- }
123
- }