Skip to content

Commit

Permalink
optimize imports
Browse files Browse the repository at this point in the history
  • Loading branch information
volar committed Nov 16, 2023
1 parent 91d5bea commit 28c047a
Show file tree
Hide file tree
Showing 74 changed files with 175 additions and 202 deletions.
3 changes: 1 addition & 2 deletions src/model/coreDam/factory/DistributionCategoryFactory.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { SYSTEM_CORE_DAM } from '@/model/systems'
import { dateTimeNow } from '@anzusystems/common-admin'
import { DamAssetType, dateTimeNow } from '@anzusystems/common-admin'
import { ENTITY } from '@/services/api/coreDam/distributionCategoryApi'
import type { DistributionCategory } from '@/types/coreDam/DistributionCategory'
import { DamAssetType } from '@anzusystems/common-admin'

export function useDistributionCategoryFactory() {
const createDefault = (extSystemId: number, type?: DamAssetType): DistributionCategory => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { SYSTEM_CORE_DAM } from '@/model/systems'
import { dateTimeNow } from '@anzusystems/common-admin'
import { DamAssetType, dateTimeNow } from '@anzusystems/common-admin'
import { ENTITY } from '@/services/api/coreDam/distributionCategorySelectApi'
import type { DistributionCategorySelect } from '@/types/coreDam/DistributionCategorySelect'
import { DamAssetType } from '@anzusystems/common-admin'

export function useDistributionCategorySelectFactory() {
const createDefault = (extSystemId: number): DistributionCategorySelect => {
Expand Down
3 changes: 1 addition & 2 deletions src/model/coreDam/filter/AssetFilter.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { reactive } from 'vue'
import { makeFilterHelper } from '@anzusystems/common-admin'
import { DamAssetStatus, makeFilterHelper } from '@anzusystems/common-admin'
import { SYSTEM_CORE_DAM } from '@/model/systems'
import { ENTITY } from '@/services/api/coreDam/assetApi'
import { DamAssetStatus } from '@anzusystems/common-admin'

const makeFilter = makeFilterHelper(SYSTEM_CORE_DAM, ENTITY)

Expand Down
3 changes: 1 addition & 2 deletions src/model/coreDam/filter/DistributionCategoryFilter.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import type { Filter } from '@anzusystems/common-admin'
import { makeFilterHelper, type MakeFilterOptions } from '@anzusystems/common-admin'
import { DamAssetType, makeFilterHelper, type MakeFilterOptions } from '@anzusystems/common-admin'
import { reactive } from 'vue'
import { SYSTEM_CORE_DAM } from '@/model/systems'
import { ENTITY } from '@/services/api/coreDam/distributionCategoryApi'
import { DamAssetType } from '@anzusystems/common-admin'

const makeFilter: <T>(options: Partial<MakeFilterOptions<T>>) => Filter<T> = makeFilterHelper(SYSTEM_CORE_DAM, ENTITY)

Expand Down
3 changes: 1 addition & 2 deletions src/model/coreDam/filter/DistributionCategorySelectFilter.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import type { Filter } from '@anzusystems/common-admin'
import { makeFilterHelper, type MakeFilterOptions } from '@anzusystems/common-admin'
import { DamAssetType, makeFilterHelper, type MakeFilterOptions } from '@anzusystems/common-admin'
import { reactive } from 'vue'
import { SYSTEM_CORE_DAM } from '@/model/systems'
import { ENTITY } from '@/services/api/coreDam/distributionCategorySelectApi'
import { DamAssetType } from '@anzusystems/common-admin'

const makeFilter: <T>(options: Partial<MakeFilterOptions<T>>) => Filter<T> = makeFilterHelper(SYSTEM_CORE_DAM, ENTITY)

Expand Down
8 changes: 6 additions & 2 deletions src/types/coreDam/Distribution.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import type { DamDistributionServiceName, DamDistributionStatus } from '@anzusystems/common-admin'
import type { DatetimeUTCNullable, DocId } from '@anzusystems/common-admin'
import type {
DamDistributionServiceName,
DamDistributionStatus,
DatetimeUTCNullable,
DocId,
} from '@anzusystems/common-admin'
import { isDefined } from '@anzusystems/common-admin'
import type { DistributionYoutubePrivacy } from '@/model/coreDam/valueObject/DistributionYoutubePrivacy'
import type { DistributionFailReason } from '@/model/coreDam/valueObject/DistributionFailReason'
Expand Down
9 changes: 7 additions & 2 deletions src/types/coreDam/DistributionCategory.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import type { AnzuUserAndTimeTrackingAware, DocId, IntegerId, ResourceNameSystemAware } from '@anzusystems/common-admin'
import type { DamAssetType } from '@anzusystems/common-admin'
import type {
AnzuUserAndTimeTrackingAware,
DamAssetType,
DocId,
IntegerId,
ResourceNameSystemAware,
} from '@anzusystems/common-admin'
import type { DistributionCategoryOption } from '@/types/coreDam/DistributionCategoryOption'

export interface DistributionCategory extends AnzuUserAndTimeTrackingAware, ResourceNameSystemAware {
Expand Down
11 changes: 8 additions & 3 deletions src/types/coreDam/DistributionCategorySelect.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import type { AnzuUserAndTimeTrackingAware, DocId, IntegerId, ResourceNameSystemAware } from '@anzusystems/common-admin'
import type {
AnzuUserAndTimeTrackingAware,
DamAssetType,
DamDistributionServiceName,
DocId,
IntegerId,
ResourceNameSystemAware,
} from '@anzusystems/common-admin'
import type { DistributionCategoryOption } from '@/types/coreDam/DistributionCategoryOption'
import type { DamAssetType } from '@anzusystems/common-admin'
import type { DamDistributionServiceName } from '@anzusystems/common-admin'

export interface DistributionCategorySelect extends AnzuUserAndTimeTrackingAware, ResourceNameSystemAware {
id: DocId
Expand Down
4 changes: 1 addition & 3 deletions src/views/common/permission/components/PermissionEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,7 @@ const { t } = useI18n()
>
<td>
{{ translatePermission('actions', permissionAction) }}
<div class="text-caption text-disabled">
{{ permissionSubject }}_{{ permissionAction }}
</div>
<div class="text-caption text-disabled">{{ permissionSubject }}_{{ permissionAction }}</div>
</td>
<td v-if="isEdit">
<PermissionGrantEditor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const grantOriginOption = computed(() => getGrantOriginOption(props.grantOrigin)
<span
v-if="grantOrigin !== GrantOrigin.DefaultGrant"
class="ml-1"
>({{ grantOriginOption.title }})</span>
>({{ grantOriginOption.title }})</span
>
</VChip>
</template>
8 changes: 3 additions & 5 deletions src/views/coreDam/asset/components/AssetImage.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<script lang="ts" setup>
import { computed } from 'vue'
import { DamAssetType } from '@anzusystems/common-admin'
import { DamAssetStatus } from '@anzusystems/common-admin'
import { useI18n } from 'vue-i18n'
import type { AssetFileProperties } from '@anzusystems/common-admin'
import { isUndefined, useRemainingTime } from '@anzusystems/common-admin'
import { DamAssetStatus, DamAssetType, isUndefined, useRemainingTime } from '@anzusystems/common-admin'
import { useI18n } from 'vue-i18n'
import placeholder16x9 from '@/assets/image/placeholder16x9.jpg'
import AssetImageMetaIcons from '@/views/coreDam/asset/components/AssetImageMetaIcons.vue'
Expand Down Expand Up @@ -247,7 +245,7 @@ const { remainingTimeShort } = useRemainingTime()
alt=""
:style="'background-color:' + backgroundColorComputed"
@onerror="onError"
>
/>
<div
v-if="showIconComputed"
class="asset-image__icon-wrapper"
Expand Down
5 changes: 2 additions & 3 deletions src/views/coreDam/asset/components/AssetImageMetaIcons.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<script lang="ts" setup>
import { DamAssetType } from '@anzusystems/common-admin'
import { type AssetFileProperties, useDamConfigState } from '@anzusystems/common-admin'
import { type AssetFileProperties, DamAssetType, useDamConfigState } from '@anzusystems/common-admin'
import { computed } from 'vue'
import {
DIMENSIONS_CONFIG,
Expand Down Expand Up @@ -90,7 +89,7 @@ const data = computed(() => {
:src="item"
alt=""
:title="data.titles[index] || ''"
>
/>
</div>
</template>

Expand Down
5 changes: 2 additions & 3 deletions src/views/coreDam/asset/components/AssetInfobox.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<script lang="ts" setup>
import { DamAssetStatus } from '@anzusystems/common-admin'
import { type AssetFileFailReason, AssetFileProcessStatus, DamAssetStatus } from '@anzusystems/common-admin'
import { useI18n } from 'vue-i18n'
import AssetFileFailReasonChip from '@/views/coreDam/asset/components/AssetFileFailReasonChip.vue'
import { type AssetFileFailReason, AssetFileProcessStatus } from '@anzusystems/common-admin'
withDefaults(
defineProps<{
Expand Down Expand Up @@ -41,7 +40,7 @@ const { t } = useI18n()
>
{{ t('coreDam.asset.detail.info.status.failed') }}
<div v-if="assetMainFileFailReason">
<br>
<br />
<AssetFileFailReasonChip :reason="assetMainFileFailReason" />
</div>
</VAlert>
Expand Down
8 changes: 3 additions & 5 deletions src/views/coreDam/asset/components/AssetMetadata.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
assetFileIsImageFile,
assetFileIsVideoFile,
ASystemEntityScope,
DamAssetType,
dateTimePretty,
prettyBytes,
} from '@anzusystems/common-admin'
Expand All @@ -16,7 +17,6 @@ import AuthorRemoteAutocompleteWithCached from '@/views/coreDam/author/component
import { useAssetDetailActions } from '@/views/coreDam/asset/detail/composables/assetDetailActions'
import { computed, ref } from 'vue'
import { useI18n } from 'vue-i18n'
import { DamAssetType } 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'
Expand Down Expand Up @@ -156,16 +156,14 @@ const onAnyMetadataChange = () => {
<VCol cols="3">
{{ t('common.model.tracking.created') }}
</VCol>
<VCol cols="9">
{{ dateTimePretty(asset.createdAt) }}<br><CachedDamUserChip :id="asset.createdBy" />
</VCol>
<VCol cols="9"> {{ dateTimePretty(asset.createdAt) }}<br /><CachedDamUserChip :id="asset.createdBy" /> </VCol>
</VRow>
<VRow>
<VCol cols="3">
{{ t('common.model.tracking.modified') }}
</VCol>
<VCol cols="9">
{{ dateTimePretty(asset.modifiedAt) }}<br><CachedDamUserChip :id="asset.modifiedBy" />
{{ dateTimePretty(asset.modifiedAt) }}<br /><CachedDamUserChip :id="asset.modifiedBy" />
</VCol>
</VRow>
<div v-if="assetMainFile">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,15 @@ const { t } = useI18n()
</VRow>
<VRow>
<VCol>{{ t('coreDam.asset.detail.info.field.width') }}</VCol>
<VCol cols="9">
{{ file.imageAttributes.width }} px
</VCol>
<VCol cols="9"> {{ file.imageAttributes.width }} px </VCol>
</VRow>
<VRow>
<VCol>{{ t('coreDam.asset.detail.info.field.height') }}</VCol>
<VCol cols="9">
{{ file.imageAttributes.height }} px
</VCol>
<VCol cols="9"> {{ file.imageAttributes.height }} px </VCol>
</VRow>
<VRow>
<VCol>{{ t('coreDam.asset.detail.info.field.ratio') }}</VCol>
<VCol cols="9">
{{ file.imageAttributes.ratioWidth }} / {{ file.imageAttributes.ratioHeight }}
</VCol>
<VCol cols="9"> {{ file.imageAttributes.ratioWidth }} / {{ file.imageAttributes.ratioHeight }} </VCol>
</VRow>
<VRow>
<VCol>{{ t('coreDam.asset.detail.info.field.animated') }}</VCol>
Expand Down
3 changes: 1 addition & 2 deletions src/views/coreDam/asset/components/AssetSlotsFilter.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<script lang="ts" setup>
import { type Filter, useDamConfigState } from '@anzusystems/common-admin'
import { AFilterValueObjectOptionsSelect } from '@anzusystems/common-admin'
import { AFilterValueObjectOptionsSelect, type Filter, useDamConfigState } from '@anzusystems/common-admin'
import { computed } from 'vue'
import { useI18n } from 'vue-i18n'
Expand Down
6 changes: 2 additions & 4 deletions src/views/coreDam/asset/components/AssetUpload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ import { useUploadQueuesStore } from '@/stores/coreDam/uploadQueuesStore'
import { QUEUE_ID_UPLOAD_GLOBAL } from '@/services/upload/uploadQueueIds'
import { computed, ref } from 'vue'
import { useBetaTestFeatures } from '@/services/BetaTestFeaturesService'
import { DamAssetType } from '@anzusystems/common-admin'
import { type DocId, useDamConfigState } from '@anzusystems/common-admin'
import { ADialogToolbar } from '@anzusystems/common-admin'
import { ADialogToolbar, DamAssetType, type DocId, useDamConfigState } from '@anzusystems/common-admin'
import { useI18n } from 'vue-i18n'
const props = withDefaults(
Expand Down Expand Up @@ -153,7 +151,7 @@ const { t } = useI18n()
<span v-if="uploadQueueTotalCount > 0">{{
t('system.upload.limits.countAlreadyInProgress', { count: uploadQueueTotalCount })
}}</span>
{{ t('system.upload.limits.onlyAllowedAtOnce', { count: maxUploadItems }) }}<br><br>
{{ t('system.upload.limits.onlyAllowedAtOnce', { count: maxUploadItems }) }}<br /><br />
{{ t('system.upload.limits.cancelOrUploadFirst', { count: maxUploadItems - uploadQueueTotalCount }) }}
</p>
</VCardText>
Expand Down
2 changes: 1 addition & 1 deletion src/views/coreDam/asset/components/ImagePreview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
ADialogToolbar,
AssetFileProcessStatus,
type AssetSelectReturnData,
DamAssetType as AssetTypeValue,
type DocId,
isNull,
} from '@anzusystems/common-admin'
Expand All @@ -13,7 +14,6 @@ import placeholder16x9 from '@/assets/image/placeholder16x9.jpg'
import { fetchImageFile } from '@/services/api/coreDam/imageApi'
import { useI18n } from 'vue-i18n'
import { useCurrentAssetLicence } from '@/composables/system/currentExtSystem'
import { DamAssetType as AssetTypeValue } from '@anzusystems/common-admin'
const props = withDefaults(
defineProps<{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
AssetFileFailReason,
ASystemEntityScope,
ATableCopyIdButton,
DamAssetStatus,
type DocId,
isNull,
prettyBytes,
Expand All @@ -16,7 +17,6 @@ import {
useAlerts,
} from '@anzusystems/common-admin'
import { useAssetListStore } from '@/stores/coreDam/assetListStore'
import { DamAssetStatus } from '@anzusystems/common-admin'
import AssetImage from '@/views/coreDam/asset/components/AssetImage.vue'
import KeywordRemoteAutocompleteWithCached from '@/views/coreDam/keyword/components/KeywordRemoteAutocompleteWithCached.vue'
import AuthorRemoteAutocompleteWithCached from '@/views/coreDam/author/components/AuthorRemoteAutocompleteWithCached.vue'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<script lang="ts" setup>
import { computed } from 'vue'
import { DamAssetStatus } from '@anzusystems/common-admin'
import AssetImage from '@/views/coreDam/asset/components/AssetImage.vue'
import type { UploadQueueItem } from '@anzusystems/common-admin'
import { UploadQueueItemStatus } from '@anzusystems/common-admin'
import { DamAssetStatus, UploadQueueItemStatus } from '@anzusystems/common-admin'
import AssetImage from '@/views/coreDam/asset/components/AssetImage.vue'
import { useI18n } from 'vue-i18n'
const props = withDefaults(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import { computed, onMounted, ref } from 'vue'
import { useUploadQueuesStore } from '@/stores/coreDam/uploadQueuesStore'
import { useI18n } from 'vue-i18n'
import AssetCustomMetadataFormMassOperations from '@/components/coreDam/customMetadata/AssetCustomMetadataFormMassOperations.vue'
import { DamAssetType } from '@anzusystems/common-admin'
import { ASystemEntityScope } from '@anzusystems/common-admin'
import { ASystemEntityScope, DamAssetType } from '@anzusystems/common-admin'
import KeywordRemoteAutocompleteWithCached from '@/views/coreDam/keyword/components/KeywordRemoteAutocompleteWithCached.vue'
import AuthorRemoteAutocompleteWithCached from '@/views/coreDam/author/components/AuthorRemoteAutocompleteWithCached.vue'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const openDialog = () => {
activator="parent"
location="bottom"
>
{{ t('system.mainBar.extSystemLicenceSwitch.extSystem') }}: {{ displayTextExtSystem }}<br>
{{ t('system.mainBar.extSystemLicenceSwitch.extSystem') }}: {{ displayTextExtSystem }}<br />
{{ t('system.mainBar.extSystemLicenceSwitch.licence') }}: {{ displayTextLicence }}
</VTooltip>
</VBtn>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,10 @@ onMounted(async () => {
<div class="mb-4 text-caption">
{{ t('system.mainBar.extSystemLicenceSwitch.currentExtSystem') }}: {{ currentExtSystemId }} ({{
extSystemName
}})<br>
}})<br />
{{ t('system.mainBar.extSystemLicenceSwitch.currentLicence') }}: {{ currentAssetLicenceId }} ({{
licenceName
}})<br>
}})<br />
</div>
<ASystemEntityScope
:system="SYSTEM_CORE_DAM"
Expand Down
10 changes: 8 additions & 2 deletions src/views/coreDam/asset/detail/components/AssetDetailDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@ import AssetDetailDialogLoader from '@/views/coreDam/asset/detail/components/Ass
import { useAssetListStore } from '@/stores/coreDam/assetListStore'
import { AssetDetailTab, useAssetDetailTab } from '@/composables/system/assetDetailTab'
import AssetImageRoiSelect from '@/views/coreDam/asset/detail/components/AssetImageRoiSelect.vue'
import { DamAssetStatus, DamAssetType } from '@anzusystems/common-admin'
import type { DocId } from '@anzusystems/common-admin'
import { assetFileIsImageFile, browserHistoryReplaceUrlByRouter, isNull, useTheme } from '@anzusystems/common-admin'
import {
assetFileIsImageFile,
browserHistoryReplaceUrlByRouter,
DamAssetStatus,
DamAssetType,
isNull,
useTheme,
} from '@anzusystems/common-admin'
import AssetImage from '@/views/coreDam/asset/components/AssetImage.vue'
import { useAssetListActions } from '@/views/coreDam/asset/list/composables/assetListActions'
import { useI18n } from 'vue-i18n'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import AssetDetailSidebarMetadata from '@/views/coreDam/asset/detail/components/
import AssetDetailSidebarROI from '@/views/coreDam/asset/detail/components/AssetDetailSidebarROI.vue'
import { AssetDetailTab, useAssetDetailTab } from '@/composables/system/assetDetailTab'
import type { DamAssetStatus, DamAssetType } from '@anzusystems/common-admin'
import AssetDetailSidebarActionsTeleportTarget from '@/views/coreDam/asset/detail/components/AssetDetailSidebarActionsTeleportTarget.vue'
import { useI18n } from 'vue-i18n'
import {
type AssetFileFailReason,
type AssetFileProcessStatus,
type DocId,
useDamConfigState
useDamConfigState,
} from '@anzusystems/common-admin'
import AssetDetailSidebarActionsTeleportTarget from '@/views/coreDam/asset/detail/components/AssetDetailSidebarActionsTeleportTarget.vue'
import { useI18n } from 'vue-i18n'
import AssetInfobox from '@/views/coreDam/asset/components/AssetInfobox.vue'
import AssetDetailSidebarDistribution from '@/views/coreDam/asset/detail/components/distribution/AssetDetailSidebarDistribution.vue'
import { computed } from 'vue'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import {
ADialogToolbar,
type DocId,
isNull,
useAlerts, useDamConfigState,
useAlerts,
useDamConfigState,
usePagination,
} from '@anzusystems/common-admin'
import { useVideoDistributionPreviewListActions } from '@/views/coreDam/asset/detail/composables/videoDistributionPreviewActions'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
<script lang="ts" setup>
import { useAssetDetailActions } from '@/views/coreDam/asset/detail/composables/assetDetailActions'
import { deleteAsset, updateAssetMetadata } from '@/services/api/coreDam/assetApi'
import type { DocId } from '@anzusystems/common-admin'
import type { DamAssetType, DocId } from '@anzusystems/common-admin'
import { AActionDeleteButton, isNull, useAlerts } from '@anzusystems/common-admin'
import AssetDetailSidebarActionsWrapper from '@/views/coreDam/asset/detail/components/AssetDetailSidebarActionsWrapper.vue'
import { useI18n } from 'vue-i18n'
import AssetMetadata from '@/views/coreDam/asset/components/AssetMetadata.vue'
import useVuelidate from '@vuelidate/core'
import { AssetMetadataValidationScopeSymbol } from '@/components/validationScopes'
import AssetDownloadButton from '@/views/coreDam/asset/detail/components/AssetDownloadButton.vue'
import type { DamAssetType } from '@anzusystems/common-admin'
import { ref } from 'vue'
import { ACL } from '@/types/Permission'
import { useUploadQueuesStore } from '@/stores/coreDam/uploadQueuesStore'
Expand Down
Loading

0 comments on commit 28c047a

Please sign in to comment.