Skip to content

Commit

Permalink
lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
volar committed Nov 10, 2023
1 parent 268c39c commit 027a475
Show file tree
Hide file tree
Showing 41 changed files with 133 additions and 90 deletions.
4 changes: 1 addition & 3 deletions src/components/coreDam/FileUpload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,7 @@ watch(selectedFiles, (newValue, oldValue) => {
@click.stop="clickDropzone"
>
<template #prepend>
<VIcon
icon="mdi-upload"
/>
<VIcon icon="mdi-upload" />
</template>
{{ buttonText }}
</VBtn>
Expand Down
2 changes: 1 addition & 1 deletion src/model/coreDam/factory/UploadQueueItemFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
type IntegerId,
type UploadQueueItem,

Check failure on line 4 in src/model/coreDam/factory/UploadQueueItemFactory.ts

View workflow job for this annotation

GitHub Actions / Lint (18, ubuntu-latest)

Module '"@anzusystems/common-admin"' has no exported member 'UploadQueueItem'.
type UploadQueueItemStatus,

Check failure on line 5 in src/model/coreDam/factory/UploadQueueItemFactory.ts

View workflow job for this annotation

GitHub Actions / Lint (18, ubuntu-latest)

Module '"@anzusystems/common-admin"' has no exported member 'UploadQueueItemStatus'.
type UploadQueueItemType
type UploadQueueItemType,

Check failure on line 6 in src/model/coreDam/factory/UploadQueueItemFactory.ts

View workflow job for this annotation

GitHub Actions / Lint (18, ubuntu-latest)

Module '"@anzusystems/common-admin"' has no exported member 'UploadQueueItemType'.
} from '@anzusystems/common-admin'
import { DamAssetStatus } from '@/model/coreDam/valueObject/DamAssetStatus'
import type { DamAssetType } from '@/model/coreDam/valueObject/DamAssetType'
Expand Down
14 changes: 7 additions & 7 deletions src/plugins.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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']
}
}

Expand Down
5 changes: 4 additions & 1 deletion src/services/DamConfigAssetCustomFormService.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
11 changes: 5 additions & 6 deletions src/services/TempMapCustomFormElementHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

import type {
DamConfigAssetCustomFormElement,
DamConfigAssetCustomFormElementTemp
DamConfigAssetCustomFormElementTemp,
} from '@/types/coreDam/DamConfigAssetCustomForm'
import { isDefined } from '@anzusystems/common-admin'

export function mapElementsWithKeyToProperty
(items: Array<DamConfigAssetCustomFormElementTemp>
export function mapElementsWithKeyToProperty(
items: Array<DamConfigAssetCustomFormElementTemp>
): Array<DamConfigAssetCustomFormElement> {
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,
Expand All @@ -24,5 +24,4 @@ export function mapElementsWithKeyToProperty
_resourceName: item._resourceName,
}
})

}
3 changes: 2 additions & 1 deletion src/services/api/coreDam/assetApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ import {
HTTP_STATUS_OK,
type IntegerId,
isNull,
type Pagination, type UploadQueueItem,
type Pagination,
type UploadQueueItem,

Check failure on line 23 in src/services/api/coreDam/assetApi.ts

View workflow job for this annotation

GitHub Actions / Lint (18, ubuntu-latest)

Module '"@anzusystems/common-admin"' has no exported member 'UploadQueueItem'.
useAlerts,
type ValidationError,
} from '@anzusystems/common-admin'
Expand Down
2 changes: 1 addition & 1 deletion src/services/api/coreDam/distributionApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const fetchAssetDistributionList = <T = DistributionJwItem | Distribution
)

export const fetchAssetFileDistributionList = <
T = DistributionJwItem | DistributionYoutubeItem | DistributionCustomItem
T = DistributionJwItem | DistributionYoutubeItem | DistributionCustomItem,
>(
assetFileId: DocId,
pagination: Pagination,
Expand Down
10 changes: 8 additions & 2 deletions src/stores/coreDam/externalProviderAssetListStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ export const useExternalProviderAssetListStore = defineStore('damExternalProvide
appendList(assets: AssetExternalProviderListDto[], selectedItems: UploadQueueItem[] = []) {
const selectedIds: Array<AssetExternalProviderId> = []
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)
}
}
Expand All @@ -56,7 +59,10 @@ export const useExternalProviderAssetListStore = defineStore('damExternalProvide
setList(assets: AssetExternalProviderListDto[], selectedItems: UploadQueueItem[] = []) {
const selectedIds: Array<AssetExternalProviderId> = []
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)
}
}
Expand Down
8 changes: 6 additions & 2 deletions src/types/coreDam/AssetSlot.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/types/coreDam/Podcast.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import type {
AnzuUserAndTimeTrackingAware,
AssetFileImagePreviewNullable,
AssetFileLinks,
DatetimeUTCNullable,
DocId,
IntegerIdNullable,
ResourceNameSystemAware,
} 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
Expand Down
4 changes: 2 additions & 2 deletions src/types/coreDam/PodcastEpisode.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
8 changes: 6 additions & 2 deletions src/types/coreDam/Roi.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 5 additions & 1 deletion src/views/common/log/LogListView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@ watch(
>
<LogDatatable
:key="system"
:ref="(el: any) => { datatables[system] = el }"
:ref="
(el: any) => {
datatables[system] = el
}
"
:system="system"
@count-change="updateCount($event, system)"
/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts" setup>
import type { IntegerId } from '@anzusystems/common-admin'
import { ACachedChip } from '@anzusystems/common-admin'
import { ROUTE } from '@/router/routes'
import type { IntegerId } from '@anzusystems/common-admin'
import { useCachedPermissionGroups } from '@/views/common/permissionGroup/composables/cachedPermissionGroups'
withDefaults(
Expand Down
3 changes: 1 addition & 2 deletions src/views/coreDam/asset/components/AssetByImageIdLink.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<script lang="ts" setup>
import { computed, ref, watch } from 'vue'
import { useRouter } from 'vue-router'
import type { DocId } from '@anzusystems/common-admin'
import type { AssetFileImage, DocId } from '@anzusystems/common-admin'
import { ROUTE } from '@/router/routes'
import { fetchImageFile } from '@/services/api/coreDam/imageApi'
import type { AssetFileImage } from '@anzusystems/common-admin'
const props = withDefaults(
defineProps<{
Expand Down
2 changes: 1 addition & 1 deletion src/views/coreDam/asset/components/AssetCreateButton.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script lang="ts" setup>
import { ref } from 'vue'
import type { AssetDetailItemDto } from '@anzusystems/common-admin'
import {
ADialogToolbar,
AFormValueObjectOptionsSelect,
Expand All @@ -12,7 +13,6 @@ import { ENTITY } from '@/services/api/coreDam/authorApi'
import { useAssetFactory } from '@/model/coreDam/factory/AssetFactory'
import { useAssetType } from '@/model/coreDam/valueObject/DamAssetType'
import { useI18n } from 'vue-i18n'
import type { AssetDetailItemDto } from '@anzusystems/common-admin'
import { createAsset } from '@/services/api/coreDam/assetApi'
import { useAssetDetailStore } from '@/stores/coreDam/assetDetailStore'
import { useCurrentAssetLicence } from '@/composables/system/currentExtSystem'
Expand Down
5 changes: 2 additions & 3 deletions src/views/coreDam/asset/components/AssetImage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ import { computed } from 'vue'
import { DamAssetType } from '@/model/coreDam/valueObject/DamAssetType'
import { DamAssetStatus } from '@/model/coreDam/valueObject/DamAssetStatus'
import { useI18n } from 'vue-i18n'
import { isUndefined } from '@anzusystems/common-admin'
import type { AssetFileProperties } from '@anzusystems/common-admin'
import { isUndefined, useRemainingTime } from '@anzusystems/common-admin'
import placeholder16x9 from '@/assets/image/placeholder16x9.jpg'
import AssetImageMetaIcons from '@/views/coreDam/asset/components/AssetImageMetaIcons.vue'
import type { AssetFileProperties } from '@anzusystems/common-admin'
import { useRemainingTime } from '@anzusystems/common-admin'
const props = withDefaults(
defineProps<{
Expand Down
16 changes: 11 additions & 5 deletions src/views/coreDam/asset/components/AssetMetadata.vue
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
<script lang="ts" setup>
import AssetCustomMetadataForm from '@/components/coreDam/customMetadata/AssetCustomMetadataForm.vue'
import { ACopyText, ASystemEntityScope, dateTimePretty, prettyBytes } from '@anzusystems/common-admin'
import type { AssetFile } from '@anzusystems/common-admin'
import {
ACopyText,
assetFileIsAudioFile,
assetFileIsImageFile,
assetFileIsVideoFile,
ASystemEntityScope,
dateTimePretty,
prettyBytes,
} from '@anzusystems/common-admin'
import KeywordRemoteAutocompleteWithCached from '@/views/coreDam/keyword/components/KeywordRemoteAutocompleteWithCached.vue'
import CachedDamUserChip from '@/components/CachedDamUserChip.vue'
import AuthorRemoteAutocompleteWithCached from '@/views/coreDam/author/components/AuthorRemoteAutocompleteWithCached.vue'
import { useAssetDetailActions } from '@/views/coreDam/asset/detail/composables/assetDetailActions'
import { computed, ref } from 'vue'
import { useI18n } from 'vue-i18n'
import { DamAssetType } from '@/model/coreDam/valueObject/DamAssetType'
import type { AssetFile, AssetFileAudio, AssetFileDocument, AssetFileImage, AssetFileVideo } from '@anzusystems/common-admin'
import { assetFileIsImageFile } from '@anzusystems/common-admin'
import { useKeywordAssetTypeConfig } from '@/views/coreDam/keyword/composables/keywordConfig'
import { useAuthorAssetTypeConfig } from '@/views/coreDam/author/composables/authorConfig'
import { AssetMetadataValidationScopeSymbol } from '@/components/validationScopes'
import AssetMetadataImageAttributes from '@/views/coreDam/asset/components/AssetMetadataImageAttributes.vue'
import { assetFileIsVideoFile, assetFileIsAudioFile } from '@anzusystems/common-admin'
import AssetMetadataVideoAttributes from '@/views/coreDam/asset/components/AssetMetadataVideoAttributes.vue'
import AssetMetadataAudioAttributes from '@/views/coreDam/asset/components/AssetMetadataAudioAttributes.vue'
Expand All @@ -41,7 +47,7 @@ const isTypeVideo = computed(() => {
})
const assetMainFile = computed<null | AssetFile>(() => {
return asset.value && asset.value.mainFile ? asset.value.mainFile as AssetFile : null
return asset.value && asset.value.mainFile ? (asset.value.mainFile as AssetFile) : null
})
const { keywordEnabled, keywordRequired } = useKeywordAssetTypeConfig(assetType.value)
Expand Down
2 changes: 1 addition & 1 deletion src/views/coreDam/asset/components/AssetUpload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import { useBetaTestFeatures } from '@/services/BetaTestFeaturesService'
import { damConfigExtSystem } from '@/services/DamConfigExtSystemService'
import { DamAssetType } from '@/model/coreDam/valueObject/DamAssetType'
import type { DocId } from '@anzusystems/common-admin'
import { useI18n } from 'vue-i18n'
import { ADialogToolbar } from '@anzusystems/common-admin'
import { useI18n } from 'vue-i18n'
const props = withDefaults(
defineProps<{
Expand Down
11 changes: 8 additions & 3 deletions src/views/coreDam/asset/components/ImageFile.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
<script lang="ts" setup>
import { AssetFileProcessStatus, type DocId, type DocIdNullable } from '@anzusystems/common-admin'
import { ADialogToolbar, isNull } from '@anzusystems/common-admin'
import type { AssetFileImage } from '@anzusystems/common-admin'
import {
ADialogToolbar,
AssetFileProcessStatus,
type DocId,
type DocIdNullable,
isNull,
} from '@anzusystems/common-admin'
import { computed, ref, watch } from 'vue'
import placeholder16x9 from '@/assets/image/placeholder16x9.jpg'
import type { AssetFileImage } from '@anzusystems/common-admin'
import { fetchImageFile } from '@/services/api/coreDam/imageApi'
import { useI18n } from 'vue-i18n'
import AssetByImageIdLink from '@/views/coreDam/asset/components/AssetByImageIdLink.vue'
Expand Down
13 changes: 9 additions & 4 deletions src/views/coreDam/asset/components/ImagePreview.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
<script lang="ts" setup>
import { AssetFileProcessStatus, type AssetSelectReturnData, type DocId } from '@anzusystems/common-admin'
import { ADialogToolbar, isNull, AAssetSelect } from '@anzusystems/common-admin'
import type { AssetFileImage, AssetFileImagePreviewNullable } from '@anzusystems/common-admin'
import {
AAssetSelect,
ADialogToolbar,
AssetFileProcessStatus,
type AssetSelectReturnData,
type DocId,
isNull,
} from '@anzusystems/common-admin'
import { computed, ref, watch } from 'vue'
import placeholder16x9 from '@/assets/image/placeholder16x9.jpg'
import type { AssetFileImagePreviewNullable } from '@anzusystems/common-admin'
import type { AssetFileImage } from '@anzusystems/common-admin'
import { fetchImageFile } from '@/services/api/coreDam/imageApi'
import { useI18n } from 'vue-i18n'
import { useCurrentAssetLicence } from '@/composables/system/currentExtSystem'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@
import { computed } from 'vue'
import { deleteAsset, fetchAsset } from '@/services/api/coreDam/assetApi'
import { useAssetDetailStore } from '@/stores/coreDam/assetDetailStore'
import { type AssetCustomData, AssetFileFailReason, type DocId, type UploadQueueItem } from '@anzusystems/common-admin'
import {
AActionDeleteButton,
type AssetCustomData,
AssetFileFailReason,
ASystemEntityScope,
ATableCopyIdButton,
type DocId,
isNull,
prettyBytes,
type UploadQueueItem,
UploadQueueItemStatus,
useAlerts,
} from '@anzusystems/common-admin'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ const props = withDefaults(
defineProps<{
modelValue: string | null
}>(),
{
}
{}
)
const emit = defineEmits<{
Expand All @@ -25,7 +24,6 @@ const modelValueComputed = computed({
emit('update:modelValue', newValue)
},
})
</script>

<template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import { ACL } from '@/types/Permission'
import AssetCreateButton from '@/views/coreDam/asset/components/AssetCreateButton.vue'
import { computed, ref } from 'vue'
import { useCurrentAssetLicence, useCurrentExtSystem } from '@/composables/system/currentExtSystem'
import AssetToolbarExtSystemLicenceDialog
from '@/views/coreDam/asset/components/toolbar/AssetToolbarExtSystemLicenceDialog.vue'
import AssetToolbarExtSystemLicenceDialog from '@/views/coreDam/asset/components/toolbar/AssetToolbarExtSystemLicenceDialog.vue'
withDefaults(
defineProps<{
Expand Down Expand Up @@ -43,7 +42,6 @@ const dialog = ref(false)
const openDialog = () => {
dialog.value = true
}
</script>

<template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ import { useAssetListStore } from '@/stores/coreDam/assetListStore'
import { AssetDetailTab, useAssetDetailTab } from '@/composables/system/assetDetailTab'
import AssetImageRoiSelect from '@/views/coreDam/asset/detail/components/AssetImageRoiSelect.vue'
import { DamAssetType } from '@/model/coreDam/valueObject/DamAssetType'
import { assetFileIsImageFile } from '@anzusystems/common-admin'
import type { DocId } from '@anzusystems/common-admin'
import { assetFileIsImageFile, browserHistoryReplaceUrlByRouter, isNull, useTheme } from '@anzusystems/common-admin'
import { DamAssetStatus } from '@/model/coreDam/valueObject/DamAssetStatus'
import AssetImage from '@/views/coreDam/asset/components/AssetImage.vue'
import type { DocId } from '@anzusystems/common-admin'
import { browserHistoryReplaceUrlByRouter, isNull, useTheme } from '@anzusystems/common-admin'
import { useAssetListActions } from '@/views/coreDam/asset/list/composables/assetListActions'
import { useI18n } from 'vue-i18n'
import { useRouter } from 'vue-router'
Expand Down
Loading

0 comments on commit 027a475

Please sign in to comment.