From 027a475a0a48e4769a920d5c178c30166c0204d7 Mon Sep 17 00:00:00 2001 From: volar Date: Fri, 10 Nov 2023 17:18:13 +0100 Subject: [PATCH] lint fixes --- src/components/coreDam/FileUpload.vue | 4 +--- .../coreDam/factory/UploadQueueItemFactory.ts | 2 +- src/plugins.d.ts | 14 +++++++------- src/services/DamConfigAssetCustomFormService.ts | 5 ++++- src/services/TempMapCustomFormElementHelper.ts | 11 +++++------ src/services/api/coreDam/assetApi.ts | 3 ++- src/services/api/coreDam/distributionApi.ts | 2 +- .../coreDam/externalProviderAssetListStore.ts | 10 ++++++++-- src/types/coreDam/AssetSlot.ts | 8 ++++++-- src/types/coreDam/Podcast.ts | 4 ++-- src/types/coreDam/PodcastEpisode.ts | 4 ++-- src/types/coreDam/Roi.ts | 8 ++++++-- src/views/common/log/LogListView.vue | 6 +++++- .../components/CachedPermissionGroupChip.vue | 2 +- .../asset/components/AssetByImageIdLink.vue | 3 +-- .../asset/components/AssetCreateButton.vue | 2 +- .../coreDam/asset/components/AssetImage.vue | 5 ++--- .../coreDam/asset/components/AssetMetadata.vue | 16 +++++++++++----- .../coreDam/asset/components/AssetUpload.vue | 2 +- src/views/coreDam/asset/components/ImageFile.vue | 11 ++++++++--- .../coreDam/asset/components/ImagePreview.vue | 13 +++++++++---- .../components/queue/AssetQueueItemEditable.vue | 5 ++++- .../components/toolbar/AssetSearchInput.vue | 4 +--- .../components/toolbar/AssetToolbarOptions.vue | 4 +--- .../detail/components/AssetDetailDialog.vue | 5 ++--- .../detail/components/AssetDetailSidebarROI.vue | 9 ++++++--- .../distribution/DistributionNewDialogCustom.vue | 11 +++++++++-- .../distribution/DistributionNewDialogJw.vue | 3 ++- .../DistributionNewDialogYoutube.vue | 3 ++- .../components/slots/AssetSlotListItem.vue | 11 +++++++++-- .../asset/list/components/AssetTableRowItem.vue | 2 +- .../asset/list/composables/assetItemActions.ts | 2 +- .../asset/list/composables/assetListActions.ts | 3 +-- .../components/CachedAssetLicenceChip.vue | 2 +- .../AuthorRemoteAutocompleteCachedAuthorChip.vue | 3 +-- ...moteAutocompleteCachedAuthorChipConflicts.vue | 3 +-- .../DistributionCategorySelectEditForm.vue | 9 +++------ .../extSystem/components/CachedExtSystemChip.vue | 2 +- ...eywordRemoteAutocompleteCachedKeywordChip.vue | 3 +-- .../podcast/components/CachedPodcastChip.vue | 2 +- .../videoShow/components/CachedVideoShowChip.vue | 2 +- 41 files changed, 133 insertions(+), 90 deletions(-) diff --git a/src/components/coreDam/FileUpload.vue b/src/components/coreDam/FileUpload.vue index e0221546..796ced72 100644 --- a/src/components/coreDam/FileUpload.vue +++ b/src/components/coreDam/FileUpload.vue @@ -292,9 +292,7 @@ watch(selectedFiles, (newValue, oldValue) => { @click.stop="clickDropzone" > {{ buttonText }} diff --git a/src/model/coreDam/factory/UploadQueueItemFactory.ts b/src/model/coreDam/factory/UploadQueueItemFactory.ts index b4ca9e69..68f3567a 100644 --- a/src/model/coreDam/factory/UploadQueueItemFactory.ts +++ b/src/model/coreDam/factory/UploadQueueItemFactory.ts @@ -3,7 +3,7 @@ import { type IntegerId, type UploadQueueItem, type UploadQueueItemStatus, - type UploadQueueItemType + type UploadQueueItemType, } from '@anzusystems/common-admin' import { DamAssetStatus } from '@/model/coreDam/valueObject/DamAssetStatus' import type { DamAssetType } from '@/model/coreDam/valueObject/DamAssetType' diff --git a/src/plugins.d.ts b/src/plugins.d.ts index c6fd79ac..80f7b4cf 100644 --- a/src/plugins.d.ts +++ b/src/plugins.d.ts @@ -15,14 +15,14 @@ declare module 'vue-router' { declare module '@vue/runtime-core' { export interface GlobalComponents { - ABtnPrimary: typeof import('vuetify/components')['VBtn'] - ABtnSecondary: typeof import('vuetify/components')['VBtn'] - ABtnTertiary: typeof import('vuetify/components')['VBtn'] - ABtnIcon: typeof import('vuetify/components')['VBtn'] - RouterLink: typeof import('vue-router')['RouterLink'] - RouterView: typeof import('vue-router')['RouterView'] + ABtnPrimary: (typeof import('vuetify/components'))['VBtn'] + ABtnSecondary: (typeof import('vuetify/components'))['VBtn'] + ABtnTertiary: (typeof import('vuetify/components'))['VBtn'] + ABtnIcon: (typeof import('vuetify/components'))['VBtn'] + RouterLink: (typeof import('vue-router'))['RouterLink'] + RouterView: (typeof import('vue-router'))['RouterView'] Notifications: any // todo - Acl: typeof import('@anzusystems/common-admin')['Acl'] + Acl: (typeof import('@anzusystems/common-admin'))['Acl'] } } diff --git a/src/services/DamConfigAssetCustomFormService.ts b/src/services/DamConfigAssetCustomFormService.ts index 08e0ce52..42b5640e 100644 --- a/src/services/DamConfigAssetCustomFormService.ts +++ b/src/services/DamConfigAssetCustomFormService.ts @@ -1,5 +1,8 @@ import { ref } from 'vue' -import type { DamConfigAssetCustomFormElement, DamConfigAssetCustomFormElementTemp } from '@/types/coreDam/DamConfigAssetCustomForm' +import type { + DamConfigAssetCustomFormElement, + DamConfigAssetCustomFormElementTemp, +} from '@/types/coreDam/DamConfigAssetCustomForm' import { fetchAssetCustomFormElements } from '@/services/api/coreDam/assetCustomFormApi' import { DamAssetType } from '@/model/coreDam/valueObject/DamAssetType' import { useCurrentExtSystem } from '@/composables/system/currentExtSystem' diff --git a/src/services/TempMapCustomFormElementHelper.ts b/src/services/TempMapCustomFormElementHelper.ts index ea7f90fe..5af2142f 100644 --- a/src/services/TempMapCustomFormElementHelper.ts +++ b/src/services/TempMapCustomFormElementHelper.ts @@ -2,17 +2,17 @@ import type { DamConfigAssetCustomFormElement, - DamConfigAssetCustomFormElementTemp + DamConfigAssetCustomFormElementTemp, } from '@/types/coreDam/DamConfigAssetCustomForm' import { isDefined } from '@anzusystems/common-admin' -export function mapElementsWithKeyToProperty -(items: Array +export function mapElementsWithKeyToProperty( + items: Array ): Array { - return items.map(item => { + return items.map((item) => { return { id: item.id, - property: isDefined(item.property) ? item.property as string : item.key as string, + property: isDefined(item.property) ? (item.property as string) : (item.key as string), name: item.name, position: item.position, attributes: item.attributes, @@ -24,5 +24,4 @@ export function mapElementsWithKeyToProperty _resourceName: item._resourceName, } }) - } diff --git a/src/services/api/coreDam/assetApi.ts b/src/services/api/coreDam/assetApi.ts index 192304ec..b8d87f1e 100644 --- a/src/services/api/coreDam/assetApi.ts +++ b/src/services/api/coreDam/assetApi.ts @@ -19,7 +19,8 @@ import { HTTP_STATUS_OK, type IntegerId, isNull, - type Pagination, type UploadQueueItem, + type Pagination, + type UploadQueueItem, useAlerts, type ValidationError, } from '@anzusystems/common-admin' diff --git a/src/services/api/coreDam/distributionApi.ts b/src/services/api/coreDam/distributionApi.ts index 03aed8d3..12351522 100644 --- a/src/services/api/coreDam/distributionApi.ts +++ b/src/services/api/coreDam/distributionApi.ts @@ -38,7 +38,7 @@ export const fetchAssetDistributionList = ( assetFileId: DocId, pagination: Pagination, diff --git a/src/stores/coreDam/externalProviderAssetListStore.ts b/src/stores/coreDam/externalProviderAssetListStore.ts index 60743ea8..75dc427b 100644 --- a/src/stores/coreDam/externalProviderAssetListStore.ts +++ b/src/stores/coreDam/externalProviderAssetListStore.ts @@ -40,7 +40,10 @@ export const useExternalProviderAssetListStore = defineStore('damExternalProvide appendList(assets: AssetExternalProviderListDto[], selectedItems: UploadQueueItem[] = []) { const selectedIds: Array = [] for (let i = 0; i < selectedItems.length; i++) { - if (selectedItems[i].type === UploadQueueItemType.ExternalProviderAsset && selectedItems[i].externalProviderAssetId) { + if ( + selectedItems[i].type === UploadQueueItemType.ExternalProviderAsset && + selectedItems[i].externalProviderAssetId + ) { selectedIds.push(selectedItems[i].externalProviderAssetId as AssetExternalProviderId) } } @@ -56,7 +59,10 @@ export const useExternalProviderAssetListStore = defineStore('damExternalProvide setList(assets: AssetExternalProviderListDto[], selectedItems: UploadQueueItem[] = []) { const selectedIds: Array = [] for (let i = 0; i < selectedItems.length; i++) { - if (selectedItems[i].type === UploadQueueItemType.ExternalProviderAsset && selectedItems[i].externalProviderAssetId) { + if ( + selectedItems[i].type === UploadQueueItemType.ExternalProviderAsset && + selectedItems[i].externalProviderAssetId + ) { selectedIds.push(selectedItems[i].externalProviderAssetId as AssetExternalProviderId) } } diff --git a/src/types/coreDam/AssetSlot.ts b/src/types/coreDam/AssetSlot.ts index d68bc03e..79042eea 100644 --- a/src/types/coreDam/AssetSlot.ts +++ b/src/types/coreDam/AssetSlot.ts @@ -1,5 +1,9 @@ -import type { AnzuUserAndTimeTrackingAware, DocId, ResourceNameSystemAware } from '@anzusystems/common-admin' -import type { AssetFileNullable } from '@anzusystems/common-admin' +import type { + AnzuUserAndTimeTrackingAware, + AssetFileNullable, + DocId, + ResourceNameSystemAware, +} from '@anzusystems/common-admin' export interface AssetSlot extends AnzuUserAndTimeTrackingAware, ResourceNameSystemAware { id: DocId diff --git a/src/types/coreDam/Podcast.ts b/src/types/coreDam/Podcast.ts index d78256c5..fee29a91 100644 --- a/src/types/coreDam/Podcast.ts +++ b/src/types/coreDam/Podcast.ts @@ -1,5 +1,7 @@ import type { AnzuUserAndTimeTrackingAware, + AssetFileImagePreviewNullable, + AssetFileLinks, DatetimeUTCNullable, DocId, IntegerIdNullable, @@ -7,8 +9,6 @@ import type { } from '@anzusystems/common-admin' import type { PodcastMode } from '@/model/coreDam/valueObject/PodcastMode' import type { PodcastLastImportStatus } from '@/model/coreDam/valueObject/PodcastLastImportStatus' -import type { AssetFileLinks } from '@anzusystems/common-admin' -import type { AssetFileImagePreviewNullable } from '@anzusystems/common-admin' interface Texts { title: string diff --git a/src/types/coreDam/PodcastEpisode.ts b/src/types/coreDam/PodcastEpisode.ts index 282dba1e..739ed9a2 100644 --- a/src/types/coreDam/PodcastEpisode.ts +++ b/src/types/coreDam/PodcastEpisode.ts @@ -1,12 +1,12 @@ import type { AnzuUserAndTimeTrackingAware, + AssetFileImagePreviewNullable, + AssetFileLinks, DatetimeUTCNullable, DocId, DocIdNullable, ResourceNameSystemAware, } from '@anzusystems/common-admin' -import type { AssetFileLinks } from '@anzusystems/common-admin' -import type { AssetFileImagePreviewNullable } from '@anzusystems/common-admin' import type { PodcastLastImportStatus } from '@/model/coreDam/valueObject/PodcastLastImportStatus' interface Texts { diff --git a/src/types/coreDam/Roi.ts b/src/types/coreDam/Roi.ts index 7fde8015..5ba617ad 100644 --- a/src/types/coreDam/Roi.ts +++ b/src/types/coreDam/Roi.ts @@ -1,5 +1,9 @@ -import type { AnzuUserAndTimeTrackingAware, DocId, ResourceNameSystemAware } from '@anzusystems/common-admin' -import type { AssetFileLink } from '@anzusystems/common-admin' +import type { + AnzuUserAndTimeTrackingAware, + AssetFileLink, + DocId, + ResourceNameSystemAware, +} from '@anzusystems/common-admin' export interface RegionOfInterest extends AnzuUserAndTimeTrackingAware, ResourceNameSystemAware { id: DocId diff --git a/src/views/common/log/LogListView.vue b/src/views/common/log/LogListView.vue index 916e0469..ea43a925 100644 --- a/src/views/common/log/LogListView.vue +++ b/src/views/common/log/LogListView.vue @@ -91,7 +91,11 @@ watch( > diff --git a/src/views/common/permissionGroup/components/CachedPermissionGroupChip.vue b/src/views/common/permissionGroup/components/CachedPermissionGroupChip.vue index a15d0942..6013a83c 100644 --- a/src/views/common/permissionGroup/components/CachedPermissionGroupChip.vue +++ b/src/views/common/permissionGroup/components/CachedPermissionGroupChip.vue @@ -1,7 +1,7 @@