diff --git a/auth-api/src/main/java/edu/unc/lib/boxc/auth/api/services/DatastreamPermissionUtil.java b/auth-api/src/main/java/edu/unc/lib/boxc/auth/api/services/DatastreamPermissionUtil.java index ff69854f65..81a72d3da0 100644 --- a/auth-api/src/main/java/edu/unc/lib/boxc/auth/api/services/DatastreamPermissionUtil.java +++ b/auth-api/src/main/java/edu/unc/lib/boxc/auth/api/services/DatastreamPermissionUtil.java @@ -30,8 +30,8 @@ public class DatastreamPermissionUtil { DS_PERMISSION_MAP.put(DatastreamType.ORIGINAL_FILE, Permission.viewOriginal); DS_PERMISSION_MAP.put(DatastreamType.TECHNICAL_METADATA, Permission.viewHidden); DS_PERMISSION_MAP.put(DatastreamType.TECHNICAL_METADATA_HISTORY, Permission.viewHidden); - DS_PERMISSION_MAP.put(DatastreamType.THUMBNAIL_SMALL, Permission.viewMetadata); - DS_PERMISSION_MAP.put(DatastreamType.THUMBNAIL_LARGE, Permission.viewMetadata); + DS_PERMISSION_MAP.put(DatastreamType.THUMBNAIL_SMALL, Permission.viewAccessCopies); + DS_PERMISSION_MAP.put(DatastreamType.THUMBNAIL_LARGE, Permission.viewAccessCopies); } private DatastreamPermissionUtil() { diff --git a/deposit-app/src/main/java/edu/unc/lib/boxc/deposit/validate/VirusScanJob.java b/deposit-app/src/main/java/edu/unc/lib/boxc/deposit/validate/VirusScanJob.java index da44308328..dcc3be253a 100644 --- a/deposit-app/src/main/java/edu/unc/lib/boxc/deposit/validate/VirusScanJob.java +++ b/deposit-app/src/main/java/edu/unc/lib/boxc/deposit/validate/VirusScanJob.java @@ -42,6 +42,7 @@ public class VirusScanJob extends AbstractConcurrentDepositJob { .getLogger(VirusScanJob.class); private static final int MAX_RETRIES = 5; + private long maxStreamSize; private ClamAVClient clamClient; @@ -97,18 +98,20 @@ public void runJob() { Path file = Paths.get(fileURI); ScanResult result; - // Clamd is unable to find files with unicode characters in their path - if (charactersInBoundsForClam(file)) { - result = clamClient.scanWithResult(file); - } else { - // Scan files with unicode in their paths via streaming - try { + try { + if (shouldScanByPath(file)) { + // Scan entire file by path + log.debug("Scanning file {} by path", file); + result = clamClient.scanWithResult(file); + } else { + // Scanning via InputStream up to the max number of bytes + log.debug("Scanning file {} by stream", file); result = clamClient.scanWithResult(Files.newInputStream(file)); - } catch (IOException e) { - failures.put(fileURI.toString(), "Failed to scan file"); - log.error("Unable to scan file {}", file, e); - return; } + } catch (IOException e) { + failures.put(fileURI.toString(), "Failed to scan file"); + log.error("Unable to scan file {}", file, e); + return; } switch (result.getStatus()) { @@ -180,8 +183,23 @@ private boolean charactersInBoundsForClam(Path path) { return CharMatcher.ascii().matchesAllOf(path.toString()); } + /** + * Determines if we should scan a file by its file path or use streaming. Files larger than the scanning + * limit or with characters in their path that clamd can't handle will return false. + * @param path + * @return + * @throws IOException + */ + private boolean shouldScanByPath(Path path) throws IOException { + return Files.size(path) < this.maxStreamSize && charactersInBoundsForClam(path); + } + // unused, no results to flush @Override protected void registrationAction() { } -} \ No newline at end of file + + public void setMaxStreamSize(long maxStreamSize) { + this.maxStreamSize = maxStreamSize; + } +} diff --git a/deposit-app/src/main/webapp/WEB-INF/deposit-jobs-context.xml b/deposit-app/src/main/webapp/WEB-INF/deposit-jobs-context.xml index d553496622..98ede9e199 100644 --- a/deposit-app/src/main/webapp/WEB-INF/deposit-jobs-context.xml +++ b/deposit-app/src/main/webapp/WEB-INF/deposit-jobs-context.xml @@ -191,6 +191,7 @@ + determineContentStatus(DocumentIndexingPackage dip) status.add(FacetConstants.IS_PRIMARY_OBJECT); } if (parentResc.hasProperty(Cdr.useAsThumbnail, resc)) { - status.add(FacetConstants.IS_ASSIGNED_THUMBNAIL); + status.add(FacetConstants.ASSIGNED_AS_THUMBNAIL); } } @@ -75,7 +75,7 @@ private void addWorkObjectStatuses(List status, Resource resource) { } if (resource.hasProperty(Cdr.useAsThumbnail)) { - status.add(FacetConstants.THUMBNAIL_ASSIGNED); + status.add(FacetConstants.HAS_THUMBNAIL_ASSIGNED); } else { status.add(FacetConstants.NO_THUMBNAIL_ASSIGNED); } diff --git a/indexing-solr/src/test/java/edu/unc/lib/boxc/indexing/solr/filter/SetContentStatusFilterTest.java b/indexing-solr/src/test/java/edu/unc/lib/boxc/indexing/solr/filter/SetContentStatusFilterTest.java index 8796c2ad07..5cc21ddd74 100644 --- a/indexing-solr/src/test/java/edu/unc/lib/boxc/indexing/solr/filter/SetContentStatusFilterTest.java +++ b/indexing-solr/src/test/java/edu/unc/lib/boxc/indexing/solr/filter/SetContentStatusFilterTest.java @@ -190,7 +190,7 @@ public void testWorkWithAssignedThumbnail() throws Exception { filter.filter(dip); verify(idb).setContentStatus(listCaptor.capture()); - assertTrue(listCaptor.getValue().contains(FacetConstants.THUMBNAIL_ASSIGNED)); + assertTrue(listCaptor.getValue().contains(FacetConstants.HAS_THUMBNAIL_ASSIGNED)); assertFalse(listCaptor.getValue().contains(FacetConstants.NO_THUMBNAIL_ASSIGNED)); } @@ -216,6 +216,6 @@ public void testIsAssignedThumbnail() throws Exception { filter.filter(dip); verify(idb).setContentStatus(listCaptor.capture()); - assertTrue(listCaptor.getValue().contains(FacetConstants.IS_ASSIGNED_THUMBNAIL)); + assertTrue(listCaptor.getValue().contains(FacetConstants.ASSIGNED_AS_THUMBNAIL)); } } diff --git a/pom.xml b/pom.xml index 4521e4717c..e1dbe60f1d 100644 --- a/pom.xml +++ b/pom.xml @@ -104,7 +104,8 @@ 1.5 1.1.3 - 5.16.3 + 5.17.6 + 5.16.7 1.1 1.7.25 diff --git a/search-api/src/main/java/edu/unc/lib/boxc/search/api/FacetConstants.java b/search-api/src/main/java/edu/unc/lib/boxc/search/api/FacetConstants.java index a6ffe9d126..c5ccf7a509 100644 --- a/search-api/src/main/java/edu/unc/lib/boxc/search/api/FacetConstants.java +++ b/search-api/src/main/java/edu/unc/lib/boxc/search/api/FacetConstants.java @@ -23,8 +23,8 @@ public abstract class FacetConstants { public static final String STAFF_ONLY_ACCESS = "Staff-Only Access"; public static final String MEMBERS_ARE_ORDERED = "Members Are Ordered"; public static final String MEMBERS_ARE_UNORDERED = "Members Are Unordered"; - public static final String THUMBNAIL_ASSIGNED = "Has Assigned Thumbnail"; + public static final String HAS_THUMBNAIL_ASSIGNED = "Has Assigned Thumbnail"; public static final String NO_THUMBNAIL_ASSIGNED = "No Assigned Thumbnail"; - public static final String IS_ASSIGNED_THUMBNAIL = "Is Assigned Thumbnail"; + public static final String ASSIGNED_AS_THUMBNAIL = "Assigned As Thumbnail"; } diff --git a/services-camel-app/pom.xml b/services-camel-app/pom.xml index fe70437392..f0b9879513 100644 --- a/services-camel-app/pom.xml +++ b/services-camel-app/pom.xml @@ -56,7 +56,7 @@ org.apache.activemq activemq-camel - ${activemq.version} + ${activemq-camel.version} org.apache.activemq diff --git a/services-camel-app/src/main/java/edu/unc/lib/boxc/services/camel/thumbnails/ThumbnailRequestProcessor.java b/services-camel-app/src/main/java/edu/unc/lib/boxc/services/camel/thumbnails/ThumbnailRequestProcessor.java index 100df0db0f..98d28c3006 100644 --- a/services-camel-app/src/main/java/edu/unc/lib/boxc/services/camel/thumbnails/ThumbnailRequestProcessor.java +++ b/services-camel-app/src/main/java/edu/unc/lib/boxc/services/camel/thumbnails/ThumbnailRequestProcessor.java @@ -3,6 +3,7 @@ import edu.unc.lib.boxc.auth.api.Permission; import edu.unc.lib.boxc.auth.api.services.AccessControlService; import edu.unc.lib.boxc.model.api.objects.RepositoryObjectLoader; +import edu.unc.lib.boxc.model.api.objects.WorkObject; import edu.unc.lib.boxc.model.api.rdf.Cdr; import edu.unc.lib.boxc.model.api.services.RepositoryObjectFactory; import edu.unc.lib.boxc.model.fcrepo.ids.PIDs; @@ -39,10 +40,17 @@ public void process(Exchange exchange) throws IOException { pid, agent.getPrincipals(), Permission.editDescription); var file = repositoryObjectLoader.getFileObject(pid); - var work = file.getParent(); + var work = (WorkObject) file.getParent(); if (Objects.equals(action, ThumbnailRequest.ASSIGN)) { + // Capture the old thumbnail id before it gets cleared + var oldThumbnailFile = work.getThumbnailObject(); repositoryObjectFactory.createExclusiveRelationship(work, Cdr.useAsThumbnail, file.getResource()); + // reindex old thumbnail object + if (oldThumbnailFile != null) { + indexingMessageSender.sendIndexingOperation( + agent.getUsername(), oldThumbnailFile.getPid(), IndexingActionType.UPDATE_DATASTREAMS); + } } else if ( Objects.equals(action, ThumbnailRequest.DELETE)) { repositoryObjectFactory.deleteProperty(work, Cdr.useAsThumbnail); } @@ -50,6 +58,8 @@ public void process(Exchange exchange) throws IOException { // send message to update solr indexingMessageSender.sendIndexingOperation( agent.getUsername(), work.getPid(), IndexingActionType.UPDATE_DATASTREAMS); + indexingMessageSender.sendIndexingOperation( + agent.getUsername(), file.getPid(), IndexingActionType.UPDATE_DATASTREAMS); } public void setRepositoryObjectLoader(RepositoryObjectLoader repositoryObjectLoader) { diff --git a/services-camel-app/src/test/java/edu/unc/lib/boxc/services/camel/thumbnails/ThumbnailProcessorTest.java b/services-camel-app/src/test/java/edu/unc/lib/boxc/services/camel/thumbnails/ThumbnailProcessorTest.java index 5f074584ab..62931e6f8a 100644 --- a/services-camel-app/src/test/java/edu/unc/lib/boxc/services/camel/thumbnails/ThumbnailProcessorTest.java +++ b/services-camel-app/src/test/java/edu/unc/lib/boxc/services/camel/thumbnails/ThumbnailProcessorTest.java @@ -87,14 +87,37 @@ void closeService() throws Exception { } @Test - public void testUpdateThumbnail() throws Exception { + public void testAssignThumbnail() throws Exception { var exchange = createRequestExchange(ThumbnailRequest.ASSIGN); processor.process(exchange); verify(repositoryObjectFactory).createExclusiveRelationship(eq(parentWork), eq(Cdr.useAsThumbnail), fileResourceCaptor.capture()); // check to see the right file was related to the work assertEquals(resource, fileResourceCaptor.getValue()); - assertIndexingMessageSent(); + assertIndexingMessageSent(workPid); + assertIndexingMessageSent(filePid); + } + + // test for when the work already has an assigned thumbnail and a new one is chosen + @Test + public void testAssignNewThumbnail() throws Exception { + // set up pre-existing assigned thumbnail + var oldThumbnailPid = ProcessorTestHelper.makePid(); + var oldThumbnailFile = mock(FileObject.class); + var oldResource = mock(Resource.class); + when(oldThumbnailFile.getResource()).thenReturn(oldResource); + when(oldThumbnailFile.getPid()).thenReturn(oldThumbnailPid); + when(parentWork.getThumbnailObject()).thenReturn(oldThumbnailFile); + + var exchange = createRequestExchange(ThumbnailRequest.ASSIGN); + + processor.process(exchange); + verify(repositoryObjectFactory).createExclusiveRelationship(eq(parentWork), eq(Cdr.useAsThumbnail), fileResourceCaptor.capture()); + // check to see the right file was related to the work + assertEquals(resource, fileResourceCaptor.getValue()); + assertIndexingMessageSent(workPid); + assertIndexingMessageSent(filePid); + assertIndexingMessageSent(oldThumbnailPid); } @Test @@ -114,11 +137,11 @@ public void testDeleteAssignedThumbnail() throws IOException { processor.process(exchange); verify(repositoryObjectFactory).deleteProperty(eq(parentWork), eq(Cdr.useAsThumbnail)); - assertIndexingMessageSent(); + assertIndexingMessageSent(workPid); } - private void assertIndexingMessageSent() { - verify(indexingMessageSender).sendIndexingOperation(agent.getUsername(), workPid, + private void assertIndexingMessageSent(PID pid) { + verify(indexingMessageSender).sendIndexingOperation(agent.getUsername(), pid, IndexingActionType.UPDATE_DATASTREAMS); } diff --git a/static/js/admin/src/ResultObject.js b/static/js/admin/src/ResultObject.js index fb9414a937..f7bc8b70f3 100644 --- a/static/js/admin/src/ResultObject.js +++ b/static/js/admin/src/ResultObject.js @@ -31,7 +31,7 @@ define('ResultObject', [ 'jquery', 'jquery-ui', 'underscore', 'ModalLoadingOverl if (tags.length > 0) { this.metadata.tags = tags.filter(function(d) { - return !/^(has|not|no.primary|public.access|members.are.unordered)/i.test(d); + return !/^(has|not|no.primary|public.access|members.are.unordered|no.assigned.thumbnail)/i.test(d); }).map(function(d) { var tagValue; @@ -85,7 +85,7 @@ define('ResultObject', [ 'jquery', 'jquery-ui', 'underscore', 'ModalLoadingOverl case 'patron-settings': helpText = 'Patron access settings for this object have been added'; break; - case 'primary-object': + case 'is-primary-object': helpText = 'This file is the representative object for the work which contains it'; break; case 'staff-only': @@ -94,6 +94,9 @@ define('ResultObject', [ 'jquery', 'jquery-ui', 'underscore', 'ModalLoadingOverl case 'inherited-settings': helpText = 'Object is inheriting patron access settings which have been modified (typically they are more restrictive)'; break; + case 'assigned-as-thumbnail': + helpText = 'This file is the assigned thumbnail for the work which contains it'; + break; default: helpText = ''; } diff --git a/static/js/admin/src/ResultObjectActionMenu.js b/static/js/admin/src/ResultObjectActionMenu.js index afca876247..f754cd60cc 100644 --- a/static/js/admin/src/ResultObjectActionMenu.js +++ b/static/js/admin/src/ResultObjectActionMenu.js @@ -151,10 +151,18 @@ define('ResultObjectActionMenu', [ 'jquery', 'jquery-ui', 'StringUtilities', 'A } else { items['setAsPrimaryObject'] = { name : 'Set as Primary Object' }; } + if ($.inArray('Assigned As Thumbnail', metadata.contentStatus) != -1) { + items['clearAssignedThumbnail'] = { name : 'Clear Assigned Thumbnail' }; + } else { + items['assignAsThumbnail'] = { name : 'Assign as Thumbnail' }; + } } else if (metadata.type == 'Work') { if ($.inArray('Has Primary Object', metadata.contentStatus) != -1) { items['clearPrimaryObject'] = { name : 'Clear Primary Object' }; } + if ($.inArray('Has Assigned Thumbnail', metadata.contentStatus) != -1) { + items['clearAssignedThumbnail'] = { name : 'Clear Assigned Thumbnail' }; + } } } @@ -188,11 +196,14 @@ define('ResultObjectActionMenu', [ 'jquery', 'jquery-ui', 'StringUtilities', 'A } // Export actions - if (!isContentRoot) { - items["sepexport"] = ""; - if (metadata.type !== 'File' && $.inArray('viewHidden', metadata.permissions) != -1) { - items["exportCSV"] = {name : 'Export as CSV'}; + if (metadata.type !== 'File' && $.inArray('viewHidden', metadata.permissions) !== -1) { + items["export"] = {name: "Export", items: {}} + + if (!isContentRoot) { + items['export']['items']["exportCSV"] = {name: "Export CSV"}; } + + items['export']['items']["exportMemberOrder"] = {name: "Export Member Order"}; } items["copyid"] = {name : 'Copy PID to Clipboard'}; @@ -363,6 +374,20 @@ define('ResultObjectActionMenu', [ 'jquery', 'jquery-ui', 'StringUtilities', 'A confirm : false }); break; + case "clearAssignedThumbnail" : + self.actionHandler.addEvent({ + action : 'ClearAssignedThumbnail', + target : resultObject, + confirm : false + }); + break; + case "assignAsThumbnail" : + self.actionHandler.addEvent({ + action : 'AssignAsThumbnail', + target : resultObject, + confirm : false + }); + break; case "destroy" : self.actionHandler.addEvent({ action : 'DestroyResult', @@ -397,6 +422,13 @@ define('ResultObjectActionMenu', [ 'jquery', 'jquery-ui', 'StringUtilities', 'A application: "services" }); break; + case "exportMemberOrder" : + self.actionHandler.addEvent({ + action : 'ChangeLocation', + url : "api/edit/memberOrder/export/csv?ids=" + metadata.id, + application: "services" + }); + break; case "runEnhancements" : self.actionHandler.addEvent({ action : 'RunEnhancementsBatch', diff --git a/static/js/admin/src/action/AssignAsThumbnailAction.js b/static/js/admin/src/action/AssignAsThumbnailAction.js new file mode 100644 index 0000000000..f19b47d493 --- /dev/null +++ b/static/js/admin/src/action/AssignAsThumbnailAction.js @@ -0,0 +1,64 @@ +define('AssignAsThumbnailAction', [ 'jquery', 'AjaxCallbackAction'], function($, AjaxCallbackAction) { + + function AssignAsThumbnailAction(context) { + this._create(context); + }; + + AssignAsThumbnailAction.prototype.constructor = AssignAsThumbnailAction; + AssignAsThumbnailAction.prototype = Object.create( AjaxCallbackAction.prototype ); + + AssignAsThumbnailAction.prototype._create = function(context) { + this.context = context; + + var options = { + workMethod: "PUT", + workPath: "/services/api/edit/assignThumbnail/{idPath}", + workLabel: "Setting as assigned thumbnail...", + followupLabel: "Setting as assigned thumbnail...", + followupPath: "/services/api/status/item/{idPath}/solrRecord/version" + } + + if ('confirm' in this.context && !this.context.confirm) { + options.confirm = false; + } else { + options.confirm = { + promptText : "Use this as the assigned thumbnail for its parent?", + confirmAnchor : this.context.confirmAnchor + }; + } + + AjaxCallbackAction.prototype._create.call(this, options); + }; + + AssignAsThumbnailAction.prototype.completeState = function() { + this.context.actionHandler.addEvent({ + action : 'RefreshResult', + target : this.context.target + }); + this.alertHandler.alertHandler("success", "Assignment of object \"" + this.context.target.metadata.title + "\" as the assigned thumbnail has completed."); + this.context.target.enable(); + }; + + AssignAsThumbnailAction.prototype.workDone = function(data) { + this.completeTimestamp = data.timestamp; + this.oldThumbnailId = data.oldThumbnailId; + this.newThumbnailId = data.newThumbnailId; + if (this.oldThumbnailId) { + this.context.actionHandler.addEvent({ + action : 'RefreshResult', + target : this.context.resultTable.resultObjectList.getResultObject(this.oldThumbnailId), + waitForUpdate : true + }); + } + return true; + }; + + AssignAsThumbnailAction.prototype.followup = function(data) { + if (data) { + return this.context.target.updateVersion(data); + } + return false; + }; + + return AssignAsThumbnailAction; +}); diff --git a/static/js/admin/src/action/ClearAssignedThumbnailAction.js b/static/js/admin/src/action/ClearAssignedThumbnailAction.js new file mode 100644 index 0000000000..6330487248 --- /dev/null +++ b/static/js/admin/src/action/ClearAssignedThumbnailAction.js @@ -0,0 +1,66 @@ +define('ClearAssignedThumbnailAction', [ 'jquery', 'AjaxCallbackAction'], function($, AjaxCallbackAction) { + + function ClearAssignedThumbnailAction(context) { + this._create(context); + }; + + ClearAssignedThumbnailAction.prototype.constructor = ClearAssignedThumbnailAction; + ClearAssignedThumbnailAction.prototype = Object.create( AjaxCallbackAction.prototype ); + + ClearAssignedThumbnailAction.prototype._create = function(context) { + this.context = context; + + var options = { + workMethod: "DELETE", + workPath: "/services/api/edit/deleteThumbnail/{idPath}", + workLabel: "Clearing assigned thumbnail...", + followupLabel: "Clearing assigned thumbnail...", + followupPath: "/services/api/status/item/{idPath}/solrRecord/version" + } + + if ('confirm' in this.context && !this.context.confirm) { + options.confirm = false; + } else { + options.confirm = { + promptText : "Clear the assigned thumbnail?", + confirmAnchor : this.context.confirmAnchor + }; + } + + AjaxCallbackAction.prototype._create.call(this, options); + }; + + ClearAssignedThumbnailAction.prototype.completeState = function() { + this.context.actionHandler.addEvent({ + action : 'RefreshResult', + target : this.context.target + }); + this.alertHandler.alertHandler("success", "Cleared the assigned thumbnail."); + this.context.target.enable(); + }; + + ClearAssignedThumbnailAction.prototype.workDone = function(data) { + this.completeTimestamp = data.timestamp; + this.oldThumbnailId = data.oldThumbnailId; + if (this.context.target.metadata.type == "Work") { + var oldThumbnail = this.context.resultTable.resultObjectList.getResultObject(this.oldThumbnailId); + if (oldThumbnail != null) { + this.context.actionHandler.addEvent({ + action : 'RefreshResult', + target : oldThumbnail, + waitForUpdate : true + }); + } + } + return true; + }; + + ClearAssignedThumbnailAction.prototype.followup = function(data) { + if (data) { + return this.context.target.updateVersion(data); + } + return false; + }; + + return ClearAssignedThumbnailAction; +}); \ No newline at end of file diff --git a/static/js/admin/src/action/ClearPrimaryObjectResultAction.js b/static/js/admin/src/action/ClearPrimaryObjectResultAction.js index 8fe6e21c1d..8284eaceb9 100644 --- a/static/js/admin/src/action/ClearPrimaryObjectResultAction.js +++ b/static/js/admin/src/action/ClearPrimaryObjectResultAction.js @@ -38,6 +38,13 @@ define('ClearPrimaryObjectResultAction', [ 'jquery', 'AjaxCallbackAction'], func this.alertHandler.alertHandler("success", "Cleared the primary object assignment."); this.context.target.enable(); }; + + ClearPrimaryObjectResultAction.prototype.followup = function(data) { + if (data) { + return this.context.target.updateVersion(data); + } + return false; + }; return ClearPrimaryObjectResultAction; }); \ No newline at end of file diff --git a/static/js/admin/src/action/SetAsPrimaryObjectResultAction.js b/static/js/admin/src/action/SetAsPrimaryObjectResultAction.js index 37ab7064d5..513a3745f6 100644 --- a/static/js/admin/src/action/SetAsPrimaryObjectResultAction.js +++ b/static/js/admin/src/action/SetAsPrimaryObjectResultAction.js @@ -38,6 +38,13 @@ define('SetAsPrimaryObjectResultAction', [ 'jquery', 'AjaxCallbackAction'], func this.alertHandler.alertHandler("success", "Assignment of object \"" + this.context.target.metadata.title + "\" as primary object has completed."); this.context.target.enable(); }; + + SetAsPrimaryObjectResultAction.prototype.followup = function(data) { + if (data) { + return this.context.target.updateVersion(data); + } + return false; + }; return SetAsPrimaryObjectResultAction; }); \ No newline at end of file diff --git a/static/js/admin/vue-permissions-editor/package-lock.json b/static/js/admin/vue-permissions-editor/package-lock.json index 23b4db9060..7d8aa76718 100644 --- a/static/js/admin/vue-permissions-editor/package-lock.json +++ b/static/js/admin/vue-permissions-editor/package-lock.json @@ -8,12 +8,12 @@ "name": "vue-permissions-editor", "version": "0.1.0", "dependencies": { - "axios": "^0.27.2", + "axios": "^1.6.2", "date-fns": "^2.29.3", "lodash.clonedeep": "^4.5.0", "lodash.findindex": "^4.6.0", "lodash.isempty": "^4.4.0", - "vue": "^3.2.39", + "vue": "^3.2.47", "vue-router": "^4.1.5", "vuex": "^4.0.2" }, @@ -22,11 +22,11 @@ "@babel/preset-env": "^7.19.1", "@testing-library/jest-dom": "^5.16.5", "@vitejs/plugin-vue": "^2.3.3", - "@vue/compiler-sfc": "^3.2.39", + "@vue/compiler-sfc": "^3.2.47", "@vue/test-utils": "2.0.2", "@vue/vue3-jest": "^29.1.0", "babel-jest": "^29.0.3", - "caniuse-lite": "^1.0.30001400", + "caniuse-lite": "^1.0.30001564", "jest": "29.0.3", "jest-environment-jsdom": "^29.0.3", "moxios": "^0.4.0", @@ -35,18 +35,19 @@ } }, "node_modules/@adobe/css-tools": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.0.1.tgz", - "integrity": "sha512-+u76oB43nOHrF4DDWRLWDCtci7f3QJoEBigemIdIeTi1ODqjx6Tad9NCVnPRwewWlKkVab5PlK8DCtPTyX7S8g==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.3.1.tgz", + "integrity": "sha512-/62yikz7NLScCGAAST5SHdnjaDJQBDq0M2muyRTpf2VQhw6StBg2ALiu73zSJQ4fMVLA+0uBhBHAle7Wg+2kSg==", "dev": true }, "node_modules/@babel/code-frame": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", - "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "dev": true, "dependencies": { - "@babel/highlight": "^7.18.6" + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" }, "engines": { "node": ">=6.9.0" @@ -92,13 +93,14 @@ } }, "node_modules/@babel/generator": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.0.tgz", - "integrity": "sha512-S1ahxf1gZ2dpoiFgA+ohK9DIpz50bJ0CWs7Zlzb54Z4sG8qmdIrGrVqmy1sAtTVRb+9CU6U8VqT9L0Zj7hxHVg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "dev": true, "dependencies": { - "@babel/types": "^7.19.0", + "@babel/types": "^7.23.0", "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" }, "engines": { @@ -203,9 +205,9 @@ } }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", - "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "dev": true, "engines": { "node": ">=6.9.0" @@ -224,25 +226,25 @@ } }, "node_modules/@babel/helper-function-name": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", - "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "dependencies": { - "@babel/template": "^7.18.10", - "@babel/types": "^7.19.0" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-hoist-variables": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", - "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "dev": true, "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -371,30 +373,30 @@ } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", - "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "dev": true, "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-string-parser": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz", - "integrity": "sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz", - "integrity": "sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true, "engines": { "node": ">=6.9.0" @@ -439,13 +441,13 @@ } }, "node_modules/@babel/highlight": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", - "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" }, "engines": { @@ -453,9 +455,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.19.1.tgz", - "integrity": "sha512-h7RCSorm1DdTVGJf3P2Mhj3kdnkmF/EiysUkzS2TdgAYqyjFdMQJbVuXOBej2SBJaXan/lIVtT6KkGbyyq753A==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", "bin": { "parser": "bin/babel-parser.js" }, @@ -1637,33 +1639,33 @@ } }, "node_modules/@babel/template": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz", - "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.18.10", - "@babel/types": "^7.18.10" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.1.tgz", - "integrity": "sha512-0j/ZfZMxKukDaag2PtOPDbwuELqIar6lLskVPPJDjXMXjfLb1Obo/1yjxIGqqAJrmfaTIY3z2wFLAQ7qSkLsuA==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.19.0", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.19.1", - "@babel/types": "^7.19.0", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -1672,13 +1674,13 @@ } }, "node_modules/@babel/types": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.0.tgz", - "integrity": "sha512-YuGopBq3ke25BVSiS6fgF49Ul9gH1x70Bcr6bqRLjWCkcX8Hre1/5+z+IiWOIerRMSSEfGZVB9z9kyq7wVs9YA==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.18.10", - "@babel/helper-validator-identifier": "^7.18.6", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" }, "engines": { @@ -2401,9 +2403,9 @@ } }, "node_modules/@jridgewell/resolve-uri": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.8.tgz", - "integrity": "sha512-YK5G9LaddzGbcucK4c8h5tWFmMPBvRZ/uyWmN1/SbBdIvqGUdWGkJ5BAaccgs6XbzVLsqbPJrBSFwKv3kT9i7w==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", "dev": true, "engines": { "node": ">=6.0.0" @@ -2419,19 +2421,18 @@ } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.15", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz", - "integrity": "sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==", + "version": "0.3.20", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", + "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", "dev": true, "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, "node_modules/@sinclair/typebox": { @@ -2725,65 +2726,49 @@ } }, "node_modules/@vue/compiler-core": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.39.tgz", - "integrity": "sha512-mf/36OWXqWn0wsC40nwRRGheR/qoID+lZXbIuLnr4/AngM0ov8Xvv8GHunC0rKRIkh60bTqydlqTeBo49rlbqw==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.3.8.tgz", + "integrity": "sha512-hN/NNBUECw8SusQvDSqqcVv6gWq8L6iAktUR0UF3vGu2OhzRqcOiAno0FmBJWwxhYEXRlQJT5XnoKsVq1WZx4g==", "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/shared": "3.2.39", + "@babel/parser": "^7.23.0", + "@vue/shared": "3.3.8", "estree-walker": "^2.0.2", - "source-map": "^0.6.1" - } - }, - "node_modules/@vue/compiler-core/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "engines": { - "node": ">=0.10.0" + "source-map-js": "^1.0.2" } }, "node_modules/@vue/compiler-dom": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.2.39.tgz", - "integrity": "sha512-HMFI25Be1C8vLEEv1hgEO1dWwG9QQ8LTTPmCkblVJY/O3OvWx6r1+zsox5mKPMGvqYEZa6l8j+xgOfUspgo7hw==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.3.8.tgz", + "integrity": "sha512-+PPtv+p/nWDd0AvJu3w8HS0RIm/C6VGBIRe24b9hSyNWOAPEUosFZ5diwawwP8ip5sJ8n0Pe87TNNNHnvjs0FQ==", "dependencies": { - "@vue/compiler-core": "3.2.39", - "@vue/shared": "3.2.39" + "@vue/compiler-core": "3.3.8", + "@vue/shared": "3.3.8" } }, "node_modules/@vue/compiler-sfc": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.2.39.tgz", - "integrity": "sha512-fqAQgFs1/BxTUZkd0Vakn3teKUt//J3c420BgnYgEOoVdTwYpBTSXCMJ88GOBCylmUBbtquGPli9tVs7LzsWIA==", - "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.39", - "@vue/compiler-dom": "3.2.39", - "@vue/compiler-ssr": "3.2.39", - "@vue/reactivity-transform": "3.2.39", - "@vue/shared": "3.2.39", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.3.8.tgz", + "integrity": "sha512-WMzbUrlTjfYF8joyT84HfwwXo+8WPALuPxhy+BZ6R4Aafls+jDBnSz8PDz60uFhuqFbl3HxRfxvDzrUf3THwpA==", + "dependencies": { + "@babel/parser": "^7.23.0", + "@vue/compiler-core": "3.3.8", + "@vue/compiler-dom": "3.3.8", + "@vue/compiler-ssr": "3.3.8", + "@vue/reactivity-transform": "3.3.8", + "@vue/shared": "3.3.8", "estree-walker": "^2.0.2", - "magic-string": "^0.25.7", - "postcss": "^8.1.10", - "source-map": "^0.6.1" - } - }, - "node_modules/@vue/compiler-sfc/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "engines": { - "node": ">=0.10.0" + "magic-string": "^0.30.5", + "postcss": "^8.4.31", + "source-map-js": "^1.0.2" } }, "node_modules/@vue/compiler-ssr": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.2.39.tgz", - "integrity": "sha512-EoGCJ6lincKOZGW+0Ky4WOKsSmqL7hp1ZYgen8M7u/mlvvEQUaO9tKKOy7K43M9U2aA3tPv0TuYYQFrEbK2eFQ==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.3.8.tgz", + "integrity": "sha512-hXCqQL/15kMVDBuoBYpUnSYT8doDNwsjvm3jTefnXr+ytn294ySnT8NlsFHmTgKNjwpuFy7XVV8yTeLtNl/P6w==", "dependencies": { - "@vue/compiler-dom": "3.2.39", - "@vue/shared": "3.2.39" + "@vue/compiler-dom": "3.3.8", + "@vue/shared": "3.3.8" } }, "node_modules/@vue/devtools-api": { @@ -2792,60 +2777,60 @@ "integrity": "sha512-pF1G4wky+hkifDiZSWn8xfuLOJI1ZXtuambpBEYaf7Xaf6zC/pM29rvAGpd3qaGXnr4BAXU1Pxz/VfvBGwexGA==" }, "node_modules/@vue/reactivity": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.2.39.tgz", - "integrity": "sha512-vlaYX2a3qMhIZfrw3Mtfd+BuU+TZmvDrPMa+6lpfzS9k/LnGxkSuf0fhkP0rMGfiOHPtyKoU9OJJJFGm92beVQ==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.3.8.tgz", + "integrity": "sha512-ctLWitmFBu6mtddPyOKpHg8+5ahouoTCRtmAHZAXmolDtuZXfjL2T3OJ6DL6ezBPQB1SmMnpzjiWjCiMYmpIuw==", "dependencies": { - "@vue/shared": "3.2.39" + "@vue/shared": "3.3.8" } }, "node_modules/@vue/reactivity-transform": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.2.39.tgz", - "integrity": "sha512-HGuWu864zStiWs9wBC6JYOP1E00UjMdDWIG5W+FpUx28hV3uz9ODOKVNm/vdOy/Pvzg8+OcANxAVC85WFBbl3A==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.3.8.tgz", + "integrity": "sha512-49CvBzmZNtcHua0XJ7GdGifM8GOXoUMOX4dD40Y5DxI3R8OUhMlvf2nvgUAcPxaXiV5MQQ1Nwy09ADpnLQUqRw==", "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.39", - "@vue/shared": "3.2.39", + "@babel/parser": "^7.23.0", + "@vue/compiler-core": "3.3.8", + "@vue/shared": "3.3.8", "estree-walker": "^2.0.2", - "magic-string": "^0.25.7" + "magic-string": "^0.30.5" } }, "node_modules/@vue/runtime-core": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.2.39.tgz", - "integrity": "sha512-xKH5XP57JW5JW+8ZG1khBbuLakINTgPuINKL01hStWLTTGFOrM49UfCFXBcFvWmSbci3gmJyLl2EAzCaZWsx8g==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.3.8.tgz", + "integrity": "sha512-qurzOlb6q26KWQ/8IShHkMDOuJkQnQcTIp1sdP4I9MbCf9FJeGVRXJFr2mF+6bXh/3Zjr9TDgURXrsCr9bfjUw==", "dependencies": { - "@vue/reactivity": "3.2.39", - "@vue/shared": "3.2.39" + "@vue/reactivity": "3.3.8", + "@vue/shared": "3.3.8" } }, "node_modules/@vue/runtime-dom": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.2.39.tgz", - "integrity": "sha512-4G9AEJP+sLhsqf5wXcyKVWQKUhI+iWfy0hWQgea+CpaTD7BR0KdQzvoQdZhwCY6B3oleSyNLkLAQwm0ya/wNoA==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.3.8.tgz", + "integrity": "sha512-Noy5yM5UIf9UeFoowBVgghyGGPIDPy1Qlqt0yVsUdAVbqI8eeMSsTqBtauaEoT2UFXUk5S64aWVNJN4MJ2vRdA==", "dependencies": { - "@vue/runtime-core": "3.2.39", - "@vue/shared": "3.2.39", - "csstype": "^2.6.8" + "@vue/runtime-core": "3.3.8", + "@vue/shared": "3.3.8", + "csstype": "^3.1.2" } }, "node_modules/@vue/server-renderer": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.2.39.tgz", - "integrity": "sha512-1yn9u2YBQWIgytFMjz4f/t0j43awKytTGVptfd3FtBk76t1pd8mxbek0G/DrnjJhd2V7mSTb5qgnxMYt8Z5iSQ==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.3.8.tgz", + "integrity": "sha512-zVCUw7RFskvPuNlPn/8xISbrf0zTWsTSdYTsUTN1ERGGZGVnRxM2QZ3x1OR32+vwkkCm0IW6HmJ49IsPm7ilLg==", "dependencies": { - "@vue/compiler-ssr": "3.2.39", - "@vue/shared": "3.2.39" + "@vue/compiler-ssr": "3.3.8", + "@vue/shared": "3.3.8" }, "peerDependencies": { - "vue": "3.2.39" + "vue": "3.3.8" } }, "node_modules/@vue/shared": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.39.tgz", - "integrity": "sha512-D3dl2ZB9qE6mTuWPk9RlhDeP1dgNRUKC3NJxji74A4yL8M2MwlhLKUC/49WHjrNzSPug58fWx/yFbaTzGAQSBw==" + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.3.8.tgz", + "integrity": "sha512-8PGwybFwM4x8pcfgqEQFy70NaQxASvOC5DJwLQfpArw1UDfUXrJkdxD3BhVTMS+0Lef/TU7YO0Jvr0jJY8T+mw==" }, "node_modules/@vue/test-utils": { "version": "2.0.2", @@ -3028,12 +3013,13 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/axios": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", - "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.2.tgz", + "integrity": "sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==", "dependencies": { - "follow-redirects": "^1.14.9", - "form-data": "^4.0.0" + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" } }, "node_modules/babel-jest": { @@ -3363,9 +3349,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001400", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001400.tgz", - "integrity": "sha512-Mv659Hn65Z4LgZdJ7ge5JTVbE3rqbJaaXgW5LEI9/tOaXclfIZ8DW7D7FCWWWmWiiPS7AC48S8kf3DApSxQdgA==", + "version": "1.0.30001564", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001564.tgz", + "integrity": "sha512-DqAOf+rhof+6GVx1y+xzbFPeOumfQnhYzVnZD6LAXijR77yPtm9mfOcqOnT3mpnJiZVT+kwLAFnRlZcIz+c6bg==", "dev": true, "funding": [ { @@ -3375,6 +3361,10 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ] }, @@ -3592,9 +3582,9 @@ "dev": true }, "node_modules/csstype": { - "version": "2.6.21", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.21.tgz", - "integrity": "sha512-Z1PhmomIfypOpoMjRQB70jfvy/wxT50qW08YXO5lMIJkrdq4yOTR+AW7FqutScmB9NkLwxo+jU+kZLbofZZq/w==" + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz", + "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==" }, "node_modules/data-urls": { "version": "3.0.2", @@ -6391,9 +6381,9 @@ "dev": true }, "node_modules/jest-snapshot/node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -6955,11 +6945,14 @@ } }, "node_modules/magic-string": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", - "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", + "version": "0.30.5", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.5.tgz", + "integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==", "dependencies": { - "sourcemap-codec": "^1.4.8" + "@jridgewell/sourcemap-codec": "^1.4.15" + }, + "engines": { + "node": ">=12" } }, "node_modules/make-dir": { @@ -7432,6 +7425,11 @@ "node": ">= 6" } }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, "node_modules/psl": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", @@ -7680,9 +7678,9 @@ } }, "node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -7766,11 +7764,6 @@ "node": ">=0.10.0" } }, - "node_modules/sourcemap-codec": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", - "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==" - }, "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -8206,15 +8199,23 @@ } }, "node_modules/vue": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/vue/-/vue-3.2.39.tgz", - "integrity": "sha512-tRkguhRTw9NmIPXhzk21YFBqXHT2t+6C6wPOgQ50fcFVWnPdetmRqbmySRHznrYjX2E47u0cGlKGcxKZJ38R/g==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.3.8.tgz", + "integrity": "sha512-5VSX/3DabBikOXMsxzlW8JyfeLKlG9mzqnWgLQLty88vdZL7ZJgrdgBOmrArwxiLtmS+lNNpPcBYqrhE6TQW5w==", "dependencies": { - "@vue/compiler-dom": "3.2.39", - "@vue/compiler-sfc": "3.2.39", - "@vue/runtime-dom": "3.2.39", - "@vue/server-renderer": "3.2.39", - "@vue/shared": "3.2.39" + "@vue/compiler-dom": "3.3.8", + "@vue/compiler-sfc": "3.3.8", + "@vue/runtime-dom": "3.3.8", + "@vue/server-renderer": "3.3.8", + "@vue/shared": "3.3.8" + }, + "peerDependencies": { + "typescript": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, "node_modules/vue-router": { @@ -8331,9 +8332,9 @@ } }, "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true, "engines": { "node": ">=0.10.0" @@ -8501,18 +8502,19 @@ }, "dependencies": { "@adobe/css-tools": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.0.1.tgz", - "integrity": "sha512-+u76oB43nOHrF4DDWRLWDCtci7f3QJoEBigemIdIeTi1ODqjx6Tad9NCVnPRwewWlKkVab5PlK8DCtPTyX7S8g==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.3.1.tgz", + "integrity": "sha512-/62yikz7NLScCGAAST5SHdnjaDJQBDq0M2muyRTpf2VQhw6StBg2ALiu73zSJQ4fMVLA+0uBhBHAle7Wg+2kSg==", "dev": true }, "@babel/code-frame": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", - "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "dev": true, "requires": { - "@babel/highlight": "^7.18.6" + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" } }, "@babel/compat-data": { @@ -8545,13 +8547,14 @@ } }, "@babel/generator": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.0.tgz", - "integrity": "sha512-S1ahxf1gZ2dpoiFgA+ohK9DIpz50bJ0CWs7Zlzb54Z4sG8qmdIrGrVqmy1sAtTVRb+9CU6U8VqT9L0Zj7hxHVg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "dev": true, "requires": { - "@babel/types": "^7.19.0", + "@babel/types": "^7.23.0", "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" } }, @@ -8626,9 +8629,9 @@ } }, "@babel/helper-environment-visitor": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", - "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "dev": true }, "@babel/helper-explode-assignable-expression": { @@ -8641,22 +8644,22 @@ } }, "@babel/helper-function-name": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", - "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "requires": { - "@babel/template": "^7.18.10", - "@babel/types": "^7.19.0" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" } }, "@babel/helper-hoist-variables": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", - "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "dev": true, "requires": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" } }, "@babel/helper-member-expression-to-functions": { @@ -8752,24 +8755,24 @@ } }, "@babel/helper-split-export-declaration": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", - "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "dev": true, "requires": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" } }, "@babel/helper-string-parser": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz", - "integrity": "sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", "dev": true }, "@babel/helper-validator-identifier": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz", - "integrity": "sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true }, "@babel/helper-validator-option": { @@ -8802,20 +8805,20 @@ } }, "@babel/highlight": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", - "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.19.1.tgz", - "integrity": "sha512-h7RCSorm1DdTVGJf3P2Mhj3kdnkmF/EiysUkzS2TdgAYqyjFdMQJbVuXOBej2SBJaXan/lIVtT6KkGbyyq753A==" + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==" }, "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { "version": "7.18.6", @@ -9604,42 +9607,42 @@ } }, "@babel/template": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz", - "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "dev": true, "requires": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.18.10", - "@babel/types": "^7.18.10" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" } }, "@babel/traverse": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.1.tgz", - "integrity": "sha512-0j/ZfZMxKukDaag2PtOPDbwuELqIar6lLskVPPJDjXMXjfLb1Obo/1yjxIGqqAJrmfaTIY3z2wFLAQ7qSkLsuA==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.19.0", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.19.1", - "@babel/types": "^7.19.0", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", "globals": "^11.1.0" } }, "@babel/types": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.0.tgz", - "integrity": "sha512-YuGopBq3ke25BVSiS6fgF49Ul9gH1x70Bcr6bqRLjWCkcX8Hre1/5+z+IiWOIerRMSSEfGZVB9z9kyq7wVs9YA==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "dev": true, "requires": { - "@babel/helper-string-parser": "^7.18.10", - "@babel/helper-validator-identifier": "^7.18.6", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" } }, @@ -10189,9 +10192,9 @@ } }, "@jridgewell/resolve-uri": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.8.tgz", - "integrity": "sha512-YK5G9LaddzGbcucK4c8h5tWFmMPBvRZ/uyWmN1/SbBdIvqGUdWGkJ5BAaccgs6XbzVLsqbPJrBSFwKv3kT9i7w==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", "dev": true }, "@jridgewell/set-array": { @@ -10201,19 +10204,18 @@ "dev": true }, "@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" }, "@jridgewell/trace-mapping": { - "version": "0.3.15", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz", - "integrity": "sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==", + "version": "0.3.20", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", + "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", "dev": true, "requires": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, "@sinclair/typebox": { @@ -10477,63 +10479,49 @@ "requires": {} }, "@vue/compiler-core": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.39.tgz", - "integrity": "sha512-mf/36OWXqWn0wsC40nwRRGheR/qoID+lZXbIuLnr4/AngM0ov8Xvv8GHunC0rKRIkh60bTqydlqTeBo49rlbqw==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.3.8.tgz", + "integrity": "sha512-hN/NNBUECw8SusQvDSqqcVv6gWq8L6iAktUR0UF3vGu2OhzRqcOiAno0FmBJWwxhYEXRlQJT5XnoKsVq1WZx4g==", "requires": { - "@babel/parser": "^7.16.4", - "@vue/shared": "3.2.39", + "@babel/parser": "^7.23.0", + "@vue/shared": "3.3.8", "estree-walker": "^2.0.2", - "source-map": "^0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - } + "source-map-js": "^1.0.2" } }, "@vue/compiler-dom": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.2.39.tgz", - "integrity": "sha512-HMFI25Be1C8vLEEv1hgEO1dWwG9QQ8LTTPmCkblVJY/O3OvWx6r1+zsox5mKPMGvqYEZa6l8j+xgOfUspgo7hw==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.3.8.tgz", + "integrity": "sha512-+PPtv+p/nWDd0AvJu3w8HS0RIm/C6VGBIRe24b9hSyNWOAPEUosFZ5diwawwP8ip5sJ8n0Pe87TNNNHnvjs0FQ==", "requires": { - "@vue/compiler-core": "3.2.39", - "@vue/shared": "3.2.39" + "@vue/compiler-core": "3.3.8", + "@vue/shared": "3.3.8" } }, "@vue/compiler-sfc": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.2.39.tgz", - "integrity": "sha512-fqAQgFs1/BxTUZkd0Vakn3teKUt//J3c420BgnYgEOoVdTwYpBTSXCMJ88GOBCylmUBbtquGPli9tVs7LzsWIA==", - "requires": { - "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.39", - "@vue/compiler-dom": "3.2.39", - "@vue/compiler-ssr": "3.2.39", - "@vue/reactivity-transform": "3.2.39", - "@vue/shared": "3.2.39", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.3.8.tgz", + "integrity": "sha512-WMzbUrlTjfYF8joyT84HfwwXo+8WPALuPxhy+BZ6R4Aafls+jDBnSz8PDz60uFhuqFbl3HxRfxvDzrUf3THwpA==", + "requires": { + "@babel/parser": "^7.23.0", + "@vue/compiler-core": "3.3.8", + "@vue/compiler-dom": "3.3.8", + "@vue/compiler-ssr": "3.3.8", + "@vue/reactivity-transform": "3.3.8", + "@vue/shared": "3.3.8", "estree-walker": "^2.0.2", - "magic-string": "^0.25.7", - "postcss": "^8.1.10", - "source-map": "^0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - } + "magic-string": "^0.30.5", + "postcss": "^8.4.31", + "source-map-js": "^1.0.2" } }, "@vue/compiler-ssr": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.2.39.tgz", - "integrity": "sha512-EoGCJ6lincKOZGW+0Ky4WOKsSmqL7hp1ZYgen8M7u/mlvvEQUaO9tKKOy7K43M9U2aA3tPv0TuYYQFrEbK2eFQ==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.3.8.tgz", + "integrity": "sha512-hXCqQL/15kMVDBuoBYpUnSYT8doDNwsjvm3jTefnXr+ytn294ySnT8NlsFHmTgKNjwpuFy7XVV8yTeLtNl/P6w==", "requires": { - "@vue/compiler-dom": "3.2.39", - "@vue/shared": "3.2.39" + "@vue/compiler-dom": "3.3.8", + "@vue/shared": "3.3.8" } }, "@vue/devtools-api": { @@ -10542,57 +10530,57 @@ "integrity": "sha512-pF1G4wky+hkifDiZSWn8xfuLOJI1ZXtuambpBEYaf7Xaf6zC/pM29rvAGpd3qaGXnr4BAXU1Pxz/VfvBGwexGA==" }, "@vue/reactivity": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.2.39.tgz", - "integrity": "sha512-vlaYX2a3qMhIZfrw3Mtfd+BuU+TZmvDrPMa+6lpfzS9k/LnGxkSuf0fhkP0rMGfiOHPtyKoU9OJJJFGm92beVQ==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.3.8.tgz", + "integrity": "sha512-ctLWitmFBu6mtddPyOKpHg8+5ahouoTCRtmAHZAXmolDtuZXfjL2T3OJ6DL6ezBPQB1SmMnpzjiWjCiMYmpIuw==", "requires": { - "@vue/shared": "3.2.39" + "@vue/shared": "3.3.8" } }, "@vue/reactivity-transform": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.2.39.tgz", - "integrity": "sha512-HGuWu864zStiWs9wBC6JYOP1E00UjMdDWIG5W+FpUx28hV3uz9ODOKVNm/vdOy/Pvzg8+OcANxAVC85WFBbl3A==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.3.8.tgz", + "integrity": "sha512-49CvBzmZNtcHua0XJ7GdGifM8GOXoUMOX4dD40Y5DxI3R8OUhMlvf2nvgUAcPxaXiV5MQQ1Nwy09ADpnLQUqRw==", "requires": { - "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.39", - "@vue/shared": "3.2.39", + "@babel/parser": "^7.23.0", + "@vue/compiler-core": "3.3.8", + "@vue/shared": "3.3.8", "estree-walker": "^2.0.2", - "magic-string": "^0.25.7" + "magic-string": "^0.30.5" } }, "@vue/runtime-core": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.2.39.tgz", - "integrity": "sha512-xKH5XP57JW5JW+8ZG1khBbuLakINTgPuINKL01hStWLTTGFOrM49UfCFXBcFvWmSbci3gmJyLl2EAzCaZWsx8g==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.3.8.tgz", + "integrity": "sha512-qurzOlb6q26KWQ/8IShHkMDOuJkQnQcTIp1sdP4I9MbCf9FJeGVRXJFr2mF+6bXh/3Zjr9TDgURXrsCr9bfjUw==", "requires": { - "@vue/reactivity": "3.2.39", - "@vue/shared": "3.2.39" + "@vue/reactivity": "3.3.8", + "@vue/shared": "3.3.8" } }, "@vue/runtime-dom": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.2.39.tgz", - "integrity": "sha512-4G9AEJP+sLhsqf5wXcyKVWQKUhI+iWfy0hWQgea+CpaTD7BR0KdQzvoQdZhwCY6B3oleSyNLkLAQwm0ya/wNoA==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.3.8.tgz", + "integrity": "sha512-Noy5yM5UIf9UeFoowBVgghyGGPIDPy1Qlqt0yVsUdAVbqI8eeMSsTqBtauaEoT2UFXUk5S64aWVNJN4MJ2vRdA==", "requires": { - "@vue/runtime-core": "3.2.39", - "@vue/shared": "3.2.39", - "csstype": "^2.6.8" + "@vue/runtime-core": "3.3.8", + "@vue/shared": "3.3.8", + "csstype": "^3.1.2" } }, "@vue/server-renderer": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.2.39.tgz", - "integrity": "sha512-1yn9u2YBQWIgytFMjz4f/t0j43awKytTGVptfd3FtBk76t1pd8mxbek0G/DrnjJhd2V7mSTb5qgnxMYt8Z5iSQ==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.3.8.tgz", + "integrity": "sha512-zVCUw7RFskvPuNlPn/8xISbrf0zTWsTSdYTsUTN1ERGGZGVnRxM2QZ3x1OR32+vwkkCm0IW6HmJ49IsPm7ilLg==", "requires": { - "@vue/compiler-ssr": "3.2.39", - "@vue/shared": "3.2.39" + "@vue/compiler-ssr": "3.3.8", + "@vue/shared": "3.3.8" } }, "@vue/shared": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.39.tgz", - "integrity": "sha512-D3dl2ZB9qE6mTuWPk9RlhDeP1dgNRUKC3NJxji74A4yL8M2MwlhLKUC/49WHjrNzSPug58fWx/yFbaTzGAQSBw==" + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.3.8.tgz", + "integrity": "sha512-8PGwybFwM4x8pcfgqEQFy70NaQxASvOC5DJwLQfpArw1UDfUXrJkdxD3BhVTMS+0Lef/TU7YO0Jvr0jJY8T+mw==" }, "@vue/test-utils": { "version": "2.0.2", @@ -10723,12 +10711,13 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "axios": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", - "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.2.tgz", + "integrity": "sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==", "requires": { - "follow-redirects": "^1.14.9", - "form-data": "^4.0.0" + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" } }, "babel-jest": { @@ -10978,9 +10967,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001400", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001400.tgz", - "integrity": "sha512-Mv659Hn65Z4LgZdJ7ge5JTVbE3rqbJaaXgW5LEI9/tOaXclfIZ8DW7D7FCWWWmWiiPS7AC48S8kf3DApSxQdgA==", + "version": "1.0.30001564", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001564.tgz", + "integrity": "sha512-DqAOf+rhof+6GVx1y+xzbFPeOumfQnhYzVnZD6LAXijR77yPtm9mfOcqOnT3mpnJiZVT+kwLAFnRlZcIz+c6bg==", "dev": true }, "chalk": { @@ -11160,9 +11149,9 @@ } }, "csstype": { - "version": "2.6.21", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.21.tgz", - "integrity": "sha512-Z1PhmomIfypOpoMjRQB70jfvy/wxT50qW08YXO5lMIJkrdq4yOTR+AW7FqutScmB9NkLwxo+jU+kZLbofZZq/w==" + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz", + "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==" }, "data-urls": { "version": "3.0.2", @@ -13131,9 +13120,9 @@ "dev": true }, "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -13555,11 +13544,11 @@ } }, "magic-string": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", - "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", + "version": "0.30.5", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.5.tgz", + "integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==", "requires": { - "sourcemap-codec": "^1.4.8" + "@jridgewell/sourcemap-codec": "^1.4.15" } }, "make-dir": { @@ -13894,6 +13883,11 @@ "sisteransi": "^1.0.5" } }, + "proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, "psl": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", @@ -14090,9 +14084,9 @@ } }, "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true }, "shebang-command": { @@ -14157,11 +14151,6 @@ } } }, - "sourcemap-codec": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", - "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==" - }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -14465,15 +14454,15 @@ } }, "vue": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/vue/-/vue-3.2.39.tgz", - "integrity": "sha512-tRkguhRTw9NmIPXhzk21YFBqXHT2t+6C6wPOgQ50fcFVWnPdetmRqbmySRHznrYjX2E47u0cGlKGcxKZJ38R/g==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.3.8.tgz", + "integrity": "sha512-5VSX/3DabBikOXMsxzlW8JyfeLKlG9mzqnWgLQLty88vdZL7ZJgrdgBOmrArwxiLtmS+lNNpPcBYqrhE6TQW5w==", "requires": { - "@vue/compiler-dom": "3.2.39", - "@vue/compiler-sfc": "3.2.39", - "@vue/runtime-dom": "3.2.39", - "@vue/server-renderer": "3.2.39", - "@vue/shared": "3.2.39" + "@vue/compiler-dom": "3.3.8", + "@vue/compiler-sfc": "3.3.8", + "@vue/runtime-dom": "3.3.8", + "@vue/server-renderer": "3.3.8", + "@vue/shared": "3.3.8" } }, "vue-router": { @@ -14560,9 +14549,9 @@ } }, "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true }, "wrap-ansi": { diff --git a/static/js/admin/vue-permissions-editor/package.json b/static/js/admin/vue-permissions-editor/package.json index c760b354fd..425561cc23 100644 --- a/static/js/admin/vue-permissions-editor/package.json +++ b/static/js/admin/vue-permissions-editor/package.json @@ -10,12 +10,12 @@ "build-dev": "vite build --mode development" }, "dependencies": { - "axios": "^0.27.2", + "axios": "^1.6.2", "date-fns": "^2.29.3", "lodash.clonedeep": "^4.5.0", "lodash.findindex": "^4.6.0", "lodash.isempty": "^4.4.0", - "vue": "^3.2.39", + "vue": "^3.2.47", "vue-router": "^4.1.5", "vuex": "^4.0.2" }, @@ -24,11 +24,11 @@ "@babel/preset-env": "^7.19.1", "@testing-library/jest-dom": "^5.16.5", "@vitejs/plugin-vue": "^2.3.3", - "@vue/compiler-sfc": "^3.2.39", + "@vue/compiler-sfc": "^3.2.47", "@vue/test-utils": "2.0.2", "@vue/vue3-jest": "^29.1.0", "babel-jest": "^29.0.3", - "caniuse-lite": "^1.0.30001400", + "caniuse-lite": "^1.0.30001564", "jest": "29.0.3", "jest-environment-jsdom": "^29.0.3", "moxios": "^0.4.0", diff --git a/static/js/vue-cdr-access/package-lock.json b/static/js/vue-cdr-access/package-lock.json index de8ff45ff6..a38aed4eea 100644 --- a/static/js/vue-cdr-access/package-lock.json +++ b/static/js/vue-cdr-access/package-lock.json @@ -40,7 +40,7 @@ "@vue/test-utils": "2.3.2", "@vue/vue3-jest": "^29.2.3", "babel-jest": "^29.5.0", - "caniuse-lite": "^1.0.30001547", + "caniuse-lite": "^1.0.30001564", "jest-environment-jsdom": "^29.5.0", "jest-localstorage-mock": "^2.4.26", "moxios": "^0.4.0", @@ -65,12 +65,13 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.21.4.tgz", - "integrity": "sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "dev": true, "dependencies": { - "@babel/highlight": "^7.18.6" + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" }, "engines": { "node": ">=6.9.0" @@ -124,12 +125,12 @@ } }, "node_modules/@babel/generator": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.21.4.tgz", - "integrity": "sha512-NieM3pVIYW2SwGzKoqfPrQsf4xGs9M9AIG3ThppsSRmO+m7eQhmI6amajKMUeIO37wFfsvnvcxQFx6x6iqxDnA==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "dev": true, "dependencies": { - "@babel/types": "^7.21.4", + "@babel/types": "^7.23.0", "@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" @@ -271,9 +272,9 @@ } }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", - "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "dev": true, "engines": { "node": ">=6.9.0" @@ -292,25 +293,25 @@ } }, "node_modules/@babel/helper-function-name": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.21.0.tgz", - "integrity": "sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "dependencies": { - "@babel/template": "^7.20.7", - "@babel/types": "^7.21.0" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-hoist-variables": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", - "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "dev": true, "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -440,30 +441,30 @@ } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", - "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "dev": true, "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-string-parser": { - "version": "7.19.4", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz", - "integrity": "sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", - "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true, "engines": { "node": ">=6.9.0" @@ -504,13 +505,13 @@ } }, "node_modules/@babel/highlight": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", - "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" }, "engines": { @@ -518,9 +519,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.4.tgz", - "integrity": "sha512-alVJj7k7zIxqBZ7BTRhz0IqJFxW1VJbm6N8JbcYhQ186df9ZBPbZBmWSqAMXwHGsCJdYks7z/voa3ibiS5bCIw==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", "bin": { "parser": "bin/babel-parser.js" }, @@ -1712,33 +1713,33 @@ } }, "node_modules/@babel/template": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.20.7.tgz", - "integrity": "sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.21.4.tgz", - "integrity": "sha512-eyKrRHKdyZxqDm+fV1iqL9UAHMoIg0nDaGqfIOd8rKH17m5snv7Gn4qgjBoFfLz9APvjFU/ICT00NVCv1Epp8Q==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.21.4", - "@babel/generator": "^7.21.4", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.21.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.21.4", - "@babel/types": "^7.21.4", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -1747,13 +1748,13 @@ } }, "node_modules/@babel/types": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.21.4.tgz", - "integrity": "sha512-rU2oY501qDxE8Pyo7i/Orqma4ziCOrby0/9mvbDUGEfvZjb279Nk9k19e2fiCxHbRRpY2ZyrgW1eq22mvmOIzA==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" }, "engines": { @@ -3546,9 +3547,9 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/axios": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.4.tgz", - "integrity": "sha512-toYm+Bsyl6VC5wSkfkbbNB6ROv7KY93PEBBL6xyDczaIHasAiv4wPqQ/c4RjoQzipxRD2W5g21cOqQulZ7rHwQ==", + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.2.tgz", + "integrity": "sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==", "dependencies": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", @@ -3877,9 +3878,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001547", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001547.tgz", - "integrity": "sha512-W7CrtIModMAxobGhz8iXmDfuJiiKg1WADMO/9x7/CLNin5cpSbuBjooyoIUVB5eyCc36QuTVlkVa1iB2S5+/eA==", + "version": "1.0.30001564", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001564.tgz", + "integrity": "sha512-DqAOf+rhof+6GVx1y+xzbFPeOumfQnhYzVnZD6LAXijR77yPtm9mfOcqOnT3mpnJiZVT+kwLAFnRlZcIz+c6bg==", "dev": true, "funding": [ { @@ -10263,12 +10264,13 @@ "dev": true }, "@babel/code-frame": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.21.4.tgz", - "integrity": "sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "dev": true, "requires": { - "@babel/highlight": "^7.18.6" + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" } }, "@babel/compat-data": { @@ -10307,12 +10309,12 @@ } }, "@babel/generator": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.21.4.tgz", - "integrity": "sha512-NieM3pVIYW2SwGzKoqfPrQsf4xGs9M9AIG3ThppsSRmO+m7eQhmI6amajKMUeIO37wFfsvnvcxQFx6x6iqxDnA==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "dev": true, "requires": { - "@babel/types": "^7.21.4", + "@babel/types": "^7.23.0", "@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" @@ -10422,9 +10424,9 @@ } }, "@babel/helper-environment-visitor": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", - "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "dev": true }, "@babel/helper-explode-assignable-expression": { @@ -10437,22 +10439,22 @@ } }, "@babel/helper-function-name": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.21.0.tgz", - "integrity": "sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "requires": { - "@babel/template": "^7.20.7", - "@babel/types": "^7.21.0" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" } }, "@babel/helper-hoist-variables": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", - "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "dev": true, "requires": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" } }, "@babel/helper-member-expression-to-functions": { @@ -10549,24 +10551,24 @@ } }, "@babel/helper-split-export-declaration": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", - "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "dev": true, "requires": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" } }, "@babel/helper-string-parser": { - "version": "7.19.4", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz", - "integrity": "sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", "dev": true }, "@babel/helper-validator-identifier": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", - "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true }, "@babel/helper-validator-option": { @@ -10597,20 +10599,20 @@ } }, "@babel/highlight": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", - "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.4.tgz", - "integrity": "sha512-alVJj7k7zIxqBZ7BTRhz0IqJFxW1VJbm6N8JbcYhQ186df9ZBPbZBmWSqAMXwHGsCJdYks7z/voa3ibiS5bCIw==" + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==" }, "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { "version": "7.18.6", @@ -11399,42 +11401,42 @@ } }, "@babel/template": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.20.7.tgz", - "integrity": "sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "dev": true, "requires": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" } }, "@babel/traverse": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.21.4.tgz", - "integrity": "sha512-eyKrRHKdyZxqDm+fV1iqL9UAHMoIg0nDaGqfIOd8rKH17m5snv7Gn4qgjBoFfLz9APvjFU/ICT00NVCv1Epp8Q==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.21.4", - "@babel/generator": "^7.21.4", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.21.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.21.4", - "@babel/types": "^7.21.4", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", "globals": "^11.1.0" } }, "@babel/types": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.21.4.tgz", - "integrity": "sha512-rU2oY501qDxE8Pyo7i/Orqma4ziCOrby0/9mvbDUGEfvZjb279Nk9k19e2fiCxHbRRpY2ZyrgW1eq22mvmOIzA==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "dev": true, "requires": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" } }, @@ -12828,9 +12830,9 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "axios": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.4.tgz", - "integrity": "sha512-toYm+Bsyl6VC5wSkfkbbNB6ROv7KY93PEBBL6xyDczaIHasAiv4wPqQ/c4RjoQzipxRD2W5g21cOqQulZ7rHwQ==", + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.2.tgz", + "integrity": "sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==", "requires": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", @@ -13075,9 +13077,15 @@ "dev": true }, "caniuse-lite": { +<<<<<<< HEAD "version": "1.0.30001547", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001547.tgz", "integrity": "sha512-W7CrtIModMAxobGhz8iXmDfuJiiKg1WADMO/9x7/CLNin5cpSbuBjooyoIUVB5eyCc36QuTVlkVa1iB2S5+/eA==", +======= + "version": "1.0.30001564", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001564.tgz", + "integrity": "sha512-DqAOf+rhof+6GVx1y+xzbFPeOumfQnhYzVnZD6LAXijR77yPtm9mfOcqOnT3mpnJiZVT+kwLAFnRlZcIz+c6bg==", +>>>>>>> main "dev": true }, "canvas": { diff --git a/static/js/vue-cdr-access/package.json b/static/js/vue-cdr-access/package.json index ff85d34b6f..e90c6f12db 100644 --- a/static/js/vue-cdr-access/package.json +++ b/static/js/vue-cdr-access/package.json @@ -42,7 +42,7 @@ "@vue/test-utils": "2.3.2", "@vue/vue3-jest": "^29.2.3", "babel-jest": "^29.5.0", - "caniuse-lite": "^1.0.30001547", + "caniuse-lite": "^1.0.30001564", "jest-environment-jsdom": "^29.5.0", "jest-localstorage-mock": "^2.4.26", "moxios": "^0.4.0", diff --git a/static/js/vue-cdr-access/src/components/displayWrapper.vue b/static/js/vue-cdr-access/src/components/displayWrapper.vue index ed790b2278..37a3c029c5 100644 --- a/static/js/vue-cdr-access/src/components/displayWrapper.vue +++ b/static/js/vue-cdr-access/src/components/displayWrapper.vue @@ -72,7 +72,6 @@ Top level component for full record pages with searching/browsing, including Adm import notAvailable from "@/components/error_pages/notAvailable.vue"; import notFound from '@/components/error_pages/notFound.vue'; import get from 'axios'; - import isEmpty from 'lodash.isempty'; import analyticsUtils from '../mixins/analyticsUtils'; import errorUtils from '../mixins/errorUtils'; import imageUtils from '../mixins/imageUtils'; @@ -189,9 +188,6 @@ Top level component for full record pages with searching/browsing, including Adm this.min_created_year = response.data.minSearchYear; this.filter_parameters = response.data.filterParameters; this.is_page_loading = false; - if (!isEmpty(this.$route.query)) { - this.updateUrl(); - } }).catch(error => { this.setErrorResponse(error); this.is_page_loading = false; @@ -237,15 +233,6 @@ Top level component for full record pages with searching/browsing, including Adm } }, - updateUrl() { - let params = this.setTypes(); - this.$router.push({ name: 'displayRecords', query: params }).catch((e) => { - if (this.nonDuplicateNavigationError(e)) { - throw e; - } - }); - }, - hasSearchQuery() { let query_params = this.$route.query; return Object.keys(query_params).some(key => query_params[key] diff --git a/static/js/vue-cdr-access/src/components/full_record/aggregateRecord.vue b/static/js/vue-cdr-access/src/components/full_record/aggregateRecord.vue index 3a78fc0408..b6fa39bb57 100644 --- a/static/js/vue-cdr-access/src/components/full_record/aggregateRecord.vue +++ b/static/js/vue-cdr-access/src/components/full_record/aggregateRecord.vue @@ -75,6 +75,7 @@ {{ $t('full_record.file_type') }} {{ $t('full_record.filesize') }} {{ $t('full_record.view_file') }} - {{ $t('full_record.download_file') }} + {{ $t('full_record.download_file') }} {{ $t('full_record.mods') }} @@ -45,6 +45,10 @@ export default { props: { childCount: Number, + downloadAccess: { + default: false, + type: Boolean + }, editAccess: { default: false, type: Boolean @@ -63,8 +67,7 @@ export default { { data: this.$t('full_record.title') }, { data: this.$t('full_record.file_type') }, { data: this.$t('full_record.filesize') }, - { data: this.$t('full_record.view_file') }, - { data: this.$t('full_record.download_file') } + { data: this.$t('full_record.view_file') } ] } }, @@ -122,7 +125,7 @@ export default { }, columnDefs() { - const excluded_columns = [0, 4, 5]; + const excluded_columns = [0, 4]; let column_defs = [ { orderable: false, targets: excluded_columns }, @@ -132,7 +135,7 @@ export default { render: (data, type, row) => { let img; - if ('thumbnail_url' in row) { + if ('thumbnail_url' in row && this.hasPermission(row,'viewAccessCopies')) { const thumbnail_title = this.$t('full_record.thumbnail_title', { title: row.title }) img = `${thumbnail_title}`; @@ -187,18 +190,29 @@ export default { ` `; }, targets: 4 - }, - { + } + ]; + + if (this.downloadAccess) { + this.columns.push({ data: this.$t('full_record.download_file') }); + excluded_columns.push(5); // download button + + // Add to orderable, searchable exclusions + [0, 1].forEach((d) => column_defs[d].targets = excluded_columns); + + column_defs.push({ render: (data, type, row) => { return this.downloadButtonHtml(row); }, targets: 5 - } - ]; + }); + } if (this.editAccess) { + // Check for the correct column number, in the unlikely event a user has edit access, but not download access + const column_number = (this.downloadAccess) ? 6 : 5; this.columns.push({ data: this.$t('full_record.mods') }); - excluded_columns.push(6); // edit button + excluded_columns.push(column_number); // edit button // Add to orderable, searchable exclusions [0, 1].forEach((d) => column_defs[d].targets = excluded_columns); @@ -209,7 +223,7 @@ export default { return `` + '' }, - targets: 6 + targets: column_number } ); } diff --git a/static/js/vue-cdr-access/src/components/full_record/thumbnail.vue b/static/js/vue-cdr-access/src/components/full_record/thumbnail.vue index 27c8718719..8ec1150b82 100644 --- a/static/js/vue-cdr-access/src/components/full_record/thumbnail.vue +++ b/static/js/vue-cdr-access/src/components/full_record/thumbnail.vue @@ -105,7 +105,7 @@ export default { }, src() { - if (this.objectData.thumbnail_url !== undefined) { + if (this.objectData.thumbnail_url !== undefined && this.hasPermission(this.objectData, 'viewAccessCopies')) { return this.objectData.thumbnail_url; } diff --git a/static/js/vue-cdr-access/src/mixins/fileDownloadUtils.js b/static/js/vue-cdr-access/src/mixins/fileDownloadUtils.js index 40ccc73dd2..0773a0ab7f 100644 --- a/static/js/vue-cdr-access/src/mixins/fileDownloadUtils.js +++ b/static/js/vue-cdr-access/src/mixins/fileDownloadUtils.js @@ -72,11 +72,7 @@ export default { return html; } else { - return ``; + return ''; } }, diff --git a/static/js/vue-cdr-access/tests/unit/displayWrapper.spec.js b/static/js/vue-cdr-access/tests/unit/displayWrapper.spec.js index 0a8d82ff0a..40debf980c 100644 --- a/static/js/vue-cdr-access/tests/unit/displayWrapper.spec.js +++ b/static/js/vue-cdr-access/tests/unit/displayWrapper.spec.js @@ -66,7 +66,6 @@ describe('displayWrapper.vue', () => { await router.push(`/record/${response.container.id}`); mountApp(); wrapper.vm.getBriefObject(); - wrapper.vm.updateUrl(); wrapper.vm.retrieveSearchResults(); await flushPromises(); @@ -83,11 +82,9 @@ describe('displayWrapper.vue', () => { mountApp(); wrapper.vm.getBriefObject(); - wrapper.vm.updateUrl(); wrapper.vm.retrieveSearchResults(); await flushPromises(); expect(wrapper.vm.search_method).toEqual('searchJson'); - expect(wrapper.vm.$router.currentRoute.value.query.types).toEqual('Work,File'); }); it("uses the correct search parameters for non admin works only browse", async () => { @@ -95,11 +92,9 @@ describe('displayWrapper.vue', () => { mountApp(); wrapper.vm.getBriefObject(); - wrapper.vm.updateUrl(); wrapper.vm.retrieveSearchResults(); await flushPromises(); expect(wrapper.vm.search_method).toEqual('listJson'); - expect(wrapper.vm.$router.currentRoute.value.query.types).toEqual('Work,Folder,Collection,File'); }); it("uses the correct search parameters if search text is specified", async () => { @@ -109,11 +104,9 @@ describe('displayWrapper.vue', () => { }); wrapper.vm.getBriefObject(); - wrapper.vm.updateUrl(); wrapper.vm.retrieveSearchResults(); await flushPromises(); expect(wrapper.vm.search_method).toEqual('searchJson'); - expect(wrapper.vm.$router.currentRoute.value.query.types).toEqual('Work,Folder,Collection,File'); }); it("uses the correct search parameters if facet parameter is specified", async () => { @@ -123,11 +116,9 @@ describe('displayWrapper.vue', () => { }); wrapper.vm.getBriefObject(); - wrapper.vm.updateUrl(); wrapper.vm.retrieveSearchResults(); await flushPromises(); expect(wrapper.vm.search_method).toEqual('searchJson'); - expect(wrapper.vm.$router.currentRoute.value.query.types).toEqual('Work,Folder,Collection,File'); }); it("uses the correct parameters for admin unit browse", async () => { @@ -157,55 +148,19 @@ describe('displayWrapper.vue', () => { }); wrapper.vm.getBriefObject(); - wrapper.vm.updateUrl(); wrapper.vm.retrieveSearchResults(); await flushPromises(); expect(wrapper.vm.search_method).toEqual('listJson'); - expect(wrapper.vm.$router.currentRoute.value.query.types).toEqual('Work,Folder,Collection,File'); expect(wrapper.find(".container-note").exists()).toBe(true); expect(wrapper.find('#browse-display-type').exists()).toBe(true); }); - it("updates the url when work type changes", async () => { - await router.push('/record/73bc003c-9603-4cd9-8a65-93a22520ef6a?browse_type=gallery-display'); - mountApp({ - container_info: { - briefObject: { - type: 'Collection', - objectPath: [ - { - pid: 'collections', - name: 'Content Collections Root', - container: true - }, - { - pid: '353ee09f-a4ed-461e-a436-18a1bee77b01', - name: 'testAdminUnit', - container: true - }, - { - pid: 'fc77a9be-b49d-4f4e-b656-1644c9e964fc', - name: 'testCollection', - container: true - } - ] - }, - resourceType: 'Collection' - } - }); - - wrapper.vm.updateUrl(); - await flushPromises(); - expect(wrapper.vm.$router.currentRoute.value.query.types).toEqual('Work,Folder,Collection,File'); - }); - it("displays a 'works only' option if the 'works only' box is checked and no records are works", async () => { stubQueryResponse(`searchJson/73bc003c-9603-4cd9-8a65-93a22520ef6a?.+`, response); await router.push('/record/73bc003c-9603-4cd9-8a65-93a22520ef6a?works_only=true'); mountApp(); wrapper.vm.getBriefObject(); - wrapper.vm.updateUrl(); wrapper.vm.retrieveSearchResults(); await flushPromises(); let works_only = wrapper.find('.container-note'); @@ -216,10 +171,7 @@ describe('displayWrapper.vue', () => { it("does not display a 'works only' option if the 'works only' box is not checked and no records are works", async () => { await router.push('/record/73bc003c-9603-4cd9-8a65-93a22520ef6a?works_only=false'); mountApp(); - // wrapper.vm.getBriefObject(); - // wrapper.vm.updateUrl(); - // wrapper.vm.retrieveSearchResults(); - // await flushPromises(); + let works_only = wrapper.find('.container-note'); expect(works_only.exists()).toBe(false) }); @@ -251,7 +203,6 @@ describe('displayWrapper.vue', () => { await router.push('/record/73bc003c-9603-4cd9-8a65-93a22520ef6a'); mountApp(); wrapper.vm.getBriefObject(); - wrapper.vm.updateUrl(); wrapper.vm.retrieveSearchResults(); await flushPromises(); @@ -355,7 +306,6 @@ describe('displayWrapper.vue', () => { let num_facets = wrapper.vm.$store.state.possibleFacetFields.length; expect(num_facets).toBeGreaterThan(0); expect(wrapper.vm.$store.state.possibleFacetFields.indexOf('unit')).toEqual(-1); - expect(wrapper.vm.$route.query.facetSelect.indexOf('unit')).toEqual(-1); // Trigger works only filter and make sure that the set of facets does not change await wrapper.find('#works-only').trigger('click'); diff --git a/static/js/vue-cdr-access/tests/unit/fileList.spec.js b/static/js/vue-cdr-access/tests/unit/fileList.spec.js index 1f1ad8bff6..905266c704 100644 --- a/static/js/vue-cdr-access/tests/unit/fileList.spec.js +++ b/static/js/vue-cdr-access/tests/unit/fileList.spec.js @@ -95,18 +95,6 @@ describe('fileList.vue', () => { expect(wrapper.vm.showBadge({ status: [''] })).toEqual({ markDeleted: false, restricted: true }); }); - // @TODO TDB whether viewAccessCopies allows a user to download anything - /* it("sets download button html for image files with canViewAccess permission", () => { - const download = wrapper.vm.downloadButtonHtml(briefObject); - // Download button - expect(download).toEqual(expect.stringContaining('button id="dcr-download-4db695c0-5fd5-4abf-9248-2e115d43f57d"')); - // Options - expect(download).toEqual(expect.stringContaining('Small JPG (800px)')); - expect(download).toEqual(expect.stringContaining('Medium JPG (1600px)')); - expect(download).toEqual(expect.not.stringContaining('Full Size JPG')); - expect(download).toEqual(expect.not.stringContaining('Original File')); - });*/ - it("sets download button html for image files with canViewOriginal permission", async () => { let updatedBriefObj = cloneDeep(briefObject); updatedBriefObj.permissions = [ @@ -149,25 +137,21 @@ describe('fileList.vue', () => { expect(download).toEqual(expect.stringContaining(' { + it("does not show a button for non-image files without viewOriginal permission", () => { let updatedBriefObj = cloneDeep(briefObject); updatedBriefObj.fileType = ['application/pdf'] updatedBriefObj.format = ['Text'] updatedBriefObj.datastream = ['original_file|application/pdf|pdf file||416330|urn:sha1:4945153c9f5ce152ef8eda495deba043f536f388||']; - const download = wrapper.vm.downloadButtonHtml(updatedBriefObj); - // Disabled download button - expect(download).toEqual(expect.stringContaining('button class="button download-images" title="Download Unavailable" disabled')); + expect(wrapper.find('div.download').exists()).toBe(false); }); - it("sets a disabled download button for image files without viewAccessCopies permission", () => { + it("does not show a button for image files without viewOriginal permission", () => { let updatedBriefObj = cloneDeep(briefObject); updatedBriefObj.permissions = [ "viewMetadata" ]; - const download = wrapper.vm.downloadButtonHtml(updatedBriefObj); - // Disabled download button - expect(download).toEqual(expect.stringContaining('button class="button download-images" title="Download Unavailable" disabled')); + expect(wrapper.find('div.image-download-options').exists()).toBe(false); }); }); \ No newline at end of file diff --git a/static/js/vue-cdr-access/tests/unit/thumbnail.spec.js b/static/js/vue-cdr-access/tests/unit/thumbnail.spec.js index 0d1f4f0f24..313c46f57f 100644 --- a/static/js/vue-cdr-access/tests/unit/thumbnail.spec.js +++ b/static/js/vue-cdr-access/tests/unit/thumbnail.spec.js @@ -128,12 +128,21 @@ describe('thumbnail.vue', () => { }); }); - it('displays a thumbnail, if present', () => { + it('displays a thumbnail, if present and user has viewAccessCopies permissions', () => { expect(wrapper.find('.thumbnail .thumbnail-viewer').exists()).toBe(true); + expect(wrapper.find('i.placeholder').exists()).toBe(false); expect(wrapper.find('a').attributes('class')) .toEqual('thumbnail thumbnail-size-large has_tooltip') }); + it('does not display a thumbnail if user does not have viewAccessCopies permissions', async () => { + let updatedRecordData = cloneDeep(recordData); + updatedRecordData.briefObject.permissions = ['viewMetadata']; + await wrapper.setProps({ thumbnailData: updatedRecordData }); + expect(wrapper.find('i.placeholder').exists()).toBe(true); + expect(wrapper.find('.thumbnail .thumbnail-viewer').exists()).toBe(false); + }); + it('displays a placeholder, if no thumbnail', async () => { let updatedRecordData = cloneDeep(recordData); updatedRecordData.briefObject.thumbnail_url = undefined; diff --git a/static/templates/admin/createWorkObjectForm.html b/static/templates/admin/createWorkObjectForm.html index 15c3cf5e6a..3384007cec 100644 --- a/static/templates/admin/createWorkObjectForm.html +++ b/static/templates/admin/createWorkObjectForm.html @@ -4,7 +4,6 @@
diff --git a/web-access-app/src/main/resources/recordTransformations/modsToFullRecord.xsl b/web-access-app/src/main/resources/recordTransformations/modsToFullRecord.xsl index cf29d91084..f5cc370fa7 100644 --- a/web-access-app/src/main/resources/recordTransformations/modsToFullRecord.xsl +++ b/web-access-app/src/main/resources/recordTransformations/modsToFullRecord.xsl @@ -525,8 +525,10 @@ - +
+
+ diff --git a/web-common/src/main/java/edu/unc/lib/boxc/web/common/services/AccessCopiesService.java b/web-common/src/main/java/edu/unc/lib/boxc/web/common/services/AccessCopiesService.java index 235ee9504c..488d337db8 100644 --- a/web-common/src/main/java/edu/unc/lib/boxc/web/common/services/AccessCopiesService.java +++ b/web-common/src/main/java/edu/unc/lib/boxc/web/common/services/AccessCopiesService.java @@ -136,6 +136,7 @@ public String getThumbnailId(ContentObjectRecord contentObjectRecord, AccessGrou log.debug("Found thumbnail object directly assigned to object {}", thumbId); return thumbId; } + // Don't need to check any further if object isn't a work or doesn't contain files with thumbnails if (!ResourceType.Work.name().equals(contentObjectRecord.getResourceType()) || contentObjectRecord.getFileFormatCategory() == null diff --git a/web-common/src/main/java/edu/unc/lib/boxc/web/common/services/PermissionsHelper.java b/web-common/src/main/java/edu/unc/lib/boxc/web/common/services/PermissionsHelper.java index 29218f80b4..bbfe17aea7 100644 --- a/web-common/src/main/java/edu/unc/lib/boxc/web/common/services/PermissionsHelper.java +++ b/web-common/src/main/java/edu/unc/lib/boxc/web/common/services/PermissionsHelper.java @@ -48,18 +48,6 @@ public boolean hasOriginalAccess(AccessGroupSet principals, ContentObjectRecord return hasDatastreamAccess(principals, ORIGINAL_FILE, metadata); } - /** - * Returns true if the principals can access thumbnails belonging to - * the requested object, if present. - * - * @param principals - * @param metadata - * @return - */ - public boolean hasThumbnailAccess(AccessGroupSet principals, ContentObjectRecord metadata) { - return hasDatastreamAccess(principals, THUMBNAIL_SMALL, metadata); - } - /** * Returns true if the principals can access the image preview belonging to * the requested object, if present. @@ -75,7 +63,7 @@ public boolean hasImagePreviewAccess(AccessGroupSet principals, ContentObjectRec /** * Returns true if the principals can access the MODS description belonging to * the requested object, if present. - * + * * @param metadata * @return */ @@ -93,7 +81,7 @@ public boolean hasDescriptionAccess(AccessGroupSet principals, ContentObjectReco * @return */ public boolean hasDatastreamAccess(AccessGroupSet principals, DatastreamType datastream, - ContentObjectRecord metadata) { + ContentObjectRecord metadata) { notNull(principals, "Requires agent principals"); notNull(datastream, "Requires datastream type"); notNull(metadata, "Requires metadata object"); @@ -168,4 +156,4 @@ public AccessControlService getAccessControlService() { public void setAccessControlService(AccessControlService accessControlService) { this.accessControlService = accessControlService; } -} +} \ No newline at end of file diff --git a/web-common/src/test/java/edu/unc/lib/boxc/web/common/services/AccessCopiesServiceTest.java b/web-common/src/test/java/edu/unc/lib/boxc/web/common/services/AccessCopiesServiceTest.java index fc17173f61..950af5449f 100644 --- a/web-common/src/test/java/edu/unc/lib/boxc/web/common/services/AccessCopiesServiceTest.java +++ b/web-common/src/test/java/edu/unc/lib/boxc/web/common/services/AccessCopiesServiceTest.java @@ -371,4 +371,4 @@ private void hasPermissions(ContentObjectSolrRecord contentObject, boolean hasAc private void populateResultList(ContentObjectRecord... objects) { when(searchResultResponse.getResultList()).thenReturn(Arrays.asList(objects)); } -} +} \ No newline at end of file diff --git a/web-common/src/test/java/edu/unc/lib/boxc/web/common/services/PermissionsHelperTest.java b/web-common/src/test/java/edu/unc/lib/boxc/web/common/services/PermissionsHelperTest.java index 68ec7c9622..fe7a2589f3 100644 --- a/web-common/src/test/java/edu/unc/lib/boxc/web/common/services/PermissionsHelperTest.java +++ b/web-common/src/test/java/edu/unc/lib/boxc/web/common/services/PermissionsHelperTest.java @@ -162,4 +162,4 @@ public void testDoesNotHaveEnhancedIfLoggedIn() { private void assignPermission(Permission permission, boolean value) { when(accessControlService.hasAccess(any(PID.class), eq(principals), eq(permission))).thenReturn(value); } -} +} \ No newline at end of file diff --git a/web-services-app/src/main/java/edu/unc/lib/boxc/web/services/processing/DownloadImageService.java b/web-services-app/src/main/java/edu/unc/lib/boxc/web/services/processing/DownloadImageService.java index 4c58d81254..278f94ebe5 100644 --- a/web-services-app/src/main/java/edu/unc/lib/boxc/web/services/processing/DownloadImageService.java +++ b/web-services-app/src/main/java/edu/unc/lib/boxc/web/services/processing/DownloadImageService.java @@ -35,6 +35,9 @@ public class DownloadImageService { */ public ResponseEntity streamImage(ContentObjectRecord contentObjectRecord, String size) throws IOException { + if (contentObjectRecord.getDatastreamObject(DatastreamType.JP2_ACCESS_COPY.getId()) == null) { + return ResponseEntity.notFound().build(); + } String pidString = contentObjectRecord.getPid().getId(); String url = buildURL(pidString, size); diff --git a/web-services-app/src/main/java/edu/unc/lib/boxc/web/services/rest/modify/ThumbnailController.java b/web-services-app/src/main/java/edu/unc/lib/boxc/web/services/rest/modify/ThumbnailController.java index 94441bb031..c29024188c 100644 --- a/web-services-app/src/main/java/edu/unc/lib/boxc/web/services/rest/modify/ThumbnailController.java +++ b/web-services-app/src/main/java/edu/unc/lib/boxc/web/services/rest/modify/ThumbnailController.java @@ -11,6 +11,7 @@ import edu.unc.lib.boxc.model.api.ids.PID; import edu.unc.lib.boxc.model.api.objects.FileObject; import edu.unc.lib.boxc.model.api.objects.RepositoryObjectLoader; +import edu.unc.lib.boxc.model.api.objects.WorkObject; import edu.unc.lib.boxc.model.fcrepo.ids.PIDs; import edu.unc.lib.boxc.operations.jms.thumbnails.ThumbnailRequest; import edu.unc.lib.boxc.operations.jms.thumbnails.ThumbnailRequestSender; @@ -46,6 +47,8 @@ @Controller public class ThumbnailController { private static final Logger log = LoggerFactory.getLogger(ThumbnailController.class); + public static final String OLD_THUMBNAIL_ID = "oldThumbnailId"; + public static final String ACTION = "action"; @Autowired private ImportThumbnailService service; @@ -71,7 +74,7 @@ ResponseEntity importThumbnail(@PathVariable("pid") String pid, String mimeType = thumbnailFile.getContentType(); Map result = new HashMap<>(); - result.put("action", "editThumbnail"); + result.put(ACTION, "editThumbnail"); result.put("username", agent.getUsername()); try (InputStream importStream = thumbnailFile.getInputStream()) { @@ -100,6 +103,8 @@ ResponseEntity importThumbnail(@PathVariable("pid") String pid, @ResponseBody public ResponseEntity assignThumbnail(@PathVariable("pidString") String pidString) { PID pid = PIDs.get(pidString); + Map result = new HashMap<>(); + result.put(ACTION, "assignThumbnail"); AccessGroupSet principals = getAgentPrincipals().getPrincipals(); aclService.assertHasAccess("Insufficient permissions to assign thumbnail for " + pidString, @@ -111,6 +116,12 @@ public ResponseEntity assignThumbnail(@PathVariable("pidString") String return new ResponseEntity<>(HttpStatus.BAD_REQUEST); } + var workObject = (WorkObject) object.getParent(); + var oldThumbnail = workObject.getThumbnailObject(); + if (oldThumbnail != null) { + result.put(OLD_THUMBNAIL_ID, oldThumbnail.getPid().getId()); + } + var agent = AgentPrincipalsImpl.createFromThread(); var request = new ThumbnailRequest(); request.setAgent(agent); @@ -123,29 +134,46 @@ public ResponseEntity assignThumbnail(@PathVariable("pidString") String log.error("Error assigning file {} as thumbnail", request.getFilePidString(), e); return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR); } - return new ResponseEntity<>(HttpStatus.OK); + result.put("timestamp", System.currentTimeMillis()); + result.put("newThumbnailId", object.getPid().getId()); + return new ResponseEntity<>(result, HttpStatus.OK); } @DeleteMapping(value = "/edit/deleteThumbnail/{pidString}") @ResponseBody public ResponseEntity deleteThumbnail(@PathVariable("pidString") String pidString) { PID pid = PIDs.get(pidString); + Map result = new HashMap<>(); + result.put(ACTION, "deleteThumbnail"); AccessGroupSet principals = getAgentPrincipals().getPrincipals(); aclService.assertHasAccess("Insufficient permissions to assign thumbnail for " + pidString, pid, principals, Permission.editDescription); var object = repositoryObjectLoader.getRepositoryObject(pid); - if (!(object instanceof FileObject)) { - log.error("Error object is not a file: {}", pidString); + if (!(object instanceof FileObject) && !(object instanceof WorkObject)) { + log.error("Error object is not a file or work: {}", pidString); + return new ResponseEntity<>(HttpStatus.BAD_REQUEST); + } + + if (object instanceof WorkObject && ((WorkObject) object).getThumbnailObject() == null) { + log.error("Error work object does not have assigned thumbnail to delete: {}", pidString); return new ResponseEntity<>(HttpStatus.BAD_REQUEST); } var agent = AgentPrincipalsImpl.createFromThread(); var request = new ThumbnailRequest(); request.setAgent(agent); - request.setFilePidString(pidString); request.setAction(ThumbnailRequest.DELETE); + if (object instanceof WorkObject) { + var fileId = ((WorkObject) object).getThumbnailObject().getPid().getId(); + request.setFilePidString(fileId); + result.put(OLD_THUMBNAIL_ID, fileId); + } else { + request.setFilePidString(pidString); + result.put(OLD_THUMBNAIL_ID, object.getPid().getId()); + } + try { thumbnailRequestSender.sendToQueue(request); } catch (IOException e) { @@ -153,6 +181,7 @@ public ResponseEntity deleteThumbnail(@PathVariable("pidString") String return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR); } - return new ResponseEntity<>(HttpStatus.OK); + result.put("timestamp", System.currentTimeMillis()); + return new ResponseEntity<>(result, HttpStatus.OK); } } diff --git a/web-services-app/src/test/java/edu/unc/lib/boxc/web/services/rest/DatastreamRestControllerIT.java b/web-services-app/src/test/java/edu/unc/lib/boxc/web/services/rest/DatastreamRestControllerIT.java index f8e91b690b..84c21b10be 100644 --- a/web-services-app/src/test/java/edu/unc/lib/boxc/web/services/rest/DatastreamRestControllerIT.java +++ b/web-services-app/src/test/java/edu/unc/lib/boxc/web/services/rest/DatastreamRestControllerIT.java @@ -1,7 +1,7 @@ package edu.unc.lib.boxc.web.services.rest; +import static edu.unc.lib.boxc.auth.api.Permission.viewAccessCopies; import static edu.unc.lib.boxc.auth.api.Permission.viewHidden; -import static edu.unc.lib.boxc.auth.api.Permission.viewMetadata; import static edu.unc.lib.boxc.model.api.DatastreamType.MD_EVENTS; import static edu.unc.lib.boxc.model.api.DatastreamType.TECHNICAL_METADATA; import static edu.unc.lib.boxc.model.api.DatastreamType.THUMBNAIL_SMALL; @@ -66,10 +66,10 @@ @ExtendWith(SpringExtension.class) @WebAppConfiguration @ContextHierarchy({ - @ContextConfiguration("/spring-test/test-fedora-container.xml"), - @ContextConfiguration("/spring-test/cdr-client-container.xml"), - @ContextConfiguration("/spring-test/solr-indexing-context.xml"), - @ContextConfiguration("/datastream-content-it-servlet.xml") + @ContextConfiguration("/spring-test/test-fedora-container.xml"), + @ContextConfiguration("/spring-test/cdr-client-container.xml"), + @ContextConfiguration("/spring-test/solr-indexing-context.xml"), + @ContextConfiguration("/datastream-content-it-servlet.xml") }) public class DatastreamRestControllerIT extends AbstractAPIIT { @@ -225,7 +225,7 @@ public void testGetThumbnailNoPermission() throws Exception { createDerivative(id, THUMBNAIL_SMALL, BINARY_CONTENT.getBytes()); doThrow(new AccessRestrictionException()).when(accessControlService) - .assertHasAccess(anyString(), eq(filePid), any(AccessGroupSetImpl.class), eq(viewMetadata)); + .assertHasAccess(anyString(), eq(filePid), any(AccessGroupSetImpl.class), eq(viewAccessCopies)); MvcResult result = mvc.perform(get("/thumb/" + filePid.getId())) .andExpect(status().isForbidden()) @@ -277,9 +277,9 @@ public void testGetEventLog() throws Exception { FolderObject folderObj = repositoryObjectFactory.createFolderObject(folderPid, null); premisLoggerFactory.createPremisLogger(folderObj) - .buildEvent(Premis.Creation) - .addAuthorizingAgent(AgentPids.forPerson("some_user")) - .writeAndClose(); + .buildEvent(Premis.Creation) + .addAuthorizingAgent(AgentPids.forPerson("some_user")) + .writeAndClose(); MvcResult result = mvc.perform(get("/file/" + id + "/" + MD_EVENTS.getId())) .andExpect(status().is2xxSuccessful()) @@ -321,9 +321,9 @@ public void testGetEventLogNoPermissions() throws Exception { FolderObject folderObj = repositoryObjectFactory.createFolderObject(folderPid, null); premisLoggerFactory.createPremisLogger(folderObj) - .buildEvent(Premis.Creation) - .addAuthorizingAgent(AgentPids.forPerson("some_user")) - .writeAndClose(); + .buildEvent(Premis.Creation) + .addAuthorizingAgent(AgentPids.forPerson("some_user")) + .writeAndClose(); doThrow(new AccessRestrictionException()).when(accessControlService) .assertHasAccess(anyString(), eq(folderPid), any(AccessGroupSetImpl.class), eq(viewHidden)); @@ -347,4 +347,4 @@ private File createDerivative(String id, DatastreamType dsType, byte[] content) return derivFile; } -} +} \ No newline at end of file diff --git a/web-services-app/src/test/java/edu/unc/lib/boxc/web/services/rest/DownloadImageControllerIT.java b/web-services-app/src/test/java/edu/unc/lib/boxc/web/services/rest/DownloadImageControllerIT.java index 06947b69f2..923e0234f2 100644 --- a/web-services-app/src/test/java/edu/unc/lib/boxc/web/services/rest/DownloadImageControllerIT.java +++ b/web-services-app/src/test/java/edu/unc/lib/boxc/web/services/rest/DownloadImageControllerIT.java @@ -7,6 +7,7 @@ import edu.unc.lib.boxc.auth.api.exceptions.AccessRestrictionException; import edu.unc.lib.boxc.auth.api.services.AccessControlService; import edu.unc.lib.boxc.auth.fcrepo.models.AccessGroupSetImpl; +import edu.unc.lib.boxc.model.api.DatastreamType; import edu.unc.lib.boxc.model.api.ids.PID; import edu.unc.lib.boxc.search.api.models.Datastream; import edu.unc.lib.boxc.search.api.requests.SimpleIdRequest; @@ -66,10 +67,14 @@ public void testGetImageAtFullSize() throws Exception { var formattedPid = idToPath(pidString, 4, 2) + pidString + ".jp2"; var filename = "bunny.jpg"; ContentObjectSolrRecord contentObjectSolrRecord = mock(ContentObjectSolrRecord.class); - Datastream datastream = mock(Datastream.class); + Datastream originalDatastream = mock(Datastream.class); + Datastream jp2Datastream = mock(Datastream.class); + when(solrSearchService.getObjectById(any(SimpleIdRequest.class))).thenReturn(contentObjectSolrRecord); - when(contentObjectSolrRecord.getDatastreamObject("original_file")).thenReturn(datastream); - when(datastream.getFilename()).thenReturn(filename); + when(contentObjectSolrRecord.getDatastreamObject(DatastreamType.ORIGINAL_FILE.getId())).thenReturn(originalDatastream); + when(originalDatastream.getFilename()).thenReturn(filename); + when(contentObjectSolrRecord.getDatastreamObject(DatastreamType.JP2_ACCESS_COPY.getId())).thenReturn(jp2Datastream); + when(contentObjectSolrRecord.getPid()).thenReturn(pid); stubFor(WireMock.get(urlMatching("/" + formattedPid + "/full/full/0/default.jpg")) @@ -93,7 +98,8 @@ public void testGetImageAtPixelSizeSmallerThanFull() throws Exception { var formattedPid = idToPath(pidString, 4, 2) + pidString + ".jp2"; var filename = "bunny.jpg"; ContentObjectSolrRecord contentObjectSolrRecord = mock(ContentObjectSolrRecord.class); - Datastream datastream = mock(Datastream.class); + Datastream originalDatastream = mock(Datastream.class); + Datastream jp2Datastream = mock(Datastream.class); stubFor(WireMock.get(urlMatching("/" + formattedPid + "/full/!800,800/0/default.jpg")) .willReturn(aResponse() @@ -102,9 +108,10 @@ public void testGetImageAtPixelSizeSmallerThanFull() throws Exception { .withHeader("Content-Type", "image/jpeg"))); when(solrSearchService.getObjectById(any(SimpleIdRequest.class))).thenReturn(contentObjectSolrRecord); - when(contentObjectSolrRecord.getDatastreamObject("original_file")).thenReturn(datastream); - when(datastream.getExtent()).thenReturn("1200x1200"); - when(datastream.getFilename()).thenReturn(filename); + when(contentObjectSolrRecord.getDatastreamObject("original_file")).thenReturn(originalDatastream); + when(originalDatastream.getExtent()).thenReturn("1200x1200"); + when(originalDatastream.getFilename()).thenReturn(filename); + when(contentObjectSolrRecord.getDatastreamObject(DatastreamType.JP2_ACCESS_COPY.getId())).thenReturn(jp2Datastream); when(contentObjectSolrRecord.getPid()).thenReturn(pid); MvcResult result = mvc.perform(get("/downloadImage/" + pidString + "/800")) @@ -124,7 +131,8 @@ public void testGetImageAtPixelSizeBiggerThanFull() throws Exception { var formattedPid = idToPath(pidString, 4, 2) + pidString + ".jp2"; var filename = "bunny.jpg"; ContentObjectSolrRecord contentObjectSolrRecord = mock(ContentObjectSolrRecord.class); - Datastream datastream = mock(Datastream.class); + Datastream originalDatastream = mock(Datastream.class); + Datastream jp2Datastream = mock(Datastream.class); stubFor(WireMock.get(urlMatching("/" + formattedPid + "/full/full/0/default.jpg")) .willReturn(aResponse() @@ -133,9 +141,10 @@ public void testGetImageAtPixelSizeBiggerThanFull() throws Exception { .withHeader("Content-Type", "image/jpeg"))); when(solrSearchService.getObjectById(any(SimpleIdRequest.class))).thenReturn(contentObjectSolrRecord); - when(contentObjectSolrRecord.getDatastreamObject("original_file")).thenReturn(datastream); - when(datastream.getExtent()).thenReturn("1200x1200"); - when(datastream.getFilename()).thenReturn(filename); + when(contentObjectSolrRecord.getDatastreamObject("original_file")).thenReturn(originalDatastream); + when(originalDatastream.getExtent()).thenReturn("1200x1200"); + when(originalDatastream.getFilename()).thenReturn(filename); + when(contentObjectSolrRecord.getDatastreamObject(DatastreamType.JP2_ACCESS_COPY.getId())).thenReturn(jp2Datastream); when(contentObjectSolrRecord.getPid()).thenReturn(pid); MvcResult result = mvc.perform(get("/downloadImage/" + pidString + "/2500")) @@ -168,13 +177,16 @@ public void testFullSizeAccessImageNoFullSizePermissions() throws Exception { public void testGetImageAtPixelSizeBiggerThanFullNoPermission() throws Exception { PID filePid = makePid(); ContentObjectSolrRecord contentObjectSolrRecord = mock(ContentObjectSolrRecord.class); - Datastream datastream = mock(Datastream.class); + Datastream originalDatastream = mock(Datastream.class); + Datastream jp2Datastream = mock(Datastream.class); when(solrSearchService.getObjectById(any(SimpleIdRequest.class))).thenReturn(contentObjectSolrRecord); doThrow(new AccessRestrictionException()).when(accessControlService) .assertHasAccess(anyString(), eq(filePid), any(AccessGroupSetImpl.class), eq(viewOriginal)); - when(contentObjectSolrRecord.getDatastreamObject("original_file")).thenReturn(datastream); - when(datastream.getExtent()).thenReturn("1200x1200"); + when(contentObjectSolrRecord.getDatastreamObject("original_file")).thenReturn(originalDatastream); + when(originalDatastream.getExtent()).thenReturn("1200x1200"); + when(contentObjectSolrRecord.getDatastreamObject(DatastreamType.JP2_ACCESS_COPY.getId())).thenReturn(jp2Datastream); + MvcResult result = mvc.perform(get("/downloadImage/" + filePid.getId() + "/2500")) .andExpect(status().isForbidden()) @@ -258,6 +270,17 @@ public void testGetAccessImageNoOriginalFile() throws Exception { assertEquals(message, DownloadImageService.INVALID_SIZE_MESSAGE); } + @Test + public void testGetImageNoJP2() throws Exception { + PID filePid = makePid(); + ContentObjectSolrRecord contentObjectSolrRecord = mock(ContentObjectSolrRecord.class); + when(solrSearchService.getObjectById(any(SimpleIdRequest.class))).thenReturn(contentObjectSolrRecord); + + mvc.perform(get("/downloadImage/" + filePid.getId() + "/full")) + .andExpect(status().is4xxClientError()) + .andReturn(); + } + private void assertCorrectImageReturned(MockHttpServletResponse response) throws IOException { assertEquals("image/jpeg", response.getContentType()); diff --git a/web-services-app/src/test/java/edu/unc/lib/boxc/web/services/rest/modify/ThumbnailIT.java b/web-services-app/src/test/java/edu/unc/lib/boxc/web/services/rest/modify/ThumbnailIT.java index c265575a7f..4a5e68eda5 100644 --- a/web-services-app/src/test/java/edu/unc/lib/boxc/web/services/rest/modify/ThumbnailIT.java +++ b/web-services-app/src/test/java/edu/unc/lib/boxc/web/services/rest/modify/ThumbnailIT.java @@ -21,8 +21,10 @@ import java.io.File; import java.io.FileInputStream; import java.nio.file.Path; +import java.util.Map; import edu.unc.lib.boxc.model.api.objects.RepositoryObjectLoader; +import edu.unc.lib.boxc.model.api.rdf.Cdr; import edu.unc.lib.boxc.operations.jms.thumbnails.ThumbnailRequest; import edu.unc.lib.boxc.operations.jms.thumbnails.ThumbnailRequestSender; import org.apache.commons.io.IOUtils; @@ -39,6 +41,7 @@ import org.springframework.mock.web.MockMultipartFile; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.ContextHierarchy; +import org.springframework.test.web.servlet.MvcResult; import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; import edu.unc.lib.boxc.auth.api.exceptions.AccessRestrictionException; @@ -163,15 +166,21 @@ public void assignThumbnailSuccess() throws Exception { var pid = makePid(); var filePidString = pid.getId(); var file = repositoryObjectFactory.createFileObject(pid, null); + var work = repositoryObjectFactory.createWorkObject(makePid(), null); when(repositoryObjectLoader.getRepositoryObject(pid)).thenReturn(file); + work.addMember(file); - mvc.perform(put("/edit/assignThumbnail/" + filePidString)) + MvcResult result = mvc.perform(put("/edit/assignThumbnail/" + filePidString)) .andExpect(status().is2xxSuccessful()) .andReturn(); verify(thumbnailRequestSender).sendToQueue(requestCaptor.capture()); ThumbnailRequest request = requestCaptor.getValue(); assertEquals(filePidString, request.getFilePidString()); + + Map respMap = getMapFromResponse(result); + assertEquals("assignThumbnail", respMap.get(ThumbnailController.ACTION)); + assertEquals(filePidString, respMap.get("newThumbnailId")); } @Test @@ -197,13 +206,40 @@ public void assignThumbnailInvalidPidString() throws Exception { } @Test - public void assignThumbnailPidIsNotAFile() throws Exception { + public void assignThumbnailPidIsAWorkWithPreviousAssignedThumbnail() throws Exception { var pid = makePid(); var filePidString = pid.getId(); - var work = repositoryObjectFactory.createWorkObject(pid, null); + var file = repositoryObjectFactory.createFileObject(pid, null); + var oldThumbnailPid = makePid(); + var oldThumbnail = repositoryObjectFactory.createFileObject(oldThumbnailPid, null); + var workPid = makePid(); + var work = repositoryObjectFactory.createWorkObject(workPid, null); + work.addMember(file); + work.addMember(oldThumbnail); when(repositoryObjectLoader.getRepositoryObject(pid)).thenReturn(work); + repositoryObjectFactory.createExclusiveRelationship(work, Cdr.useAsThumbnail, oldThumbnail.getResource()); - mvc.perform(put("/edit/assignThumbnail/" + filePidString)) + MvcResult result = mvc.perform(put("/edit/assignThumbnail/" + filePidString)) + .andExpect(status().is2xxSuccessful()) + .andReturn(); + verify(thumbnailRequestSender).sendToQueue(requestCaptor.capture()); + ThumbnailRequest request = requestCaptor.getValue(); + assertEquals(filePidString, request.getFilePidString()); + + Map respMap = getMapFromResponse(result); + assertEquals("assignThumbnail", respMap.get(ThumbnailController.ACTION)); + assertEquals(filePidString, respMap.get("newThumbnailId")); + assertEquals(oldThumbnailPid.getId(), respMap.get(ThumbnailController.OLD_THUMBNAIL_ID)); + } + + @Test + public void assignThumbnailPidIsNotAFileOrWork() throws Exception { + var pid = makePid(); + var folderPidString = pid.getId(); + var folder = repositoryObjectFactory.createFolderObject(pid, null); + when(repositoryObjectLoader.getRepositoryObject(pid)).thenReturn(folder); + + mvc.perform(put("/edit/assignThumbnail/" + folderPidString)) .andExpect(status().isBadRequest()) .andReturn(); verify(thumbnailRequestSender, never()).sendMessage(any(Document.class)); @@ -215,7 +251,7 @@ public void deleteThumbnailSuccess() throws Exception { var filePidString = pid.getId(); var file = repositoryObjectFactory.createFileObject(pid, null); when(repositoryObjectLoader.getRepositoryObject(pid)).thenReturn(file); - mvc.perform(delete("/edit/deleteThumbnail/" + filePidString)) + MvcResult result = mvc.perform(delete("/edit/deleteThumbnail/" + filePidString)) .andExpect(status().is2xxSuccessful()) .andReturn(); @@ -223,6 +259,10 @@ public void deleteThumbnailSuccess() throws Exception { ThumbnailRequest request = requestCaptor.getValue(); assertEquals(filePidString, request.getFilePidString()); assertEquals(ThumbnailRequest.DELETE, request.getAction()); + + Map respMap = getMapFromResponse(result); + assertEquals("deleteThumbnail", respMap.get(ThumbnailController.ACTION)); + assertEquals(filePidString, respMap.get(ThumbnailController.OLD_THUMBNAIL_ID)); } @Test @@ -240,10 +280,33 @@ public void deleteThumbnailNoAccess() throws Exception { } @Test - public void deleteThumbnailPidIsNotAFile() throws Exception { + public void deleteThumbnailPidIsAWork() throws Exception { + var pid = makePid(); + var workPidString = pid.getId(); + var work = repositoryObjectFactory.createWorkObject(pid, null); + var filePid = makePid(); + var file = repositoryObjectFactory.createFileObject(filePid, null); + work.addMember(file); + repositoryObjectFactory.createExclusiveRelationship(work, Cdr.useAsThumbnail, file.getResource()); + when(repositoryObjectLoader.getRepositoryObject(pid)).thenReturn(work); + + mvc.perform(delete("/edit/deleteThumbnail/" + workPidString)) + .andExpect(status().is2xxSuccessful()) + .andReturn(); + verify(thumbnailRequestSender).sendToQueue(requestCaptor.capture()); + ThumbnailRequest request = requestCaptor.getValue(); + assertEquals(filePid.getId(), request.getFilePidString()); + assertEquals(ThumbnailRequest.DELETE, request.getAction()); + } + + @Test + public void deleteThumbnailPidIsAWorkButNoAssignedThumbnail() throws Exception { var pid = makePid(); var workPidString = pid.getId(); var work = repositoryObjectFactory.createWorkObject(pid, null); + var filePid = makePid(); + var file = repositoryObjectFactory.createFileObject(filePid, null); + work.addMember(file); when(repositoryObjectLoader.getRepositoryObject(pid)).thenReturn(work); mvc.perform(delete("/edit/deleteThumbnail/" + workPidString)) @@ -252,6 +315,19 @@ public void deleteThumbnailPidIsNotAFile() throws Exception { verify(thumbnailRequestSender, never()).sendMessage(any(Document.class)); } + @Test + public void deleteThumbnailPidIsNotAFileOrWork() throws Exception { + var pid = makePid(); + var folderPidString = pid.getId(); + var folder = repositoryObjectFactory.createFolderObject(pid, null); + when(repositoryObjectLoader.getRepositoryObject(pid)).thenReturn(folder); + + mvc.perform(delete("/edit/deleteThumbnail/" + folderPidString)) + .andExpect(status().isBadRequest()) + .andReturn(); + verify(thumbnailRequestSender, never()).sendMessage(any(Document.class)); + } + private byte[] textStream() { return "I am not an image".getBytes(); } diff --git a/web-services-app/src/test/resources/datastream-content-it-servlet.xml b/web-services-app/src/test/resources/datastream-content-it-servlet.xml index 0b50961d24..0ba2e6c93a 100644 --- a/web-services-app/src/test/resources/datastream-content-it-servlet.xml +++ b/web-services-app/src/test/resources/datastream-content-it-servlet.xml @@ -1,34 +1,34 @@ - + - + - + - + - + @@ -41,4 +41,4 @@ - + \ No newline at end of file