diff --git a/packages/dui3/components/filter/ListSelect.vue b/packages/dui3/components/filter/ListSelect.vue
index 7a6f50f080..de4499c506 100644
--- a/packages/dui3/components/filter/ListSelect.vue
+++ b/packages/dui3/components/filter/ListSelect.vue
@@ -4,45 +4,64 @@
- {{ value }}
+ {{ value }}
- {{ item }}
+ {{ item }}
-
+
All supported objects will be sent. Depending on the model, this might take a
while.
-
+
(selectedFilter = filter)"
/>
-
TODO
+
TODO
+
+ (selectedFilter = filter)"
+ />
+
This action will replace the existing
- {{ filter.name }}
+ {{ selectedFilterName }}
filter.
diff --git a/packages/dui3/lib/models/card/send.ts b/packages/dui3/lib/models/card/send.ts
index 823f493dda..744896e555 100644
--- a/packages/dui3/lib/models/card/send.ts
+++ b/packages/dui3/lib/models/card/send.ts
@@ -9,6 +9,7 @@ export interface ISenderModelCard extends IModelCard {
}
export interface ISendFilter extends IDiscriminatedObject {
+ id: string
name: string
summary: string
isDefault: boolean
@@ -19,6 +20,11 @@ export interface IDirectSelectionSendFilter extends ISendFilter {
selectedObjectIds: string[]
}
+export interface RevitViewsSendFilter extends ISendFilter {
+ selectedView: string
+ availableViews: string[]
+}
+
export class SenderModelCard extends ModelCard implements ISenderModelCard {
sendFilter?: ISendFilter | undefined
sending?: boolean | undefined
diff --git a/packages/dui3/store/hostApp.ts b/packages/dui3/store/hostApp.ts
index cbe9fd1990..9b0527bf16 100644
--- a/packages/dui3/store/hostApp.ts
+++ b/packages/dui3/store/hostApp.ts
@@ -8,7 +8,8 @@ import type { IReceiverModelCard } from '~/lib/models/card/receiver'
import type {
IDirectSelectionSendFilter,
ISendFilter,
- ISenderModelCard
+ ISenderModelCard,
+ RevitViewsSendFilter
} from 'lib/models/card/send'
import type { ToastNotification } from '@speckle/ui-components'
import type { Nullable } from '@speckle/shared'
@@ -45,6 +46,8 @@ export const useHostAppStore = defineStore('hostAppStore', () => {
const documentInfo = ref
()
const documentModelStore = ref({ models: [] })
+ const availableViews = ref()
+
const dismissNotification = () => {
currentNotification.value = null
}
@@ -256,7 +259,8 @@ export const useHostAppStore = defineStore('hostAppStore', () => {
// You should stop asking why if you saw anything related autocad..
// It solves the press "escape" issue.
// Because probably we don't give enough time to acad complete it's previos task and it stucks.
- if (hostAppName.value === 'autocad') {
+ const shittyHostApps = ['autocad']
+ if (shittyHostApps.includes(hostAppName.value as string)) {
setTimeout(() => {
void app.$sendBinding.send(modelCardId)
}, 500) // I prefer to sacrifice 500ms
@@ -443,8 +447,15 @@ export const useHostAppStore = defineStore('hostAppStore', () => {
/**
* Sources the available send filters from the app. This is useful in case of host app layer changes, etc.
*/
- const refreshSendFilters = async () =>
- (sendFilters.value = await app.$sendBinding?.getSendFilters())
+ const refreshSendFilters = async () => {
+ sendFilters.value = await app.$sendBinding?.getSendFilters()
+ const revitViews = sendFilters.value.find(
+ (f) => f.id === 'revitViews'
+ ) as RevitViewsSendFilter
+ if (revitViews) {
+ availableViews.value = revitViews.availableViews
+ }
+ }
const getSendSettings = async () => {
sendSettings.value = await app.$sendBinding.getSendSettings()
@@ -549,6 +560,7 @@ export const useHostAppStore = defineStore('hostAppStore', () => {
currentNotification,
showErrorDialog,
hostAppError,
+ availableViews,
setNotification,
setModelError,
setLatestAvailableVersion,