Skip to content

Commit

Permalink
PATCH: remove design-system imports
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasRichel committed Oct 24, 2023
1 parent d044fa3 commit 47d42a1
Showing 19 changed files with 7 additions and 202 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -24,8 +24,11 @@ and make all components available globally.
import { createApp } from "vue";
import { createI18n } from "vue-i18n"; // v9.x
import { makeBIMDataApiClient } from "@bimdata/typescript-fetch-api-client"; // v8.2+
import DesignSystem from "@bimdata/design-system/vue3-plugin.js"; // v2+
import BIMDataComponents from "@bimdata/components/vue3-plugin.js"; // v1+

// Import Vue 3 plugin factory
import BIMDataBcfComponents from "@bimdata/bcf-components/vue3-plugin.js";
import BcfComponents from "@bimdata/bcf-components/vue3-plugin.js";

// Instanciate i18n plugin
const i18nPlugin = createI18n({ ... });
@@ -34,8 +37,10 @@ const apiClient = makeBIMDataApiClient({ ... });

const app = createApp()
.use(i18nPlugin)
.use(DesignSystem())
.use(BIMDataComponents())
// Provide both i18n plugin and API client as plugin config
.use(BIMDataBcfComponents({ i18nPlugin, apiClient }));
.use(BcfComponents({ i18nPlugin, apiClient }));
...
```

19 changes: 0 additions & 19 deletions src/components/bcf-filters/BcfFilters.vue
Original file line number Diff line number Diff line change
@@ -113,16 +113,6 @@
<script>
import { computed, ref, toRaw, watch } from "vue";
import { useBcfFilter } from "../../composables/filter.js";
// Components
import BIMDataButton from "@bimdata/design-system/src/BIMDataComponents/BIMDataButton/BIMDataButton.vue";
import {
BIMDataIconClose,
BIMDataIconFilterList,
BIMDataIconSearch,
} from "@bimdata/design-system/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/index.js";
import BIMDataInput from "@bimdata/design-system/src/BIMDataComponents/BIMDataInput/BIMDataInput.vue";
import BIMDataSelect from "@bimdata/design-system/src/BIMDataComponents/BIMDataSelect/BIMDataSelect.vue";
import BIMDataText from "@bimdata/design-system/src/BIMDataComponents/BIMDataText/BIMDataText.vue";
function getSelectOptions(list) {
return Array.from(new Set(list)).sort((a, b) =>
@@ -131,15 +121,6 @@ function getSelectOptions(list) {
}
export default {
components: {
BIMDataButton,
BIMDataIconClose,
BIMDataIconFilterList,
BIMDataIconSearch,
BIMDataInput,
BIMDataSelect,
BIMDataText
},
props: {
topics: {
type: Array,
9 changes: 0 additions & 9 deletions src/components/bcf-settings/BcfSettings.vue
Original file line number Diff line number Diff line change
@@ -46,19 +46,10 @@
import { EXTENSION_TYPES } from "../../config.js";
import { useService } from "../../service.js";
// Components
import BIMDataButton from "@bimdata/design-system/src/BIMDataComponents/BIMDataButton/BIMDataButton.vue";
import {
BIMDataIconArrow,
BIMDataIconClose,
} from "@bimdata/design-system/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/index.js";
import SettingCard from "./setting-card/SettingCard.vue";
export default {
components: {
BIMDataButton,
BIMDataIconArrow,
BIMDataIconClose,
SettingCard,
},
props: {
10 changes: 0 additions & 10 deletions src/components/bcf-settings/setting-card/SettingCard.vue
Original file line number Diff line number Diff line change
@@ -60,20 +60,10 @@
import { computed, ref } from "vue";
import { getAvailableExtensions } from "../../../utils/extensions.js";
// Compopnents
import BIMDataButton from "@bimdata/design-system/src/BIMDataComponents/BIMDataButton/BIMDataButton.vue";
import {
BIMDataIconChevron,
BIMDataIconPlus,
} from "@bimdata/design-system/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/index.js";
import BIMDataInput from "@bimdata/design-system/src/BIMDataComponents/BIMDataInput/BIMDataInput.vue";
import SettingCardItem from "./SettingCardItem.vue";
export default {
components: {
BIMDataButton,
BIMDataIconChevron,
BIMDataIconPlus,
BIMDataInput,
SettingCardItem,
},
props: {
15 changes: 0 additions & 15 deletions src/components/bcf-settings/setting-card/SettingCardItem.vue
Original file line number Diff line number Diff line change
@@ -62,23 +62,8 @@ import { adjustBorderColor } from "@bimdata/design-system/src/BIMDataComponents/
import { ref, watch } from "vue";
import { EXTENSION_WITH_COLOR } from "../../../config.js";
import { getExtensionField } from "../../../utils/extensions.js";
// Components
import BIMDataButton from "@bimdata/design-system/src/BIMDataComponents/BIMDataButton/BIMDataButton.vue";
import BIMDataColorSelector from "@bimdata/design-system/src/BIMDataComponents/BIMDataColorSelector/BIMDataColorSelector.vue";
import {
BIMDataIconDelete,
BIMDataIconClose,
} from "@bimdata/design-system/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/index.js";
import BIMDataInput from "@bimdata/design-system/src/BIMDataComponents/BIMDataInput/BIMDataInput.vue";
export default {
components: {
BIMDataButton,
BIMDataColorSelector,
BIMDataIconDelete,
BIMDataIconClose,
BIMDataInput,
},
props: {
extensionType: {
type: String,
7 changes: 0 additions & 7 deletions src/components/bcf-statistics/BcfStatistics.vue
Original file line number Diff line number Diff line change
@@ -53,15 +53,8 @@
import { computed } from "vue";
import { DEFAULT_PRIORITY_COLOR } from "../../config.js";
import { getAvailableExtensions, getExtensionField } from "../../utils/extensions.js";
// Components
import BIMDataPaginatedList from "@bimdata/design-system/src/BIMDataComponents/BIMDataPaginatedList/BIMDataPaginatedList.vue";
import BIMDataSimplePieChart from "@bimdata/design-system/src/BIMDataComponents/BIMDataSimplePieChart/BIMDataSimplePieChart.vue";
export default {
components: {
BIMDataPaginatedList,
BIMDataSimplePieChart,
},
props: {
detailedExtensions: {
type: Object,
10 changes: 0 additions & 10 deletions src/components/bcf-topic-card/BcfTopicCard.vue
Original file line number Diff line number Diff line change
@@ -85,21 +85,11 @@ import { adjustTextColor } from "@bimdata/design-system/src/BIMDataComponents/BI
import { computed, ref } from "vue";
import { getPriorityColor, getStatusColor } from "../../utils/topic.js";
// Components
import BIMDataButton from "@bimdata/design-system/src/BIMDataComponents/BIMDataButton/BIMDataButton.vue";
import {
BIMDataIconInformation,
BIMDataIconModel3D,
} from "@bimdata/design-system/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/index.js";
import BIMDataTextbox from "@bimdata/design-system/src/BIMDataComponents/BIMDataTextbox/BIMDataTextbox.vue";
import BcfTopicDefaultImage from "./BcfTopicDefaultImage.vue";
export default {
components: {
BcfTopicDefaultImage,
BIMDataButton,
BIMDataIconInformation,
BIMDataIconModel3D,
BIMDataTextbox,
},
props: {
detailedExtensions: {
Original file line number Diff line number Diff line change
@@ -20,15 +20,11 @@

<script>
// Components
import BIMDataButton from "@bimdata/design-system/src/BIMDataComponents/BIMDataButton/BIMDataButton.vue";
import BIMDataIconPlus from "@bimdata/design-system/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconPlus.vue";
import BcfTopicCreationCardImage from "./BcfTopicCreationCardImage.vue";
export default {
components: {
BcfTopicCreationCardImage,
BIMDataButton,
BIMDataIconPlus,
},
emits: ["create-topic"],
};
26 changes: 0 additions & 26 deletions src/components/bcf-topic-form/BcfTopicForm.vue
Original file line number Diff line number Diff line change
@@ -201,20 +201,6 @@ import { useService } from "../../service.js";
import { getViewerList } from "../../utils/viewer.js";
import { setViewpointDefaults } from "../../utils/viewpoints.js";
// Components
import BIMDataSafeZoneModal from "@bimdata/components/src/BIMDataSafeZoneModal/BIMDataSafeZoneModal.vue";
import BIMDataButton from "@bimdata/design-system/src/BIMDataComponents/BIMDataButton/BIMDataButton.vue";
import BIMDataDatePicker from "@bimdata/design-system/src/BIMDataComponents/BIMDataDatePicker/BIMDataDatePicker.vue";
import {
BIMDataIconArrow,
BIMDataIconClose,
BIMDataIconPlus,
} from "@bimdata/design-system/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/index.js";
import BIMDataInput from "@bimdata/design-system/src/BIMDataComponents/BIMDataInput/BIMDataInput.vue";
import BIMDataLoading from "@bimdata/design-system/src/BIMDataComponents/BIMDataLoading/BIMDataLoading.vue";
import BIMDataSelect from "@bimdata/design-system/src/BIMDataComponents/BIMDataSelect/BIMDataSelect.vue";
import BIMDataTextarea from "@bimdata/design-system/src/BIMDataComponents/BIMDataTextarea/BIMDataTextarea.vue";
import BIMDataTextbox from "@bimdata/design-system/src/BIMDataComponents/BIMDataTextbox/BIMDataTextbox.vue";
import BIMDataTooltip from "@bimdata/design-system/src/BIMDataComponents/BIMDataTooltip/BIMDataTooltip.vue";
import BcfTopicImages from "./bcf-topic-images/BcfTopicImages.vue";
import BcfTopicSnapshots from "./bcf-topic-snapshots/BcfTopicSnapshots.vue";
import BcfTopicSnapshotsActions from "./bcf-topic-snapshots-actions/BcfTopicSnapshotsActions.vue";
@@ -224,18 +210,6 @@ export default {
BcfTopicImages,
BcfTopicSnapshots,
BcfTopicSnapshotsActions,
BIMDataButton,
BIMDataDatePicker,
BIMDataIconArrow,
BIMDataIconClose,
BIMDataIconPlus,
BIMDataInput,
BIMDataLoading,
BIMDataSafeZoneModal,
BIMDataSelect,
BIMDataTextarea,
BIMDataTextbox,
BIMDataTooltip,
},
props: {
uiConfig: {
13 changes: 0 additions & 13 deletions src/components/bcf-topic-form/bcf-topic-images/BcfTopicImages.vue
Original file line number Diff line number Diff line change
@@ -67,21 +67,8 @@

<script>
import { isTabletOrMobile } from "../../../utils/browser.js";
// Components
import BIMDataButton from "@bimdata/design-system/src/BIMDataComponents/BIMDataButton/BIMDataButton.vue";
import {
BIMDataIconDelete,
BIMDataIconCamera,
BIMDataIconUnarchive,
} from "@bimdata/design-system/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/index.js";
export default {
components: {
BIMDataButton,
BIMDataIconDelete,
BIMDataIconCamera,
BIMDataIconUnarchive,
},
props: {
viewpoints: {
type: Array,
Original file line number Diff line number Diff line change
@@ -53,7 +53,6 @@ export default {
},
emits: ["create-viewpoint", "upload-viewpoint"],
setup(props) {
// Computed filtering viewpoints on isUpload = false
const snapshotedViewpoints = computed(() =>
props.viewpoints.filter((viewpoint) => !viewpoint.isUpload)
Original file line number Diff line number Diff line change
@@ -44,19 +44,10 @@

<script>
import BcfTopicSnapshotsActions from "../bcf-topic-snapshots-actions/BcfTopicSnapshotsActions.vue";
// Components
import BIMDataButton from "@bimdata/design-system/src/BIMDataComponents/BIMDataButton/BIMDataButton.vue";
import {
BIMDataIconDelete,
BIMDataIconCamera,
} from "@bimdata/design-system/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/index.js";
export default {
components: {
BcfTopicSnapshotsActions,
BIMDataButton,
BIMDataIconDelete,
BIMDataIconCamera,
},
props: {
viewpoints: {
10 changes: 0 additions & 10 deletions src/components/bcf-topic-overview/BcfTopicOverview.vue
Original file line number Diff line number Diff line change
@@ -235,11 +235,6 @@ import { computed, onMounted, ref } from "vue";
import { useService } from "../../service.js";
import { getPriorityColor } from "../../utils/topic.js";
// Components
import BIMDataSafeZoneModal from "@bimdata/components/src/BIMDataSafeZoneModal/BIMDataSafeZoneModal.vue";
import BIMDataButton from "@bimdata/design-system/src/BIMDataComponents/BIMDataButton/BIMDataButton.vue";
import {BIMDataIconArrow,BIMDataIconEdit, BIMDataIconDelete, BIMDataIconClose, BIMDataIconModel3D } from "@bimdata/design-system/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/index.js";
import BIMDataLoading from "@bimdata/design-system/src/BIMDataComponents/BIMDataLoading/BIMDataLoading.vue";
import BIMDataTextbox from "@bimdata/design-system/src/BIMDataComponents/BIMDataTextbox/BIMDataTextbox.vue";
import BcfTopicComments from "./bcf-topic-comments/BcfTopicComments.vue";
import BcfTopicDefaultImage from "../bcf-topic-card/BcfTopicDefaultImage.vue";
import BcfTopicViewpoints from "./bcf-topic-viewpoints/BcfTopicViewpoints.vue";
@@ -249,11 +244,6 @@ export default {
BcfTopicComments,
BcfTopicDefaultImage,
BcfTopicViewpoints,
BIMDataButton,
BIMDataIconArrow,BIMDataIconEdit, BIMDataIconDelete, BIMDataIconClose, BIMDataIconModel3D,
BIMDataLoading,
BIMDataSafeZoneModal,
BIMDataTextbox,
},
props: {
uiConfig: {
Original file line number Diff line number Diff line change
@@ -98,24 +98,10 @@ import { useService } from "../../../service.js";
import { getViewerOptions, highlightViewer, unhighlightViewer } from "../../../utils/viewer.js";
// Components
import BIMDataButton from "@bimdata/design-system/src/BIMDataComponents/BIMDataButton/BIMDataButton.vue";
import BIMDataDropdownList from "@bimdata/design-system/src/BIMDataComponents/BIMDataDropdownList/BIMDataDropdownList.vue";
import {
BIMDataIconCamera,
BIMDataIconDelete,
} from "@bimdata/design-system/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/index.js";
import BIMDataLoading from "@bimdata/design-system/src/BIMDataComponents/BIMDataLoading/BIMDataLoading.vue";
import BIMDataTextarea from "@bimdata/design-system/src/BIMDataComponents/BIMDataTextarea/BIMDataTextarea.vue";
import TopicComment from "./topic-comment/TopicComment.vue";
export default {
components: {
BIMDataButton,
BIMDataDropdownList,
BIMDataIconCamera,
BIMDataIconDelete,
BIMDataLoading,
BIMDataTextarea,
TopicComment,
},
props: {
Original file line number Diff line number Diff line change
@@ -141,39 +141,11 @@ import { inject, onMounted, ref, onBeforeUnmount } from "vue";
import { useService } from "../../../../service.js";
import { getViewerOptions, highlightViewer, unhighlightViewer } from "../../../../utils/viewer.js";
// Components
import BIMDataButton from "@bimdata/design-system/src/BIMDataComponents/BIMDataButton/BIMDataButton.vue";
import {
BIMDataIconCamera,
BIMDataIconClose,
BIMDataIconDelete,
BIMDataIconEdit,
BIMDataIconEllipsis,
BIMDataIconUndo,
BIMDataIconUser,
BIMDataIconValidate,
} from "@bimdata/design-system/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/index.js";
import BIMDataLoading from "@bimdata/design-system/src/BIMDataComponents/BIMDataLoading/BIMDataLoading.vue";
import BIMDataTextarea from "@bimdata/design-system/src/BIMDataComponents/BIMDataTextarea/BIMDataTextarea.vue";
import BIMDataTextbox from "@bimdata/design-system/src/BIMDataComponents/BIMDataTextbox/BIMDataTextbox.vue";
// TODO: should be imported from DS
import UserAvatar from "../../../user-avatar/UserAvatar.vue";
export default {
components: {
BIMDataButton,
BIMDataIconCamera,
BIMDataIconClose,
BIMDataIconDelete,
BIMDataIconEdit,
BIMDataIconEllipsis,
BIMDataIconUndo,
BIMDataIconUser,
BIMDataIconValidate,
BIMDataLoading,
BIMDataTextarea,
BIMDataTextbox,
UserAvatar,
},
props: {
Original file line number Diff line number Diff line change
@@ -35,17 +35,11 @@ import { computed } from "vue";
import { getStatusColor } from "../../../utils/topic.js";
import { getViewpointConfig } from "../../../utils/viewpoints.js";
// Components
import BIMDataCarousel from "@bimdata/design-system/src/BIMDataComponents/BIMDataCarousel/BIMDataCarousel.vue";
import BIMDataIconInformation from "@bimdata/design-system/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconInformation.vue";
import BIMDataIcon from "@bimdata/design-system/src/BIMDataComponents/BIMDataIcon/BIMDataIcon.vue";
import BcfTopicDefaultImage from "../../bcf-topic-card/BcfTopicDefaultImage.vue";
export default {
components: {
BcfTopicDefaultImage,
BIMDataCarousel,
BIMDataIcon,
BIMDataIconInformation,
},
props: {
detailedExtensions: {
6 changes: 0 additions & 6 deletions src/components/bcf-topics-table/BcfTopicsTable.vue
Original file line number Diff line number Diff line change
@@ -66,9 +66,6 @@
import { computed } from "vue";
import columnsDef from "./columns.js";
// Components
import BIMDataTable from "@bimdata/design-system/src/BIMDataComponents/BIMDataTable/BIMDataTable.vue";
import BIMDataTextbox from "@bimdata/design-system/src/BIMDataComponents/BIMDataTextbox/BIMDataTextbox.vue";
import BIMDataTooltip from "@bimdata/design-system/src/BIMDataComponents/BIMDataTooltip/BIMDataTooltip.vue";
import BcfTopicActionsCell from "./bcf-topic-actions-cell/BcfTopicActionsCell.vue";
import BcfTopicIndexCell from "./bcf-topic-index-cell/BcfTopicIndexCell.vue";
import BcfTopicPriorityCell from "./bcf-topic-priority-cell/BcfTopicPriorityCell.vue";
@@ -83,9 +80,6 @@ export default {
BcfTopicIndexCell,
BcfTopicPriorityCell,
BcfTopicStatusCell,
BIMDataTable,
BIMDataTextbox,
BIMDataTooltip,
UserAvatar
},
props: {
Loading

0 comments on commit 47d42a1

Please sign in to comment.