From 423a3788a8ff5c004d90cb099cedcd620b95d3f4 Mon Sep 17 00:00:00 2001 From: mathieu-lessard Date: Fri, 3 May 2024 12:21:51 -0700 Subject: [PATCH 1/5] Added mapping for uuid (#74) Co-authored-by: Mathieu Lessard --- scripts/metadata.js | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/metadata.js b/scripts/metadata.js index f9368c5a..ccc53b8b 100644 --- a/scripts/metadata.js +++ b/scripts/metadata.js @@ -12,6 +12,7 @@ import { fetchCached } from './fetch-util.js'; import { getBaseConfigPath, getMetadataConfigs } from './site-config.js'; const SEARCH_FIELD_TO_POLARIS_API_MAP = { + uuid: 'assetId', 'dc-format': 'repositoryMetadata.dc:format', 'repo-name': 'repositoryMetadata.repo:name', 'repo-createDate': 'repositoryMetadata.repo:createDate', From f7c918ac04d3e860ee150d735d5e482b4c864ad0 Mon Sep 17 00:00:00 2001 From: Christopher Heintzman Date: Wed, 8 May 2024 17:03:05 -0400 Subject: [PATCH 2/5] Removed Prefix from Displayed UUID Value on Assets (#76) --- scripts/metadata-html-builder.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/metadata-html-builder.js b/scripts/metadata-html-builder.js index 8ae18086..92da6528 100644 --- a/scripts/metadata-html-builder.js +++ b/scripts/metadata-html-builder.js @@ -139,6 +139,12 @@ export async function fetchMetadataAndCreateHTML(metadataViewConfig, assetData, if (assetData === undefined || assetJSON === undefined) { assetJSON = await getAssetMetadata(getAssetIdFromURL()); } + // Remove "urn:aaid:aem:" prefix from displayed 'assetId' value + if (assetJSON.assetId) { + // A deep copy of the assetJSON object is created to avoid modifying the original object + assetJSON = JSON.parse(JSON.stringify(assetJSON)); + assetJSON.assetId = assetJSON.assetId.replace('urn:aaid:aem:', ''); + } const metadataContainer = document.createElement('div'); metadataContainer.classList.add('metadata-container'); From 61f761195d0d96550ce39419ab25c6a20cdea7ce Mon Sep 17 00:00:00 2001 From: Christopher Heintzman Date: Thu, 9 May 2024 14:34:50 -0400 Subject: [PATCH 3/5] Modified formatAssetMetadata() to allow custom dc-format Labels (#79) --- scripts/metadata.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/scripts/metadata.js b/scripts/metadata.js index ccc53b8b..dd0d036a 100644 --- a/scripts/metadata.js +++ b/scripts/metadata.js @@ -387,11 +387,6 @@ export function formatAssetMetadata(propertyName, metadataValue) { return DATA_TYPES.tags(metadataValue, propertyName); } - // file types - if (['dc-format'].includes(propertyName)) { - return PREDEFINED_METADATA_FIELDS.format.format(metadataValue); - } - // dates if (isDate(propertyName, metadataValue)) { return formatDate(metadataValue); From 777b5cbed5b653adff26b38ef0ea1ed1c991c572 Mon Sep 17 00:00:00 2001 From: mathieu-lessard Date: Fri, 17 May 2024 10:38:22 -0700 Subject: [PATCH 4/5] Removed "required" and custom values for fields (#86) Co-authored-by: Mathieu Lessard --- contenthub/hydration/hydration-utils.js | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/contenthub/hydration/hydration-utils.js b/contenthub/hydration/hydration-utils.js index 61471d8c..d2c3912f 100644 --- a/contenthub/hydration/hydration-utils.js +++ b/contenthub/hydration/hydration-utils.js @@ -29,10 +29,6 @@ export function formIsComplete(metadataSchema, formValues) { if(incomplete) return false; - if(formValues['gmo:campaignName']){ - if(!formValues['gmo:programName']) return false; - } - if(formValues['gmo:licensedContent'] !== 'no'){ if(!formValues['gmo:usageTerms']) return false; if(formValues['gmo:licensedContent'] === 'yes-expires' && !formValues['gmo:licenseExpiryDate']) return false; @@ -116,7 +112,8 @@ export function getMetadataSchema(facetOptions){ label: 'Product', placeholder: 'Select one or more', required: true, - element: 'tags', + element: 'dropdown', + multipleSelection: true, dropdownOptions: [ { name: 'N/A', id: 'na' }, { name: 'Acrobat Export PDF', id: 'acrobat-export-pdf' }, @@ -217,13 +214,7 @@ export function getMetadataSchema(facetOptions){ return value.toLowerCase().split(' ').every((val) => name.includes(val)); } ) - }, - required: true, - requires: [{ - property: 'gmo:campaignName', - expectedValue: '', - operator: '!==' - }] + } }, { mapToProperty: 'gmo:deliverableType', @@ -360,7 +351,8 @@ export function getMetadataSchema(facetOptions){ mapToProperty: 'gmo:ddomStage', label: 'DDOM Stage', placeholder: 'Select one or more', - element: 'tags', + element: 'dropdown', + multipleSelection: true, dropdownOptions: [ { id: 'discover', @@ -388,7 +380,8 @@ export function getMetadataSchema(facetOptions){ mapToProperty: 'gmo:p0TargetMarketGeo', label: 'Target Market', placeholder: 'Select one or more', - element: 'tags', + element: 'dropdown', + multipleSelection: true, dropdownOptions: [ { id: 'apac', From e1748ca349d43d2b1919cbf83153f3f63b203428 Mon Sep 17 00:00:00 2001 From: Christopher Heintzman Date: Thu, 23 May 2024 13:23:25 -0400 Subject: [PATCH 5/5] Added getBaseConfigPath to Collections Back Button (#89) --- blocks/adp-collection-header/adp-collection-header.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/blocks/adp-collection-header/adp-collection-header.js b/blocks/adp-collection-header/adp-collection-header.js index 7bea4d74..0d496732 100644 --- a/blocks/adp-collection-header/adp-collection-header.js +++ b/blocks/adp-collection-header/adp-collection-header.js @@ -2,6 +2,7 @@ import { getCollection, getCollectionIdFromURL, deleteCollection } from '../../s import createConfirmDialog from '../../scripts/confirm-dialog.js'; import { decorateIcons } from '../../scripts/lib-franklin.js'; import { createLinkHref, navigateTo } from '../../scripts/shared.js'; +import { getBaseConfigPath } from '../../scripts/site-config.js'; import { selectAllAssets, deselectAllAssets, @@ -13,7 +14,7 @@ function createCollectionInfoHeader(collectionInfoHeader, collection) { collectionInfoHeader.innerHTML = `
- +