From 2936818c245e5ed4e3014f2cad9ca4bbf66a59f3 Mon Sep 17 00:00:00 2001 From: Samruddhi <150183547+staware30@users.noreply.github.com> Date: Thu, 28 Mar 2024 09:01:03 -0700 Subject: [PATCH 1/5] updated hydration-utils.js (#54) MH: Added Firefly product to AA Modal 'Product' Field List --- contenthub/hydration/hydration-utils.js | 1 + 1 file changed, 1 insertion(+) diff --git a/contenthub/hydration/hydration-utils.js b/contenthub/hydration/hydration-utils.js index bdcf6216..8f828a3d 100644 --- a/contenthub/hydration/hydration-utils.js +++ b/contenthub/hydration/hydration-utils.js @@ -145,6 +145,7 @@ export function getMetadataSchema(facetOptions){ { name: 'Digital Editions', id: 'digital-editions' }, { name: 'Dreamweaver', id: 'dreamweaver' }, { name: 'Fill Sign', id: 'fill-sign' }, + { name: 'Firefly', id: 'firefly' }, { name: 'Frame.io', id: 'frame-io' }, { name: 'Fresco', id: 'fresco' }, { name: 'Http Dynamic Streaming', id: 'http-dynamic-streaming' }, From 1ebda0f9293ae46f837c3a6a9b9df69e1bb56989 Mon Sep 17 00:00:00 2001 From: Samruddhi <150183547+staware30@users.noreply.github.com> Date: Thu, 4 Apr 2024 09:08:16 -0700 Subject: [PATCH 2/5] MH: Add 'Asset Owner' Field to Add Assets Modal (#57) * MH: Add 'Asset Owner' Field to Add Assets Modal * Update hydration-utils.js * Comment Update --- contenthub/hydration/hydration-utils.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/contenthub/hydration/hydration-utils.js b/contenthub/hydration/hydration-utils.js index 8f828a3d..a4b36809 100644 --- a/contenthub/hydration/hydration-utils.js +++ b/contenthub/hydration/hydration-utils.js @@ -31,9 +31,8 @@ export function formIsComplete(metadataSchema, formValues) { if(formValues['gmo:campaignName']){ if(!formValues['gmo:programName']) return false; - if(!formValues['gmo:deliverableType']) return false; } - + if(formValues['gmo:licensedContent'] !== 'no'){ if(!formValues['gmo:usageTerms']) return false; if(formValues['gmo:licensedContent'] === 'yes-expire' && !formValues['gmo:licenseExpiryDate']) return false; @@ -255,11 +254,6 @@ export function getMetadataSchema(facetOptions){ name: 'Tutorial', }, ], - requires: [{ - property: 'gmo:campaignName', - expectedValue: '', - operator: '!==' - }] }, { mapToProperty: 'gmo:licensedContent', @@ -294,6 +288,12 @@ export function getMetadataSchema(facetOptions){ { property: 'gmo:licensedContent', expectedValue: '', operator: '!==' } ], }, + { + mapToProperty: 'gmo:owner', + label:'Campaign/Asset Owner', + element: 'textarea', + required: true, + }, { mapToProperty: 'gmo:contentType', label: 'Content Type', From 6e7e550d8e0dc4fb334e78f7c141eef1d35c3fc1 Mon Sep 17 00:00:00 2001 From: Samruddhi <150183547+staware30@users.noreply.github.com> Date: Thu, 11 Apr 2024 10:45:43 -0700 Subject: [PATCH 3/5] Update hydration-utils.js (#63) * Update hydration-utils.js * changed Target Market to multi-select --- contenthub/hydration/hydration-utils.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/contenthub/hydration/hydration-utils.js b/contenthub/hydration/hydration-utils.js index a4b36809..e6237d12 100644 --- a/contenthub/hydration/hydration-utils.js +++ b/contenthub/hydration/hydration-utils.js @@ -194,14 +194,14 @@ export function getMetadataSchema(facetOptions){ { mapToProperty: 'gmo:campaignName', label: 'Campaign', - placeholder: 'Select campaign', + placeholder: 'Select one', element: 'dropdown', dropdownOptions: [{id: '', name: 'N/A'}, ...facetOptions['gmo-campaignName']], }, { mapToProperty: 'gmo:programName', label: 'Program', - placeholder: 'Select program name', + placeholder: 'Select one', element: 'dropdown', dropdownOptions: facetOptions['gmo-programName'], required: true, @@ -214,6 +214,7 @@ export function getMetadataSchema(facetOptions){ { mapToProperty: 'gmo:deliverableType', label: 'Select deliverable type', + placeholder: 'Select one', element: 'dropdown', required: true, dropdownOptions: [ @@ -344,7 +345,7 @@ export function getMetadataSchema(facetOptions){ { mapToProperty: 'gmo:ddomStage', label: 'DDOM Stage', - placeholder: 'Select multiple', + placeholder: 'Select one or more', element: 'tags', dropdownOptions: [ { @@ -372,8 +373,8 @@ export function getMetadataSchema(facetOptions){ { mapToProperty: 'gmo:p0TargetMarketGeo', label: 'Target Market', - placeholder: 'Select One', - element: 'dropdown', + placeholder: 'Select one or more', + element: 'tags', dropdownOptions: [ { id: 'apac', From 9f58975b74786cc416d166e22a6c39e44933c3a9 Mon Sep 17 00:00:00 2001 From: mathieu-lessard Date: Thu, 18 Apr 2024 09:11:06 -0700 Subject: [PATCH 4/5] Added custom values for campaign and program (#67) * Changed Campaign and Program to ComboBox * Corrected Campaign Prompt * Matched values to Workfront * Fixed validation for new values * Corrected validation now that select fields are comboboxes --------- Co-authored-by: Mathieu Lessard --- contenthub/hydration/hydration-utils.js | 32 ++++++++++++++++++------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/contenthub/hydration/hydration-utils.js b/contenthub/hydration/hydration-utils.js index e6237d12..61471d8c 100644 --- a/contenthub/hydration/hydration-utils.js +++ b/contenthub/hydration/hydration-utils.js @@ -24,7 +24,7 @@ export function formIsComplete(metadataSchema, formValues) { const incomplete = metadataSchema.find((schema) => { if(!schema.required) return; if(schema.requires) return; - return Array.isArray(formValues[schema.mapToProperty]) ? formValues[schema.mapToProperty].length === 0 : formValues[schema.mapToProperty] === ''; + return !(schema.mapToProperty in formValues) || Array.isArray(formValues[schema.mapToProperty]) ? formValues[schema.mapToProperty].length === 0 : formValues[schema.mapToProperty] === ''; }); if(incomplete) return false; @@ -35,7 +35,7 @@ export function formIsComplete(metadataSchema, formValues) { if(formValues['gmo:licensedContent'] !== 'no'){ if(!formValues['gmo:usageTerms']) return false; - if(formValues['gmo:licensedContent'] === 'yes-expire' && !formValues['gmo:licenseExpiryDate']) return false; + if(formValues['gmo:licensedContent'] === 'yes-expires' && !formValues['gmo:licenseExpiryDate']) return false; } return true; }; @@ -46,7 +46,7 @@ export const licenseDateFieldShow = { placeholder: 'Select date', required: true, element: 'datepicker', - requires: [{ property: 'gmo:licensedContent', expectedValue: 'yes-expire' }], + requires: [{ property: 'gmo:licensedContent', expectedValue: 'yes-expires' }], }; const licenseExpirePerpitytity = new Date(); @@ -195,15 +195,29 @@ export function getMetadataSchema(facetOptions){ mapToProperty: 'gmo:campaignName', label: 'Campaign', placeholder: 'Select one', - element: 'dropdown', - dropdownOptions: [{id: '', name: 'N/A'}, ...facetOptions['gmo-campaignName']], + element: 'text', + getSuggestions: async (value) => { + return facetOptions['gmo-campaignName'].filter( + (option) => { + const name = option.name.toLowerCase(); + return value.toLowerCase().split(' ').every((val) => name.includes(val)); + } + ) + }, }, { mapToProperty: 'gmo:programName', label: 'Program', placeholder: 'Select one', - element: 'dropdown', - dropdownOptions: facetOptions['gmo-programName'], + element: 'text', + getSuggestions: async (value) => { + return facetOptions['gmo-programName'].filter( + (option) => { + const name = option.name.toLowerCase(); + return value.toLowerCase().split(' ').every((val) => name.includes(val)); + } + ) + }, required: true, requires: [{ property: 'gmo:campaignName', @@ -268,11 +282,11 @@ export function getMetadataSchema(facetOptions){ name: 'No', }, { - id: 'yes-expire', + id: 'yes-expires', name: 'Yes (Expires)', }, { - id: 'yes-perpetuity', + id: 'yes-in-perpetuity', name: 'Yes (in Perpetuity)', }, ], From d564007844ba098c8fe3fb61472e54bc3ac5571d Mon Sep 17 00:00:00 2001 From: mathieu-lessard Date: Thu, 9 May 2024 09:24:36 -0700 Subject: [PATCH 5/5] Release 05.09.2024 (#78) * Added mapping for uuid (#74) Co-authored-by: Mathieu Lessard * Removed Prefix from Displayed UUID Value on Assets (#76) --------- Co-authored-by: Mathieu Lessard Co-authored-by: Christopher Heintzman --- scripts/metadata-html-builder.js | 6 ++++++ scripts/metadata.js | 1 + 2 files changed, 7 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'); 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',