diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cd2ddcb2..7ed9cb6b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,6 +27,9 @@ jobs: - name: Checkout uses: actions/checkout@v3 + - name: Enable corepack + run: corepack enable + - name: Setup Node uses: actions/setup-node@v3 with: @@ -34,9 +37,6 @@ jobs: cache: 'yarn' cache-dependency-path: 'yarn.lock' - - name: Enable corepack - run: corepack enable - - name: Install dependencies run: yarn install --immutable diff --git a/.yarnrc.yml b/.yarnrc.yml index 3186f3f0..91b1101f 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -1 +1,5 @@ +compressionLevel: mixed + +enableGlobalCache: false + nodeLinker: node-modules diff --git a/package.json b/package.json index b04eaf63..fbf44660 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "adam-admin", - "packageManager": "yarn@3.6.4", + "packageManager": "yarn@4.0.2", "license": "Apache-2.0", "version": "0.0.1", "scripts": { @@ -21,55 +21,55 @@ "cy:open": "CYPRESS_CACHE_FOLDER='node_modules/.cache/Cypress' yarn cypress open -C cypress/config/cypress.config.ts" }, "dependencies": { - "@anzusystems/common-admin": "^1.5.0", - "@mdi/font": "7.2.96", + "@anzusystems/common-admin": "1.40.0-alpha10", + "@mdi/font": "7.3.67", "@vuelidate/core": "^2.0.3", - "@vuelidate/validators": "^2.0.3", - "@vueuse/core": "10.2.1", - "@vueuse/integrations": "10.2.1", - "axios": "^1.4.0", - "core-js": "^3.31.0", - "js-sha1": "^0.6.0", - "jwt-decode": "^3.1.2", - "pinia": "^2.1.4", - "sortablejs": "^1.15.0", - "universal-cookie": "^4.0.4", - "uuid": "^9.0.0", - "vue": "^3.3.4", - "vue-cropperjs": "^5.0.0", - "vue-i18n": "^9.2.2", - "vue-router": "^4.2.2", - "vuetify": "^3.3.6" + "@vuelidate/validators": "^2.0.4", + "@vueuse/core": "10.7.0", + "@vueuse/integrations": "10.7.0", + "axios": "^1.6.2", + "cropperjs": "^1.6.1", + "jwt-decode": "^4.0.0", + "pinia": "^2.1.7", + "rusha": "^0.8.14", + "sortablejs": "^1.15.1", + "universal-cookie": "^6.1.1", + "uuid": "^9.0.1", + "vue": "^3.3.11", + "vue-i18n": "^9.8.0", + "vue-router": "^4.2.5", + "vuetify": "^3.4.6" }, "devDependencies": { - "@cypress/grep": "^3.1.5", - "@intlify/unplugin-vue-i18n": "^0.11.0", - "@rushstack/eslint-patch": "^1.3.2", - "@types/node": "^18.16.18", - "@types/sortablejs": "^1.15.1", - "@types/uuid": "^9.0.2", - "@typescript-eslint/parser": "^5.60.1", - "@vitejs/plugin-vue": "^4.2.3", - "@vue/eslint-config-prettier": "^7.1.0", - "@vue/eslint-config-typescript": "^11.0.3", + "@cypress/grep": "^4.0.1", + "@intlify/unplugin-vue-i18n": "^1.5.0", + "@rushstack/eslint-patch": "^1.6.0", + "@types/node": "^18.19.3", + "@types/rusha": "^0.8.3", + "@types/sortablejs": "^1.15.7", + "@types/uuid": "^9.0.7", + "@typescript-eslint/parser": "^6.13.2", + "@vitejs/plugin-vue": "^4.5.2", + "@vue/eslint-config-prettier": "^8.0.0", + "@vue/eslint-config-typescript": "^12.0.0", "@vue/tsconfig": "^0.1.3", - "cypress": "^12.16.0", + "cypress": "^13.6.1", "cypress-downloadfile": "1.2.3", - "cypress-mochawesome-reporter": "^3.5.1", - "eslint": "8.43.0", - "eslint-plugin-cypress": "^2.13.3", - "eslint-plugin-vue": "^9.15.1", + "cypress-mochawesome-reporter": "^3.7.0", + "eslint": "8.52.0", + "eslint-plugin-cypress": "^2.15.1", + "eslint-plugin-vue": "^9.19.2", "npm-run-all": "^4.1.5", - "postcss": "^8.4.31", + "postcss": "^8.4.32", "postcss-html": "^1.5.0", - "prettier": "^2.8.8", - "sass": "^1.63.6", - "stylelint": "^15.9.0", - "stylelint-config-recommended-vue": "^1.4.0", - "stylelint-config-standard-scss": "^10.0.0", + "prettier": "^3.1.1", + "sass": "^1.69.5", + "stylelint": "^15.11.0", + "stylelint-config-recommended-vue": "^1.5.0", + "stylelint-config-standard-scss": "^11.1.0", "typescript": "^4.9.5", - "vite": "^4.3.9", + "vite": "^5.0.7", "vite-plugin-vuetify": "^1.0.2", - "vue-tsc": "1.8.3" + "vue-tsc": "1.8.25" } } diff --git a/src/components/coreDam/FileUpload.vue b/src/components/coreDam/FileUpload.vue index e0221546..eeb98ea3 100644 --- a/src/components/coreDam/FileUpload.vue +++ b/src/components/coreDam/FileUpload.vue @@ -3,7 +3,7 @@ import { useWindowFilesDragWatcher } from '@/composables/system/windowFilesDragW import { computed, ref, watch } from 'vue' import { arrayFlatten, arrayFromArgs, isArray, isUndefined, useAlerts } from '@anzusystems/common-admin' import { useI18n } from 'vue-i18n' -import { fileTypeFix } from '@/services/fileType' +import { damFileTypeFix } from '@anzusystems/common-admin' type InputRef = null | HTMLInputElement @@ -180,9 +180,9 @@ const checkFormats = (file: File, accepts: string[]) => { } else { // type const splitType = accepts[i].split('/') - if (splitType[1] === '*' && fileTypeFix(file).startsWith(splitType[0] + '/')) { + if (splitType[1] === '*' && damFileTypeFix(file).startsWith(splitType[0] + '/')) { return true - } else if (accepts[i] === fileTypeFix(file)) { + } else if (accepts[i] === damFileTypeFix(file)) { return true } } @@ -203,9 +203,9 @@ const checkSizes = (file: File, keys: Array, sizes: Record file.size) { + if (splitType[1] === '*' && damFileTypeFix(file).startsWith(splitType[0] + '/') && sizes[keys[j]] > file.size) { return true - } else if (keys[j] === fileTypeFix(file) && sizes[keys[j]] > file.size) { + } else if (keys[j] === damFileTypeFix(file) && sizes[keys[j]] > file.size) { return true } } @@ -292,9 +292,7 @@ watch(selectedFiles, (newValue, oldValue) => { @click.stop="clickDropzone" > {{ buttonText }} diff --git a/src/components/coreDam/customMetadata/AssetCustomMetadataElement.vue b/src/components/coreDam/customMetadata/AssetCustomMetadataElement.vue deleted file mode 100644 index ed78ad8d..00000000 --- a/src/components/coreDam/customMetadata/AssetCustomMetadataElement.vue +++ /dev/null @@ -1,169 +0,0 @@ - - - diff --git a/src/components/coreDam/customMetadata/AssetCustomMetadataForm.vue b/src/components/coreDam/customMetadata/AssetCustomMetadataForm.vue index 0b7103a5..46823ef1 100644 --- a/src/components/coreDam/customMetadata/AssetCustomMetadataForm.vue +++ b/src/components/coreDam/customMetadata/AssetCustomMetadataForm.vue @@ -1,18 +1,11 @@ diff --git a/src/components/coreDam/customMetadata/AssetCustomMetadataFormMassOperations.vue b/src/components/coreDam/customMetadata/AssetCustomMetadataFormMassOperations.vue index b534a89b..935cc452 100644 --- a/src/components/coreDam/customMetadata/AssetCustomMetadataFormMassOperations.vue +++ b/src/components/coreDam/customMetadata/AssetCustomMetadataFormMassOperations.vue @@ -1,23 +1,22 @@ @@ -47,10 +48,13 @@ const elements = computed(() => { class="mt-1" > -
- +
+ diff --git a/src/components/filter/FilterClosestColor.vue b/src/components/filter/FilterClosestColor.vue index f0d9e654..4edd4f37 100644 --- a/src/components/filter/FilterClosestColor.vue +++ b/src/components/filter/FilterClosestColor.vue @@ -1,8 +1,13 @@ diff --git a/src/views/coreDam/asset/components/ImageFile.vue b/src/views/coreDam/asset/components/ImageFile.vue index 606d342f..f50dc912 100644 --- a/src/views/coreDam/asset/components/ImageFile.vue +++ b/src/views/coreDam/asset/components/ImageFile.vue @@ -1,10 +1,14 @@ diff --git a/src/views/coreDam/asset/components/queue/AssetQueueItemList.vue b/src/views/coreDam/asset/components/queue/AssetQueueItemList.vue index 2893bac6..b5a2eb00 100644 --- a/src/views/coreDam/asset/components/queue/AssetQueueItemList.vue +++ b/src/views/coreDam/asset/components/queue/AssetQueueItemList.vue @@ -1,9 +1,8 @@ diff --git a/src/views/coreDam/asset/components/queue/AssetQueueSelectedSidebar.vue b/src/views/coreDam/asset/components/queue/AssetQueueSelectedSidebar.vue index 0deafe3d..ee5e1bba 100644 --- a/src/views/coreDam/asset/components/queue/AssetQueueSelectedSidebar.vue +++ b/src/views/coreDam/asset/components/queue/AssetQueueSelectedSidebar.vue @@ -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 { AssetType } from '@/model/coreDam/valueObject/AssetType' -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' @@ -25,10 +24,10 @@ const panels = ref>(['general']) const uploadQueuesStore = useUploadQueuesStore() -const fillEmptyField = (data: { assetType: AssetType; elementProperty: string; value: any }) => { +const fillEmptyField = (data: { assetType: DamAssetType; elementProperty: string; value: any }) => { uploadQueuesStore.queueItemsReplaceEmptyCustomDataValue(props.queueId, data) } -const replaceField = (data: { assetType: AssetType; elementProperty: string; value: any }) => { +const replaceField = (data: { assetType: DamAssetType; elementProperty: string; value: any }) => { uploadQueuesStore.queueItemsReplaceEmptyCustomDataValue(props.queueId, data, true) } const fillEmptyKeywords = () => { @@ -48,7 +47,7 @@ const fillAll = (forceReplace = false) => { uploadQueuesStore.queueItemsReplaceEmptyCustomDataValue( props.queueId, { - assetType: AssetType.Image, + assetType: DamAssetType.Image, elementProperty, value, }, @@ -59,7 +58,7 @@ const fillAll = (forceReplace = false) => { uploadQueuesStore.queueItemsReplaceEmptyCustomDataValue( props.queueId, { - assetType: AssetType.Video, + assetType: DamAssetType.Video, elementProperty, value, }, @@ -70,7 +69,7 @@ const fillAll = (forceReplace = false) => { uploadQueuesStore.queueItemsReplaceEmptyCustomDataValue( props.queueId, { - assetType: AssetType.Audio, + assetType: DamAssetType.Audio, elementProperty, value, }, @@ -81,7 +80,7 @@ const fillAll = (forceReplace = false) => { uploadQueuesStore.queueItemsReplaceEmptyCustomDataValue( props.queueId, { - assetType: AssetType.Document, + assetType: DamAssetType.Document, elementProperty, value, }, @@ -241,60 +240,60 @@ onMounted(() => { diff --git a/src/views/coreDam/asset/components/queue/AssetQueueUploadList.vue b/src/views/coreDam/asset/components/queue/AssetQueueUploadList.vue index 76ef8478..4fd555ff 100644 --- a/src/views/coreDam/asset/components/queue/AssetQueueUploadList.vue +++ b/src/views/coreDam/asset/components/queue/AssetQueueUploadList.vue @@ -3,7 +3,7 @@ import { computed } from 'vue' import { useUploadQueuesStore } from '@/stores/coreDam/uploadQueuesStore' import { QUEUE_ID_UPLOAD_GLOBAL } from '@/services/upload/uploadQueueIds' import AssetQueueItemList from '@/views/coreDam/asset/components/queue/AssetQueueItemList.vue' -import type { UploadQueueItem } from '@/types/coreDam/UploadQueue' +import type { UploadQueueItem } from '@anzusystems/common-admin' const props = withDefaults( defineProps<{ diff --git a/src/views/coreDam/asset/components/toolbar/AssetSearchInput.vue b/src/views/coreDam/asset/components/toolbar/AssetSearchInput.vue index c49446e1..2135fad8 100644 --- a/src/views/coreDam/asset/components/toolbar/AssetSearchInput.vue +++ b/src/views/coreDam/asset/components/toolbar/AssetSearchInput.vue @@ -8,8 +8,7 @@ const props = withDefaults( defineProps<{ modelValue: string | null }>(), - { - } + {} ) const emit = defineEmits<{ @@ -25,7 +24,6 @@ const modelValueComputed = computed({ emit('update:modelValue', newValue) }, }) -