Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist #60

Merged
merged 4 commits into from
Apr 5, 2024

Conversation

TyroneAEM
Copy link
Collaborator

…rs of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx
…needed any more.

Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)
@TyroneAEM TyroneAEM requested a review from shiv-gup April 5, 2024 19:40
Copy link

aem-code-sync bot commented Apr 5, 2024

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

@TyroneAEM TyroneAEM self-assigned this Apr 5, 2024
Copy link

aem-code-sync bot commented Apr 5, 2024

Page Scores Audits Google
/assets PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
/drafts/tyrone/marketing-dashboard PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@TyroneAEM TyroneAEM merged commit f34bff4 into ASSETS-02024 Apr 5, 2024
0 of 2 checks passed
TyroneAEM added a commit that referenced this pull request Apr 8, 2024
* ASSETS-02024:
  ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)
  Assets 98990 - Dynamic campaign list (#61)
shiv-gup added a commit that referenced this pull request Jun 3, 2024
* ASSETS-88894 GRAPHQL Persisted Query Code (#53)

* GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

* Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

* Renamed file test-graphql.js to graphql.js

Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

* Changed queryName to getAllCampaings

* Rollback to 3/15/24 Commit a519a51 before adding GraphQL test code

* Delete test graphql code

* ASSETS-88895 : Show HCV report pages to limited users (#55)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Campaign List block for Marketing Dashboard page (#56)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

---------

Co-authored-by: Michael Dickson <[email protected]>

* updated hydration-utils.js (#54)

MH: Added Firefly  product to AA Modal 'Product' Field List

* Assets 98990 - Dynamic campaign list (#61)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

* Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

Which calls the persisted query gmo/filter-on-marketing-initiative
with example parameters

{
  "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
}

https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

* Campaign List filters display (#65)

* initial html structure setup

* refactor from select to div implementation

Select with multiselect displays as a list, not a dropdown

* finish refactor, enable visual functionality

- added all javascript needed for visual functionality
- finished refactoring structure

* Assets 98990 (#66)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* minor updates

- update graphql query to have hardcoded offset/limit (to resolve error)
- remove comments
- add placeholder 'refresh date' message and css
- move css for main body to accomodate above message

* add firefly icon

---------

Co-authored-by: Tyrone Tse <[email protected]>

* ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

* Added function hideQuickLinks()

* Added the hide field to the  shared-quicklinks config/worksheet
/blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
/scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
/scripts/site-config.js : Updated function to include the hide field

* Refactored the If statement logic

* Assets 98992- Campaign details/overview (#69)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

* gmo-campagin-list refactored to use  persisted query function
	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

* Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
Refactored the code for Repaginate for when the number of items page is changed
Show current page status

* graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
Deleted function  graphqlCampaignPaginated(first,cursor)

Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

* Fixed logic in calculating the nextCursor

* Removed all debug console.log statements

* Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

* Renamed the variable testConfig to headerConfig

* Campaign details block (#71)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* add status bar display

Also adjusted demo data slightly to include due date and lead

* update css/html to align with mockup and mvp

* resolve border bug

* implemented requested changes

* ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

---------

Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

* Updated function toggleOption : To only allow a single option to be selected in the dropdown list

---------

Co-authored-by: Shivani gupta <[email protected]>

* Assets 98993 (#75)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* resolve pr comments

* Release 05.09.2024 (#78)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

---------

Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>

* ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Assets 98994 (#81)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* initial changeover from static to dynamic data

* adjustments based on feedback

* additional changes based on feedback

* minor bugfix, null checks

* squash final bug with read more

* final touches

* combine two graphql functions with duplicated code

* bugfixes per pr review

* ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
Updated Geo dropdown list to be populated by graphql persisted query getGeoList

* Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
When a Business Line option is deselected then the Products List shows all products.

* Reduced the sample dropdown list options

* make links configurable, remove extraneous logs (#83)

* ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Removed comment

* ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Added function searchAsset(programName, campaignName) to get the asset URL

* Changed alt text to use assets repo-name property

* Renamed/Moved AssetsDatasource.js to /scripts/assets
gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
otherwise the values from blockConfig are overwritten when paginating to next page.

gmo-campaign-details.js : Added campaign Image
gmo-campaign-details.css : Updated CSS to display campaign Image

* gmo-campaign-list.js : Deleted comment
/scripts/assets.js : Updated to use createSearchEndpoint
/scripts/scripts.js : Added export to  export function createSearchEndpoint() {

* Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

* gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
/scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

* Assets 98996 (#88)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* ASSETS-88905 : Add Fields to the Overview Tab (#87)

* Added Target Market Area lists

function function createKPI(kpi)  is renamed createLI(li)

Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

* gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
gmo-campaign-details.js : Added Target Market Area and Platforms
refactored async function buildChannelScope(scopeTypeId, scopes, block)
to be able to display data for data based for a specified  CSS ID

* Added function getUniqueItems(items, property)
to get unique values for deliverableType and platforms

* Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
to  async function buildFieldScopes(scopeTypeId, scopes, block)

* Added global variable globalGraphFliter (#92)

Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
with graphFilter = currentGraphqlFilter

* Assets 98996 (#93)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* add deliverabletype graphql

- todo: refactor, some superfluous function(s) can be removed

* refactor product list to use graphql

* fix deliverable type tags, fix multiline text

* fix sort on marketing moments column

* removing merge artifact

* resolve PR comments

* platforms mapping with graphql (#94)

- also cleaned up extraneous/defunct code

* Refactor sort icons (#95)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

* assets.js : Refactored code to eliminate console.log error
gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

* Eliminated  JavaScript errors when image is not found

* Display total assets = 0 when the campaign image does not exist

* Code cleanup (#98)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

* Code cleanup part 2 (#100)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* Added  function closeAllDropDowns() (#101)

Added function handleClickOutside(event)

Updated function attachEventListeners()
    // Add event listener for clicks outside of dropdowns
    document.addEventListener('click', handleClickOutside);

Added function  resetProductsDropDown();

Updated  function resetAllFilters() to call function   resetProductsDropDown();

* Sticky deliverables header, update graphql endpoints (#102)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* update query endpoints, css tweak on deliverables

* Added tool tip for Program Name and Campaign Name (#103)

* remove duplicate icons

---------

Co-authored-by: TyroneAEM <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Tyrone Tse <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
mathieu-lessard pushed a commit that referenced this pull request Jun 3, 2024
* ASSETS-88894 GRAPHQL Persisted Query Code (#53)

* GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

* Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

* Renamed file test-graphql.js to graphql.js

Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

* Changed queryName to getAllCampaings

* Rollback to 3/15/24 Commit a519a51 before adding GraphQL test code

* Delete test graphql code

* ASSETS-88895 : Show HCV report pages to limited users (#55)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Campaign List block for Marketing Dashboard page (#56)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

---------

Co-authored-by: Michael Dickson <[email protected]>

* updated hydration-utils.js (#54)

MH: Added Firefly  product to AA Modal 'Product' Field List

* Assets 98990 - Dynamic campaign list (#61)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

* Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

Which calls the persisted query gmo/filter-on-marketing-initiative
with example parameters

{
  "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
}

https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

* Campaign List filters display (#65)

* initial html structure setup

* refactor from select to div implementation

Select with multiselect displays as a list, not a dropdown

* finish refactor, enable visual functionality

- added all javascript needed for visual functionality
- finished refactoring structure

* Assets 98990 (#66)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* minor updates

- update graphql query to have hardcoded offset/limit (to resolve error)
- remove comments
- add placeholder 'refresh date' message and css
- move css for main body to accomodate above message

* add firefly icon

---------

Co-authored-by: Tyrone Tse <[email protected]>

* ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

* Added function hideQuickLinks()

* Added the hide field to the  shared-quicklinks config/worksheet
/blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
/scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
/scripts/site-config.js : Updated function to include the hide field

* Refactored the If statement logic

* Assets 98992- Campaign details/overview (#69)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

* gmo-campagin-list refactored to use  persisted query function
	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

* Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
Refactored the code for Repaginate for when the number of items page is changed
Show current page status

* graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
Deleted function  graphqlCampaignPaginated(first,cursor)

Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

* Fixed logic in calculating the nextCursor

* Removed all debug console.log statements

* Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

* Renamed the variable testConfig to headerConfig

* Campaign details block (#71)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* add status bar display

Also adjusted demo data slightly to include due date and lead

* update css/html to align with mockup and mvp

* resolve border bug

* implemented requested changes

* ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

---------

Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

* Updated function toggleOption : To only allow a single option to be selected in the dropdown list

---------

Co-authored-by: Shivani gupta <[email protected]>

* Assets 98993 (#75)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* resolve pr comments

* ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Assets 98994 (#81)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* initial changeover from static to dynamic data

* adjustments based on feedback

* additional changes based on feedback

* minor bugfix, null checks

* squash final bug with read more

* final touches

* combine two graphql functions with duplicated code

* bugfixes per pr review

* ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
Updated Geo dropdown list to be populated by graphql persisted query getGeoList

* Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
When a Business Line option is deselected then the Products List shows all products.

* Reduced the sample dropdown list options

* make links configurable, remove extraneous logs (#83)

* ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Removed comment

* ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Added function searchAsset(programName, campaignName) to get the asset URL

* Changed alt text to use assets repo-name property

* Renamed/Moved AssetsDatasource.js to /scripts/assets
gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
otherwise the values from blockConfig are overwritten when paginating to next page.

gmo-campaign-details.js : Added campaign Image
gmo-campaign-details.css : Updated CSS to display campaign Image

* gmo-campaign-list.js : Deleted comment
/scripts/assets.js : Updated to use createSearchEndpoint
/scripts/scripts.js : Added export to  export function createSearchEndpoint() {

* Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

* gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
/scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

* Assets 98996 (#88)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* ASSETS-88905 : Add Fields to the Overview Tab (#87)

* Added Target Market Area lists

function function createKPI(kpi)  is renamed createLI(li)

Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

* gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
gmo-campaign-details.js : Added Target Market Area and Platforms
refactored async function buildChannelScope(scopeTypeId, scopes, block)
to be able to display data for data based for a specified  CSS ID

* Added function getUniqueItems(items, property)
to get unique values for deliverableType and platforms

* Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
to  async function buildFieldScopes(scopeTypeId, scopes, block)

* Added global variable globalGraphFliter (#92)

Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
with graphFilter = currentGraphqlFilter

* Assets 98996 (#93)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* add deliverabletype graphql

- todo: refactor, some superfluous function(s) can be removed

* refactor product list to use graphql

* fix deliverable type tags, fix multiline text

* fix sort on marketing moments column

* removing merge artifact

* resolve PR comments

* platforms mapping with graphql (#94)

- also cleaned up extraneous/defunct code

* Refactor sort icons (#95)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

* assets.js : Refactored code to eliminate console.log error
gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

* Eliminated  JavaScript errors when image is not found

* Display total assets = 0 when the campaign image does not exist

* Code cleanup (#98)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

* Code cleanup part 2 (#100)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* Added  function closeAllDropDowns() (#101)

Added function handleClickOutside(event)

Updated function attachEventListeners()
    // Add event listener for clicks outside of dropdowns
    document.addEventListener('click', handleClickOutside);

Added function  resetProductsDropDown();

Updated  function resetAllFilters() to call function   resetProductsDropDown();

* Sticky deliverables header, update graphql endpoints (#102)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* update query endpoints, css tweak on deliverables

* Added tool tip for Program Name and Campaign Name (#103)

* remove duplicate icons

---------

Co-authored-by: TyroneAEM <[email protected]>
Co-authored-by: Shivani Gupta <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: Tyrone Tse <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
shiv-gup added a commit that referenced this pull request Jun 4, 2024
…mber of pages (#105)

* ASSETS-88894 GRAPHQL Persisted Query Code (#53)

* GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

* Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

* Renamed file test-graphql.js to graphql.js

Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

* Changed queryName to getAllCampaings

* Rollback to 3/15/24 Commit a519a51 before adding GraphQL test code

* Delete test graphql code

* ASSETS-88895 : Show HCV report pages to limited users (#55)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Campaign List block for Marketing Dashboard page (#56)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

---------

Co-authored-by: Michael Dickson <[email protected]>

* updated hydration-utils.js (#54)

MH: Added Firefly  product to AA Modal 'Product' Field List

* Assets 98990 - Dynamic campaign list (#61)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

* Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

Which calls the persisted query gmo/filter-on-marketing-initiative
with example parameters

{
  "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
}

https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

* Campaign List filters display (#65)

* initial html structure setup

* refactor from select to div implementation

Select with multiselect displays as a list, not a dropdown

* finish refactor, enable visual functionality

- added all javascript needed for visual functionality
- finished refactoring structure

* Assets 98990 (#66)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* minor updates

- update graphql query to have hardcoded offset/limit (to resolve error)
- remove comments
- add placeholder 'refresh date' message and css
- move css for main body to accomodate above message

* add firefly icon

---------

Co-authored-by: Tyrone Tse <[email protected]>

* ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

* Added function hideQuickLinks()

* Added the hide field to the  shared-quicklinks config/worksheet
/blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
/scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
/scripts/site-config.js : Updated function to include the hide field

* Refactored the If statement logic

* Assets 98992- Campaign details/overview (#69)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

* gmo-campagin-list refactored to use  persisted query function
	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

* Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
Refactored the code for Repaginate for when the number of items page is changed
Show current page status

* graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
Deleted function  graphqlCampaignPaginated(first,cursor)

Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

* Fixed logic in calculating the nextCursor

* Removed all debug console.log statements

* Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

* Renamed the variable testConfig to headerConfig

* Campaign details block (#71)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* add status bar display

Also adjusted demo data slightly to include due date and lead

* update css/html to align with mockup and mvp

* resolve border bug

* implemented requested changes

* ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

---------

Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

* Updated function toggleOption : To only allow a single option to be selected in the dropdown list

---------

Co-authored-by: Shivani gupta <[email protected]>

* Assets 98993 (#75)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* resolve pr comments

* Release 05.09.2024 (#78)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

---------

Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>

* ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Assets 98994 (#81)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* initial changeover from static to dynamic data

* adjustments based on feedback

* additional changes based on feedback

* minor bugfix, null checks

* squash final bug with read more

* final touches

* combine two graphql functions with duplicated code

* bugfixes per pr review

* ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
Updated Geo dropdown list to be populated by graphql persisted query getGeoList

* Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
When a Business Line option is deselected then the Products List shows all products.

* Reduced the sample dropdown list options

* make links configurable, remove extraneous logs (#83)

* ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Removed comment

* ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Added function searchAsset(programName, campaignName) to get the asset URL

* Changed alt text to use assets repo-name property

* Renamed/Moved AssetsDatasource.js to /scripts/assets
gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
otherwise the values from blockConfig are overwritten when paginating to next page.

gmo-campaign-details.js : Added campaign Image
gmo-campaign-details.css : Updated CSS to display campaign Image

* gmo-campaign-list.js : Deleted comment
/scripts/assets.js : Updated to use createSearchEndpoint
/scripts/scripts.js : Added export to  export function createSearchEndpoint() {

* Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

* gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
/scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

* Assets 98996 (#88)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* ASSETS-88905 : Add Fields to the Overview Tab (#87)

* Added Target Market Area lists

function function createKPI(kpi)  is renamed createLI(li)

Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

* gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
gmo-campaign-details.js : Added Target Market Area and Platforms
refactored async function buildChannelScope(scopeTypeId, scopes, block)
to be able to display data for data based for a specified  CSS ID

* Added function getUniqueItems(items, property)
to get unique values for deliverableType and platforms

* Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
to  async function buildFieldScopes(scopeTypeId, scopes, block)

* Added global variable globalGraphFliter (#92)

Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
with graphFilter = currentGraphqlFilter

* Assets 98996 (#93)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* add deliverabletype graphql

- todo: refactor, some superfluous function(s) can be removed

* refactor product list to use graphql

* fix deliverable type tags, fix multiline text

* fix sort on marketing moments column

* removing merge artifact

* resolve PR comments

* platforms mapping with graphql (#94)

- also cleaned up extraneous/defunct code

* Refactor sort icons (#95)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

* assets.js : Refactored code to eliminate console.log error
gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

* Eliminated  JavaScript errors when image is not found

* Display total assets = 0 when the campaign image does not exist

* Code cleanup (#98)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

* Code cleanup part 2 (#100)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* Added  function closeAllDropDowns() (#101)

Added function handleClickOutside(event)

Updated function attachEventListeners()
    // Add event listener for clicks outside of dropdowns
    document.addEventListener('click', handleClickOutside);

Added function  resetProductsDropDown();

Updated  function resetAllFilters() to call function   resetProductsDropDown();

* Sticky deliverables header, update graphql endpoints (#102)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* update query endpoints, css tweak on deliverables

* Added tool tip for Program Name and Campaign Name (#103)

* remove duplicate icons

* Change default items per page from 4 to 8
Changed undefined message for Campaign to  Marketing Moment Not Available

* Remove debugging from graphql.js

* Deleted function debug_console()

---------

Co-authored-by: Shivani Gupta <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
shiv-gup added a commit that referenced this pull request Jun 6, 2024
* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

* Modified formatAssetMetadata() to allow custom dc-format Labels (#79)

* Removed "required" and custom values for fields (#86)

Co-authored-by: Mathieu Lessard <[email protected]>

* Added getBaseConfigPath to Collections Back Button (#89)

* Releasing HCV Dashboard code (#106)

* ASSETS-88894 GRAPHQL Persisted Query Code (#53)

* GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

* Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

* Renamed file test-graphql.js to graphql.js

Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

* Changed queryName to getAllCampaings

* Rollback to 3/15/24 Commit a519a5155c3dd57f0c54ea8bd336cd0a231cffab before adding GraphQL test code

* Delete test graphql code

* ASSETS-88895 : Show HCV report pages to limited users (#55)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Campaign List block for Marketing Dashboard page (#56)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

---------

Co-authored-by: Michael Dickson <[email protected]>

* updated hydration-utils.js (#54)

MH: Added Firefly  product to AA Modal 'Product' Field List

* Assets 98990 - Dynamic campaign list (#61)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

* Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

Which calls the persisted query gmo/filter-on-marketing-initiative
with example parameters

{
  "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
}

https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

* Campaign List filters display (#65)

* initial html structure setup

* refactor from select to div implementation

Select with multiselect displays as a list, not a dropdown

* finish refactor, enable visual functionality

- added all javascript needed for visual functionality
- finished refactoring structure

* Assets 98990 (#66)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* minor updates

- update graphql query to have hardcoded offset/limit (to resolve error)
- remove comments
- add placeholder 'refresh date' message and css
- move css for main body to accomodate above message

* add firefly icon

---------

Co-authored-by: Tyrone Tse <[email protected]>

* ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

* Added function hideQuickLinks()

* Added the hide field to the  shared-quicklinks config/worksheet
/blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
/scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
/scripts/site-config.js : Updated function to include the hide field

* Refactored the If statement logic

* Assets 98992- Campaign details/overview (#69)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

* gmo-campagin-list refactored to use  persisted query function
	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

* Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
Refactored the code for Repaginate for when the number of items page is changed
Show current page status

* graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
Deleted function  graphqlCampaignPaginated(first,cursor)

Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

* Fixed logic in calculating the nextCursor

* Removed all debug console.log statements

* Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

* Renamed the variable testConfig to headerConfig

* Campaign details block (#71)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* add status bar display

Also adjusted demo data slightly to include due date and lead

* update css/html to align with mockup and mvp

* resolve border bug

* implemented requested changes

* ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

---------

Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

* Updated function toggleOption : To only allow a single option to be selected in the dropdown list

---------

Co-authored-by: Shivani gupta <[email protected]>

* Assets 98993 (#75)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* resolve pr comments

* Release 05.09.2024 (#78)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

---------

Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>

* ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Assets 98994 (#81)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* initial changeover from static to dynamic data

* adjustments based on feedback

* additional changes based on feedback

* minor bugfix, null checks

* squash final bug with read more

* final touches

* combine two graphql functions with duplicated code

* bugfixes per pr review

* ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
Updated Geo dropdown list to be populated by graphql persisted query getGeoList

* Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
When a Business Line option is deselected then the Products List shows all products.

* Reduced the sample dropdown list options

* make links configurable, remove extraneous logs (#83)

* ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Removed comment

* ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Added function searchAsset(programName, campaignName) to get the asset URL

* Changed alt text to use assets repo-name property

* Renamed/Moved AssetsDatasource.js to /scripts/assets
gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
otherwise the values from blockConfig are overwritten when paginating to next page.

gmo-campaign-details.js : Added campaign Image
gmo-campaign-details.css : Updated CSS to display campaign Image

* gmo-campaign-list.js : Deleted comment
/scripts/assets.js : Updated to use createSearchEndpoint
/scripts/scripts.js : Added export to  export function createSearchEndpoint() {

* Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

* gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
/scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

* Assets 98996 (#88)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* ASSETS-88905 : Add Fields to the Overview Tab (#87)

* Added Target Market Area lists

function function createKPI(kpi)  is renamed createLI(li)

Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

* gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
gmo-campaign-details.js : Added Target Market Area and Platforms
refactored async function buildChannelScope(scopeTypeId, scopes, block)
to be able to display data for data based for a specified  CSS ID

* Added function getUniqueItems(items, property)
to get unique values for deliverableType and platforms

* Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
to  async function buildFieldScopes(scopeTypeId, scopes, block)

* Added global variable globalGraphFliter (#92)

Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
with graphFilter = currentGraphqlFilter

* Assets 98996 (#93)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* add deliverabletype graphql

- todo: refactor, some superfluous function(s) can be removed

* refactor product list to use graphql

* fix deliverable type tags, fix multiline text

* fix sort on marketing moments column

* removing merge artifact

* resolve PR comments

* platforms mapping with graphql (#94)

- also cleaned up extraneous/defunct code

* Refactor sort icons (#95)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

* assets.js : Refactored code to eliminate console.log error
gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

* Eliminated  JavaScript errors when image is not found

* Display total assets = 0 when the campaign image does not exist

* Code cleanup (#98)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

* Code cleanup part 2 (#100)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* Added  function closeAllDropDowns() (#101)

Added function handleClickOutside(event)

Updated function attachEventListeners()
    // Add event listener for clicks outside of dropdowns
    document.addEventListener('click', handleClickOutside);

Added function  resetProductsDropDown();

Updated  function resetAllFilters() to call function   resetProductsDropDown();

* Sticky deliverables header, update graphql endpoints (#102)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* update query endpoints, css tweak on deliverables

* Added tool tip for Program Name and Campaign Name (#103)

* remove duplicate icons

---------

Co-authored-by: TyroneAEM <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Tyrone Tse <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88912 : [Issue] Last page number is not matching with total number of pages (#105)

* ASSETS-88894 GRAPHQL Persisted Query Code (#53)

* GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

* Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

* Renamed file test-graphql.js to graphql.js

Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

* Changed queryName to getAllCampaings

* Rollback to 3/15/24 Commit a519a5155c3dd57f0c54ea8bd336cd0a231cffab before adding GraphQL test code

* Delete test graphql code

* ASSETS-88895 : Show HCV report pages to limited users (#55)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Campaign List block for Marketing Dashboard page (#56)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

---------

Co-authored-by: Michael Dickson <[email protected]>

* updated hydration-utils.js (#54)

MH: Added Firefly  product to AA Modal 'Product' Field List

* Assets 98990 - Dynamic campaign list (#61)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

* Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

Which calls the persisted query gmo/filter-on-marketing-initiative
with example parameters

{
  "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
}

https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

* Campaign List filters display (#65)

* initial html structure setup

* refactor from select to div implementation

Select with multiselect displays as a list, not a dropdown

* finish refactor, enable visual functionality

- added all javascript needed for visual functionality
- finished refactoring structure

* Assets 98990 (#66)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* minor updates

- update graphql query to have hardcoded offset/limit (to resolve error)
- remove comments
- add placeholder 'refresh date' message and css
- move css for main body to accomodate above message

* add firefly icon

---------

Co-authored-by: Tyrone Tse <[email protected]>

* ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

* Added function hideQuickLinks()

* Added the hide field to the  shared-quicklinks config/worksheet
/blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
/scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
/scripts/site-config.js : Updated function to include the hide field

* Refactored the If statement logic

* Assets 98992- Campaign details/overview (#69)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

* gmo-campagin-list refactored to use  persisted query function
	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

* Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
Refactored the code for Repaginate for when the number of items page is changed
Show current page status

* graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
Deleted function  graphqlCampaignPaginated(first,cursor)

Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

* Fixed logic in calculating the nextCursor

* Removed all debug console.log statements

* Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

* Renamed the variable testConfig to headerConfig

* Campaign details block (#71)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* add status bar display

Also adjusted demo data slightly to include due date and lead

* update css/html to align with mockup and mvp

* resolve border bug

* implemented requested changes

* ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

---------

Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

* Updated function toggleOption : To only allow a single option to be selected in the dropdown list

---------

Co-authored-by: Shivani gupta <[email protected]>

* Assets 98993 (#75)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* resolve pr comments

* Release 05.09.2024 (#78)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

---------

Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>

* ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Assets 98994 (#81)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* initial changeover from static to dynamic data

* adjustments based on feedback

* additional changes based on feedback

* minor bugfix, null checks

* squash final bug with read more

* final touches

* combine two graphql functions with duplicated code

* bugfixes per pr review

* ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
Updated Geo dropdown list to be populated by graphql persisted query getGeoList

* Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
When a Business Line option is deselected then the Products List shows all products.

* Reduced the sample dropdown list options

* make links configurable, remove extraneous logs (#83)

* ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Removed comment

* ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Added function searchAsset(programName, campaignName) to get the asset URL

* Changed alt text to use assets repo-name property

* Renamed/Moved AssetsDatasource.js to /scripts/assets
gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
otherwise the values from blockConfig are overwritten when paginating to next page.

gmo-campaign-details.js : Added campaign Image
gmo-campaign-details.css : Updated CSS to display campaign Image

* gmo-campaign-list.js : Deleted comment
/scripts/assets.js : Updated to use createSearchEndpoint
/scripts/scripts.js : Added export to  export function createSearchEndpoint() {

* Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

* gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
/scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

* Assets 98996 (#88)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* ASSETS-88905 : Add Fields to the Overview Tab (#87)

* Added Target Market Area lists

function function createKPI(kpi)  is renamed createLI(li)

Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

* gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
gmo-campaign-details.js : Added Target Market Area and Platforms
refactored async function buildChannelScope(scopeTypeId, scopes, block)
to be able to display data for data based for a specified  CSS ID

* Added function getUniqueItems(items, property)
to get unique values for deliverableType and platforms

* Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
to  async function buildFieldScopes(scopeTypeId, scopes, block)

* Added global variable globalGraphFliter (#92)

Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
with graphFilter = currentGraphqlFilter

* Assets 98996 (#93)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* add deliverabletype graphql

- todo: refactor, some superfluous function(s) can be removed

* refactor product list to use graphql

* fix deliverable type tags, fix multiline text

* fix sort on marketing moments column

* removing merge artifact

* resolve PR comments

* platforms mapping with graphql (#94)

- also cleaned up extraneous/defunct code

* Refactor sort icons (#95)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

* assets.js : Refactored code to eliminate console.log error
gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

* Eliminated  JavaScript errors when image is not found

* Display total assets = 0 when the campaign image does not exist

* Code cleanup (#98)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

* Code cleanup part 2 (#100)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* Added  function closeAllDropDowns() (#101)

Added function handleClickOutside(event)

Updated function attachEventListeners()
    // Add event listener for clicks outside of dropdowns
    document.addEventListener('click', handleClickOutside);

Added function  resetProductsDropDown();

Updated  function resetAllFilters() to call function   resetProductsDropDown();

* Sticky deliverables header, update graphql endpoints (#102)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* update query endpoints, css tweak on deliverables

* Added tool tip for Program Name and Campaign Name (#103)

* remove duplicate icons

* Change default items per page from 4 to 8
Changed undefined message for Campaign to  Marketing Moment Not Available

* Remove debugging from graphql.js

* Deleted function debug_console()

---------

Co-authored-by: Shivani Gupta <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>

* Performance refactoring (#107)

* performance refactoring

- improve thumbnail performance by makin async
- format date property to yyyy-mm-dd
- fix margin issue in program header
- refactor function that builds header dropdown for increased
  performance

* resolve bug with event listeners not attaching

* add programID parameter to deliverable query (#109)

* add programID parameter to deliverable query

* quick null check for status color

* remove console log

* Update query names, handle formatting (#110)

* update query names

* handle null deliverable types

* make dateFormat function available to detail block

* remove unused function

* remove console log messages

* fix typo in graphql query name (#111)

* ASSETS-88914 : Fix Pagination Frontend Code (#108)

* Changed the default number items per page to 4
Added function  debounce(func, wait)  to delay the Previous and Next page to wait 0.5 seconds between each click, to stop the user clicking too fast and breaking pagination

* Decrease debounce timeout to 200 milliseconds (0.2 secs)

* Added check that next page cannot go past last page
Added check that prev page cannot go back past page 1

* fix(pagination): Ensure proper handling of next/prev buttons and page boundaries

- Added totalPages calculation and checks to ensure "Next" button is disabled on the last page
- Updated nextPage function to correctly enable/disable pagination buttons
- Improved prevPage function to ensure it navigates back to the first page correctly
- Applied debounce to prevent rapid clicking issues
- Refactored logic for enabling/disabling pagination buttons based on current page state

* - Changed default items per page to 8
- Removed 4 items per page from filter
- Removed cusorArray, and replaced it with  currentPageInfo.previousCursor =  currentPageInfo.currentCursor;
- Set next cursor to  data.programPaginated.pageInfo.endCursor;
- Function prevPage now uses  currentPage.previousCursor as the cursor parameter value, and calculating the cursor value to use from cursorArray is no longer needed.

* Increased the click delay to 500 milliseconds

* Disabled the Previous and Next Button as soon as they are clicked, to prevent the user multiple clicking the button.

* Restored previous logic using cursorArray to manage the calculation of the cursor for the previous page. (#113)

---------

Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: TyroneAEM <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Tyrone Tse <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: shivanigupta <[email protected]>
mathieu-lessard added a commit that referenced this pull request Jun 13, 2024
* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

* Modified formatAssetMetadata() to allow custom dc-format Labels (#79)

* Removed "required" and custom values for fields (#86)

Co-authored-by: Mathieu Lessard <[email protected]>

* Added getBaseConfigPath to Collections Back Button (#89)

* Releasing HCV Dashboard code (#106)

* ASSETS-88894 GRAPHQL Persisted Query Code (#53)

* GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

* Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

* Renamed file test-graphql.js to graphql.js

Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

* Changed queryName to getAllCampaings

* Rollback to 3/15/24 Commit a519a5155c3dd57f0c54ea8bd336cd0a231cffab before adding GraphQL test code

* Delete test graphql code

* ASSETS-88895 : Show HCV report pages to limited users (#55)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Campaign List block for Marketing Dashboard page (#56)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

---------

Co-authored-by: Michael Dickson <[email protected]>

* updated hydration-utils.js (#54)

MH: Added Firefly  product to AA Modal 'Product' Field List

* Assets 98990 - Dynamic campaign list (#61)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

* Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

Which calls the persisted query gmo/filter-on-marketing-initiative
with example parameters

{
  "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
}

https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

* Campaign List filters display (#65)

* initial html structure setup

* refactor from select to div implementation

Select with multiselect displays as a list, not a dropdown

* finish refactor, enable visual functionality

- added all javascript needed for visual functionality
- finished refactoring structure

* Assets 98990 (#66)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* minor updates

- update graphql query to have hardcoded offset/limit (to resolve error)
- remove comments
- add placeholder 'refresh date' message and css
- move css for main body to accomodate above message

* add firefly icon

---------

Co-authored-by: Tyrone Tse <[email protected]>

* ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

* Added function hideQuickLinks()

* Added the hide field to the  shared-quicklinks config/worksheet
/blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
/scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
/scripts/site-config.js : Updated function to include the hide field

* Refactored the If statement logic

* Assets 98992- Campaign details/overview (#69)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

* gmo-campagin-list refactored to use  persisted query function
	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

* Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
Refactored the code for Repaginate for when the number of items page is changed
Show current page status

* graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
Deleted function  graphqlCampaignPaginated(first,cursor)

Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

* Fixed logic in calculating the nextCursor

* Removed all debug console.log statements

* Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

* Renamed the variable testConfig to headerConfig

* Campaign details block (#71)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* add status bar display

Also adjusted demo data slightly to include due date and lead

* update css/html to align with mockup and mvp

* resolve border bug

* implemented requested changes

* ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

---------

Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

* Updated function toggleOption : To only allow a single option to be selected in the dropdown list

---------

Co-authored-by: Shivani gupta <[email protected]>

* Assets 98993 (#75)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* resolve pr comments

* Release 05.09.2024 (#78)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

---------

Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>

* ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Assets 98994 (#81)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* initial changeover from static to dynamic data

* adjustments based on feedback

* additional changes based on feedback

* minor bugfix, null checks

* squash final bug with read more

* final touches

* combine two graphql functions with duplicated code

* bugfixes per pr review

* ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
Updated Geo dropdown list to be populated by graphql persisted query getGeoList

* Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
When a Business Line option is deselected then the Products List shows all products.

* Reduced the sample dropdown list options

* make links configurable, remove extraneous logs (#83)

* ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Removed comment

* ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Added function searchAsset(programName, campaignName) to get the asset URL

* Changed alt text to use assets repo-name property

* Renamed/Moved AssetsDatasource.js to /scripts/assets
gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
otherwise the values from blockConfig are overwritten when paginating to next page.

gmo-campaign-details.js : Added campaign Image
gmo-campaign-details.css : Updated CSS to display campaign Image

* gmo-campaign-list.js : Deleted comment
/scripts/assets.js : Updated to use createSearchEndpoint
/scripts/scripts.js : Added export to  export function createSearchEndpoint() {

* Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

* gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
/scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

* Assets 98996 (#88)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* ASSETS-88905 : Add Fields to the Overview Tab (#87)

* Added Target Market Area lists

function function createKPI(kpi)  is renamed createLI(li)

Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

* gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
gmo-campaign-details.js : Added Target Market Area and Platforms
refactored async function buildChannelScope(scopeTypeId, scopes, block)
to be able to display data for data based for a specified  CSS ID

* Added function getUniqueItems(items, property)
to get unique values for deliverableType and platforms

* Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
to  async function buildFieldScopes(scopeTypeId, scopes, block)

* Added global variable globalGraphFliter (#92)

Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
with graphFilter = currentGraphqlFilter

* Assets 98996 (#93)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* add deliverabletype graphql

- todo: refactor, some superfluous function(s) can be removed

* refactor product list to use graphql

* fix deliverable type tags, fix multiline text

* fix sort on marketing moments column

* removing merge artifact

* resolve PR comments

* platforms mapping with graphql (#94)

- also cleaned up extraneous/defunct code

* Refactor sort icons (#95)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

* assets.js : Refactored code to eliminate console.log error
gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

* Eliminated  JavaScript errors when image is not found

* Display total assets = 0 when the campaign image does not exist

* Code cleanup (#98)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

* Code cleanup part 2 (#100)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* Added  function closeAllDropDowns() (#101)

Added function handleClickOutside(event)

Updated function attachEventListeners()
    // Add event listener for clicks outside of dropdowns
    document.addEventListener('click', handleClickOutside);

Added function  resetProductsDropDown();

Updated  function resetAllFilters() to call function   resetProductsDropDown();

* Sticky deliverables header, update graphql endpoints (#102)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* update query endpoints, css tweak on deliverables

* Added tool tip for Program Name and Campaign Name (#103)

* remove duplicate icons

---------

Co-authored-by: TyroneAEM <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Tyrone Tse <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88912 : [Issue] Last page number is not matching with total number of pages (#105)

* ASSETS-88894 GRAPHQL Persisted Query Code (#53)

* GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

* Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

* Renamed file test-graphql.js to graphql.js

Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

* Changed queryName to getAllCampaings

* Rollback to 3/15/24 Commit a519a5155c3dd57f0c54ea8bd336cd0a231cffab before adding GraphQL test code

* Delete test graphql code

* ASSETS-88895 : Show HCV report pages to limited users (#55)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Campaign List block for Marketing Dashboard page (#56)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

---------

Co-authored-by: Michael Dickson <[email protected]>

* updated hydration-utils.js (#54)

MH: Added Firefly  product to AA Modal 'Product' Field List

* Assets 98990 - Dynamic campaign list (#61)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

* Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

Which calls the persisted query gmo/filter-on-marketing-initiative
with example parameters

{
  "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
}

https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

* Campaign List filters display (#65)

* initial html structure setup

* refactor from select to div implementation

Select with multiselect displays as a list, not a dropdown

* finish refactor, enable visual functionality

- added all javascript needed for visual functionality
- finished refactoring structure

* Assets 98990 (#66)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* minor updates

- update graphql query to have hardcoded offset/limit (to resolve error)
- remove comments
- add placeholder 'refresh date' message and css
- move css for main body to accomodate above message

* add firefly icon

---------

Co-authored-by: Tyrone Tse <[email protected]>

* ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

* Added function hideQuickLinks()

* Added the hide field to the  shared-quicklinks config/worksheet
/blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
/scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
/scripts/site-config.js : Updated function to include the hide field

* Refactored the If statement logic

* Assets 98992- Campaign details/overview (#69)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

* gmo-campagin-list refactored to use  persisted query function
	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

* Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
Refactored the code for Repaginate for when the number of items page is changed
Show current page status

* graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
Deleted function  graphqlCampaignPaginated(first,cursor)

Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

* Fixed logic in calculating the nextCursor

* Removed all debug console.log statements

* Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

* Renamed the variable testConfig to headerConfig

* Campaign details block (#71)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* add status bar display

Also adjusted demo data slightly to include due date and lead

* update css/html to align with mockup and mvp

* resolve border bug

* implemented requested changes

* ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

---------

Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

* Updated function toggleOption : To only allow a single option to be selected in the dropdown list

---------

Co-authored-by: Shivani gupta <[email protected]>

* Assets 98993 (#75)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* resolve pr comments

* Release 05.09.2024 (#78)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

---------

Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>

* ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Assets 98994 (#81)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* initial changeover from static to dynamic data

* adjustments based on feedback

* additional changes based on feedback

* minor bugfix, null checks

* squash final bug with read more

* final touches

* combine two graphql functions with duplicated code

* bugfixes per pr review

* ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
Updated Geo dropdown list to be populated by graphql persisted query getGeoList

* Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
When a Business Line option is deselected then the Products List shows all products.

* Reduced the sample dropdown list options

* make links configurable, remove extraneous logs (#83)

* ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Removed comment

* ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Added function searchAsset(programName, campaignName) to get the asset URL

* Changed alt text to use assets repo-name property

* Renamed/Moved AssetsDatasource.js to /scripts/assets
gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
otherwise the values from blockConfig are overwritten when paginating to next page.

gmo-campaign-details.js : Added campaign Image
gmo-campaign-details.css : Updated CSS to display campaign Image

* gmo-campaign-list.js : Deleted comment
/scripts/assets.js : Updated to use createSearchEndpoint
/scripts/scripts.js : Added export to  export function createSearchEndpoint() {

* Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

* gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
/scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

* Assets 98996 (#88)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* ASSETS-88905 : Add Fields to the Overview Tab (#87)

* Added Target Market Area lists

function function createKPI(kpi)  is renamed createLI(li)

Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

* gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
gmo-campaign-details.js : Added Target Market Area and Platforms
refactored async function buildChannelScope(scopeTypeId, scopes, block)
to be able to display data for data based for a specified  CSS ID

* Added function getUniqueItems(items, property)
to get unique values for deliverableType and platforms

* Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
to  async function buildFieldScopes(scopeTypeId, scopes, block)

* Added global variable globalGraphFliter (#92)

Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
with graphFilter = currentGraphqlFilter

* Assets 98996 (#93)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* add deliverabletype graphql

- todo: refactor, some superfluous function(s) can be removed

* refactor product list to use graphql

* fix deliverable type tags, fix multiline text

* fix sort on marketing moments column

* removing merge artifact

* resolve PR comments

* platforms mapping with graphql (#94)

- also cleaned up extraneous/defunct code

* Refactor sort icons (#95)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

* assets.js : Refactored code to eliminate console.log error
gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

* Eliminated  JavaScript errors when image is not found

* Display total assets = 0 when the campaign image does not exist

* Code cleanup (#98)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

* Code cleanup part 2 (#100)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* Added  function closeAllDropDowns() (#101)

Added function handleClickOutside(event)

Updated function attachEventListeners()
    // Add event listener for clicks outside of dropdowns
    document.addEventListener('click', handleClickOutside);

Added function  resetProductsDropDown();

Updated  function resetAllFilters() to call function   resetProductsDropDown();

* Sticky deliverables header, update graphql endpoints (#102)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* update query endpoints, css tweak on deliverables

* Added tool tip for Program Name and Campaign Name (#103)

* remove duplicate icons

* Change default items per page from 4 to 8
Changed undefined message for Campaign to  Marketing Moment Not Available

* Remove debugging from graphql.js

* Deleted function debug_console()

---------

Co-authored-by: Shivani Gupta <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>

* Performance refactoring (#107)

* performance refactoring

- improve thumbnail performance by makin async
- format date property to yyyy-mm-dd
- fix margin issue in program header
- refactor function that builds header dropdown for increased
  performance

* resolve bug with event listeners not attaching

* add programID parameter to deliverable query (#109)

* add programID parameter to deliverable query

* quick null check for status color

* remove console log

* Update query names, handle formatting (#110)

* update query names

* handle null deliverable types

* make dateFormat function available to detail block

* remove unused function

* remove console log messages

* fix typo in graphql query name (#111)

* ASSETS-88914 : Fix Pagination Frontend Code (#108)

* Changed the default number items per page to 4
Added function  debounce(func, wait)  to delay the Previous and Next page to wait 0.5 seconds between each click, to stop the user clicking too fast and breaking pagination

* Decrease debounce timeout to 200 milliseconds (0.2 secs)

* Added check that next page cannot go past last page
Added check that prev page cannot go back past page 1

* fix(pagination): Ensure proper handling of next/prev buttons and page boundaries

- Added totalPages calculation and checks to ensure "Next" button is disabled on the last page
- Updated nextPage function to correctly enable/disable pagination buttons
- Improved prevPage function to ensure it navigates back to the first page correctly
- Applied debounce to prevent rapid clicking issues
- Refactored logic for enabling/disabling pagination buttons based on current page state

* - Changed default items per page to 8
- Removed 4 items per page from filter
- Removed cusorArray, and replaced it with  currentPageInfo.previousCursor =  currentPageInfo.currentCursor;
- Set next cursor to  data.programPaginated.pageInfo.endCursor;
- Function prevPage now uses  currentPage.previousCursor as the cursor parameter value, and calculating the cursor value to use from cursorArray is no longer needed.

* Increased the click delay to 500 milliseconds

* Disabled the Previous and Next Button as soon as they are clicked, to prevent the user multiple clicking the button.

* Restored previous logic using cursorArray to manage the calculation of the cursor for the previous page. (#113)

* Adjust height of deliverables tab on program-details block (#114)

* minor css changes for program details

* adjust deliverables table height

* add min height to deliverables table

* remove commented css

* Sort deliverable type array before rows are made

* DXI-26587- Modify landing page for v3 Hub, so Signin goes to CH/v4 (#116)

* Replace throwing 404 error when the asset is not found, with asset.svg icon (#119)

* Make content fragment path for WF mappings configurable (#118)

* refactoring to use single graphql endpoint for map

* refactor 'mapping' functions

- refactor mapping retrieval functions in all three hcv blocks

* Remove comments

* remove unused function stub

* resolve bug in header filter refresh

* remove unused import

* Fixed issue where header didn't load if the user didn't have a profile yet (#121)

Co-authored-by: Mathieu Lessard <[email protected]>

* add checks for null 'review link' and 'final asset' (#122)

* Refactor header and query variable extraction (#123)

* add checks for null 'review link' and 'final asset'

* Add msg for programs with no data available

* refactor header so it can be used with no data

* wrap msg with div for styling

* refactor query variable extraction

- had to account for ampersand in program name

* Updated Product List (#117)

* Product list updated

* N/A value and label now match

* Fixed formatting

---------

Co-authored-by: Mathieu Lessard <[email protected]>

---------

Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani Gupta <[email protected]>
Co-authored-by: TyroneAEM <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: Tyrone Tse <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: shivanigupta <[email protected]>
shiv-gup added a commit that referenced this pull request Jun 20, 2024
* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

* Modified formatAssetMetadata() to allow custom dc-format Labels (#79)

* Removed "required" and custom values for fields (#86)

Co-authored-by: Mathieu Lessard <[email protected]>

* Added getBaseConfigPath to Collections Back Button (#89)

* Releasing HCV Dashboard code (#106)

* ASSETS-88894 GRAPHQL Persisted Query Code (#53)

* GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

* Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

* Renamed file test-graphql.js to graphql.js

Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

* Changed queryName to getAllCampaings

* Rollback to 3/15/24 Commit a519a5155c3dd57f0c54ea8bd336cd0a231cffab before adding GraphQL test code

* Delete test graphql code

* ASSETS-88895 : Show HCV report pages to limited users (#55)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Campaign List block for Marketing Dashboard page (#56)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

---------

Co-authored-by: Michael Dickson <[email protected]>

* updated hydration-utils.js (#54)

MH: Added Firefly  product to AA Modal 'Product' Field List

* Assets 98990 - Dynamic campaign list (#61)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

* Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

Which calls the persisted query gmo/filter-on-marketing-initiative
with example parameters

{
  "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
}

https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

* Campaign List filters display (#65)

* initial html structure setup

* refactor from select to div implementation

Select with multiselect displays as a list, not a dropdown

* finish refactor, enable visual functionality

- added all javascript needed for visual functionality
- finished refactoring structure

* Assets 98990 (#66)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* minor updates

- update graphql query to have hardcoded offset/limit (to resolve error)
- remove comments
- add placeholder 'refresh date' message and css
- move css for main body to accomodate above message

* add firefly icon

---------

Co-authored-by: Tyrone Tse <[email protected]>

* ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

* Added function hideQuickLinks()

* Added the hide field to the  shared-quicklinks config/worksheet
/blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
/scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
/scripts/site-config.js : Updated function to include the hide field

* Refactored the If statement logic

* Assets 98992- Campaign details/overview (#69)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

* gmo-campagin-list refactored to use  persisted query function
	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

* Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
Refactored the code for Repaginate for when the number of items page is changed
Show current page status

* graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
Deleted function  graphqlCampaignPaginated(first,cursor)

Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

* Fixed logic in calculating the nextCursor

* Removed all debug console.log statements

* Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

* Renamed the variable testConfig to headerConfig

* Campaign details block (#71)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* add status bar display

Also adjusted demo data slightly to include due date and lead

* update css/html to align with mockup and mvp

* resolve border bug

* implemented requested changes

* ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

---------

Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

* Updated function toggleOption : To only allow a single option to be selected in the dropdown list

---------

Co-authored-by: Shivani gupta <[email protected]>

* Assets 98993 (#75)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* resolve pr comments

* Release 05.09.2024 (#78)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

---------

Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>

* ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Assets 98994 (#81)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* initial changeover from static to dynamic data

* adjustments based on feedback

* additional changes based on feedback

* minor bugfix, null checks

* squash final bug with read more

* final touches

* combine two graphql functions with duplicated code

* bugfixes per pr review

* ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
Updated Geo dropdown list to be populated by graphql persisted query getGeoList

* Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
When a Business Line option is deselected then the Products List shows all products.

* Reduced the sample dropdown list options

* make links configurable, remove extraneous logs (#83)

* ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Removed comment

* ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Added function searchAsset(programName, campaignName) to get the asset URL

* Changed alt text to use assets repo-name property

* Renamed/Moved AssetsDatasource.js to /scripts/assets
gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
otherwise the values from blockConfig are overwritten when paginating to next page.

gmo-campaign-details.js : Added campaign Image
gmo-campaign-details.css : Updated CSS to display campaign Image

* gmo-campaign-list.js : Deleted comment
/scripts/assets.js : Updated to use createSearchEndpoint
/scripts/scripts.js : Added export to  export function createSearchEndpoint() {

* Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

* gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
/scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

* Assets 98996 (#88)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* ASSETS-88905 : Add Fields to the Overview Tab (#87)

* Added Target Market Area lists

function function createKPI(kpi)  is renamed createLI(li)

Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

* gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
gmo-campaign-details.js : Added Target Market Area and Platforms
refactored async function buildChannelScope(scopeTypeId, scopes, block)
to be able to display data for data based for a specified  CSS ID

* Added function getUniqueItems(items, property)
to get unique values for deliverableType and platforms

* Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
to  async function buildFieldScopes(scopeTypeId, scopes, block)

* Added global variable globalGraphFliter (#92)

Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
with graphFilter = currentGraphqlFilter

* Assets 98996 (#93)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* add deliverabletype graphql

- todo: refactor, some superfluous function(s) can be removed

* refactor product list to use graphql

* fix deliverable type tags, fix multiline text

* fix sort on marketing moments column

* removing merge artifact

* resolve PR comments

* platforms mapping with graphql (#94)

- also cleaned up extraneous/defunct code

* Refactor sort icons (#95)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

* assets.js : Refactored code to eliminate console.log error
gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

* Eliminated  JavaScript errors when image is not found

* Display total assets = 0 when the campaign image does not exist

* Code cleanup (#98)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

* Code cleanup part 2 (#100)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* Added  function closeAllDropDowns() (#101)

Added function handleClickOutside(event)

Updated function attachEventListeners()
    // Add event listener for clicks outside of dropdowns
    document.addEventListener('click', handleClickOutside);

Added function  resetProductsDropDown();

Updated  function resetAllFilters() to call function   resetProductsDropDown();

* Sticky deliverables header, update graphql endpoints (#102)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* update query endpoints, css tweak on deliverables

* Added tool tip for Program Name and Campaign Name (#103)

* remove duplicate icons

---------

Co-authored-by: TyroneAEM <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Tyrone Tse <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88912 : [Issue] Last page number is not matching with total number of pages (#105)

* ASSETS-88894 GRAPHQL Persisted Query Code (#53)

* GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

* Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

* Renamed file test-graphql.js to graphql.js

Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

* Changed queryName to getAllCampaings

* Rollback to 3/15/24 Commit a519a5155c3dd57f0c54ea8bd336cd0a231cffab before adding GraphQL test code

* Delete test graphql code

* ASSETS-88895 : Show HCV report pages to limited users (#55)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Campaign List block for Marketing Dashboard page (#56)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

---------

Co-authored-by: Michael Dickson <[email protected]>

* updated hydration-utils.js (#54)

MH: Added Firefly  product to AA Modal 'Product' Field List

* Assets 98990 - Dynamic campaign list (#61)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

* Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

Which calls the persisted query gmo/filter-on-marketing-initiative
with example parameters

{
  "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
}

https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

* Campaign List filters display (#65)

* initial html structure setup

* refactor from select to div implementation

Select with multiselect displays as a list, not a dropdown

* finish refactor, enable visual functionality

- added all javascript needed for visual functionality
- finished refactoring structure

* Assets 98990 (#66)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* minor updates

- update graphql query to have hardcoded offset/limit (to resolve error)
- remove comments
- add placeholder 'refresh date' message and css
- move css for main body to accomodate above message

* add firefly icon

---------

Co-authored-by: Tyrone Tse <[email protected]>

* ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

* Added function hideQuickLinks()

* Added the hide field to the  shared-quicklinks config/worksheet
/blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
/scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
/scripts/site-config.js : Updated function to include the hide field

* Refactored the If statement logic

* Assets 98992- Campaign details/overview (#69)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

* gmo-campagin-list refactored to use  persisted query function
	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

* Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
Refactored the code for Repaginate for when the number of items page is changed
Show current page status

* graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
Deleted function  graphqlCampaignPaginated(first,cursor)

Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

* Fixed logic in calculating the nextCursor

* Removed all debug console.log statements

* Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

* Renamed the variable testConfig to headerConfig

* Campaign details block (#71)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* add status bar display

Also adjusted demo data slightly to include due date and lead

* update css/html to align with mockup and mvp

* resolve border bug

* implemented requested changes

* ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

---------

Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

* Updated function toggleOption : To only allow a single option to be selected in the dropdown list

---------

Co-authored-by: Shivani gupta <[email protected]>

* Assets 98993 (#75)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* resolve pr comments

* Release 05.09.2024 (#78)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

---------

Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>

* ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Assets 98994 (#81)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* initial changeover from static to dynamic data

* adjustments based on feedback

* additional changes based on feedback

* minor bugfix, null checks

* squash final bug with read more

* final touches

* combine two graphql functions with duplicated code

* bugfixes per pr review

* ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
Updated Geo dropdown list to be populated by graphql persisted query getGeoList

* Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
When a Business Line option is deselected then the Products List shows all products.

* Reduced the sample dropdown list options

* make links configurable, remove extraneous logs (#83)

* ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Removed comment

* ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Added function searchAsset(programName, campaignName) to get the asset URL

* Changed alt text to use assets repo-name property

* Renamed/Moved AssetsDatasource.js to /scripts/assets
gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
otherwise the values from blockConfig are overwritten when paginating to next page.

gmo-campaign-details.js : Added campaign Image
gmo-campaign-details.css : Updated CSS to display campaign Image

* gmo-campaign-list.js : Deleted comment
/scripts/assets.js : Updated to use createSearchEndpoint
/scripts/scripts.js : Added export to  export function createSearchEndpoint() {

* Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

* gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
/scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

* Assets 98996 (#88)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* ASSETS-88905 : Add Fields to the Overview Tab (#87)

* Added Target Market Area lists

function function createKPI(kpi)  is renamed createLI(li)

Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

* gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
gmo-campaign-details.js : Added Target Market Area and Platforms
refactored async function buildChannelScope(scopeTypeId, scopes, block)
to be able to display data for data based for a specified  CSS ID

* Added function getUniqueItems(items, property)
to get unique values for deliverableType and platforms

* Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
to  async function buildFieldScopes(scopeTypeId, scopes, block)

* Added global variable globalGraphFliter (#92)

Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
with graphFilter = currentGraphqlFilter

* Assets 98996 (#93)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* add deliverabletype graphql

- todo: refactor, some superfluous function(s) can be removed

* refactor product list to use graphql

* fix deliverable type tags, fix multiline text

* fix sort on marketing moments column

* removing merge artifact

* resolve PR comments

* platforms mapping with graphql (#94)

- also cleaned up extraneous/defunct code

* Refactor sort icons (#95)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

* assets.js : Refactored code to eliminate console.log error
gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

* Eliminated  JavaScript errors when image is not found

* Display total assets = 0 when the campaign image does not exist

* Code cleanup (#98)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

* Code cleanup part 2 (#100)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* Added  function closeAllDropDowns() (#101)

Added function handleClickOutside(event)

Updated function attachEventListeners()
    // Add event listener for clicks outside of dropdowns
    document.addEventListener('click', handleClickOutside);

Added function  resetProductsDropDown();

Updated  function resetAllFilters() to call function   resetProductsDropDown();

* Sticky deliverables header, update graphql endpoints (#102)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* update query endpoints, css tweak on deliverables

* Added tool tip for Program Name and Campaign Name (#103)

* remove duplicate icons

* Change default items per page from 4 to 8
Changed undefined message for Campaign to  Marketing Moment Not Available

* Remove debugging from graphql.js

* Deleted function debug_console()

---------

Co-authored-by: Shivani Gupta <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>

* Performance refactoring (#107)

* performance refactoring

- improve thumbnail performance by makin async
- format date property to yyyy-mm-dd
- fix margin issue in program header
- refactor function that builds header dropdown for increased
  performance

* resolve bug with event listeners not attaching

* add programID parameter to deliverable query (#109)

* add programID parameter to deliverable query

* quick null check for status color

* remove console log

* Update query names, handle formatting (#110)

* update query names

* handle null deliverable types

* make dateFormat function available to detail block

* remove unused function

* remove console log messages

* fix typo in graphql query name (#111)

* ASSETS-88914 : Fix Pagination Frontend Code (#108)

* Changed the default number items per page to 4
Added function  debounce(func, wait)  to delay the Previous and Next page to wait 0.5 seconds between each click, to stop the user clicking too fast and breaking pagination

* Decrease debounce timeout to 200 milliseconds (0.2 secs)

* Added check that next page cannot go past last page
Added check that prev page cannot go back past page 1

* fix(pagination): Ensure proper handling of next/prev buttons and page boundaries

- Added totalPages calculation and checks to ensure "Next" button is disabled on the last page
- Updated nextPage function to correctly enable/disable pagination buttons
- Improved prevPage function to ensure it navigates back to the first page correctly
- Applied debounce to prevent rapid clicking issues
- Refactored logic for enabling/disabling pagination buttons based on current page state

* - Changed default items per page to 8
- Removed 4 items per page from filter
- Removed cusorArray, and replaced it with  currentPageInfo.previousCursor =  currentPageInfo.currentCursor;
- Set next cursor to  data.programPaginated.pageInfo.endCursor;
- Function prevPage now uses  currentPage.previousCursor as the cursor parameter value, and calculating the cursor value to use from cursorArray is no longer needed.

* Increased the click delay to 500 milliseconds

* Disabled the Previous and Next Button as soon as they are clicked, to prevent the user multiple clicking the button.

* Restored previous logic using cursorArray to manage the calculation of the cursor for the previous page. (#113)

* Adjust height of deliverables tab on program-details block (#114)

* minor css changes for program details

* adjust deliverables table height

* add min height to deliverables table

* remove commented css

* Sort deliverable type array before rows are made

* DXI-26587- Modify landing page for v3 Hub, so Signin goes to CH/v4 (#116)

* Replace throwing 404 error when the asset is not found, with asset.svg icon (#119)

* Make content fragment path for WF mappings configurable (#118)

* refactoring to use single graphql endpoint for map

* refactor 'mapping' functions

- refactor mapping retrieval functions in all three hcv blocks

* Remove comments

* remove unused function stub

* resolve bug in header filter refresh

* remove unused import

* Fixed issue where header didn't load if the user didn't have a profile yet (#121)

Co-authored-by: Mathieu Lessard <[email protected]>

* add checks for null 'review link' and 'final asset' (#122)

* Refactor header and query variable extraction (#123)

* add checks for null 'review link' and 'final asset'

* Add msg for programs with no data available

* refactor header so it can be used with no data

* wrap msg with div for styling

* refactor query variable extraction

- had to account for ampersand in program name

* Updated Product List (#117)

* Product list updated

* N/A value and label now match

* Fixed formatting

---------

Co-authored-by: Mathieu Lessard <[email protected]>

* Restored calling the function attatchEventListerners() at the end of the function decorate(block) (#124)

* Fix text wrapping issue in Project Owner column for smaller viewports (#125)

- Adjusted CSS to ensure text in the "Project Owner" column wraps properly
- Set row height to auto and adjusted line-height for better spacing
- Added media query for responsive width adjustments
- Ensured consistent display and improved readability across different viewport sizes

* ASSETS-88920 : Cosmetic Updates from MVP Feedback (#126)

* feat: Add Geo column to program list and adjust column widths for proper alignment

- Updated `gmo-program-list.js` to include Geo column in the header configuration and campaign list
- Adjusted column widths in `gmo-program-list.css` to ensure proper alignment under each column heading
- Add function `formatGeos` to format Geo array as comma-delimited list, that is displayed in the Geo column

* - Added a tooltip to the "Total Approved Assets" field in the Deliverables tab.
- Tooltip text provides instructions to view assets: "To view the assets, go to the 'All Asset' search page and use Program and Campaign name facet to filter the assets."
- Styled the tooltip to match the color and background of the Launch Date tooltip.
- Ensured the tooltip text appears on one line and positioned it correctly.
- Updated the "Total Asset" label to "Total Approved Asset"
- Updated the "Deliverable Name" column name to "Deliverable Task Name"

* - Added the Driver detail in Overview Tab next to Launch date like "Project Owner: Aina Tchoshanova"
- Update the Project "Owner column" label to "Task Owner"

---------

Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani Gupta <[email protected]>
Co-authored-by: TyroneAEM <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: Tyrone Tse <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: shivanigupta <[email protected]>
shiv-gup added a commit that referenced this pull request Jun 27, 2024
* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

* Modified formatAssetMetadata() to allow custom dc-format Labels (#79)

* Removed "required" and custom values for fields (#86)

Co-authored-by: Mathieu Lessard <[email protected]>

* Added getBaseConfigPath to Collections Back Button (#89)

* Releasing HCV Dashboard code (#106)

* ASSETS-88894 GRAPHQL Persisted Query Code (#53)

* GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

* Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

* Renamed file test-graphql.js to graphql.js

Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

* Changed queryName to getAllCampaings

* Rollback to 3/15/24 Commit a519a5155c3dd57f0c54ea8bd336cd0a231cffab before adding GraphQL test code

* Delete test graphql code

* ASSETS-88895 : Show HCV report pages to limited users (#55)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Campaign List block for Marketing Dashboard page (#56)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

---------

Co-authored-by: Michael Dickson <[email protected]>

* updated hydration-utils.js (#54)

MH: Added Firefly  product to AA Modal 'Product' Field List

* Assets 98990 - Dynamic campaign list (#61)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

* Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

Which calls the persisted query gmo/filter-on-marketing-initiative
with example parameters

{
  "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
}

https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

* Campaign List filters display (#65)

* initial html structure setup

* refactor from select to div implementation

Select with multiselect displays as a list, not a dropdown

* finish refactor, enable visual functionality

- added all javascript needed for visual functionality
- finished refactoring structure

* Assets 98990 (#66)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* minor updates

- update graphql query to have hardcoded offset/limit (to resolve error)
- remove comments
- add placeholder 'refresh date' message and css
- move css for main body to accomodate above message

* add firefly icon

---------

Co-authored-by: Tyrone Tse <[email protected]>

* ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

* Added function hideQuickLinks()

* Added the hide field to the  shared-quicklinks config/worksheet
/blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
/scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
/scripts/site-config.js : Updated function to include the hide field

* Refactored the If statement logic

* Assets 98992- Campaign details/overview (#69)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

* gmo-campagin-list refactored to use  persisted query function
	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

* Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
Refactored the code for Repaginate for when the number of items page is changed
Show current page status

* graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
Deleted function  graphqlCampaignPaginated(first,cursor)

Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

* Fixed logic in calculating the nextCursor

* Removed all debug console.log statements

* Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

* Renamed the variable testConfig to headerConfig

* Campaign details block (#71)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* add status bar display

Also adjusted demo data slightly to include due date and lead

* update css/html to align with mockup and mvp

* resolve border bug

* implemented requested changes

* ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

---------

Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

* Updated function toggleOption : To only allow a single option to be selected in the dropdown list

---------

Co-authored-by: Shivani gupta <[email protected]>

* Assets 98993 (#75)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* resolve pr comments

* Release 05.09.2024 (#78)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

---------

Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>

* ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Assets 98994 (#81)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* initial changeover from static to dynamic data

* adjustments based on feedback

* additional changes based on feedback

* minor bugfix, null checks

* squash final bug with read more

* final touches

* combine two graphql functions with duplicated code

* bugfixes per pr review

* ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
Updated Geo dropdown list to be populated by graphql persisted query getGeoList

* Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
When a Business Line option is deselected then the Products List shows all products.

* Reduced the sample dropdown list options

* make links configurable, remove extraneous logs (#83)

* ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Removed comment

* ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Added function searchAsset(programName, campaignName) to get the asset URL

* Changed alt text to use assets repo-name property

* Renamed/Moved AssetsDatasource.js to /scripts/assets
gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
otherwise the values from blockConfig are overwritten when paginating to next page.

gmo-campaign-details.js : Added campaign Image
gmo-campaign-details.css : Updated CSS to display campaign Image

* gmo-campaign-list.js : Deleted comment
/scripts/assets.js : Updated to use createSearchEndpoint
/scripts/scripts.js : Added export to  export function createSearchEndpoint() {

* Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

* gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
/scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

* Assets 98996 (#88)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* ASSETS-88905 : Add Fields to the Overview Tab (#87)

* Added Target Market Area lists

function function createKPI(kpi)  is renamed createLI(li)

Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

* gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
gmo-campaign-details.js : Added Target Market Area and Platforms
refactored async function buildChannelScope(scopeTypeId, scopes, block)
to be able to display data for data based for a specified  CSS ID

* Added function getUniqueItems(items, property)
to get unique values for deliverableType and platforms

* Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
to  async function buildFieldScopes(scopeTypeId, scopes, block)

* Added global variable globalGraphFliter (#92)

Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
with graphFilter = currentGraphqlFilter

* Assets 98996 (#93)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* add deliverabletype graphql

- todo: refactor, some superfluous function(s) can be removed

* refactor product list to use graphql

* fix deliverable type tags, fix multiline text

* fix sort on marketing moments column

* removing merge artifact

* resolve PR comments

* platforms mapping with graphql (#94)

- also cleaned up extraneous/defunct code

* Refactor sort icons (#95)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

* assets.js : Refactored code to eliminate console.log error
gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

* Eliminated  JavaScript errors when image is not found

* Display total assets = 0 when the campaign image does not exist

* Code cleanup (#98)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

* Code cleanup part 2 (#100)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* Added  function closeAllDropDowns() (#101)

Added function handleClickOutside(event)

Updated function attachEventListeners()
    // Add event listener for clicks outside of dropdowns
    document.addEventListener('click', handleClickOutside);

Added function  resetProductsDropDown();

Updated  function resetAllFilters() to call function   resetProductsDropDown();

* Sticky deliverables header, update graphql endpoints (#102)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* update query endpoints, css tweak on deliverables

* Added tool tip for Program Name and Campaign Name (#103)

* remove duplicate icons

---------

Co-authored-by: TyroneAEM <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Tyrone Tse <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88912 : [Issue] Last page number is not matching with total number of pages (#105)

* ASSETS-88894 GRAPHQL Persisted Query Code (#53)

* GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

* Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

* Renamed file test-graphql.js to graphql.js

Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

* Changed queryName to getAllCampaings

* Rollback to 3/15/24 Commit a519a5155c3dd57f0c54ea8bd336cd0a231cffab before adding GraphQL test code

* Delete test graphql code

* ASSETS-88895 : Show HCV report pages to limited users (#55)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Campaign List block for Marketing Dashboard page (#56)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

---------

Co-authored-by: Michael Dickson <[email protected]>

* updated hydration-utils.js (#54)

MH: Added Firefly  product to AA Modal 'Product' Field List

* Assets 98990 - Dynamic campaign list (#61)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

* Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

Which calls the persisted query gmo/filter-on-marketing-initiative
with example parameters

{
  "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
}

https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

* Campaign List filters display (#65)

* initial html structure setup

* refactor from select to div implementation

Select with multiselect displays as a list, not a dropdown

* finish refactor, enable visual functionality

- added all javascript needed for visual functionality
- finished refactoring structure

* Assets 98990 (#66)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* minor updates

- update graphql query to have hardcoded offset/limit (to resolve error)
- remove comments
- add placeholder 'refresh date' message and css
- move css for main body to accomodate above message

* add firefly icon

---------

Co-authored-by: Tyrone Tse <[email protected]>

* ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

* Added function hideQuickLinks()

* Added the hide field to the  shared-quicklinks config/worksheet
/blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
/scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
/scripts/site-config.js : Updated function to include the hide field

* Refactored the If statement logic

* Assets 98992- Campaign details/overview (#69)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

* gmo-campagin-list refactored to use  persisted query function
	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

* Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
Refactored the code for Repaginate for when the number of items page is changed
Show current page status

* graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
Deleted function  graphqlCampaignPaginated(first,cursor)

Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

* Fixed logic in calculating the nextCursor

* Removed all debug console.log statements

* Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

* Renamed the variable testConfig to headerConfig

* Campaign details block (#71)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* add status bar display

Also adjusted demo data slightly to include due date and lead

* update css/html to align with mockup and mvp

* resolve border bug

* implemented requested changes

* ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

---------

Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

* Updated function toggleOption : To only allow a single option to be selected in the dropdown list

---------

Co-authored-by: Shivani gupta <[email protected]>

* Assets 98993 (#75)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* resolve pr comments

* Release 05.09.2024 (#78)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

---------

Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>

* ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Assets 98994 (#81)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* initial changeover from static to dynamic data

* adjustments based on feedback

* additional changes based on feedback

* minor bugfix, null checks

* squash final bug with read more

* final touches

* combine two graphql functions with duplicated code

* bugfixes per pr review

* ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
Updated Geo dropdown list to be populated by graphql persisted query getGeoList

* Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
When a Business Line option is deselected then the Products List shows all products.

* Reduced the sample dropdown list options

* make links configurable, remove extraneous logs (#83)

* ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Removed comment

* ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Added function searchAsset(programName, campaignName) to get the asset URL

* Changed alt text to use assets repo-name property

* Renamed/Moved AssetsDatasource.js to /scripts/assets
gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
otherwise the values from blockConfig are overwritten when paginating to next page.

gmo-campaign-details.js : Added campaign Image
gmo-campaign-details.css : Updated CSS to display campaign Image

* gmo-campaign-list.js : Deleted comment
/scripts/assets.js : Updated to use createSearchEndpoint
/scripts/scripts.js : Added export to  export function createSearchEndpoint() {

* Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

* gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
/scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

* Assets 98996 (#88)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* ASSETS-88905 : Add Fields to the Overview Tab (#87)

* Added Target Market Area lists

function function createKPI(kpi)  is renamed createLI(li)

Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

* gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
gmo-campaign-details.js : Added Target Market Area and Platforms
refactored async function buildChannelScope(scopeTypeId, scopes, block)
to be able to display data for data based for a specified  CSS ID

* Added function getUniqueItems(items, property)
to get unique values for deliverableType and platforms

* Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
to  async function buildFieldScopes(scopeTypeId, scopes, block)

* Added global variable globalGraphFliter (#92)

Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
with graphFilter = currentGraphqlFilter

* Assets 98996 (#93)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* add deliverabletype graphql

- todo: refactor, some superfluous function(s) can be removed

* refactor product list to use graphql

* fix deliverable type tags, fix multiline text

* fix sort on marketing moments column

* removing merge artifact

* resolve PR comments

* platforms mapping with graphql (#94)

- also cleaned up extraneous/defunct code

* Refactor sort icons (#95)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

* assets.js : Refactored code to eliminate console.log error
gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

* Eliminated  JavaScript errors when image is not found

* Display total assets = 0 when the campaign image does not exist

* Code cleanup (#98)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

* Code cleanup part 2 (#100)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* Added  function closeAllDropDowns() (#101)

Added function handleClickOutside(event)

Updated function attachEventListeners()
    // Add event listener for clicks outside of dropdowns
    document.addEventListener('click', handleClickOutside);

Added function  resetProductsDropDown();

Updated  function resetAllFilters() to call function   resetProductsDropDown();

* Sticky deliverables header, update graphql endpoints (#102)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* update query endpoints, css tweak on deliverables

* Added tool tip for Program Name and Campaign Name (#103)

* remove duplicate icons

* Change default items per page from 4 to 8
Changed undefined message for Campaign to  Marketing Moment Not Available

* Remove debugging from graphql.js

* Deleted function debug_console()

---------

Co-authored-by: Shivani Gupta <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>

* Performance refactoring (#107)

* performance refactoring

- improve thumbnail performance by makin async
- format date property to yyyy-mm-dd
- fix margin issue in program header
- refactor function that builds header dropdown for increased
  performance

* resolve bug with event listeners not attaching

* add programID parameter to deliverable query (#109)

* add programID parameter to deliverable query

* quick null check for status color

* remove console log

* Update query names, handle formatting (#110)

* update query names

* handle null deliverable types

* make dateFormat function available to detail block

* remove unused function

* remove console log messages

* fix typo in graphql query name (#111)

* ASSETS-88914 : Fix Pagination Frontend Code (#108)

* Changed the default number items per page to 4
Added function  debounce(func, wait)  to delay the Previous and Next page to wait 0.5 seconds between each click, to stop the user clicking too fast and breaking pagination

* Decrease debounce timeout to 200 milliseconds (0.2 secs)

* Added check that next page cannot go past last page
Added check that prev page cannot go back past page 1

* fix(pagination): Ensure proper handling of next/prev buttons and page boundaries

- Added totalPages calculation and checks to ensure "Next" button is disabled on the last page
- Updated nextPage function to correctly enable/disable pagination buttons
- Improved prevPage function to ensure it navigates back to the first page correctly
- Applied debounce to prevent rapid clicking issues
- Refactored logic for enabling/disabling pagination buttons based on current page state

* - Changed default items per page to 8
- Removed 4 items per page from filter
- Removed cusorArray, and replaced it with  currentPageInfo.previousCursor =  currentPageInfo.currentCursor;
- Set next cursor to  data.programPaginated.pageInfo.endCursor;
- Function prevPage now uses  currentPage.previousCursor as the cursor parameter value, and calculating the cursor value to use from cursorArray is no longer needed.

* Increased the click delay to 500 milliseconds

* Disabled the Previous and Next Button as soon as they are clicked, to prevent the user multiple clicking the button.

* Restored previous logic using cursorArray to manage the calculation of the cursor for the previous page. (#113)

* Adjust height of deliverables tab on program-details block (#114)

* minor css changes for program details

* adjust deliverables table height

* add min height to deliverables table

* remove commented css

* Sort deliverable type array before rows are made

* DXI-26587- Modify landing page for v3 Hub, so Signin goes to CH/v4 (#116)

* Replace throwing 404 error when the asset is not found, with asset.svg icon (#119)

* Make content fragment path for WF mappings configurable (#118)

* refactoring to use single graphql endpoint for map

* refactor 'mapping' functions

- refactor mapping retrieval functions in all three hcv blocks

* Remove comments

* remove unused function stub

* resolve bug in header filter refresh

* remove unused import

* Fixed issue where header didn't load if the user didn't have a profile yet (#121)

Co-authored-by: Mathieu Lessard <[email protected]>

* add checks for null 'review link' and 'final asset' (#122)

* Refactor header and query variable extraction (#123)

* add checks for null 'review link' and 'final asset'

* Add msg for programs with no data available

* refactor header so it can be used with no data

* wrap msg with div for styling

* refactor query variable extraction

- had to account for ampersand in program name

* Updated Product List (#117)

* Product list updated

* N/A value and label now match

* Fixed formatting

---------

Co-authored-by: Mathieu Lessard <[email protected]>

* Restored calling the function attatchEventListerners() at the end of the function decorate(block) (#124)

* Fix text wrapping issue in Project Owner column for smaller viewports (#125)

- Adjusted CSS to ensure text in the "Project Owner" column wraps properly
- Set row height to auto and adjusted line-height for better spacing
- Added media query for responsive width adjustments
- Ensured consistent display and improved readability across different viewport sizes

* ASSETS-88920 : Cosmetic Updates from MVP Feedback (#126)

* feat: Add Geo column to program list and adjust column widths for proper alignment

- Updated `gmo-program-list.js` to include Geo column in the header configuration and campaign list
- Adjusted column widths in `gmo-program-list.css` to ensure proper alignment under each column heading
- Add function `formatGeos` to format Geo array as comma-delimited list, that is displayed in the Geo column

* - Added a tooltip to the "Total Approved Assets" field in the Deliverables tab.
- Tooltip text provides instructions to view assets: "To view the assets, go to the 'All Asset' search page and use Program and Campaign name facet to filter the assets."
- Styled the tooltip to match the color and background of the Launch Date tooltip.
- Ensured the tooltip text appears on one line and positioned it correctly.
- Updated the "Total Asset" label to "Total Approved Asset"
- Updated the "Deliverable Name" column name to "Deliverable Task Name"

* - Added the Driver detail in Overview Tab next to Launch date like "Project Owner: Aina Tchoshanova"
- Update the Project "Owner column" label to "Task Owner"

* ASSETS-88921 : Marketing Moments Clickable Title and Underdevelopment Icon for ProgramNames/Campaigns (#128)

* feat: Change cursor to pointer for campaign name label and text

- Added CSS to change cursor to pointer on hover for .campaign-name-label and .campaign-name span.

feat: Add click event to campaign name label and text

- Updated buildCampaignList function to add click event listener to campaign name label and text.
- Clicking on the campaign name label or text now navigates to campaignDetailsLink.
- Ensured the appearance of the label and text remains unchanged while adding navigation functionality.

feat:  Rename "Review Link" to "QA Files" in the "Deliverable" task tab

- Updated Program Details column text/header to  QA files
- Updated CSS class from review-link to qa-files

* - feature :  When a campaign does not have an image assigned display the underdevelopment icon
Updated function searchAsset(programName, campaignName, imageWidth = 80) to get the  underdevelopment icon from site-config worksheet shared-branding worksheet

---------

Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani Gupta <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: shivanigupta <[email protected]>
shiv-gup added a commit that referenced this pull request Jul 11, 2024
* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

* Modified formatAssetMetadata() to allow custom dc-format Labels (#79)

* Removed "required" and custom values for fields (#86)

Co-authored-by: Mathieu Lessard <[email protected]>

* Added getBaseConfigPath to Collections Back Button (#89)

* Releasing HCV Dashboard code (#106)

* ASSETS-88894 GRAPHQL Persisted Query Code (#53)

* GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

* Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

* Renamed file test-graphql.js to graphql.js

Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

* Changed queryName to getAllCampaings

* Rollback to 3/15/24 Commit a519a5155c3dd57f0c54ea8bd336cd0a231cffab before adding GraphQL test code

* Delete test graphql code

* ASSETS-88895 : Show HCV report pages to limited users (#55)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Campaign List block for Marketing Dashboard page (#56)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

---------

Co-authored-by: Michael Dickson <[email protected]>

* updated hydration-utils.js (#54)

MH: Added Firefly  product to AA Modal 'Product' Field List

* Assets 98990 - Dynamic campaign list (#61)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

* Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

Which calls the persisted query gmo/filter-on-marketing-initiative
with example parameters

{
  "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
}

https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

* Campaign List filters display (#65)

* initial html structure setup

* refactor from select to div implementation

Select with multiselect displays as a list, not a dropdown

* finish refactor, enable visual functionality

- added all javascript needed for visual functionality
- finished refactoring structure

* Assets 98990 (#66)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* minor updates

- update graphql query to have hardcoded offset/limit (to resolve error)
- remove comments
- add placeholder 'refresh date' message and css
- move css for main body to accomodate above message

* add firefly icon

---------

Co-authored-by: Tyrone Tse <[email protected]>

* ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

* Added function hideQuickLinks()

* Added the hide field to the  shared-quicklinks config/worksheet
/blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
/scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
/scripts/site-config.js : Updated function to include the hide field

* Refactored the If statement logic

* Assets 98992- Campaign details/overview (#69)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

* gmo-campagin-list refactored to use  persisted query function
	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

* Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
Refactored the code for Repaginate for when the number of items page is changed
Show current page status

* graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
Deleted function  graphqlCampaignPaginated(first,cursor)

Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

* Fixed logic in calculating the nextCursor

* Removed all debug console.log statements

* Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

* Renamed the variable testConfig to headerConfig

* Campaign details block (#71)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* add status bar display

Also adjusted demo data slightly to include due date and lead

* update css/html to align with mockup and mvp

* resolve border bug

* implemented requested changes

* ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

---------

Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

* Updated function toggleOption : To only allow a single option to be selected in the dropdown list

---------

Co-authored-by: Shivani gupta <[email protected]>

* Assets 98993 (#75)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* resolve pr comments

* Release 05.09.2024 (#78)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

---------

Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>

* ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Assets 98994 (#81)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* initial changeover from static to dynamic data

* adjustments based on feedback

* additional changes based on feedback

* minor bugfix, null checks

* squash final bug with read more

* final touches

* combine two graphql functions with duplicated code

* bugfixes per pr review

* ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
Updated Geo dropdown list to be populated by graphql persisted query getGeoList

* Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
When a Business Line option is deselected then the Products List shows all products.

* Reduced the sample dropdown list options

* make links configurable, remove extraneous logs (#83)

* ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Removed comment

* ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Added function searchAsset(programName, campaignName) to get the asset URL

* Changed alt text to use assets repo-name property

* Renamed/Moved AssetsDatasource.js to /scripts/assets
gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
otherwise the values from blockConfig are overwritten when paginating to next page.

gmo-campaign-details.js : Added campaign Image
gmo-campaign-details.css : Updated CSS to display campaign Image

* gmo-campaign-list.js : Deleted comment
/scripts/assets.js : Updated to use createSearchEndpoint
/scripts/scripts.js : Added export to  export function createSearchEndpoint() {

* Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

* gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
/scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

* Assets 98996 (#88)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* ASSETS-88905 : Add Fields to the Overview Tab (#87)

* Added Target Market Area lists

function function createKPI(kpi)  is renamed createLI(li)

Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

* gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
gmo-campaign-details.js : Added Target Market Area and Platforms
refactored async function buildChannelScope(scopeTypeId, scopes, block)
to be able to display data for data based for a specified  CSS ID

* Added function getUniqueItems(items, property)
to get unique values for deliverableType and platforms

* Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
to  async function buildFieldScopes(scopeTypeId, scopes, block)

* Added global variable globalGraphFliter (#92)

Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
with graphFilter = currentGraphqlFilter

* Assets 98996 (#93)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* add deliverabletype graphql

- todo: refactor, some superfluous function(s) can be removed

* refactor product list to use graphql

* fix deliverable type tags, fix multiline text

* fix sort on marketing moments column

* removing merge artifact

* resolve PR comments

* platforms mapping with graphql (#94)

- also cleaned up extraneous/defunct code

* Refactor sort icons (#95)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

* assets.js : Refactored code to eliminate console.log error
gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

* Eliminated  JavaScript errors when image is not found

* Display total assets = 0 when the campaign image does not exist

* Code cleanup (#98)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

* Code cleanup part 2 (#100)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* Added  function closeAllDropDowns() (#101)

Added function handleClickOutside(event)

Updated function attachEventListeners()
    // Add event listener for clicks outside of dropdowns
    document.addEventListener('click', handleClickOutside);

Added function  resetProductsDropDown();

Updated  function resetAllFilters() to call function   resetProductsDropDown();

* Sticky deliverables header, update graphql endpoints (#102)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* update query endpoints, css tweak on deliverables

* Added tool tip for Program Name and Campaign Name (#103)

* remove duplicate icons

---------

Co-authored-by: TyroneAEM <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Tyrone Tse <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88912 : [Issue] Last page number is not matching with total number of pages (#105)

* ASSETS-88894 GRAPHQL Persisted Query Code (#53)

* GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

* Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

* Renamed file test-graphql.js to graphql.js

Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

* Changed queryName to getAllCampaings

* Rollback to 3/15/24 Commit a519a5155c3dd57f0c54ea8bd336cd0a231cffab before adding GraphQL test code

* Delete test graphql code

* ASSETS-88895 : Show HCV report pages to limited users (#55)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Campaign List block for Marketing Dashboard page (#56)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

---------

Co-authored-by: Michael Dickson <[email protected]>

* updated hydration-utils.js (#54)

MH: Added Firefly  product to AA Modal 'Product' Field List

* Assets 98990 - Dynamic campaign list (#61)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

* Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

Which calls the persisted query gmo/filter-on-marketing-initiative
with example parameters

{
  "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
}

https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

* Campaign List filters display (#65)

* initial html structure setup

* refactor from select to div implementation

Select with multiselect displays as a list, not a dropdown

* finish refactor, enable visual functionality

- added all javascript needed for visual functionality
- finished refactoring structure

* Assets 98990 (#66)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* minor updates

- update graphql query to have hardcoded offset/limit (to resolve error)
- remove comments
- add placeholder 'refresh date' message and css
- move css for main body to accomodate above message

* add firefly icon

---------

Co-authored-by: Tyrone Tse <[email protected]>

* ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

* Added function hideQuickLinks()

* Added the hide field to the  shared-quicklinks config/worksheet
/blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
/scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
/scripts/site-config.js : Updated function to include the hide field

* Refactored the If statement logic

* Assets 98992- Campaign details/overview (#69)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

* gmo-campagin-list refactored to use  persisted query function
	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

* Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
Refactored the code for Repaginate for when the number of items page is changed
Show current page status

* graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
Deleted function  graphqlCampaignPaginated(first,cursor)

Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

* Fixed logic in calculating the nextCursor

* Removed all debug console.log statements

* Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

* Renamed the variable testConfig to headerConfig

* Campaign details block (#71)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* add status bar display

Also adjusted demo data slightly to include due date and lead

* update css/html to align with mockup and mvp

* resolve border bug

* implemented requested changes

* ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

---------

Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

* Updated function toggleOption : To only allow a single option to be selected in the dropdown list

---------

Co-authored-by: Shivani gupta <[email protected]>

* Assets 98993 (#75)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* resolve pr comments

* Release 05.09.2024 (#78)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

---------

Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>

* ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Assets 98994 (#81)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* initial changeover from static to dynamic data

* adjustments based on feedback

* additional changes based on feedback

* minor bugfix, null checks

* squash final bug with read more

* final touches

* combine two graphql functions with duplicated code

* bugfixes per pr review

* ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
Updated Geo dropdown list to be populated by graphql persisted query getGeoList

* Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
When a Business Line option is deselected then the Products List shows all products.

* Reduced the sample dropdown list options

* make links configurable, remove extraneous logs (#83)

* ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Removed comment

* ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Added function searchAsset(programName, campaignName) to get the asset URL

* Changed alt text to use assets repo-name property

* Renamed/Moved AssetsDatasource.js to /scripts/assets
gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
otherwise the values from blockConfig are overwritten when paginating to next page.

gmo-campaign-details.js : Added campaign Image
gmo-campaign-details.css : Updated CSS to display campaign Image

* gmo-campaign-list.js : Deleted comment
/scripts/assets.js : Updated to use createSearchEndpoint
/scripts/scripts.js : Added export to  export function createSearchEndpoint() {

* Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

* gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
/scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

* Assets 98996 (#88)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* ASSETS-88905 : Add Fields to the Overview Tab (#87)

* Added Target Market Area lists

function function createKPI(kpi)  is renamed createLI(li)

Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

* gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
gmo-campaign-details.js : Added Target Market Area and Platforms
refactored async function buildChannelScope(scopeTypeId, scopes, block)
to be able to display data for data based for a specified  CSS ID

* Added function getUniqueItems(items, property)
to get unique values for deliverableType and platforms

* Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
to  async function buildFieldScopes(scopeTypeId, scopes, block)

* Added global variable globalGraphFliter (#92)

Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
with graphFilter = currentGraphqlFilter

* Assets 98996 (#93)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* add deliverabletype graphql

- todo: refactor, some superfluous function(s) can be removed

* refactor product list to use graphql

* fix deliverable type tags, fix multiline text

* fix sort on marketing moments column

* removing merge artifact

* resolve PR comments

* platforms mapping with graphql (#94)

- also cleaned up extraneous/defunct code

* Refactor sort icons (#95)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

* assets.js : Refactored code to eliminate console.log error
gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

* Eliminated  JavaScript errors when image is not found

* Display total assets = 0 when the campaign image does not exist

* Code cleanup (#98)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

* Code cleanup part 2 (#100)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* Added  function closeAllDropDowns() (#101)

Added function handleClickOutside(event)

Updated function attachEventListeners()
    // Add event listener for clicks outside of dropdowns
    document.addEventListener('click', handleClickOutside);

Added function  resetProductsDropDown();

Updated  function resetAllFilters() to call function   resetProductsDropDown();

* Sticky deliverables header, update graphql endpoints (#102)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* update query endpoints, css tweak on deliverables

* Added tool tip for Program Name and Campaign Name (#103)

* remove duplicate icons

* Change default items per page from 4 to 8
Changed undefined message for Campaign to  Marketing Moment Not Available

* Remove debugging from graphql.js

* Deleted function debug_console()

---------

Co-authored-by: Shivani Gupta <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>

* Performance refactoring (#107)

* performance refactoring

- improve thumbnail performance by makin async
- format date property to yyyy-mm-dd
- fix margin issue in program header
- refactor function that builds header dropdown for increased
  performance

* resolve bug with event listeners not attaching

* add programID parameter to deliverable query (#109)

* add programID parameter to deliverable query

* quick null check for status color

* remove console log

* Update query names, handle formatting (#110)

* update query names

* handle null deliverable types

* make dateFormat function available to detail block

* remove unused function

* remove console log messages

* fix typo in graphql query name (#111)

* ASSETS-88914 : Fix Pagination Frontend Code (#108)

* Changed the default number items per page to 4
Added function  debounce(func, wait)  to delay the Previous and Next page to wait 0.5 seconds between each click, to stop the user clicking too fast and breaking pagination

* Decrease debounce timeout to 200 milliseconds (0.2 secs)

* Added check that next page cannot go past last page
Added check that prev page cannot go back past page 1

* fix(pagination): Ensure proper handling of next/prev buttons and page boundaries

- Added totalPages calculation and checks to ensure "Next" button is disabled on the last page
- Updated nextPage function to correctly enable/disable pagination buttons
- Improved prevPage function to ensure it navigates back to the first page correctly
- Applied debounce to prevent rapid clicking issues
- Refactored logic for enabling/disabling pagination buttons based on current page state

* - Changed default items per page to 8
- Removed 4 items per page from filter
- Removed cusorArray, and replaced it with  currentPageInfo.previousCursor =  currentPageInfo.currentCursor;
- Set next cursor to  data.programPaginated.pageInfo.endCursor;
- Function prevPage now uses  currentPage.previousCursor as the cursor parameter value, and calculating the cursor value to use from cursorArray is no longer needed.

* Increased the click delay to 500 milliseconds

* Disabled the Previous and Next Button as soon as they are clicked, to prevent the user multiple clicking the button.

* Restored previous logic using cursorArray to manage the calculation of the cursor for the previous page. (#113)

* Adjust height of deliverables tab on program-details block (#114)

* minor css changes for program details

* adjust deliverables table height

* add min height to deliverables table

* remove commented css

* Sort deliverable type array before rows are made

* DXI-26587- Modify landing page for v3 Hub, so Signin goes to CH/v4 (#116)

* Replace throwing 404 error when the asset is not found, with asset.svg icon (#119)

* Make content fragment path for WF mappings configurable (#118)

* refactoring to use single graphql endpoint for map

* refactor 'mapping' functions

- refactor mapping retrieval functions in all three hcv blocks

* Remove comments

* remove unused function stub

* resolve bug in header filter refresh

* remove unused import

* Fixed issue where header didn't load if the user didn't have a profile yet (#121)

Co-authored-by: Mathieu Lessard <[email protected]>

* add checks for null 'review link' and 'final asset' (#122)

* Refactor header and query variable extraction (#123)

* add checks for null 'review link' and 'final asset'

* Add msg for programs with no data available

* refactor header so it can be used with no data

* wrap msg with div for styling

* refactor query variable extraction

- had to account for ampersand in program name

* Updated Product List (#117)

* Product list updated

* N/A value and label now match

* Fixed formatting

---------

Co-authored-by: Mathieu Lessard <[email protected]>

* Restored calling the function attatchEventListerners() at the end of the function decorate(block) (#124)

* Fix text wrapping issue in Project Owner column for smaller viewports (#125)

- Adjusted CSS to ensure text in the "Project Owner" column wraps properly
- Set row height to auto and adjusted line-height for better spacing
- Added media query for responsive width adjustments
- Ensured consistent display and improved readability across different viewport sizes

* ASSETS-88920 : Cosmetic Updates from MVP Feedback (#126)

* feat: Add Geo column to program list and adjust column widths for proper alignment

- Updated `gmo-program-list.js` to include Geo column in the header configuration and campaign list
- Adjusted column widths in `gmo-program-list.css` to ensure proper alignment under each column heading
- Add function `formatGeos` to format Geo array as comma-delimited list, that is displayed in the Geo column

* - Added a tooltip to the "Total Approved Assets" field in the Deliverables tab.
- Tooltip text provides instructions to view assets: "To view the assets, go to the 'All Asset' search page and use Program and Campaign name facet to filter the assets."
- Styled the tooltip to match the color and background of the Launch Date tooltip.
- Ensured the tooltip text appears on one line and positioned it correctly.
- Updated the "Total Asset" label to "Total Approved Asset"
- Updated the "Deliverable Name" column name to "Deliverable Task Name"

* - Added the Driver detail in Overview Tab next to Launch date like "Project Owner: Aina Tchoshanova"
- Update the Project "Owner column" label to "Task Owner"

* ASSETS-88921 : Marketing Moments Clickable Title and Underdevelopment Icon for ProgramNames/Campaigns (#128)

* feat: Change cursor to pointer for campaign name label and text

- Added CSS to change cursor to pointer on hover for .campaign-name-label and .campaign-name span.

feat: Add click event to campaign name label and text

- Updated buildCampaignList function to add click event listener to campaign name label and text.
- Clicking on the campaign name label or text now navigates to campaignDetailsLink.
- Ensured the appearance of the label and text remains unchanged while adding navigation functionality.

feat:  Rename "Review Link" to "QA Files" in the "Deliverable" task tab

- Updated Program Details column text/header to  QA files
- Updated CSS class from review-link to qa-files

* - feature :  When a campaign does not have an image assigned display the underdevelopment icon
Updated function searchAsset(programName, campaignName, imageWidth = 80) to get the  underdevelopment icon from site-config worksheet shared-branding worksheet

* Sorted the options in the dropdown lists alphabetically on the options text field (#131)

* ASSETS-88922 : Review the Deliverable page load time (#130)

* Improve page load time by parallelizing API calls and adding debug logs

- Updated `decorate` function to fetch program details and deliverables in parallel using `Promise.all`.
- Added console logs before and after API calls to help with debugging.
- Maintained existing functionality while optimizing performance by reducing sequential API calls.

* Remove logging messages

* feat: Improve performance of gmo-program-details.js

- Implement parallel GraphQL queries to reduce load times.
- Lazy load images using the `loading="lazy"` attribute to improve initial load performance.
- Batch DOM updates using `document.createDocumentFragment()` to minimize reflows and repaints.
- Debounce event listeners to prevent performance issues caused by rapid firing of events.

These optimizations should enhance the overall performance and responsiveness of the page.

* Optimize header rendering and asynchronous data fetching

- Initiate parallel fetching of program details and deliverables.
- Render a placeholder header immediately to improve perceived load time.
- Update header with actual data once program details are fetched.
- Ensure images are loaded asynchronously without blocking header rendering.

* feat: Inject additional HTML content into main-body-wrapper after header update

- Added HTML content including tab-wrapper, overview, and deliverables sections to the main-body-wrapper div after the header.
- Updated the main-body-wrapper div to include newly provided HTML content for improved user interface and navigation.
- Ensured the content injection occurs after the header update to maintain correct rendering order.

* Added back displaying the back button with arrow icon and program name not available message and no data available message when program

* Updated logic to display the total asset count for an image

* Reverted back to
const programData = await executeQuery(programQueryString);
const deliverables = await executeQuery(deliverableQueryString);

* Restored constant variables for Marketing Goal, KPIs, Target Market, Audiences
    const p0TargetMarketArea = program.p0TargetMarketArea;
    const p1TargetMarketArea = program.p1TargetMarketArea;
    const kpis = buildKPIList(program).outerHTML;
    const targetMarketAreas = buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea).outerHTML;
    const audiences = buildAudienceList(program).outerHTML;
    const artifactLinks = buildArtifactLinks(program).outerHTML;

To make the code more readable, they were removed when the structure of the code was refactored to incrementally build the block.innerHTML, to make the page appear to load faster.

* assets.js (#132)

Added helper function async function getUnderdevelopmentIcon() to display the underdevelopment icon.
Also display the under development icon when  programName and campaignName is null
gmo-program-details.js
When programName and campaignName is null display the under development icon

* gmo-program-details.js
PR Code review change to

* Revert "gmo-program-details.js"

This reverts commit 18ddd12c8fef2fbcb9c56b54735e907f421f17ad.

* gmo-program-details.js
PR code review change to
let imageObject = {imageUrl : '', imageAltText: '', assetCount: 0};
assets.js
PR code review change to
if (!progamName && !campaginName)

---------

Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani Gupta <[email protected]>
Co-authored-by: TyroneAEM <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: Tyrone Tse <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: shivanigupta <[email protected]>
shiv-gup added a commit that referenced this pull request Jul 11, 2024
…n variable name) (#136)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

* Modified formatAssetMetadata() to allow custom dc-format Labels (#79)

* Removed "required" and custom values for fields (#86)

Co-authored-by: Mathieu Lessard <[email protected]>

* Added getBaseConfigPath to Collections Back Button (#89)

* Releasing HCV Dashboard code (#106)

* ASSETS-88894 GRAPHQL Persisted Query Code (#53)

* GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

* Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

* Renamed file test-graphql.js to graphql.js

Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

* Changed queryName to getAllCampaings

* Rollback to 3/15/24 Commit a519a5155c3dd57f0c54ea8bd336cd0a231cffab before adding GraphQL test code

* Delete test graphql code

* ASSETS-88895 : Show HCV report pages to limited users (#55)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Campaign List block for Marketing Dashboard page (#56)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

---------

Co-authored-by: Michael Dickson <[email protected]>

* updated hydration-utils.js (#54)

MH: Added Firefly  product to AA Modal 'Product' Field List

* Assets 98990 - Dynamic campaign list (#61)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

* Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

Which calls the persisted query gmo/filter-on-marketing-initiative
with example parameters

{
  "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
}

https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

* Campaign List filters display (#65)

* initial html structure setup

* refactor from select to div implementation

Select with multiselect displays as a list, not a dropdown

* finish refactor, enable visual functionality

- added all javascript needed for visual functionality
- finished refactoring structure

* Assets 98990 (#66)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* minor updates

- update graphql query to have hardcoded offset/limit (to resolve error)
- remove comments
- add placeholder 'refresh date' message and css
- move css for main body to accomodate above message

* add firefly icon

---------

Co-authored-by: Tyrone Tse <[email protected]>

* ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

* Added function hideQuickLinks()

* Added the hide field to the  shared-quicklinks config/worksheet
/blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
/scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
/scripts/site-config.js : Updated function to include the hide field

* Refactored the If statement logic

* Assets 98992- Campaign details/overview (#69)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

* gmo-campagin-list refactored to use  persisted query function
	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

* Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
Refactored the code for Repaginate for when the number of items page is changed
Show current page status

* graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
Deleted function  graphqlCampaignPaginated(first,cursor)

Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

* Fixed logic in calculating the nextCursor

* Removed all debug console.log statements

* Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

* Renamed the variable testConfig to headerConfig

* Campaign details block (#71)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* add status bar display

Also adjusted demo data slightly to include due date and lead

* update css/html to align with mockup and mvp

* resolve border bug

* implemented requested changes

* ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

---------

Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

* Updated function toggleOption : To only allow a single option to be selected in the dropdown list

---------

Co-authored-by: Shivani gupta <[email protected]>

* Assets 98993 (#75)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* resolve pr comments

* Release 05.09.2024 (#78)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

---------

Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>

* ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Assets 98994 (#81)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* initial changeover from static to dynamic data

* adjustments based on feedback

* additional changes based on feedback

* minor bugfix, null checks

* squash final bug with read more

* final touches

* combine two graphql functions with duplicated code

* bugfixes per pr review

* ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
Updated Geo dropdown list to be populated by graphql persisted query getGeoList

* Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
When a Business Line option is deselected then the Products List shows all products.

* Reduced the sample dropdown list options

* make links configurable, remove extraneous logs (#83)

* ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Removed comment

* ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Added function searchAsset(programName, campaignName) to get the asset URL

* Changed alt text to use assets repo-name property

* Renamed/Moved AssetsDatasource.js to /scripts/assets
gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
otherwise the values from blockConfig are overwritten when paginating to next page.

gmo-campaign-details.js : Added campaign Image
gmo-campaign-details.css : Updated CSS to display campaign Image

* gmo-campaign-list.js : Deleted comment
/scripts/assets.js : Updated to use createSearchEndpoint
/scripts/scripts.js : Added export to  export function createSearchEndpoint() {

* Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

* gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
/scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

* Assets 98996 (#88)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* ASSETS-88905 : Add Fields to the Overview Tab (#87)

* Added Target Market Area lists

function function createKPI(kpi)  is renamed createLI(li)

Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

* gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
gmo-campaign-details.js : Added Target Market Area and Platforms
refactored async function buildChannelScope(scopeTypeId, scopes, block)
to be able to display data for data based for a specified  CSS ID

* Added function getUniqueItems(items, property)
to get unique values for deliverableType and platforms

* Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
to  async function buildFieldScopes(scopeTypeId, scopes, block)

* Added global variable globalGraphFliter (#92)

Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
with graphFilter = currentGraphqlFilter

* Assets 98996 (#93)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* add deliverabletype graphql

- todo: refactor, some superfluous function(s) can be removed

* refactor product list to use graphql

* fix deliverable type tags, fix multiline text

* fix sort on marketing moments column

* removing merge artifact

* resolve PR comments

* platforms mapping with graphql (#94)

- also cleaned up extraneous/defunct code

* Refactor sort icons (#95)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

* assets.js : Refactored code to eliminate console.log error
gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

* Eliminated  JavaScript errors when image is not found

* Display total assets = 0 when the campaign image does not exist

* Code cleanup (#98)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

* Code cleanup part 2 (#100)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* Added  function closeAllDropDowns() (#101)

Added function handleClickOutside(event)

Updated function attachEventListeners()
    // Add event listener for clicks outside of dropdowns
    document.addEventListener('click', handleClickOutside);

Added function  resetProductsDropDown();

Updated  function resetAllFilters() to call function   resetProductsDropDown();

* Sticky deliverables header, update graphql endpoints (#102)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* update query endpoints, css tweak on deliverables

* Added tool tip for Program Name and Campaign Name (#103)

* remove duplicate icons

---------

Co-authored-by: TyroneAEM <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Tyrone Tse <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88912 : [Issue] Last page number is not matching with total number of pages (#105)

* ASSETS-88894 GRAPHQL Persisted Query Code (#53)

* GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

* Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

* Renamed file test-graphql.js to graphql.js

Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

* Changed queryName to getAllCampaings

* Rollback to 3/15/24 Commit a519a5155c3dd57f0c54ea8bd336cd0a231cffab before adding GraphQL test code

* Delete test graphql code

* ASSETS-88895 : Show HCV report pages to limited users (#55)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Campaign List block for Marketing Dashboard page (#56)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

---------

Co-authored-by: Michael Dickson <[email protected]>

* updated hydration-utils.js (#54)

MH: Added Firefly  product to AA Modal 'Product' Field List

* Assets 98990 - Dynamic campaign list (#61)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

* Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

Which calls the persisted query gmo/filter-on-marketing-initiative
with example parameters

{
  "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
}

https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

* Campaign List filters display (#65)

* initial html structure setup

* refactor from select to div implementation

Select with multiselect displays as a list, not a dropdown

* finish refactor, enable visual functionality

- added all javascript needed for visual functionality
- finished refactoring structure

* Assets 98990 (#66)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* minor updates

- update graphql query to have hardcoded offset/limit (to resolve error)
- remove comments
- add placeholder 'refresh date' message and css
- move css for main body to accomodate above message

* add firefly icon

---------

Co-authored-by: Tyrone Tse <[email protected]>

* ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

* Added function hideQuickLinks()

* Added the hide field to the  shared-quicklinks config/worksheet
/blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
/scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
/scripts/site-config.js : Updated function to include the hide field

* Refactored the If statement logic

* Assets 98992- Campaign details/overview (#69)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

* gmo-campagin-list refactored to use  persisted query function
	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

* Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
Refactored the code for Repaginate for when the number of items page is changed
Show current page status

* graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
Deleted function  graphqlCampaignPaginated(first,cursor)

Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

* Fixed logic in calculating the nextCursor

* Removed all debug console.log statements

* Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

* Renamed the variable testConfig to headerConfig

* Campaign details block (#71)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* add status bar display

Also adjusted demo data slightly to include due date and lead

* update css/html to align with mockup and mvp

* resolve border bug

* implemented requested changes

* ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

---------

Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

* Updated function toggleOption : To only allow a single option to be selected in the dropdown list

---------

Co-authored-by: Shivani gupta <[email protected]>

* Assets 98993 (#75)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* resolve pr comments

* Release 05.09.2024 (#78)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

---------

Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>

* ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Assets 98994 (#81)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* initial changeover from static to dynamic data

* adjustments based on feedback

* additional changes based on feedback

* minor bugfix, null checks

* squash final bug with read more

* final touches

* combine two graphql functions with duplicated code

* bugfixes per pr review

* ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
Updated Geo dropdown list to be populated by graphql persisted query getGeoList

* Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
When a Business Line option is deselected then the Products List shows all products.

* Reduced the sample dropdown list options

* make links configurable, remove extraneous logs (#83)

* ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Removed comment

* ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Added function searchAsset(programName, campaignName) to get the asset URL

* Changed alt text to use assets repo-name property

* Renamed/Moved AssetsDatasource.js to /scripts/assets
gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
otherwise the values from blockConfig are overwritten when paginating to next page.

gmo-campaign-details.js : Added campaign Image
gmo-campaign-details.css : Updated CSS to display campaign Image

* gmo-campaign-list.js : Deleted comment
/scripts/assets.js : Updated to use createSearchEndpoint
/scripts/scripts.js : Added export to  export function createSearchEndpoint() {

* Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

* gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
/scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

* Assets 98996 (#88)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* ASSETS-88905 : Add Fields to the Overview Tab (#87)

* Added Target Market Area lists

function function createKPI(kpi)  is renamed createLI(li)

Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

* gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
gmo-campaign-details.js : Added Target Market Area and Platforms
refactored async function buildChannelScope(scopeTypeId, scopes, block)
to be able to display data for data based for a specified  CSS ID

* Added function getUniqueItems(items, property)
to get unique values for deliverableType and platforms

* Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
to  async function buildFieldScopes(scopeTypeId, scopes, block)

* Added global variable globalGraphFliter (#92)

Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
with graphFilter = currentGraphqlFilter

* Assets 98996 (#93)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* add deliverabletype graphql

- todo: refactor, some superfluous function(s) can be removed

* refactor product list to use graphql

* fix deliverable type tags, fix multiline text

* fix sort on marketing moments column

* removing merge artifact

* resolve PR comments

* platforms mapping with graphql (#94)

- also cleaned up extraneous/defunct code

* Refactor sort icons (#95)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

* assets.js : Refactored code to eliminate console.log error
gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

* Eliminated  JavaScript errors when image is not found

* Display total assets = 0 when the campaign image does not exist

* Code cleanup (#98)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

* Code cleanup part 2 (#100)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* Added  function closeAllDropDowns() (#101)

Added function handleClickOutside(event)

Updated function attachEventListeners()
    // Add event listener for clicks outside of dropdowns
    document.addEventListener('click', handleClickOutside);

Added function  resetProductsDropDown();

Updated  function resetAllFilters() to call function   resetProductsDropDown();

* Sticky deliverables header, update graphql endpoints (#102)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* update query endpoints, css tweak on deliverables

* Added tool tip for Program Name and Campaign Name (#103)

* remove duplicate icons

* Change default items per page from 4 to 8
Changed undefined message for Campaign to  Marketing Moment Not Available

* Remove debugging from graphql.js

* Deleted function debug_console()

---------

Co-authored-by: Shivani Gupta <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>

* Performance refactoring (#107)

* performance refactoring

- improve thumbnail performance by makin async
- format date property to yyyy-mm-dd
- fix margin issue in program header
- refactor function that builds header dropdown for increased
  performance

* resolve bug with event listeners not attaching

* add programID parameter to deliverable query (#109)

* add programID parameter to deliverable query

* quick null check for status color

* remove console log

* Update query names, handle formatting (#110)

* update query names

* handle null deliverable types

* make dateFormat function available to detail block

* remove unused function

* remove console log messages

* fix typo in graphql query name (#111)

* ASSETS-88914 : Fix Pagination Frontend Code (#108)

* Changed the default number items per page to 4
Added function  debounce(func, wait)  to delay the Previous and Next page to wait 0.5 seconds between each click, to stop the user clicking too fast and breaking pagination

* Decrease debounce timeout to 200 milliseconds (0.2 secs)

* Added check that next page cannot go past last page
Added check that prev page cannot go back past page 1

* fix(pagination): Ensure proper handling of next/prev buttons and page boundaries

- Added totalPages calculation and checks to ensure "Next" button is disabled on the last page
- Updated nextPage function to correctly enable/disable pagination buttons
- Improved prevPage function to ensure it navigates back to the first page correctly
- Applied debounce to prevent rapid clicking issues
- Refactored logic for enabling/disabling pagination buttons based on current page state

* - Changed default items per page to 8
- Removed 4 items per page from filter
- Removed cusorArray, and replaced it with  currentPageInfo.previousCursor =  currentPageInfo.currentCursor;
- Set next cursor to  data.programPaginated.pageInfo.endCursor;
- Function prevPage now uses  currentPage.previousCursor as the cursor parameter value, and calculating the cursor value to use from cursorArray is no longer needed.

* Increased the click delay to 500 milliseconds

* Disabled the Previous and Next Button as soon as they are clicked, to prevent the user multiple clicking the button.

* Restored previous logic using cursorArray to manage the calculation of the cursor for the previous page. (#113)

* Adjust height of deliverables tab on program-details block (#114)

* minor css changes for program details

* adjust deliverables table height

* add min height to deliverables table

* remove commented css

* Sort deliverable type array before rows are made

* DXI-26587- Modify landing page for v3 Hub, so Signin goes to CH/v4 (#116)

* Replace throwing 404 error when the asset is not found, with asset.svg icon (#119)

* Make content fragment path for WF mappings configurable (#118)

* refactoring to use single graphql endpoint for map

* refactor 'mapping' functions

- refactor mapping retrieval functions in all three hcv blocks

* Remove comments

* remove unused function stub

* resolve bug in header filter refresh

* remove unused import

* Fixed issue where header didn't load if the user didn't have a profile yet (#121)

Co-authored-by: Mathieu Lessard <[email protected]>

* add checks for null 'review link' and 'final asset' (#122)

* Refactor header and query variable extraction (#123)

* add checks for null 'review link' and 'final asset'

* Add msg for programs with no data available

* refactor header so it can be used with no data

* wrap msg with div for styling

* refactor query variable extraction

- had to account for ampersand in program name

* Updated Product List (#117)

* Product list updated

* N/A value and label now match

* Fixed formatting

---------

Co-authored-by: Mathieu Lessard <[email protected]>

* Restored calling the function attatchEventListerners() at the end of the function decorate(block) (#124)

* Fix text wrapping issue in Project Owner column for smaller viewports (#125)

- Adjusted CSS to ensure text in the "Project Owner" column wraps properly
- Set row height to auto and adjusted line-height for better spacing
- Added media query for responsive width adjustments
- Ensured consistent display and improved readability across different viewport sizes

* ASSETS-88920 : Cosmetic Updates from MVP Feedback (#126)

* feat: Add Geo column to program list and adjust column widths for proper alignment

- Updated `gmo-program-list.js` to include Geo column in the header configuration and campaign list
- Adjusted column widths in `gmo-program-list.css` to ensure proper alignment under each column heading
- Add function `formatGeos` to format Geo array as comma-delimited list, that is displayed in the Geo column

* - Added a tooltip to the "Total Approved Assets" field in the Deliverables tab.
- Tooltip text provides instructions to view assets: "To view the assets, go to the 'All Asset' search page and use Program and Campaign name facet to filter the assets."
- Styled the tooltip to match the color and background of the Launch Date tooltip.
- Ensured the tooltip text appears on one line and positioned it correctly.
- Updated the "Total Asset" label to "Total Approved Asset"
- Updated the "Deliverable Name" column name to "Deliverable Task Name"

* - Added the Driver detail in Overview Tab next to Launch date like "Project Owner: Aina Tchoshanova"
- Update the Project "Owner column" label to "Task Owner"

* ASSETS-88921 : Marketing Moments Clickable Title and Underdevelopment Icon for ProgramNames/Campaigns (#128)

* feat: Change cursor to pointer for campaign name label and text

- Added CSS to change cursor to pointer on hover for .campaign-name-label and .campaign-name span.

feat: Add click event to campaign name label and text

- Updated buildCampaignList function to add click event listener to campaign name label and text.
- Clicking on the campaign name label or text now navigates to campaignDetailsLink.
- Ensured the appearance of the label and text remains unchanged while adding navigation functionality.

feat:  Rename "Review Link" to "QA Files" in the "Deliverable" task tab

- Updated Program Details column text/header to  QA files
- Updated CSS class from review-link to qa-files

* - feature :  When a campaign does not have an image assigned display the underdevelopment icon
Updated function searchAsset(programName, campaignName, imageWidth = 80) to get the  underdevelopment icon from site-config worksheet shared-branding worksheet

* Sorted the options in the dropdown lists alphabetically on the options text field (#131)

* ASSETS-88922 : Review the Deliverable page load time (#130)

* Improve page load time by parallelizing API calls and adding debug logs

- Updated `decorate` function to fetch program details and deliverables in parallel using `Promise.all`.
- Added console logs before and after API calls to help with debugging.
- Maintained existing functionality while optimizing performance by reducing sequential API calls.

* Remove logging messages

* feat: Improve performance of gmo-program-details.js

- Implement parallel GraphQL queries to reduce load times.
- Lazy load images using the `loading="lazy"` attribute to improve initial load performance.
- Batch DOM updates using `document.createDocumentFragment()` to minimize reflows and repaints.
- Debounce event listeners to prevent performance issues caused by rapid firing of events.

These optimizations should enhance the overall performance and responsiveness of the page.

* Optimize header rendering and asynchronous data fetching

- Initiate parallel fetching of program details and deliverables.
- Render a placeholder header immediately to improve perceived load time.
- Update header with actual data once program details are fetched.
- Ensure images are loaded asynchronously without blocking header rendering.

* feat: Inject additional HTML content into main-body-wrapper after header update

- Added HTML content including tab-wrapper, overview, and deliverables sections to the main-body-wrapper div after the header.
- Updated the main-body-wrapper div to include newly provided HTML content for improved user interface and navigation.
- Ensured the content injection occurs after the header update to maintain correct rendering order.

* Added back displaying the back button with arrow icon and program name not available message and no data available message when program

* Updated logic to display the total asset count for an image

* Reverted back to
const programData = await executeQuery(programQueryString);
const deliverables = await executeQuery(deliverableQueryString);

* Restored constant variables for Marketing Goal, KPIs, Target Market, Audiences
    const p0TargetMarketArea = program.p0TargetMarketArea;
    const p1TargetMarketArea = program.p1TargetMarketArea;
    const kpis = buildKPIList(program).outerHTML;
    const targetMarketAreas = buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea).outerHTML;
    const audiences = buildAudienceList(program).outerHTML;
    const artifactLinks = buildArtifactLinks(program).outerHTML;

To make the code more readable, they were removed when the structure of the code was refactored to incrementally build the block.innerHTML, to make the page appear to load faster.

* assets.js (#132)

Added helper function async function getUnderdevelopmentIcon() to display the underdevelopment icon.
Also display the under development icon when  programName and campaignName is null
gmo-program-details.js
When programName and campaignName is null display the under development icon

* gmo-program-details.js
PR Code review change to

* Revert "gmo-program-details.js"

This reverts commit 18ddd12c8fef2fbcb9c56b54735e907f421f17ad.

* gmo-program-details.js
PR code review change to
let imageObject = {imageUrl : '', imageAltText: '', assetCount: 0};
assets.js
PR code review change to
if (!progamName && !campaginName)

* Resolved typo in variable programName

from
  if (!progamName && !campaginName)
to
 if (!programName && !campaignName)

---------

Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani Gupta <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: shivanigupta <[email protected]>
mathieu-lessard added a commit that referenced this pull request Jul 16, 2024
* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

* Modified formatAssetMetadata() to allow custom dc-format Labels (#79)

* Removed "required" and custom values for fields (#86)

Co-authored-by: Mathieu Lessard <[email protected]>

* Added getBaseConfigPath to Collections Back Button (#89)

* Releasing HCV Dashboard code (#106)

* ASSETS-88894 GRAPHQL Persisted Query Code (#53)

* GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

* Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

* Renamed file test-graphql.js to graphql.js

Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

* Changed queryName to getAllCampaings

* Rollback to 3/15/24 Commit a519a5155c3dd57f0c54ea8bd336cd0a231cffab before adding GraphQL test code

* Delete test graphql code

* ASSETS-88895 : Show HCV report pages to limited users (#55)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Campaign List block for Marketing Dashboard page (#56)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

---------

Co-authored-by: Michael Dickson <[email protected]>

* updated hydration-utils.js (#54)

MH: Added Firefly  product to AA Modal 'Product' Field List

* Assets 98990 - Dynamic campaign list (#61)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

* Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

Which calls the persisted query gmo/filter-on-marketing-initiative
with example parameters

{
  "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
}

https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

* Campaign List filters display (#65)

* initial html structure setup

* refactor from select to div implementation

Select with multiselect displays as a list, not a dropdown

* finish refactor, enable visual functionality

- added all javascript needed for visual functionality
- finished refactoring structure

* Assets 98990 (#66)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* minor updates

- update graphql query to have hardcoded offset/limit (to resolve error)
- remove comments
- add placeholder 'refresh date' message and css
- move css for main body to accomodate above message

* add firefly icon

---------

Co-authored-by: Tyrone Tse <[email protected]>

* ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

* Added function hideQuickLinks()

* Added the hide field to the  shared-quicklinks config/worksheet
/blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
/scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
/scripts/site-config.js : Updated function to include the hide field

* Refactored the If statement logic

* Assets 98992- Campaign details/overview (#69)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

* gmo-campagin-list refactored to use  persisted query function
	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

* Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
Refactored the code for Repaginate for when the number of items page is changed
Show current page status

* graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
Deleted function  graphqlCampaignPaginated(first,cursor)

Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

* Fixed logic in calculating the nextCursor

* Removed all debug console.log statements

* Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

* Renamed the variable testConfig to headerConfig

* Campaign details block (#71)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* add status bar display

Also adjusted demo data slightly to include due date and lead

* update css/html to align with mockup and mvp

* resolve border bug

* implemented requested changes

* ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

---------

Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

* Updated function toggleOption : To only allow a single option to be selected in the dropdown list

---------

Co-authored-by: Shivani gupta <[email protected]>

* Assets 98993 (#75)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* resolve pr comments

* Release 05.09.2024 (#78)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

---------

Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>

* ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Assets 98994 (#81)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* initial changeover from static to dynamic data

* adjustments based on feedback

* additional changes based on feedback

* minor bugfix, null checks

* squash final bug with read more

* final touches

* combine two graphql functions with duplicated code

* bugfixes per pr review

* ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
Updated Geo dropdown list to be populated by graphql persisted query getGeoList

* Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
When a Business Line option is deselected then the Products List shows all products.

* Reduced the sample dropdown list options

* make links configurable, remove extraneous logs (#83)

* ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Removed comment

* ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Added function searchAsset(programName, campaignName) to get the asset URL

* Changed alt text to use assets repo-name property

* Renamed/Moved AssetsDatasource.js to /scripts/assets
gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
otherwise the values from blockConfig are overwritten when paginating to next page.

gmo-campaign-details.js : Added campaign Image
gmo-campaign-details.css : Updated CSS to display campaign Image

* gmo-campaign-list.js : Deleted comment
/scripts/assets.js : Updated to use createSearchEndpoint
/scripts/scripts.js : Added export to  export function createSearchEndpoint() {

* Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

* gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
/scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

* Assets 98996 (#88)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* ASSETS-88905 : Add Fields to the Overview Tab (#87)

* Added Target Market Area lists

function function createKPI(kpi)  is renamed createLI(li)

Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

* gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
gmo-campaign-details.js : Added Target Market Area and Platforms
refactored async function buildChannelScope(scopeTypeId, scopes, block)
to be able to display data for data based for a specified  CSS ID

* Added function getUniqueItems(items, property)
to get unique values for deliverableType and platforms

* Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
to  async function buildFieldScopes(scopeTypeId, scopes, block)

* Added global variable globalGraphFliter (#92)

Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
with graphFilter = currentGraphqlFilter

* Assets 98996 (#93)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* add deliverabletype graphql

- todo: refactor, some superfluous function(s) can be removed

* refactor product list to use graphql

* fix deliverable type tags, fix multiline text

* fix sort on marketing moments column

* removing merge artifact

* resolve PR comments

* platforms mapping with graphql (#94)

- also cleaned up extraneous/defunct code

* Refactor sort icons (#95)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

* assets.js : Refactored code to eliminate console.log error
gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

* Eliminated  JavaScript errors when image is not found

* Display total assets = 0 when the campaign image does not exist

* Code cleanup (#98)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

* Code cleanup part 2 (#100)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* Added  function closeAllDropDowns() (#101)

Added function handleClickOutside(event)

Updated function attachEventListeners()
    // Add event listener for clicks outside of dropdowns
    document.addEventListener('click', handleClickOutside);

Added function  resetProductsDropDown();

Updated  function resetAllFilters() to call function   resetProductsDropDown();

* Sticky deliverables header, update graphql endpoints (#102)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* update query endpoints, css tweak on deliverables

* Added tool tip for Program Name and Campaign Name (#103)

* remove duplicate icons

---------

Co-authored-by: TyroneAEM <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Tyrone Tse <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88912 : [Issue] Last page number is not matching with total number of pages (#105)

* ASSETS-88894 GRAPHQL Persisted Query Code (#53)

* GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

* Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

* Renamed file test-graphql.js to graphql.js

Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

* Changed queryName to getAllCampaings

* Rollback to 3/15/24 Commit a519a5155c3dd57f0c54ea8bd336cd0a231cffab before adding GraphQL test code

* Delete test graphql code

* ASSETS-88895 : Show HCV report pages to limited users (#55)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Campaign List block for Marketing Dashboard page (#56)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

---------

Co-authored-by: Michael Dickson <[email protected]>

* updated hydration-utils.js (#54)

MH: Added Firefly  product to AA Modal 'Product' Field List

* Assets 98990 - Dynamic campaign list (#61)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

* Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

Which calls the persisted query gmo/filter-on-marketing-initiative
with example parameters

{
  "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
}

https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

* Campaign List filters display (#65)

* initial html structure setup

* refactor from select to div implementation

Select with multiselect displays as a list, not a dropdown

* finish refactor, enable visual functionality

- added all javascript needed for visual functionality
- finished refactoring structure

* Assets 98990 (#66)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* minor updates

- update graphql query to have hardcoded offset/limit (to resolve error)
- remove comments
- add placeholder 'refresh date' message and css
- move css for main body to accomodate above message

* add firefly icon

---------

Co-authored-by: Tyrone Tse <[email protected]>

* ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

* Added function hideQuickLinks()

* Added the hide field to the  shared-quicklinks config/worksheet
/blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
/scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
/scripts/site-config.js : Updated function to include the hide field

* Refactored the If statement logic

* Assets 98992- Campaign details/overview (#69)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

* gmo-campagin-list refactored to use  persisted query function
	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

* Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
Refactored the code for Repaginate for when the number of items page is changed
Show current page status

* graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
Deleted function  graphqlCampaignPaginated(first,cursor)

Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

* Fixed logic in calculating the nextCursor

* Removed all debug console.log statements

* Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

* Renamed the variable testConfig to headerConfig

* Campaign details block (#71)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* add status bar display

Also adjusted demo data slightly to include due date and lead

* update css/html to align with mockup and mvp

* resolve border bug

* implemented requested changes

* ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

---------

Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

* Updated function toggleOption : To only allow a single option to be selected in the dropdown list

---------

Co-authored-by: Shivani gupta <[email protected]>

* Assets 98993 (#75)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* resolve pr comments

* Release 05.09.2024 (#78)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

---------

Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>

* ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Assets 98994 (#81)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* initial changeover from static to dynamic data

* adjustments based on feedback

* additional changes based on feedback

* minor bugfix, null checks

* squash final bug with read more

* final touches

* combine two graphql functions with duplicated code

* bugfixes per pr review

* ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
Updated Geo dropdown list to be populated by graphql persisted query getGeoList

* Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
When a Business Line option is deselected then the Products List shows all products.

* Reduced the sample dropdown list options

* make links configurable, remove extraneous logs (#83)

* ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Removed comment

* ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Added function searchAsset(programName, campaignName) to get the asset URL

* Changed alt text to use assets repo-name property

* Renamed/Moved AssetsDatasource.js to /scripts/assets
gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
otherwise the values from blockConfig are overwritten when paginating to next page.

gmo-campaign-details.js : Added campaign Image
gmo-campaign-details.css : Updated CSS to display campaign Image

* gmo-campaign-list.js : Deleted comment
/scripts/assets.js : Updated to use createSearchEndpoint
/scripts/scripts.js : Added export to  export function createSearchEndpoint() {

* Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

* gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
/scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

* Assets 98996 (#88)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* ASSETS-88905 : Add Fields to the Overview Tab (#87)

* Added Target Market Area lists

function function createKPI(kpi)  is renamed createLI(li)

Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

* gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
gmo-campaign-details.js : Added Target Market Area and Platforms
refactored async function buildChannelScope(scopeTypeId, scopes, block)
to be able to display data for data based for a specified  CSS ID

* Added function getUniqueItems(items, property)
to get unique values for deliverableType and platforms

* Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
to  async function buildFieldScopes(scopeTypeId, scopes, block)

* Added global variable globalGraphFliter (#92)

Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
with graphFilter = currentGraphqlFilter

* Assets 98996 (#93)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* add deliverabletype graphql

- todo: refactor, some superfluous function(s) can be removed

* refactor product list to use graphql

* fix deliverable type tags, fix multiline text

* fix sort on marketing moments column

* removing merge artifact

* resolve PR comments

* platforms mapping with graphql (#94)

- also cleaned up extraneous/defunct code

* Refactor sort icons (#95)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

* assets.js : Refactored code to eliminate console.log error
gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

* Eliminated  JavaScript errors when image is not found

* Display total assets = 0 when the campaign image does not exist

* Code cleanup (#98)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

* Code cleanup part 2 (#100)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* Added  function closeAllDropDowns() (#101)

Added function handleClickOutside(event)

Updated function attachEventListeners()
    // Add event listener for clicks outside of dropdowns
    document.addEventListener('click', handleClickOutside);

Added function  resetProductsDropDown();

Updated  function resetAllFilters() to call function   resetProductsDropDown();

* Sticky deliverables header, update graphql endpoints (#102)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* update query endpoints, css tweak on deliverables

* Added tool tip for Program Name and Campaign Name (#103)

* remove duplicate icons

* Change default items per page from 4 to 8
Changed undefined message for Campaign to  Marketing Moment Not Available

* Remove debugging from graphql.js

* Deleted function debug_console()

---------

Co-authored-by: Shivani Gupta <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>

* Performance refactoring (#107)

* performance refactoring

- improve thumbnail performance by makin async
- format date property to yyyy-mm-dd
- fix margin issue in program header
- refactor function that builds header dropdown for increased
  performance

* resolve bug with event listeners not attaching

* add programID parameter to deliverable query (#109)

* add programID parameter to deliverable query

* quick null check for status color

* remove console log

* Update query names, handle formatting (#110)

* update query names

* handle null deliverable types

* make dateFormat function available to detail block

* remove unused function

* remove console log messages

* fix typo in graphql query name (#111)

* ASSETS-88914 : Fix Pagination Frontend Code (#108)

* Changed the default number items per page to 4
Added function  debounce(func, wait)  to delay the Previous and Next page to wait 0.5 seconds between each click, to stop the user clicking too fast and breaking pagination

* Decrease debounce timeout to 200 milliseconds (0.2 secs)

* Added check that next page cannot go past last page
Added check that prev page cannot go back past page 1

* fix(pagination): Ensure proper handling of next/prev buttons and page boundaries

- Added totalPages calculation and checks to ensure "Next" button is disabled on the last page
- Updated nextPage function to correctly enable/disable pagination buttons
- Improved prevPage function to ensure it navigates back to the first page correctly
- Applied debounce to prevent rapid clicking issues
- Refactored logic for enabling/disabling pagination buttons based on current page state

* - Changed default items per page to 8
- Removed 4 items per page from filter
- Removed cusorArray, and replaced it with  currentPageInfo.previousCursor =  currentPageInfo.currentCursor;
- Set next cursor to  data.programPaginated.pageInfo.endCursor;
- Function prevPage now uses  currentPage.previousCursor as the cursor parameter value, and calculating the cursor value to use from cursorArray is no longer needed.

* Increased the click delay to 500 milliseconds

* Disabled the Previous and Next Button as soon as they are clicked, to prevent the user multiple clicking the button.

* Restored previous logic using cursorArray to manage the calculation of the cursor for the previous page. (#113)

* Adjust height of deliverables tab on program-details block (#114)

* minor css changes for program details

* adjust deliverables table height

* add min height to deliverables table

* remove commented css

* Sort deliverable type array before rows are made

* DXI-26587- Modify landing page for v3 Hub, so Signin goes to CH/v4 (#116)

* Replace throwing 404 error when the asset is not found, with asset.svg icon (#119)

* Make content fragment path for WF mappings configurable (#118)

* refactoring to use single graphql endpoint for map

* refactor 'mapping' functions

- refactor mapping retrieval functions in all three hcv blocks

* Remove comments

* remove unused function stub

* resolve bug in header filter refresh

* remove unused import

* Fixed issue where header didn't load if the user didn't have a profile yet (#121)

Co-authored-by: Mathieu Lessard <[email protected]>

* add checks for null 'review link' and 'final asset' (#122)

* Refactor header and query variable extraction (#123)

* add checks for null 'review link' and 'final asset'

* Add msg for programs with no data available

* refactor header so it can be used with no data

* wrap msg with div for styling

* refactor query variable extraction

- had to account for ampersand in program name

* Updated Product List (#117)

* Product list updated

* N/A value and label now match

* Fixed formatting

---------

Co-authored-by: Mathieu Lessard <[email protected]>

* Restored calling the function attatchEventListerners() at the end of the function decorate(block) (#124)

* Fix text wrapping issue in Project Owner column for smaller viewports (#125)

- Adjusted CSS to ensure text in the "Project Owner" column wraps properly
- Set row height to auto and adjusted line-height for better spacing
- Added media query for responsive width adjustments
- Ensured consistent display and improved readability across different viewport sizes

* ASSETS-88920 : Cosmetic Updates from MVP Feedback (#126)

* feat: Add Geo column to program list and adjust column widths for proper alignment

- Updated `gmo-program-list.js` to include Geo column in the header configuration and campaign list
- Adjusted column widths in `gmo-program-list.css` to ensure proper alignment under each column heading
- Add function `formatGeos` to format Geo array as comma-delimited list, that is displayed in the Geo column

* - Added a tooltip to the "Total Approved Assets" field in the Deliverables tab.
- Tooltip text provides instructions to view assets: "To view the assets, go to the 'All Asset' search page and use Program and Campaign name facet to filter the assets."
- Styled the tooltip to match the color and background of the Launch Date tooltip.
- Ensured the tooltip text appears on one line and positioned it correctly.
- Updated the "Total Asset" label to "Total Approved Asset"
- Updated the "Deliverable Name" column name to "Deliverable Task Name"

* - Added the Driver detail in Overview Tab next to Launch date like "Project Owner: Aina Tchoshanova"
- Update the Project "Owner column" label to "Task Owner"

* ASSETS-88921 : Marketing Moments Clickable Title and Underdevelopment Icon for ProgramNames/Campaigns (#128)

* feat: Change cursor to pointer for campaign name label and text

- Added CSS to change cursor to pointer on hover for .campaign-name-label and .campaign-name span.

feat: Add click event to campaign name label and text

- Updated buildCampaignList function to add click event listener to campaign name label and text.
- Clicking on the campaign name label or text now navigates to campaignDetailsLink.
- Ensured the appearance of the label and text remains unchanged while adding navigation functionality.

feat:  Rename "Review Link" to "QA Files" in the "Deliverable" task tab

- Updated Program Details column text/header to  QA files
- Updated CSS class from review-link to qa-files

* - feature :  When a campaign does not have an image assigned display the underdevelopment icon
Updated function searchAsset(programName, campaignName, imageWidth = 80) to get the  underdevelopment icon from site-config worksheet shared-branding worksheet

* Sorted the options in the dropdown lists alphabetically on the options text field (#131)

* ASSETS-88922 : Review the Deliverable page load time (#130)

* Improve page load time by parallelizing API calls and adding debug logs

- Updated `decorate` function to fetch program details and deliverables in parallel using `Promise.all`.
- Added console logs before and after API calls to help with debugging.
- Maintained existing functionality while optimizing performance by reducing sequential API calls.

* Remove logging messages

* feat: Improve performance of gmo-program-details.js

- Implement parallel GraphQL queries to reduce load times.
- Lazy load images using the `loading="lazy"` attribute to improve initial load performance.
- Batch DOM updates using `document.createDocumentFragment()` to minimize reflows and repaints.
- Debounce event listeners to prevent performance issues caused by rapid firing of events.

These optimizations should enhance the overall performance and responsiveness of the page.

* Optimize header rendering and asynchronous data fetching

- Initiate parallel fetching of program details and deliverables.
- Render a placeholder header immediately to improve perceived load time.
- Update header with actual data once program details are fetched.
- Ensure images are loaded asynchronously without blocking header rendering.

* feat: Inject additional HTML content into main-body-wrapper after header update

- Added HTML content including tab-wrapper, overview, and deliverables sections to the main-body-wrapper div after the header.
- Updated the main-body-wrapper div to include newly provided HTML content for improved user interface and navigation.
- Ensured the content injection occurs after the header update to maintain correct rendering order.

* Added back displaying the back button with arrow icon and program name not available message and no data available message when program

* Updated logic to display the total asset count for an image

* Reverted back to
const programData = await executeQuery(programQueryString);
const deliverables = await executeQuery(deliverableQueryString);

* Restored constant variables for Marketing Goal, KPIs, Target Market, Audiences
    const p0TargetMarketArea = program.p0TargetMarketArea;
    const p1TargetMarketArea = program.p1TargetMarketArea;
    const kpis = buildKPIList(program).outerHTML;
    const targetMarketAreas = buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea).outerHTML;
    const audiences = buildAudienceList(program).outerHTML;
    const artifactLinks = buildArtifactLinks(program).outerHTML;

To make the code more readable, they were removed when the structure of the code was refactored to incrementally build the block.innerHTML, to make the page appear to load faster.

* assets.js (#132)

Added helper function async function getUnderdevelopmentIcon() to display the underdevelopment icon.
Also display the under development icon when  programName and campaignName is null
gmo-program-details.js
When programName and campaignName is null display the under development icon

* gmo-program-details.js
PR Code review change to

* Revert "gmo-program-details.js"

This reverts commit 18ddd12c8fef2fbcb9c56b54735e907f421f17ad.

* gmo-program-details.js
PR code review change to
let imageObject = {imageUrl : '', imageAltText: '', assetCount: 0};
assets.js
PR code review change to
if (!progamName && !campaginName)

* Resolved typo in variable programName

from
  if (!progamName && !campaginName)
to
 if (!programName && !campaignName)

* feat: Improve page load speed and add lazy loading for images (#134)

- Implement debounce for search input to reduce the number of API calls.
- Refactor the `decorate` function for better readability and performance.
- Add lazy loading for images using `IntersectionObserver` to load images only when they come into view.
- Move pagination button toggling to a separate `togglePaginationButtons` function.
- Ensure strict comparison (`===`) for block configuration check.

* ASSETS-88926 : Review and Improve Page Performance of Marketing Moment Landing page (Push Failed) (#137)

* feat: Improve page load speed and add lazy loading for images

- Implement debounce for search input to reduce the number of API calls.
- Refactor the `decorate` function for better readability and performance.
- Add lazy loading for images using `IntersectionObserver` to load images only when they come into view.
- Move pagination button toggling to a separate `togglePaginationButtons` function.
- Ensure strict comparison (`===`) for block configuration check.

* feat: Improve page load speed and add lazy loading for images

- Removed debounce for search
- Added lazy loading for images using `IntersectionObserver` to load images only when they come into view.

* ASSETS-88927 : Toggle Read More Button (#138)

* feat: Add Read More/Read Less toggle functionality

- Added event listener for Read More buttons to toggle text visibility in Marketing Goal and Product Value sections.
- Updated the decorate function to handle Read More/Read Less functionality.

* style: Add hide-overflow class for text truncation

- Added .hide-overflow class to handle text truncation with ellipsis.
- Ensured compatibility with the Read More/Read Less functionality.

* Modified FAQ Nav (#139)

Co-authored-by: Mathieu Lessard <[email protected]>

---------

Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani Gupta <[email protected]>
Co-authored-by: TyroneAEM <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Tyrone Tse <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: shivanigupta <[email protected]>
mathieu-lessard added a commit that referenced this pull request Aug 1, 2024
…ch Date" (#147)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

* Modified formatAssetMetadata() to allow custom dc-format Labels (#79)

* Removed "required" and custom values for fields (#86)

Co-authored-by: Mathieu Lessard <[email protected]>

* Added getBaseConfigPath to Collections Back Button (#89)

* Releasing HCV Dashboard code (#106)

* ASSETS-88894 GRAPHQL Persisted Query Code (#53)

* GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

* Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

* Renamed file test-graphql.js to graphql.js

Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

* Changed queryName to getAllCampaings

* Rollback to 3/15/24 Commit a519a5155c3dd57f0c54ea8bd336cd0a231cffab before adding GraphQL test code

* Delete test graphql code

* ASSETS-88895 : Show HCV report pages to limited users (#55)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Campaign List block for Marketing Dashboard page (#56)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

---------

Co-authored-by: Michael Dickson <[email protected]>

* updated hydration-utils.js (#54)

MH: Added Firefly  product to AA Modal 'Product' Field List

* Assets 98990 - Dynamic campaign list (#61)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

* Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

Which calls the persisted query gmo/filter-on-marketing-initiative
with example parameters

{
  "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
}

https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

* Campaign List filters display (#65)

* initial html structure setup

* refactor from select to div implementation

Select with multiselect displays as a list, not a dropdown

* finish refactor, enable visual functionality

- added all javascript needed for visual functionality
- finished refactoring structure

* Assets 98990 (#66)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* minor updates

- update graphql query to have hardcoded offset/limit (to resolve error)
- remove comments
- add placeholder 'refresh date' message and css
- move css for main body to accomodate above message

* add firefly icon

---------

Co-authored-by: Tyrone Tse <[email protected]>

* ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

* Added function hideQuickLinks()

* Added the hide field to the  shared-quicklinks config/worksheet
/blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
/scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
/scripts/site-config.js : Updated function to include the hide field

* Refactored the If statement logic

* Assets 98992- Campaign details/overview (#69)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

* gmo-campagin-list refactored to use  persisted query function
	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

* Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
Refactored the code for Repaginate for when the number of items page is changed
Show current page status

* graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
Deleted function  graphqlCampaignPaginated(first,cursor)

Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

* Fixed logic in calculating the nextCursor

* Removed all debug console.log statements

* Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

* Renamed the variable testConfig to headerConfig

* Campaign details block (#71)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* add status bar display

Also adjusted demo data slightly to include due date and lead

* update css/html to align with mockup and mvp

* resolve border bug

* implemented requested changes

* ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

---------

Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

* Updated function toggleOption : To only allow a single option to be selected in the dropdown list

---------

Co-authored-by: Shivani gupta <[email protected]>

* Assets 98993 (#75)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* resolve pr comments

* Release 05.09.2024 (#78)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

---------

Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>

* ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Assets 98994 (#81)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* initial changeover from static to dynamic data

* adjustments based on feedback

* additional changes based on feedback

* minor bugfix, null checks

* squash final bug with read more

* final touches

* combine two graphql functions with duplicated code

* bugfixes per pr review

* ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
Updated Geo dropdown list to be populated by graphql persisted query getGeoList

* Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
When a Business Line option is deselected then the Products List shows all products.

* Reduced the sample dropdown list options

* make links configurable, remove extraneous logs (#83)

* ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Removed comment

* ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Added function searchAsset(programName, campaignName) to get the asset URL

* Changed alt text to use assets repo-name property

* Renamed/Moved AssetsDatasource.js to /scripts/assets
gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
otherwise the values from blockConfig are overwritten when paginating to next page.

gmo-campaign-details.js : Added campaign Image
gmo-campaign-details.css : Updated CSS to display campaign Image

* gmo-campaign-list.js : Deleted comment
/scripts/assets.js : Updated to use createSearchEndpoint
/scripts/scripts.js : Added export to  export function createSearchEndpoint() {

* Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

* gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
/scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

* Assets 98996 (#88)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* ASSETS-88905 : Add Fields to the Overview Tab (#87)

* Added Target Market Area lists

function function createKPI(kpi)  is renamed createLI(li)

Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

* gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
gmo-campaign-details.js : Added Target Market Area and Platforms
refactored async function buildChannelScope(scopeTypeId, scopes, block)
to be able to display data for data based for a specified  CSS ID

* Added function getUniqueItems(items, property)
to get unique values for deliverableType and platforms

* Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
to  async function buildFieldScopes(scopeTypeId, scopes, block)

* Added global variable globalGraphFliter (#92)

Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
with graphFilter = currentGraphqlFilter

* Assets 98996 (#93)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* add deliverabletype graphql

- todo: refactor, some superfluous function(s) can be removed

* refactor product list to use graphql

* fix deliverable type tags, fix multiline text

* fix sort on marketing moments column

* removing merge artifact

* resolve PR comments

* platforms mapping with graphql (#94)

- also cleaned up extraneous/defunct code

* Refactor sort icons (#95)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

* assets.js : Refactored code to eliminate console.log error
gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

* Eliminated  JavaScript errors when image is not found

* Display total assets = 0 when the campaign image does not exist

* Code cleanup (#98)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

* Code cleanup part 2 (#100)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* Added  function closeAllDropDowns() (#101)

Added function handleClickOutside(event)

Updated function attachEventListeners()
    // Add event listener for clicks outside of dropdowns
    document.addEventListener('click', handleClickOutside);

Added function  resetProductsDropDown();

Updated  function resetAllFilters() to call function   resetProductsDropDown();

* Sticky deliverables header, update graphql endpoints (#102)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* update query endpoints, css tweak on deliverables

* Added tool tip for Program Name and Campaign Name (#103)

* remove duplicate icons

---------

Co-authored-by: TyroneAEM <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Tyrone Tse <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88912 : [Issue] Last page number is not matching with total number of pages (#105)

* ASSETS-88894 GRAPHQL Persisted Query Code (#53)

* GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

* Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

* Renamed file test-graphql.js to graphql.js

Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

* Changed queryName to getAllCampaings

* Rollback to 3/15/24 Commit a519a5155c3dd57f0c54ea8bd336cd0a231cffab before adding GraphQL test code

* Delete test graphql code

* ASSETS-88895 : Show HCV report pages to limited users (#55)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Campaign List block for Marketing Dashboard page (#56)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

---------

Co-authored-by: Michael Dickson <[email protected]>

* updated hydration-utils.js (#54)

MH: Added Firefly  product to AA Modal 'Product' Field List

* Assets 98990 - Dynamic campaign list (#61)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

* Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

Which calls the persisted query gmo/filter-on-marketing-initiative
with example parameters

{
  "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
}

https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

* Campaign List filters display (#65)

* initial html structure setup

* refactor from select to div implementation

Select with multiselect displays as a list, not a dropdown

* finish refactor, enable visual functionality

- added all javascript needed for visual functionality
- finished refactoring structure

* Assets 98990 (#66)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* minor updates

- update graphql query to have hardcoded offset/limit (to resolve error)
- remove comments
- add placeholder 'refresh date' message and css
- move css for main body to accomodate above message

* add firefly icon

---------

Co-authored-by: Tyrone Tse <[email protected]>

* ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

* Added function hideQuickLinks()

* Added the hide field to the  shared-quicklinks config/worksheet
/blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
/scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
/scripts/site-config.js : Updated function to include the hide field

* Refactored the If statement logic

* Assets 98992- Campaign details/overview (#69)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

* gmo-campagin-list refactored to use  persisted query function
	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

* Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
Refactored the code for Repaginate for when the number of items page is changed
Show current page status

* graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
Deleted function  graphqlCampaignPaginated(first,cursor)

Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

* Fixed logic in calculating the nextCursor

* Removed all debug console.log statements

* Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

* Renamed the variable testConfig to headerConfig

* Campaign details block (#71)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* add status bar display

Also adjusted demo data slightly to include due date and lead

* update css/html to align with mockup and mvp

* resolve border bug

* implemented requested changes

* ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

---------

Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

* Updated function toggleOption : To only allow a single option to be selected in the dropdown list

---------

Co-authored-by: Shivani gupta <[email protected]>

* Assets 98993 (#75)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* resolve pr comments

* Release 05.09.2024 (#78)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

---------

Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>

* ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Assets 98994 (#81)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* initial changeover from static to dynamic data

* adjustments based on feedback

* additional changes based on feedback

* minor bugfix, null checks

* squash final bug with read more

* final touches

* combine two graphql functions with duplicated code

* bugfixes per pr review

* ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
Updated Geo dropdown list to be populated by graphql persisted query getGeoList

* Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
When a Business Line option is deselected then the Products List shows all products.

* Reduced the sample dropdown list options

* make links configurable, remove extraneous logs (#83)

* ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Removed comment

* ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Added function searchAsset(programName, campaignName) to get the asset URL

* Changed alt text to use assets repo-name property

* Renamed/Moved AssetsDatasource.js to /scripts/assets
gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
otherwise the values from blockConfig are overwritten when paginating to next page.

gmo-campaign-details.js : Added campaign Image
gmo-campaign-details.css : Updated CSS to display campaign Image

* gmo-campaign-list.js : Deleted comment
/scripts/assets.js : Updated to use createSearchEndpoint
/scripts/scripts.js : Added export to  export function createSearchEndpoint() {

* Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

* gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
/scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

* Assets 98996 (#88)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* ASSETS-88905 : Add Fields to the Overview Tab (#87)

* Added Target Market Area lists

function function createKPI(kpi)  is renamed createLI(li)

Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

* gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
gmo-campaign-details.js : Added Target Market Area and Platforms
refactored async function buildChannelScope(scopeTypeId, scopes, block)
to be able to display data for data based for a specified  CSS ID

* Added function getUniqueItems(items, property)
to get unique values for deliverableType and platforms

* Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
to  async function buildFieldScopes(scopeTypeId, scopes, block)

* Added global variable globalGraphFliter (#92)

Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
with graphFilter = currentGraphqlFilter

* Assets 98996 (#93)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* add deliverabletype graphql

- todo: refactor, some superfluous function(s) can be removed

* refactor product list to use graphql

* fix deliverable type tags, fix multiline text

* fix sort on marketing moments column

* removing merge artifact

* resolve PR comments

* platforms mapping with graphql (#94)

- also cleaned up extraneous/defunct code

* Refactor sort icons (#95)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

* assets.js : Refactored code to eliminate console.log error
gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

* Eliminated  JavaScript errors when image is not found

* Display total assets = 0 when the campaign image does not exist

* Code cleanup (#98)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

* Code cleanup part 2 (#100)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* Added  function closeAllDropDowns() (#101)

Added function handleClickOutside(event)

Updated function attachEventListeners()
    // Add event listener for clicks outside of dropdowns
    document.addEventListener('click', handleClickOutside);

Added function  resetProductsDropDown();

Updated  function resetAllFilters() to call function   resetProductsDropDown();

* Sticky deliverables header, update graphql endpoints (#102)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* update query endpoints, css tweak on deliverables

* Added tool tip for Program Name and Campaign Name (#103)

* remove duplicate icons

* Change default items per page from 4 to 8
Changed undefined message for Campaign to  Marketing Moment Not Available

* Remove debugging from graphql.js

* Deleted function debug_console()

---------

Co-authored-by: Shivani Gupta <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>

* Performance refactoring (#107)

* performance refactoring

- improve thumbnail performance by makin async
- format date property to yyyy-mm-dd
- fix margin issue in program header
- refactor function that builds header dropdown for increased
  performance

* resolve bug with event listeners not attaching

* add programID parameter to deliverable query (#109)

* add programID parameter to deliverable query

* quick null check for status color

* remove console log

* Update query names, handle formatting (#110)

* update query names

* handle null deliverable types

* make dateFormat function available to detail block

* remove unused function

* remove console log messages

* fix typo in graphql query name (#111)

* ASSETS-88914 : Fix Pagination Frontend Code (#108)

* Changed the default number items per page to 4
Added function  debounce(func, wait)  to delay the Previous and Next page to wait 0.5 seconds between each click, to stop the user clicking too fast and breaking pagination

* Decrease debounce timeout to 200 milliseconds (0.2 secs)

* Added check that next page cannot go past last page
Added check that prev page cannot go back past page 1

* fix(pagination): Ensure proper handling of next/prev buttons and page boundaries

- Added totalPages calculation and checks to ensure "Next" button is disabled on the last page
- Updated nextPage function to correctly enable/disable pagination buttons
- Improved prevPage function to ensure it navigates back to the first page correctly
- Applied debounce to prevent rapid clicking issues
- Refactored logic for enabling/disabling pagination buttons based on current page state

* - Changed default items per page to 8
- Removed 4 items per page from filter
- Removed cusorArray, and replaced it with  currentPageInfo.previousCursor =  currentPageInfo.currentCursor;
- Set next cursor to  data.programPaginated.pageInfo.endCursor;
- Function prevPage now uses  currentPage.previousCursor as the cursor parameter value, and calculating the cursor value to use from cursorArray is no longer needed.

* Increased the click delay to 500 milliseconds

* Disabled the Previous and Next Button as soon as they are clicked, to prevent the user multiple clicking the button.

* Restored previous logic using cursorArray to manage the calculation of the cursor for the previous page. (#113)

* Adjust height of deliverables tab on program-details block (#114)

* minor css changes for program details

* adjust deliverables table height

* add min height to deliverables table

* remove commented css

* Sort deliverable type array before rows are made

* DXI-26587- Modify landing page for v3 Hub, so Signin goes to CH/v4 (#116)

* Replace throwing 404 error when the asset is not found, with asset.svg icon (#119)

* Make content fragment path for WF mappings configurable (#118)

* refactoring to use single graphql endpoint for map

* refactor 'mapping' functions

- refactor mapping retrieval functions in all three hcv blocks

* Remove comments

* remove unused function stub

* resolve bug in header filter refresh

* remove unused import

* Fixed issue where header didn't load if the user didn't have a profile yet (#121)

Co-authored-by: Mathieu Lessard <[email protected]>

* add checks for null 'review link' and 'final asset' (#122)

* Refactor header and query variable extraction (#123)

* add checks for null 'review link' and 'final asset'

* Add msg for programs with no data available

* refactor header so it can be used with no data

* wrap msg with div for styling

* refactor query variable extraction

- had to account for ampersand in program name

* Updated Product List (#117)

* Product list updated

* N/A value and label now match

* Fixed formatting

---------

Co-authored-by: Mathieu Lessard <[email protected]>

* Restored calling the function attatchEventListerners() at the end of the function decorate(block) (#124)

* Fix text wrapping issue in Project Owner column for smaller viewports (#125)

- Adjusted CSS to ensure text in the "Project Owner" column wraps properly
- Set row height to auto and adjusted line-height for better spacing
- Added media query for responsive width adjustments
- Ensured consistent display and improved readability across different viewport sizes

* ASSETS-88920 : Cosmetic Updates from MVP Feedback (#126)

* feat: Add Geo column to program list and adjust column widths for proper alignment

- Updated `gmo-program-list.js` to include Geo column in the header configuration and campaign list
- Adjusted column widths in `gmo-program-list.css` to ensure proper alignment under each column heading
- Add function `formatGeos` to format Geo array as comma-delimited list, that is displayed in the Geo column

* - Added a tooltip to the "Total Approved Assets" field in the Deliverables tab.
- Tooltip text provides instructions to view assets: "To view the assets, go to the 'All Asset' search page and use Program and Campaign name facet to filter the assets."
- Styled the tooltip to match the color and background of the Launch Date tooltip.
- Ensured the tooltip text appears on one line and positioned it correctly.
- Updated the "Total Asset" label to "Total Approved Asset"
- Updated the "Deliverable Name" column name to "Deliverable Task Name"

* - Added the Driver detail in Overview Tab next to Launch date like "Project Owner: Aina Tchoshanova"
- Update the Project "Owner column" label to "Task Owner"

* ASSETS-88921 : Marketing Moments Clickable Title and Underdevelopment Icon for ProgramNames/Campaigns (#128)

* feat: Change cursor to pointer for campaign name label and text

- Added CSS to change cursor to pointer on hover for .campaign-name-label and .campaign-name span.

feat: Add click event to campaign name label and text

- Updated buildCampaignList function to add click event listener to campaign name label and text.
- Clicking on the campaign name label or text now navigates to campaignDetailsLink.
- Ensured the appearance of the label and text remains unchanged while adding navigation functionality.

feat:  Rename "Review Link" to "QA Files" in the "Deliverable" task tab

- Updated Program Details column text/header to  QA files
- Updated CSS class from review-link to qa-files

* - feature :  When a campaign does not have an image assigned display the underdevelopment icon
Updated function searchAsset(programName, campaignName, imageWidth = 80) to get the  underdevelopment icon from site-config worksheet shared-branding worksheet

* Sorted the options in the dropdown lists alphabetically on the options text field (#131)

* ASSETS-88922 : Review the Deliverable page load time (#130)

* Improve page load time by parallelizing API calls and adding debug logs

- Updated `decorate` function to fetch program details and deliverables in parallel using `Promise.all`.
- Added console logs before and after API calls to help with debugging.
- Maintained existing functionality while optimizing performance by reducing sequential API calls.

* Remove logging messages

* feat: Improve performance of gmo-program-details.js

- Implement parallel GraphQL queries to reduce load times.
- Lazy load images using the `loading="lazy"` attribute to improve initial load performance.
- Batch DOM updates using `document.createDocumentFragment()` to minimize reflows and repaints.
- Debounce event listeners to prevent performance issues caused by rapid firing of events.

These optimizations should enhance the overall performance and responsiveness of the page.

* Optimize header rendering and asynchronous data fetching

- Initiate parallel fetching of program details and deliverables.
- Render a placeholder header immediately to improve perceived load time.
- Update header with actual data once program details are fetched.
- Ensure images are loaded asynchronously without blocking header rendering.

* feat: Inject additional HTML content into main-body-wrapper after header update

- Added HTML content including tab-wrapper, overview, and deliverables sections to the main-body-wrapper div after the header.
- Updated the main-body-wrapper div to include newly provided HTML content for improved user interface and navigation.
- Ensured the content injection occurs after the header update to maintain correct rendering order.

* Added back displaying the back button with arrow icon and program name not available message and no data available message when program

* Updated logic to display the total asset count for an image

* Reverted back to
const programData = await executeQuery(programQueryString);
const deliverables = await executeQuery(deliverableQueryString);

* Restored constant variables for Marketing Goal, KPIs, Target Market, Audiences
    const p0TargetMarketArea = program.p0TargetMarketArea;
    const p1TargetMarketArea = program.p1TargetMarketArea;
    const kpis = buildKPIList(program).outerHTML;
    const targetMarketAreas = buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea).outerHTML;
    const audiences = buildAudienceList(program).outerHTML;
    const artifactLinks = buildArtifactLinks(program).outerHTML;

To make the code more readable, they were removed when the structure of the code was refactored to incrementally build the block.innerHTML, to make the page appear to load faster.

* assets.js (#132)

Added helper function async function getUnderdevelopmentIcon() to display the underdevelopment icon.
Also display the under development icon when  programName and campaignName is null
gmo-program-details.js
When programName and campaignName is null display the under development icon

* gmo-program-details.js
PR Code review change to

* Revert "gmo-program-details.js"

This reverts commit 18ddd12c8fef2fbcb9c56b54735e907f421f17ad.

* gmo-program-details.js
PR code review change to
let imageObject = {imageUrl : '', imageAltText: '', assetCount: 0};
assets.js
PR code review change to
if (!progamName && !campaginName)

* Resolved typo in variable programName

from
  if (!progamName && !campaginName)
to
 if (!programName && !campaignName)

* feat: Improve page load speed and add lazy loading for images (#134)

- Implement debounce for search input to reduce the number of API calls.
- Refactor the `decorate` function for better readability and performance.
- Add lazy loading for images using `IntersectionObserver` to load images only when they come into view.
- Move pagination button toggling to a separate `togglePaginationButtons` function.
- Ensure strict comparison (`===`) for block configuration check.

* ASSETS-88926 : Review and Improve Page Performance of Marketing Moment Landing page (Push Failed) (#137)

* feat: Improve page load speed and add lazy loading for images

- Implement debounce for search input to reduce the number of API calls.
- Refactor the `decorate` function for better readability and performance.
- Add lazy loading for images using `IntersectionObserver` to load images only when they come into view.
- Move pagination button toggling to a separate `togglePaginationButtons` function.
- Ensure strict comparison (`===`) for block configuration check.

* feat: Improve page load speed and add lazy loading for images

- Removed debounce for search
- Added lazy loading for images using `IntersectionObserver` to load images only when they come into view.

* ASSETS-88927 : Toggle Read More Button (#138)

* feat: Add Read More/Read Less toggle functionality

- Added event listener for Read More buttons to toggle text visibility in Marketing Goal and Product Value sections.
- Updated the decorate function to handle Read More/Read Less functionality.

* style: Add hide-overflow class for text truncation

- Added .hide-overflow class to handle text truncation with ellipsis.
- Ensured compatibility with the Read More/Read Less functionality.

* Modified FAQ Nav (#139)

Co-authored-by: Mathieu Lessard <[email protected]>

* Updated function  searchAsset(programName, campaignName, deliverableType = '', imageWidth = 80) (#142)

Added new parameter deliverableType, moved parameter  imageWidth to be the last parameter.

* Updated Launch Date label to Proposed Launch Date in Program List (#145)

Updated Launch Date tool tip to and Proposed Launch Date in Program Details page

* Added redirect block which supports regex (#148)

Co-authored-by: Mathieu Lessard <[email protected]>

* Replaced console.log with console.info (#149)

* Added redirect block which supports regex

* Added alert for redirect

* Changed log to info

* Added alert for redirect

* Changed log to info

---------

Co-authored-by: Mathieu Lessard <[email protected]>

---------

Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani Gupta <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: shivanigupta <[email protected]>
mathieu-lessard pushed a commit that referenced this pull request Aug 8, 2024
commit 0659922c04ac5a76e29b135dc534b56ffd1d554d
Author: TyroneAEM <[email protected]>
Date:   Thu Aug 1 12:16:47 2024 -0500

    Branch rc to main => Update the 'Launch Date' label to "Proposed Launch Date" (#147)

    * Added mapping for uuid (#74)

    Co-authored-by: Mathieu Lessard <[email protected]>

    * Removed Prefix from Displayed UUID Value on Assets (#76)

    * Modified formatAssetMetadata() to allow custom dc-format Labels (#79)

    * Removed "required" and custom values for fields (#86)

    Co-authored-by: Mathieu Lessard <[email protected]>

    * Added getBaseConfigPath to Collections Back Button (#89)

    * Releasing HCV Dashboard code (#106)

    * ASSETS-88894 GRAPHQL Persisted Query Code (#53)

    * GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

    * Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

    * Renamed file test-graphql.js to graphql.js

    Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
    Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
    Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

    * Changed queryName to getAllCampaings

    * Rollback to 3/15/24 Commit a519a5155c3dd57f0c54ea8bd336cd0a231cffab before adding GraphQL test code

    * Delete test graphql code

    * ASSETS-88895 : Show HCV report pages to limited users (#55)

    * security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

    site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

    * securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
    Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
    The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

    Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

    * Campaign List block for Marketing Dashboard page (#56)

    * initial commit, new blocks/files

    * rename files, start implementing

    * continuing to implement/adjust styling

    * numerous changes

    - finish building bones of list component
    - build bones of pagination/footer
    - add icons for products (will likely need more)
    - build javascript for pagination (cleanup needed)
    - build javascript for sorting list

    ---------

    Co-authored-by: Michael Dickson <[email protected]>

    * updated hydration-utils.js (#54)

    MH: Added Firefly  product to AA Modal 'Product' Field List

    * Assets 98990 - Dynamic campaign list (#61)

    * initial commit, new blocks/files

    * rename files, start implementing

    * continuing to implement/adjust styling

    * numerous changes

    - finish building bones of list component
    - build bones of pagination/footer
    - add icons for products (will likely need more)
    - build javascript for pagination (cleanup needed)
    - build javascript for sorting list

    * finish pagination

    * Updates to css/js to better align to mockup

    * ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

    * security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

    site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

    * securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
    Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
    The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

    Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

    * Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

    * Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

    Which calls the persisted query gmo/filter-on-marketing-initiative
    with example parameters

    {
      "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
    }

    https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

    * Campaign List filters display (#65)

    * initial html structure setup

    * refactor from select to div implementation

    Select with multiselect displays as a list, not a dropdown

    * finish refactor, enable visual functionality

    - added all javascript needed for visual functionality
    - finished refactoring structure

    * Assets 98990 (#66)

    * initial commit, new blocks/files

    * rename files, start implementing

    * continuing to implement/adjust styling

    * numerous changes

    - finish building bones of list component
    - build bones of pagination/footer
    - add icons for products (will likely need more)
    - build javascript for pagination (cleanup needed)
    - build javascript for sorting list

    * finish pagination

    * Updates to css/js to better align to mockup

    * minor updates

    - update graphql query to have hardcoded offset/limit (to resolve error)
    - remove comments
    - add placeholder 'refresh date' message and css
    - move css for main body to accomodate above message

    * add firefly icon

    ---------

    Co-authored-by: Tyrone Tse <[email protected]>

    * ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

    * Added function hideQuickLinks()

    * Added the hide field to the  shared-quicklinks config/worksheet
    /blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
    /scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
    /scripts/site-config.js : Updated function to include the hide field

    * Refactored the If statement logic

    * Assets 98992- Campaign details/overview (#69)

    * initial block structure

    * start mocking up structure

    * many changes

    - finish overview tab mockup
    - (mostly) finish deliverables tab

    * fix css- add top/bottom borders to rows

    * delete invalid metadata from new svgs

    * updates for mvp

    - Rename and hide various elements of page
    - Refactor tablebuilding function to deal with items that are missing
      categorization properties

    * hide total assets

    * ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

    * gmo-campagin-list refactored to use  persisted query function
    	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

    * Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
    Refactored the code for Repaginate for when the number of items page is changed
    Show current page status

    * graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
    Deleted function  graphqlCampaignPaginated(first,cursor)

    Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

    * Fixed logic in calculating the nextCursor

    * Removed all debug console.log statements

    * Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

    * Renamed the variable testConfig to headerConfig

    * Campaign details block (#71)

    * initial block structure

    * start mocking up structure

    * many changes

    - finish overview tab mockup
    - (mostly) finish deliverables tab

    * fix css- add top/bottom borders to rows

    * delete invalid metadata from new svgs

    * updates for mvp

    - Rename and hide various elements of page
    - Refactor tablebuilding function to deal with items that are missing
      categorization properties

    * hide total assets

    * add status bar display

    Also adjusted demo data slightly to include due date and lead

    * update css/html to align with mockup and mvp

    * resolve border bug

    * implemented requested changes

    * ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

    * graphql.js : Added functions graphqlProductList and graphqlStatusList
    gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
    Updated code to build Product dropdown from function graphqlProductList

    * /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
    which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

    /blocks/gmo-campaign-header/gmo-campaign-header.js :
    Created new function sendGmoCampaignListBlockEvent()
    that calls the custom event   gmoCampaignListBlock
    from the gmo-campaign-header.

    This will trigger the custom event in the /blocks/gmo-campaign-list
    to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
    Business Line
    Status and Product

    * graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
    Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

    /blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

    /blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
    Updated the function decorate to have new parameter graphQLFilter
    So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

    * Adde autocomplete list CSS, JS and HMTL for the campaign search field.

    * graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
    gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
    /gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

    * gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
    gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
    graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

    * Removed console.log messages

    * Fixed bug with currentPageInfo.nextCursor

    * Fixed bug in calculation of cursor to use for the previous page logic

    * graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
    Variables baseApiUrl and projectId are now global/class level variables.

    gmo-campaign-header.js : Close dropdown list when a value is selected

    * update campaign with program

    ---------

    Co-authored-by: Shivani gupta <[email protected]>

    * ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

    * graphql.js : Added functions graphqlProductList and graphqlStatusList
    gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
    Updated code to build Product dropdown from function graphqlProductList

    * /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
    which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

    /blocks/gmo-campaign-header/gmo-campaign-header.js :
    Created new function sendGmoCampaignListBlockEvent()
    that calls the custom event   gmoCampaignListBlock
    from the gmo-campaign-header.

    This will trigger the custom event in the /blocks/gmo-campaign-list
    to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
    Business Line
    Status and Product

    * graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
    Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

    /blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

    /blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
    Updated the function decorate to have new parameter graphQLFilter
    So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

    * Adde autocomplete list CSS, JS and HMTL for the campaign search field.

    * graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
    gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
    /gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

    * gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
    gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
    graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

    * Removed console.log messages

    * Fixed bug with currentPageInfo.nextCursor

    * Fixed bug in calculation of cursor to use for the previous page logic

    * graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
    Variables baseApiUrl and projectId are now global/class level variables.

    gmo-campaign-header.js : Close dropdown list when a value is selected

    * update campaign with program

    * Updated function toggleOption : To only allow a single option to be selected in the dropdown list

    ---------

    Co-authored-by: Shivani gupta <[email protected]>

    * Assets 98993 (#75)

    * many updates

    * finish dynamic properties

    - all properties should be dynamic based on graphql data
    - refactored some common lookups to a shared javascript file
    - updated overflow for overview/description
    - made status, products more presentable
    - more elegant handling of empty audience and kpi lists

    * test rename svg to resolve issue

    * finish updating icon names and mapping

    * resolve pr comments

    * Release 05.09.2024 (#78)

    * Added mapping for uuid (#74)

    Co-authored-by: Mathieu Lessard <[email protected]>

    * Removed Prefix from Displayed UUID Value on Assets (#76)

    ---------

    Co-authored-by: Mathieu Lessard <[email protected]>
    Co-authored-by: Christopher Heintzman <[email protected]>

    * ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

    * Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

    * Fixed Previous Page pagination logic for calculating the cursor for the Previous page

    * Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

    * Assets 98994 (#81)

    * many updates

    * finish dynamic properties

    - all properties should be dynamic based on graphql data
    - refactored some common lookups to a shared javascript file
    - updated overflow for overview/description
    - made status, products more presentable
    - more elegant handling of empty audience and kpi lists

    * test rename svg to resolve issue

    * finish updating icon names and mapping

    * initial changeover from static to dynamic data

    * adjustments based on feedback

    * additional changes based on feedback

    * minor bugfix, null checks

    * squash final bug with read more

    * final touches

    * combine two graphql functions with duplicated code

    * bugfixes per pr review

    * ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

    * Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

    * Fixed Previous Page pagination logic for calculating the cursor for the Previous page

    * Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

    * Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
    Updated Geo dropdown list to be populated by graphql persisted query getGeoList

    * Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
    When a Business Line option is deselected then the Products List shows all products.

    * Reduced the sample dropdown list options

    * make links configurable, remove extraneous logs (#83)

    * ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

    * Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

    * Removed comment

    * ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

    * Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

    * Added function searchAsset(programName, campaignName) to get the asset URL

    * Changed alt text to use assets repo-name property

    * Renamed/Moved AssetsDatasource.js to /scripts/assets
    gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
    otherwise the values from blockConfig are overwritten when paginating to next page.

    gmo-campaign-details.js : Added campaign Image
    gmo-campaign-details.css : Updated CSS to display campaign Image

    * gmo-campaign-list.js : Deleted comment
    /scripts/assets.js : Updated to use createSearchEndpoint
    /scripts/scripts.js : Added export to  export function createSearchEndpoint() {

    * Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

    * gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
    /scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

    * Assets 98996 (#88)

    * initial grouping functionality

    * add sorting, label mappings

    * readd expand/collapse chevrons, add counts

    * add sort by date in groups

    * add important links dynamic generation

    * resolve bug with detailpage link

    * adjust width on links in deliverables tab

    * merge 12024 in and adjust width for links

    * update property name for revised completion date

    * implement graphql query for status mapping

    * ASSETS-88905 : Add Fields to the Overview Tab (#87)

    * Added Target Market Area lists

    function function createKPI(kpi)  is renamed createLI(li)

    Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

    * gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
    gmo-campaign-details.js : Added Target Market Area and Platforms
    refactored async function buildChannelScope(scopeTypeId, scopes, block)
    to be able to display data for data based for a specified  CSS ID

    * Added function getUniqueItems(items, property)
    to get unique values for deliverableType and platforms

    * Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
    to  async function buildFieldScopes(scopeTypeId, scopes, block)

    * Added global variable globalGraphFliter (#92)

    Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
    with graphFilter = currentGraphqlFilter

    * Assets 98996 (#93)

    * initial grouping functionality

    * add sorting, label mappings

    * readd expand/collapse chevrons, add counts

    * add sort by date in groups

    * add important links dynamic generation

    * resolve bug with detailpage link

    * adjust width on links in deliverables tab

    * merge 12024 in and adjust width for links

    * update property name for revised completion date

    * implement graphql query for status mapping

    * add deliverabletype graphql

    - todo: refactor, some superfluous function(s) can be removed

    * refactor product list to use graphql

    * fix deliverable type tags, fix multiline text

    * fix sort on marketing moments column

    * removing merge artifact

    * resolve PR comments

    * platforms mapping with graphql (#94)

    - also cleaned up extraneous/defunct code

    * Refactor sort icons (#95)

    * platforms mapping with graphql

    - also cleaned up extraneous/defunct code

    * refactor chevrons for column sort

    * add title attribs

    * ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

    * assets.js : Refactored code to eliminate console.log error
    gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

    * Eliminated  JavaScript errors when image is not found

    * Display total assets = 0 when the campaign image does not exist

    * Code cleanup (#98)

    * platforms mapping with graphql

    - also cleaned up extraneous/defunct code

    * refactor chevrons for column sort

    * add title attribs

    * remove kpi column

    * rename blocks

    * cleaning up redundant code

    * continuing cleanup

    * fix pagination bug

    * fix css bug in audience card

    * Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

    * Code cleanup part 2 (#100)

    * platforms mapping with graphql

    - also cleaned up extraneous/defunct code

    * refactor chevrons for column sort

    * add title attribs

    * remove kpi column

    * rename blocks

    * cleaning up redundant code

    * continuing cleanup

    * fix pagination bug

    * fix css bug in audience card

    * cleanup, readd missing row

    - remove commented code
    - remove commented html
    - readd campaign name to overview tab if available

    * resolve undone null check for product label

    * handle bad response from product icon map

    * Added  function closeAllDropDowns() (#101)

    Added function handleClickOutside(event)

    Updated function attachEventListeners()
        // Add event listener for clicks outside of dropdowns
        document.addEventListener('click', handleClickOutside);

    Added function  resetProductsDropDown();

    Updated  function resetAllFilters() to call function   resetProductsDropDown();

    * Sticky deliverables header, update graphql endpoints (#102)

    * platforms mapping with graphql

    - also cleaned up extraneous/defunct code

    * refactor chevrons for column sort

    * add title attribs

    * remove kpi column

    * rename blocks

    * cleaning up redundant code

    * continuing cleanup

    * fix pagination bug

    * fix css bug in audience card

    * cleanup, readd missing row

    - remove commented code
    - remove commented html
    - readd campaign name to overview tab if available

    * resolve undone null check for product label

    * handle bad response from product icon map

    * update query endpoints, css tweak on deliverables

    * Added tool tip for Program Name and Campaign Name (#103)

    * remove duplicate icons

    ---------

    Co-authored-by: TyroneAEM <[email protected]>
    Co-authored-by: Michael Dickson <[email protected]>
    Co-authored-by: Samruddhi <[email protected]>
    Co-authored-by: mdickson-adbe <[email protected]>
    Co-authored-by: Tyrone Tse <[email protected]>
    Co-authored-by: Shivani gupta <[email protected]>
    Co-authored-by: mathieu-lessard <[email protected]>
    Co-authored-by: Mathieu Lessard <[email protected]>
    Co-authored-by: Christopher Heintzman <[email protected]>
    Co-authored-by: Shivani gupta <[email protected]>

    * ASSETS-88912 : [Issue] Last page number is not matching with total number of pages (#105)

    * ASSETS-88894 GRAPHQL Persisted Query Code (#53)

    * GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

    * Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

    * Renamed file test-graphql.js to graphql.js

    Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
    Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
    Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

    * Changed queryName to getAllCampaings

    * Rollback to 3/15/24 Commit a519a5155c3dd57f0c54ea8bd336cd0a231cffab before adding GraphQL test code

    * Delete test graphql code

    * ASSETS-88895 : Show HCV report pages to limited users (#55)

    * security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

    site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

    * securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
    Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
    The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

    Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

    * Campaign List block for Marketing Dashboard page (#56)

    * initial commit, new blocks/files

    * rename files, start implementing

    * continuing to implement/adjust styling

    * numerous changes

    - finish building bones of list component
    - build bones of pagination/footer
    - add icons for products (will likely need more)
    - build javascript for pagination (cleanup needed)
    - build javascript for sorting list

    ---------

    Co-authored-by: Michael Dickson <[email protected]>

    * updated hydration-utils.js (#54)

    MH: Added Firefly  product to AA Modal 'Product' Field List

    * Assets 98990 - Dynamic campaign list (#61)

    * initial commit, new blocks/files

    * rename files, start implementing

    * continuing to implement/adjust styling

    * numerous changes

    - finish building bones of list component
    - build bones of pagination/footer
    - add icons for products (will likely need more)
    - build javascript for pagination (cleanup needed)
    - build javascript for sorting list

    * finish pagination

    * Updates to css/js to better align to mockup

    * ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

    * security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

    site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

    * securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
    Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
    The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

    Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

    * Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

    * Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

    Which calls the persisted query gmo/filter-on-marketing-initiative
    with example parameters

    {
      "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
    }

    https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

    * Campaign List filters display (#65)

    * initial html structure setup

    * refactor from select to div implementation

    Select with multiselect displays as a list, not a dropdown

    * finish refactor, enable visual functionality

    - added all javascript needed for visual functionality
    - finished refactoring structure

    * Assets 98990 (#66)

    * initial commit, new blocks/files

    * rename files, start implementing

    * continuing to implement/adjust styling

    * numerous changes

    - finish building bones of list component
    - build bones of pagination/footer
    - add icons for products (will likely need more)
    - build javascript for pagination (cleanup needed)
    - build javascript for sorting list

    * finish pagination

    * Updates to css/js to better align to mockup

    * minor updates

    - update graphql query to have hardcoded offset/limit (to resolve error)
    - remove comments
    - add placeholder 'refresh date' message and css
    - move css for main body to accomodate above message

    * add firefly icon

    ---------

    Co-authored-by: Tyrone Tse <[email protected]>

    * ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

    * Added function hideQuickLinks()

    * Added the hide field to the  shared-quicklinks config/worksheet
    /blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
    /scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
    /scripts/site-config.js : Updated function to include the hide field

    * Refactored the If statement logic

    * Assets 98992- Campaign details/overview (#69)

    * initial block structure

    * start mocking up structure

    * many changes

    - finish overview tab mockup
    - (mostly) finish deliverables tab

    * fix css- add top/bottom borders to rows

    * delete invalid metadata from new svgs

    * updates for mvp

    - Rename and hide various elements of page
    - Refactor tablebuilding function to deal with items that are missing
      categorization properties

    * hide total assets

    * ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

    * gmo-campagin-list refactored to use  persisted query function
    	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

    * Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
    Refactored the code for Repaginate for when the number of items page is changed
    Show current page status

    * graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
    Deleted function  graphqlCampaignPaginated(first,cursor)

    Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

    * Fixed logic in calculating the nextCursor

    * Removed all debug console.log statements

    * Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

    * Renamed the variable testConfig to headerConfig

    * Campaign details block (#71)

    * initial block structure

    * start mocking up structure

    * many changes

    - finish overview tab mockup
    - (mostly) finish deliverables tab

    * fix css- add top/bottom borders to rows

    * delete invalid metadata from new svgs

    * updates for mvp

    - Rename and hide various elements of page
    - Refactor tablebuilding function to deal with items that are missing
      categorization properties

    * hide total assets

    * add status bar display

    Also adjusted demo data slightly to include due date and lead

    * update css/html to align with mockup and mvp

    * resolve border bug

    * implemented requested changes

    * ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

    * graphql.js : Added functions graphqlProductList and graphqlStatusList
    gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
    Updated code to build Product dropdown from function graphqlProductList

    * /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
    which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

    /blocks/gmo-campaign-header/gmo-campaign-header.js :
    Created new function sendGmoCampaignListBlockEvent()
    that calls the custom event   gmoCampaignListBlock
    from the gmo-campaign-header.

    This will trigger the custom event in the /blocks/gmo-campaign-list
    to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
    Business Line
    Status and Product

    * graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
    Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

    /blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

    /blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
    Updated the function decorate to have new parameter graphQLFilter
    So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

    * Adde autocomplete list CSS, JS and HMTL for the campaign search field.

    * graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
    gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
    /gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

    * gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
    gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
    graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

    * Removed console.log messages

    * Fixed bug with currentPageInfo.nextCursor

    * Fixed bug in calculation of cursor to use for the previous page logic

    * graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
    Variables baseApiUrl and projectId are now global/class level variables.

    gmo-campaign-header.js : Close dropdown list when a value is selected

    * update campaign with program

    ---------

    Co-authored-by: Shivani gupta <[email protected]>

    * ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

    * graphql.js : Added functions graphqlProductList and graphqlStatusList
    gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
    Updated code to build Product dropdown from function graphqlProductList

    * /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
    which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

    /blocks/gmo-campaign-header/gmo-campaign-header.js :
    Created new function sendGmoCampaignListBlockEvent()
    that calls the custom event   gmoCampaignListBlock
    from the gmo-campaign-header.

    This will trigger the custom event in the /blocks/gmo-campaign-list
    to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
    Business Line
    Status and Product

    * graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
    Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

    /blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

    /blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
    Updated the function decorate to have new parameter graphQLFilter
    So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

    * Adde autocomplete list CSS, JS and HMTL for the campaign search field.

    * graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
    gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
    /gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

    * gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
    gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
    graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

    * Removed console.log messages

    * Fixed bug with currentPageInfo.nextCursor

    * Fixed bug in calculation of cursor to use for the previous page logic

    * graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
    Variables baseApiUrl and projectId are now global/class level variables.

    gmo-campaign-header.js : Close dropdown list when a value is selected

    * update campaign with program

    * Updated function toggleOption : To only allow a single option to be selected in the dropdown list

    ---------

    Co-authored-by: Shivani gupta <[email protected]>

    * Assets 98993 (#75)

    * many updates

    * finish dynamic properties

    - all properties should be dynamic based on graphql data
    - refactored some common lookups to a shared javascript file
    - updated overflow for overview/description
    - made status, products more presentable
    - more elegant handling of empty audience and kpi lists

    * test rename svg to resolve issue

    * finish updating icon names and mapping

    * resolve pr comments

    * Release 05.09.2024 (#78)

    * Added mapping for uuid (#74)

    Co-authored-by: Mathieu Lessard <[email protected]>

    * Removed Prefix from Displayed UUID Value on Assets (#76)

    ---------

    Co-authored-by: Mathieu Lessard <[email protected]>
    Co-authored-by: Christopher Heintzman <[email protected]>

    * ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

    * Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

    * Fixed Previous Page pagination logic for calculating the cursor for the Previous page

    * Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

    * Assets 98994 (#81)

    * many updates

    * finish dynamic properties

    - all properties should be dynamic based on graphql data
    - refactored some common lookups to a shared javascript file
    - updated overflow for overview/description
    - made status, products more presentable
    - more elegant handling of empty audience and kpi lists

    * test rename svg to resolve issue

    * finish updating icon names and mapping

    * initial changeover from static to dynamic data

    * adjustments based on feedback

    * additional changes based on feedback

    * minor bugfix, null checks

    * squash final bug with read more

    * final touches

    * combine two graphql functions with duplicated code

    * bugfixes per pr review

    * ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

    * Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

    * Fixed Previous Page pagination logic for calculating the cursor for the Previous page

    * Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

    * Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
    Updated Geo dropdown list to be populated by graphql persisted query getGeoList

    * Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
    When a Business Line option is deselected then the Products List shows all products.

    * Reduced the sample dropdown list options

    * make links configurable, remove extraneous logs (#83)

    * ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

    * Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

    * Removed comment

    * ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

    * Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

    * Added function searchAsset(programName, campaignName) to get the asset URL

    * Changed alt text to use assets repo-name property

    * Renamed/Moved AssetsDatasource.js to /scripts/assets
    gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
    otherwise the values from blockConfig are overwritten when paginating to next page.

    gmo-campaign-details.js : Added campaign Image
    gmo-campaign-details.css : Updated CSS to display campaign Image

    * gmo-campaign-list.js : Deleted comment
    /scripts/assets.js : Updated to use createSearchEndpoint
    /scripts/scripts.js : Added export to  export function createSearchEndpoint() {

    * Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

    * gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
    /scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

    * Assets 98996 (#88)

    * initial grouping functionality

    * add sorting, label mappings

    * readd expand/collapse chevrons, add counts

    * add sort by date in groups

    * add important links dynamic generation

    * resolve bug with detailpage link

    * adjust width on links in deliverables tab

    * merge 12024 in and adjust width for links

    * update property name for revised completion date

    * implement graphql query for status mapping

    * ASSETS-88905 : Add Fields to the Overview Tab (#87)

    * Added Target Market Area lists

    function function createKPI(kpi)  is renamed createLI(li)

    Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

    * gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
    gmo-campaign-details.js : Added Target Market Area and Platforms
    refactored async function buildChannelScope(scopeTypeId, scopes, block)
    to be able to display data for data based for a specified  CSS ID

    * Added function getUniqueItems(items, property)
    to get unique values for deliverableType and platforms

    * Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
    to  async function buildFieldScopes(scopeTypeId, scopes, block)

    * Added global variable globalGraphFliter (#92)

    Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
    with graphFilter = currentGraphqlFilter

    * Assets 98996 (#93)

    * initial grouping functionality

    * add sorting, label mappings

    * readd expand/collapse chevrons, add counts

    * add sort by date in groups

    * add important links dynamic generation

    * resolve bug with detailpage link

    * adjust width on links in deliverables tab

    * merge 12024 in and adjust width for links

    * update property name for revised completion date

    * implement graphql query for status mapping

    * add deliverabletype graphql

    - todo: refactor, some superfluous function(s) can be removed

    * refactor product list to use graphql

    * fix deliverable type tags, fix multiline text

    * fix sort on marketing moments column

    * removing merge artifact

    * resolve PR comments

    * platforms mapping with graphql (#94)

    - also cleaned up extraneous/defunct code

    * Refactor sort icons (#95)

    * platforms mapping with graphql

    - also cleaned up extraneous/defunct code

    * refactor chevrons for column sort

    * add title attribs

    * ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

    * assets.js : Refactored code to eliminate console.log error
    gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

    * Eliminated  JavaScript errors when image is not found

    * Display total assets = 0 when the campaign image does not exist

    * Code cleanup (#98)

    * platforms mapping with graphql

    - also cleaned up extraneous/defunct code

    * refactor chevrons for column sort

    * add title attribs

    * remove kpi column

    * rename blocks

    * cleaning up redundant code

    * continuing cleanup

    * fix pagination bug

    * fix css bug in audience card

    * Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

    * Code cleanup part 2 (#100)

    * platforms mapping with graphql

    - also cleaned up extraneous/defunct code

    * refactor chevrons for column sort

    * add title attribs

    * remove kpi column

    * rename blocks

    * cleaning up redundant code

    * continuing cleanup

    * fix pagination bug

    * fix css bug in audience card

    * cleanup, readd missing row

    - remove commented code
    - remove commented html
    - readd campaign name to overview tab if available

    * resolve undone null check for product label

    * handle bad response from product icon map

    * Added  function closeAllDropDowns() (#101)

    Added function handleClickOutside(event)

    Updated function attachEventListeners()
        // Add event listener for clicks outside of dropdowns
        document.addEventListener('click', handleClickOutside);

    Added function  resetProductsDropDown();

    Updated  function resetAllFilters() to call function   resetProductsDropDown();

    * Sticky deliverables header, update graphql endpoints (#102)

    * platforms mapping with graphql

    - also cleaned up extraneous/defunct code

    * refactor chevrons for column sort

    * add title attribs

    * remove kpi column

    * rename blocks

    * cleaning up redundant code

    * continuing cleanup

    * fix pagination bug

    * fix css bug in audience card

    * cleanup, readd missing row

    - remove commented code
    - remove commented html
    - readd campaign name to overview tab if available

    * resolve undone null check for product label

    * handle bad response from product icon map

    * update query endpoints, css tweak on deliverables

    * Added tool tip for Program Name and Campaign Name (#103)

    * remove duplicate icons

    * Change default items per page from 4 to 8
    Changed undefined message for Campaign to  Marketing Moment Not Available

    * Remove debugging from graphql.js

    * Deleted function debug_console()

    ---------

    Co-authored-by: Shivani Gupta <[email protected]>
    Co-authored-by: Michael Dickson <[email protected]>
    Co-authored-by: Samruddhi <[email protected]>
    Co-authored-by: mdickson-adbe <[email protected]>
    Co-authored-by: Shivani gupta <[email protected]>
    Co-authored-by: mathieu-lessard <[email protected]>
    Co-authored-by: Mathieu Lessard <[email protected]>
    Co-authored-by: Christopher Heintzman <[email protected]>
    Co-authored-by: Shivani gupta <[email protected]>

    * Performance refactoring (#107)

    * performance refactoring

    - improve thumbnail performance by makin async
    - format date property to yyyy-mm-dd
    - fix margin issue in program header
    - refactor function that builds header dropdown for increased
      performance

    * resolve bug with event listeners not attaching

    * add programID parameter to deliverable query (#109)

    * add programID parameter to deliverable query

    * quick null check for status color

    * remove console log

    * Update query names, handle formatting (#110)

    * update query names

    * handle null deliverable types

    * make dateFormat function available to detail block

    * remove unused function

    * remove console log messages

    * fix typo in graphql query name (#111)

    * ASSETS-88914 : Fix Pagination Frontend Code (#108)

    * Changed the default number items per page to 4
    Added function  debounce(func, wait)  to delay the Previous and Next page to wait 0.5 seconds between each click, to stop the user clicking too fast and breaking pagination

    * Decrease debounce timeout to 200 milliseconds (0.2 secs)

    * Added check that next page cannot go past last page
    Added check that prev page cannot go back past page 1

    * fix(pagination): Ensure proper handling of next/prev buttons and page boundaries

    - Added totalPages calculation and checks to ensure "Next" button is disabled on the last page
    - Updated nextPage function to correctly enable/disable pagination buttons
    - Improved prevPage function to ensure it navigates back to the first page correctly
    - Applied debounce to prevent rapid clicking issues
    - Refactored logic for enabling/disabling pagination buttons based on current page state

    * - Changed default items per page to 8
    - Removed 4 items per page from filter
    - Removed cusorArray, and replaced it with  currentPageInfo.previousCursor =  currentPageInfo.currentCursor;
    - Set next cursor to  data.programPaginated.pageInfo.endCursor;
    - Function prevPage now uses  currentPage.previousCursor as the cursor parameter value, and calculating the cursor value to use from cursorArray is no longer needed.

    * Increased the click delay to 500 milliseconds

    * Disabled the Previous and Next Button as soon as they are clicked, to prevent the user multiple clicking the button.

    * Restored previous logic using cursorArray to manage the calculation of the cursor for the previous page. (#113)

    * Adjust height of deliverables tab on program-details block (#114)

    * minor css changes for program details

    * adjust deliverables table height

    * add min height to deliverables table

    * remove commented css

    * Sort deliverable type array before rows are made

    * DXI-26587- Modify landing page for v3 Hub, so Signin goes to CH/v4 (#116)

    * Replace throwing 404 error when the asset is not found, with asset.svg icon (#119)

    * Make content fragment path for WF mappings configurable (#118)

    * refactoring to use single graphql endpoint for map

    * refactor 'mapping' functions

    - refactor mapping retrieval functions in all three hcv blocks

    * Remove comments

    * remove unused function stub

    * resolve bug in header filter refresh

    * remove unused import

    * Fixed issue where header didn't load if the user didn't have a profile yet (#121)

    Co-authored-by: Mathieu Lessard <[email protected]>

    * add checks for null 'review link' and 'final asset' (#122)

    * Refactor header and query variable extraction (#123)

    * add checks for null 'review link' and 'final asset'

    * Add msg for programs with no data available

    * refactor header so it can be used with no data

    * wrap msg with div for styling

    * refactor query variable extraction

    - had to account for ampersand in program name

    * Updated Product List (#117)

    * Product list updated

    * N/A value and label now match

    * Fixed formatting

    ---------

    Co-authored-by: Mathieu Lessard <[email protected]>

    * Restored calling the function attatchEventListerners() at the end of the function decorate(block) (#124)

    * Fix text wrapping issue in Project Owner column for smaller viewports (#125)

    - Adjusted CSS to ensure text in the "Project Owner" column wraps properly
    - Set row height to auto and adjusted line-height for better spacing
    - Added media query for responsive width adjustments
    - Ensured consistent display and improved readability across different viewport sizes

    * ASSETS-88920 : Cosmetic Updates from MVP Feedback (#126)

    * feat: Add Geo column to program list and adjust column widths for proper alignment

    - Updated `gmo-program-list.js` to include Geo column in the header configuration and campaign list
    - Adjusted column widths in `gmo-program-list.css` to ensure proper alignment under each column heading
    - Add function `formatGeos` to format Geo array as comma-delimited list, that is displayed in the Geo column

    * - Added a tooltip to the "Total Approved Assets" field in the Deliverables tab.
    - Tooltip text provides instructions to view assets: "To view the assets, go to the 'All Asset' search page and use Program and Campaign name facet to filter the assets."
    - Styled the tooltip to match the color and background of the Launch Date tooltip.
    - Ensured the tooltip text appears on one line and positioned it correctly.
    - Updated the "Total Asset" label to "Total Approved Asset"
    - Updated the "Deliverable Name" column name to "Deliverable Task Name"

    * - Added the Driver detail in Overview Tab next to Launch date like "Project Owner: Aina Tchoshanova"
    - Update the Project "Owner column" label to "Task Owner"

    * ASSETS-88921 : Marketing Moments Clickable Title and Underdevelopment Icon for ProgramNames/Campaigns (#128)

    * feat: Change cursor to pointer for campaign name label and text

    - Added CSS to change cursor to pointer on hover for .campaign-name-label and .campaign-name span.

    feat: Add click event to campaign name label and text

    - Updated buildCampaignList function to add click event listener to campaign name label and text.
    - Clicking on the campaign name label or text now navigates to campaignDetailsLink.
    - Ensured the appearance of the label and text remains unchanged while adding navigation functionality.

    feat:  Rename "Review Link" to "QA Files" in the "Deliverable" task tab

    - Updated Program Details column text/header to  QA files
    - Updated CSS class from review-link to qa-files

    * - feature :  When a campaign does not have an image assigned display the underdevelopment icon
    Updated function searchAsset(programName, campaignName, imageWidth = 80) to get the  underdevelopment icon from site-config worksheet shared-branding worksheet

    * Sorted the options in the dropdown lists alphabetically on the options text field (#131)

    * ASSETS-88922 : Review the Deliverable page load time (#130)

    * Improve page load time by parallelizing API calls and adding debug logs

    - Updated `decorate` function to fetch program details and deliverables in parallel using `Promise.all`.
    - Added console logs before and after API calls to help with debugging.
    - Maintained existing functionality while optimizing performance by reducing sequential API calls.

    * Remove logging messages

    * feat: Improve performance of gmo-program-details.js

    - Implement parallel GraphQL queries to reduce load times.
    - Lazy load images using the `loading="lazy"` attribute to improve initial load performance.
    - Batch DOM updates using `document.createDocumentFragment()` to minimize reflows and repaints.
    - Debounce event listeners to prevent performance issues caused by rapid firing of events.

    These optimizations should enhance the overall performance and responsiveness of the page.

    * Optimize header rendering and asynchronous data fetching

    - Initiate parallel fetching of program details and deliverables.
    - Render a placeholder header immediately to improve perceived load time.
    - Update header with actual data once program details are fetched.
    - Ensure images are loaded asynchronously without blocking header rendering.

    * feat: Inject additional HTML content into main-body-wrapper after header update

    - Added HTML content including tab-wrapper, overview, and deliverables sections to the main-body-wrapper div after the header.
    - Updated the main-body-wrapper div to include newly provided HTML content for improved user interface and navigation.
    - Ensured the content injection occurs after the header update to maintain correct rendering order.

    * Added back displaying the back button with arrow icon and program name not available message and no data available message when program

    * Updated logic to display the total asset count for an image

    * Reverted back to
    const programData = await executeQuery(programQueryString);
    const deliverables = await executeQuery(deliverableQueryString);

    * Restored constant variables for Marketing Goal, KPIs, Target Market, Audiences
        const p0TargetMarketArea = program.p0TargetMarketArea;
        const p1TargetMarketArea = program.p1TargetMarketArea;
        const kpis = buildKPIList(program).outerHTML;
        const targetMarketAreas = buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea).outerHTML;
        const audiences = buildAudienceList(program).outerHTML;
        const artifactLinks = buildArtifactLinks(program).outerHTML;

    To make the code more readable, they were removed when the structure of the code was refactored to incrementally build the block.innerHTML, to make the page appear to load faster.

    * assets.js (#132)

    Added helper function async function getUnderdevelopmentIcon() to display the underdevelopment icon.
    Also display the under development icon when  programName and campaignName is null
    gmo-program-details.js
    When programName and campaignName is null display the under development icon

    * gmo-program-details.js
    PR Code review change to

    * Revert "gmo-program-details.js"

    This reverts commit 18ddd12c8fef2fbcb9c56b54735e907f421f17ad.

    * gmo-program-details.js
    PR code review change to
    let imageObject = {imageUrl : '', imageAltText: '', assetCount: 0};
    assets.js
    PR code review change to
    if (!progamName && !campaginName)

    * Resolved typo in variable programName

    from
      if (!progamName && !campaginName)
    to
     if (!programName && !campaignName)

    * feat: Improve page load speed and add lazy loading for images (#134)

    - Implement debounce for search input to reduce the number of API calls.
    - Refactor the `decorate` function for better readability and performance.
    - Add lazy loading for images using `IntersectionObserver` to load images only when they come into view.
    - Move pagination button toggling to a separate `togglePaginationButtons` function.
    - Ensure strict comparison (`===`) for block configuration check.

    * ASSETS-88926 : Review and Improve Page Performance of Marketing Moment Landing page (Push Failed) (#137)

    * feat: Improve page load speed and add lazy loading for images

    - Implement debounce for search input to reduce the number of API calls.
    - Refactor the `decorate` function for better readability and performance.
    - Add lazy loading for images using `IntersectionObserver` to load images only when they come into view.
    - Move pagination button toggling to a separate `togglePaginationButtons` function.
    - Ensure strict comparison (`===`) for block configuration check.

    * feat: Improve page load speed and add lazy loading for images

    - Removed debounce for search
    - Added lazy loading for images using `IntersectionObserver` to load images only when they come into view.

    * ASSETS-88927 : Toggle Read More Button (#138)

    * feat: Add Read More/Read Less toggle functionality

    - Added event listener for Read More buttons to toggle text visibility in Marketing Goal and Product Value sections.
    - Updated the decorate function to handle Read More/Read Less functionality.

    * style: Add hide-overflow class for text truncation

    - Added .hide-overflow class to handle text truncation with ellipsis.
    - Ensured compatibility with the Read More/Read Less functionality.

    * Modified FAQ Nav (#139)

    Co-authored-by: Mathieu…
mathieu-lessard added a commit that referenced this pull request Aug 8, 2024
* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

* Modified formatAssetMetadata() to allow custom dc-format Labels (#79)

* Removed "required" and custom values for fields (#86)

Co-authored-by: Mathieu Lessard <[email protected]>

* Added getBaseConfigPath to Collections Back Button (#89)

* Releasing HCV Dashboard code (#106)

* ASSETS-88894 GRAPHQL Persisted Query Code (#53)

* GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

* Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

* Renamed file test-graphql.js to graphql.js

Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

* Changed queryName to getAllCampaings

* Rollback to 3/15/24 Commit a519a5155c3dd57f0c54ea8bd336cd0a231cffab before adding GraphQL test code

* Delete test graphql code

* ASSETS-88895 : Show HCV report pages to limited users (#55)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Campaign List block for Marketing Dashboard page (#56)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

---------

Co-authored-by: Michael Dickson <[email protected]>

* updated hydration-utils.js (#54)

MH: Added Firefly  product to AA Modal 'Product' Field List

* Assets 98990 - Dynamic campaign list (#61)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

* Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

Which calls the persisted query gmo/filter-on-marketing-initiative
with example parameters

{
  "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
}

https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

* Campaign List filters display (#65)

* initial html structure setup

* refactor from select to div implementation

Select with multiselect displays as a list, not a dropdown

* finish refactor, enable visual functionality

- added all javascript needed for visual functionality
- finished refactoring structure

* Assets 98990 (#66)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* minor updates

- update graphql query to have hardcoded offset/limit (to resolve error)
- remove comments
- add placeholder 'refresh date' message and css
- move css for main body to accomodate above message

* add firefly icon

---------

Co-authored-by: Tyrone Tse <[email protected]>

* ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

* Added function hideQuickLinks()

* Added the hide field to the  shared-quicklinks config/worksheet
/blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
/scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
/scripts/site-config.js : Updated function to include the hide field

* Refactored the If statement logic

* Assets 98992- Campaign details/overview (#69)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

* gmo-campagin-list refactored to use  persisted query function
	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

* Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
Refactored the code for Repaginate for when the number of items page is changed
Show current page status

* graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
Deleted function  graphqlCampaignPaginated(first,cursor)

Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

* Fixed logic in calculating the nextCursor

* Removed all debug console.log statements

* Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

* Renamed the variable testConfig to headerConfig

* Campaign details block (#71)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* add status bar display

Also adjusted demo data slightly to include due date and lead

* update css/html to align with mockup and mvp

* resolve border bug

* implemented requested changes

* ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

---------

Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

* Updated function toggleOption : To only allow a single option to be selected in the dropdown list

---------

Co-authored-by: Shivani gupta <[email protected]>

* Assets 98993 (#75)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* resolve pr comments

* Release 05.09.2024 (#78)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

---------

Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>

* ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Assets 98994 (#81)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* initial changeover from static to dynamic data

* adjustments based on feedback

* additional changes based on feedback

* minor bugfix, null checks

* squash final bug with read more

* final touches

* combine two graphql functions with duplicated code

* bugfixes per pr review

* ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
Updated Geo dropdown list to be populated by graphql persisted query getGeoList

* Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
When a Business Line option is deselected then the Products List shows all products.

* Reduced the sample dropdown list options

* make links configurable, remove extraneous logs (#83)

* ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Removed comment

* ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Added function searchAsset(programName, campaignName) to get the asset URL

* Changed alt text to use assets repo-name property

* Renamed/Moved AssetsDatasource.js to /scripts/assets
gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
otherwise the values from blockConfig are overwritten when paginating to next page.

gmo-campaign-details.js : Added campaign Image
gmo-campaign-details.css : Updated CSS to display campaign Image

* gmo-campaign-list.js : Deleted comment
/scripts/assets.js : Updated to use createSearchEndpoint
/scripts/scripts.js : Added export to  export function createSearchEndpoint() {

* Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

* gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
/scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

* Assets 98996 (#88)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* ASSETS-88905 : Add Fields to the Overview Tab (#87)

* Added Target Market Area lists

function function createKPI(kpi)  is renamed createLI(li)

Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

* gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
gmo-campaign-details.js : Added Target Market Area and Platforms
refactored async function buildChannelScope(scopeTypeId, scopes, block)
to be able to display data for data based for a specified  CSS ID

* Added function getUniqueItems(items, property)
to get unique values for deliverableType and platforms

* Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
to  async function buildFieldScopes(scopeTypeId, scopes, block)

* Added global variable globalGraphFliter (#92)

Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
with graphFilter = currentGraphqlFilter

* Assets 98996 (#93)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* add deliverabletype graphql

- todo: refactor, some superfluous function(s) can be removed

* refactor product list to use graphql

* fix deliverable type tags, fix multiline text

* fix sort on marketing moments column

* removing merge artifact

* resolve PR comments

* platforms mapping with graphql (#94)

- also cleaned up extraneous/defunct code

* Refactor sort icons (#95)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

* assets.js : Refactored code to eliminate console.log error
gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

* Eliminated  JavaScript errors when image is not found

* Display total assets = 0 when the campaign image does not exist

* Code cleanup (#98)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

* Code cleanup part 2 (#100)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* Added  function closeAllDropDowns() (#101)

Added function handleClickOutside(event)

Updated function attachEventListeners()
    // Add event listener for clicks outside of dropdowns
    document.addEventListener('click', handleClickOutside);

Added function  resetProductsDropDown();

Updated  function resetAllFilters() to call function   resetProductsDropDown();

* Sticky deliverables header, update graphql endpoints (#102)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* update query endpoints, css tweak on deliverables

* Added tool tip for Program Name and Campaign Name (#103)

* remove duplicate icons

---------

Co-authored-by: TyroneAEM <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Tyrone Tse <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88912 : [Issue] Last page number is not matching with total number of pages (#105)

* ASSETS-88894 GRAPHQL Persisted Query Code (#53)

* GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

* Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

* Renamed file test-graphql.js to graphql.js

Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

* Changed queryName to getAllCampaings

* Rollback to 3/15/24 Commit a519a5155c3dd57f0c54ea8bd336cd0a231cffab before adding GraphQL test code

* Delete test graphql code

* ASSETS-88895 : Show HCV report pages to limited users (#55)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Campaign List block for Marketing Dashboard page (#56)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

---------

Co-authored-by: Michael Dickson <[email protected]>

* updated hydration-utils.js (#54)

MH: Added Firefly  product to AA Modal 'Product' Field List

* Assets 98990 - Dynamic campaign list (#61)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

* Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

Which calls the persisted query gmo/filter-on-marketing-initiative
with example parameters

{
  "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
}

https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

* Campaign List filters display (#65)

* initial html structure setup

* refactor from select to div implementation

Select with multiselect displays as a list, not a dropdown

* finish refactor, enable visual functionality

- added all javascript needed for visual functionality
- finished refactoring structure

* Assets 98990 (#66)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* minor updates

- update graphql query to have hardcoded offset/limit (to resolve error)
- remove comments
- add placeholder 'refresh date' message and css
- move css for main body to accomodate above message

* add firefly icon

---------

Co-authored-by: Tyrone Tse <[email protected]>

* ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

* Added function hideQuickLinks()

* Added the hide field to the  shared-quicklinks config/worksheet
/blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
/scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
/scripts/site-config.js : Updated function to include the hide field

* Refactored the If statement logic

* Assets 98992- Campaign details/overview (#69)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

* gmo-campagin-list refactored to use  persisted query function
	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

* Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
Refactored the code for Repaginate for when the number of items page is changed
Show current page status

* graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
Deleted function  graphqlCampaignPaginated(first,cursor)

Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

* Fixed logic in calculating the nextCursor

* Removed all debug console.log statements

* Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

* Renamed the variable testConfig to headerConfig

* Campaign details block (#71)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* add status bar display

Also adjusted demo data slightly to include due date and lead

* update css/html to align with mockup and mvp

* resolve border bug

* implemented requested changes

* ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

---------

Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

* Updated function toggleOption : To only allow a single option to be selected in the dropdown list

---------

Co-authored-by: Shivani gupta <[email protected]>

* Assets 98993 (#75)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* resolve pr comments

* Release 05.09.2024 (#78)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

---------

Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>

* ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Assets 98994 (#81)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* initial changeover from static to dynamic data

* adjustments based on feedback

* additional changes based on feedback

* minor bugfix, null checks

* squash final bug with read more

* final touches

* combine two graphql functions with duplicated code

* bugfixes per pr review

* ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
Updated Geo dropdown list to be populated by graphql persisted query getGeoList

* Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
When a Business Line option is deselected then the Products List shows all products.

* Reduced the sample dropdown list options

* make links configurable, remove extraneous logs (#83)

* ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Removed comment

* ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Added function searchAsset(programName, campaignName) to get the asset URL

* Changed alt text to use assets repo-name property

* Renamed/Moved AssetsDatasource.js to /scripts/assets
gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
otherwise the values from blockConfig are overwritten when paginating to next page.

gmo-campaign-details.js : Added campaign Image
gmo-campaign-details.css : Updated CSS to display campaign Image

* gmo-campaign-list.js : Deleted comment
/scripts/assets.js : Updated to use createSearchEndpoint
/scripts/scripts.js : Added export to  export function createSearchEndpoint() {

* Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

* gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
/scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

* Assets 98996 (#88)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* ASSETS-88905 : Add Fields to the Overview Tab (#87)

* Added Target Market Area lists

function function createKPI(kpi)  is renamed createLI(li)

Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

* gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
gmo-campaign-details.js : Added Target Market Area and Platforms
refactored async function buildChannelScope(scopeTypeId, scopes, block)
to be able to display data for data based for a specified  CSS ID

* Added function getUniqueItems(items, property)
to get unique values for deliverableType and platforms

* Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
to  async function buildFieldScopes(scopeTypeId, scopes, block)

* Added global variable globalGraphFliter (#92)

Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
with graphFilter = currentGraphqlFilter

* Assets 98996 (#93)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* add deliverabletype graphql

- todo: refactor, some superfluous function(s) can be removed

* refactor product list to use graphql

* fix deliverable type tags, fix multiline text

* fix sort on marketing moments column

* removing merge artifact

* resolve PR comments

* platforms mapping with graphql (#94)

- also cleaned up extraneous/defunct code

* Refactor sort icons (#95)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

* assets.js : Refactored code to eliminate console.log error
gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

* Eliminated  JavaScript errors when image is not found

* Display total assets = 0 when the campaign image does not exist

* Code cleanup (#98)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

* Code cleanup part 2 (#100)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* Added  function closeAllDropDowns() (#101)

Added function handleClickOutside(event)

Updated function attachEventListeners()
    // Add event listener for clicks outside of dropdowns
    document.addEventListener('click', handleClickOutside);

Added function  resetProductsDropDown();

Updated  function resetAllFilters() to call function   resetProductsDropDown();

* Sticky deliverables header, update graphql endpoints (#102)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* update query endpoints, css tweak on deliverables

* Added tool tip for Program Name and Campaign Name (#103)

* remove duplicate icons

* Change default items per page from 4 to 8
Changed undefined message for Campaign to  Marketing Moment Not Available

* Remove debugging from graphql.js

* Deleted function debug_console()

---------

Co-authored-by: Shivani Gupta <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>

* Performance refactoring (#107)

* performance refactoring

- improve thumbnail performance by makin async
- format date property to yyyy-mm-dd
- fix margin issue in program header
- refactor function that builds header dropdown for increased
  performance

* resolve bug with event listeners not attaching

* add programID parameter to deliverable query (#109)

* add programID parameter to deliverable query

* quick null check for status color

* remove console log

* Update query names, handle formatting (#110)

* update query names

* handle null deliverable types

* make dateFormat function available to detail block

* remove unused function

* remove console log messages

* fix typo in graphql query name (#111)

* ASSETS-88914 : Fix Pagination Frontend Code (#108)

* Changed the default number items per page to 4
Added function  debounce(func, wait)  to delay the Previous and Next page to wait 0.5 seconds between each click, to stop the user clicking too fast and breaking pagination

* Decrease debounce timeout to 200 milliseconds (0.2 secs)

* Added check that next page cannot go past last page
Added check that prev page cannot go back past page 1

* fix(pagination): Ensure proper handling of next/prev buttons and page boundaries

- Added totalPages calculation and checks to ensure "Next" button is disabled on the last page
- Updated nextPage function to correctly enable/disable pagination buttons
- Improved prevPage function to ensure it navigates back to the first page correctly
- Applied debounce to prevent rapid clicking issues
- Refactored logic for enabling/disabling pagination buttons based on current page state

* - Changed default items per page to 8
- Removed 4 items per page from filter
- Removed cusorArray, and replaced it with  currentPageInfo.previousCursor =  currentPageInfo.currentCursor;
- Set next cursor to  data.programPaginated.pageInfo.endCursor;
- Function prevPage now uses  currentPage.previousCursor as the cursor parameter value, and calculating the cursor value to use from cursorArray is no longer needed.

* Increased the click delay to 500 milliseconds

* Disabled the Previous and Next Button as soon as they are clicked, to prevent the user multiple clicking the button.

* Restored previous logic using cursorArray to manage the calculation of the cursor for the previous page. (#113)

* Adjust height of deliverables tab on program-details block (#114)

* minor css changes for program details

* adjust deliverables table height

* add min height to deliverables table

* remove commented css

* Sort deliverable type array before rows are made

* DXI-26587- Modify landing page for v3 Hub, so Signin goes to CH/v4 (#116)

* Replace throwing 404 error when the asset is not found, with asset.svg icon (#119)

* Make content fragment path for WF mappings configurable (#118)

* refactoring to use single graphql endpoint for map

* refactor 'mapping' functions

- refactor mapping retrieval functions in all three hcv blocks

* Remove comments

* remove unused function stub

* resolve bug in header filter refresh

* remove unused import

* Fixed issue where header didn't load if the user didn't have a profile yet (#121)

Co-authored-by: Mathieu Lessard <[email protected]>

* add checks for null 'review link' and 'final asset' (#122)

* Refactor header and query variable extraction (#123)

* add checks for null 'review link' and 'final asset'

* Add msg for programs with no data available

* refactor header so it can be used with no data

* wrap msg with div for styling

* refactor query variable extraction

- had to account for ampersand in program name

* Updated Product List (#117)

* Product list updated

* N/A value and label now match

* Fixed formatting

---------

Co-authored-by: Mathieu Lessard <[email protected]>

* Restored calling the function attatchEventListerners() at the end of the function decorate(block) (#124)

* Fix text wrapping issue in Project Owner column for smaller viewports (#125)

- Adjusted CSS to ensure text in the "Project Owner" column wraps properly
- Set row height to auto and adjusted line-height for better spacing
- Added media query for responsive width adjustments
- Ensured consistent display and improved readability across different viewport sizes

* ASSETS-88920 : Cosmetic Updates from MVP Feedback (#126)

* feat: Add Geo column to program list and adjust column widths for proper alignment

- Updated `gmo-program-list.js` to include Geo column in the header configuration and campaign list
- Adjusted column widths in `gmo-program-list.css` to ensure proper alignment under each column heading
- Add function `formatGeos` to format Geo array as comma-delimited list, that is displayed in the Geo column

* - Added a tooltip to the "Total Approved Assets" field in the Deliverables tab.
- Tooltip text provides instructions to view assets: "To view the assets, go to the 'All Asset' search page and use Program and Campaign name facet to filter the assets."
- Styled the tooltip to match the color and background of the Launch Date tooltip.
- Ensured the tooltip text appears on one line and positioned it correctly.
- Updated the "Total Asset" label to "Total Approved Asset"
- Updated the "Deliverable Name" column name to "Deliverable Task Name"

* - Added the Driver detail in Overview Tab next to Launch date like "Project Owner: Aina Tchoshanova"
- Update the Project "Owner column" label to "Task Owner"

* ASSETS-88921 : Marketing Moments Clickable Title and Underdevelopment Icon for ProgramNames/Campaigns (#128)

* feat: Change cursor to pointer for campaign name label and text

- Added CSS to change cursor to pointer on hover for .campaign-name-label and .campaign-name span.

feat: Add click event to campaign name label and text

- Updated buildCampaignList function to add click event listener to campaign name label and text.
- Clicking on the campaign name label or text now navigates to campaignDetailsLink.
- Ensured the appearance of the label and text remains unchanged while adding navigation functionality.

feat:  Rename "Review Link" to "QA Files" in the "Deliverable" task tab

- Updated Program Details column text/header to  QA files
- Updated CSS class from review-link to qa-files

* - feature :  When a campaign does not have an image assigned display the underdevelopment icon
Updated function searchAsset(programName, campaignName, imageWidth = 80) to get the  underdevelopment icon from site-config worksheet shared-branding worksheet

* Sorted the options in the dropdown lists alphabetically on the options text field (#131)

* ASSETS-88922 : Review the Deliverable page load time (#130)

* Improve page load time by parallelizing API calls and adding debug logs

- Updated `decorate` function to fetch program details and deliverables in parallel using `Promise.all`.
- Added console logs before and after API calls to help with debugging.
- Maintained existing functionality while optimizing performance by reducing sequential API calls.

* Remove logging messages

* feat: Improve performance of gmo-program-details.js

- Implement parallel GraphQL queries to reduce load times.
- Lazy load images using the `loading="lazy"` attribute to improve initial load performance.
- Batch DOM updates using `document.createDocumentFragment()` to minimize reflows and repaints.
- Debounce event listeners to prevent performance issues caused by rapid firing of events.

These optimizations should enhance the overall performance and responsiveness of the page.

* Optimize header rendering and asynchronous data fetching

- Initiate parallel fetching of program details and deliverables.
- Render a placeholder header immediately to improve perceived load time.
- Update header with actual data once program details are fetched.
- Ensure images are loaded asynchronously without blocking header rendering.

* feat: Inject additional HTML content into main-body-wrapper after header update

- Added HTML content including tab-wrapper, overview, and deliverables sections to the main-body-wrapper div after the header.
- Updated the main-body-wrapper div to include newly provided HTML content for improved user interface and navigation.
- Ensured the content injection occurs after the header update to maintain correct rendering order.

* Added back displaying the back button with arrow icon and program name not available message and no data available message when program

* Updated logic to display the total asset count for an image

* Reverted back to
const programData = await executeQuery(programQueryString);
const deliverables = await executeQuery(deliverableQueryString);

* Restored constant variables for Marketing Goal, KPIs, Target Market, Audiences
    const p0TargetMarketArea = program.p0TargetMarketArea;
    const p1TargetMarketArea = program.p1TargetMarketArea;
    const kpis = buildKPIList(program).outerHTML;
    const targetMarketAreas = buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea).outerHTML;
    const audiences = buildAudienceList(program).outerHTML;
    const artifactLinks = buildArtifactLinks(program).outerHTML;

To make the code more readable, they were removed when the structure of the code was refactored to incrementally build the block.innerHTML, to make the page appear to load faster.

* assets.js (#132)

Added helper function async function getUnderdevelopmentIcon() to display the underdevelopment icon.
Also display the under development icon when  programName and campaignName is null
gmo-program-details.js
When programName and campaignName is null display the under development icon

* gmo-program-details.js
PR Code review change to

* Revert "gmo-program-details.js"

This reverts commit 18ddd12c8fef2fbcb9c56b54735e907f421f17ad.

* gmo-program-details.js
PR code review change to
let imageObject = {imageUrl : '', imageAltText: '', assetCount: 0};
assets.js
PR code review change to
if (!progamName && !campaginName)

* Resolved typo in variable programName

from
  if (!progamName && !campaginName)
to
 if (!programName && !campaignName)

* feat: Improve page load speed and add lazy loading for images (#134)

- Implement debounce for search input to reduce the number of API calls.
- Refactor the `decorate` function for better readability and performance.
- Add lazy loading for images using `IntersectionObserver` to load images only when they come into view.
- Move pagination button toggling to a separate `togglePaginationButtons` function.
- Ensure strict comparison (`===`) for block configuration check.

* ASSETS-88926 : Review and Improve Page Performance of Marketing Moment Landing page (Push Failed) (#137)

* feat: Improve page load speed and add lazy loading for images

- Implement debounce for search input to reduce the number of API calls.
- Refactor the `decorate` function for better readability and performance.
- Add lazy loading for images using `IntersectionObserver` to load images only when they come into view.
- Move pagination button toggling to a separate `togglePaginationButtons` function.
- Ensure strict comparison (`===`) for block configuration check.

* feat: Improve page load speed and add lazy loading for images

- Removed debounce for search
- Added lazy loading for images using `IntersectionObserver` to load images only when they come into view.

* ASSETS-88927 : Toggle Read More Button (#138)

* feat: Add Read More/Read Less toggle functionality

- Added event listener for Read More buttons to toggle text visibility in Marketing Goal and Product Value sections.
- Updated the decorate function to handle Read More/Read Less functionality.

* style: Add hide-overflow class for text truncation

- Added .hide-overflow class to handle text truncation with ellipsis.
- Ensured compatibility with the Read More/Read Less functionality.

* Modified FAQ Nav (#139)

Co-authored-by: Mathieu Lessard <[email protected]>

* Updated function  searchAsset(programName, campaignName, deliverableType = '', imageWidth = 80) (#142)

Added new parameter deliverableType, moved parameter  imageWidth to be the last parameter.

* Updated Launch Date label to Proposed Launch Date in Program List (#145)

Updated Launch Date tool tip to and Proposed Launch Date in Program Details page

* Added redirect block which supports regex (#148)

Co-authored-by: Mathieu Lessard <[email protected]>

* Replaced console.log with console.info (#149)

* Added redirect block which supports regex

* Added alert for redirect

* Changed log to info

* Added alert for redirect

* Changed log to info

---------

Co-authored-by: Mathieu Lessard <[email protected]>

* Added alert letting people know their content as moved (#154)

* Added redirect block which supports regex

* Added alert for redirect

* Changed log to info

* Added alert for redirect

* Changed log to info

* Added alert for redirect

---------

Co-authored-by: Mathieu Lessard <[email protected]>

* Squashed commit of the following:

commit 0659922c04ac5a76e29b135dc534b56ffd1d554d
Author: TyroneAEM <[email protected]>
Date:   Thu Aug 1 12:16:47 2024 -0500

    Branch rc to main => Update the 'Launch Date' label to "Proposed Launch Date" (#147)

    * Added mapping for uuid (#74)

    Co-authored-by: Mathieu Lessard <[email protected]>

    * Removed Prefix from Displayed UUID Value on Assets (#76)

    * Modified formatAssetMetadata() to allow custom dc-format Labels (#79)

    * Removed "required" and custom values for fields (#86)

    Co-authored-by: Mathieu Lessard <[email protected]>

    * Added getBaseConfigPath to Collections Back Button (#89)

    * Releasing HCV Dashboard code (#106)

    * ASSETS-88894 GRAPHQL Persisted Query Code (#53)

    * GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

    * Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

    * Renamed file test-graphql.js to graphql.js

    Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
    Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
    Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config …
mathieu-lessard added a commit that referenced this pull request Aug 22, 2024
* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

* Modified formatAssetMetadata() to allow custom dc-format Labels (#79)

* Removed "required" and custom values for fields (#86)

Co-authored-by: Mathieu Lessard <[email protected]>

* Added getBaseConfigPath to Collections Back Button (#89)

* Releasing HCV Dashboard code (#106)

* ASSETS-88894 GRAPHQL Persisted Query Code (#53)

* GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

* Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

* Renamed file test-graphql.js to graphql.js

Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

* Changed queryName to getAllCampaings

* Rollback to 3/15/24 Commit a519a5155c3dd57f0c54ea8bd336cd0a231cffab before adding GraphQL test code

* Delete test graphql code

* ASSETS-88895 : Show HCV report pages to limited users (#55)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Campaign List block for Marketing Dashboard page (#56)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

---------

Co-authored-by: Michael Dickson <[email protected]>

* updated hydration-utils.js (#54)

MH: Added Firefly  product to AA Modal 'Product' Field List

* Assets 98990 - Dynamic campaign list (#61)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

* Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

Which calls the persisted query gmo/filter-on-marketing-initiative
with example parameters

{
  "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
}

https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

* Campaign List filters display (#65)

* initial html structure setup

* refactor from select to div implementation

Select with multiselect displays as a list, not a dropdown

* finish refactor, enable visual functionality

- added all javascript needed for visual functionality
- finished refactoring structure

* Assets 98990 (#66)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* minor updates

- update graphql query to have hardcoded offset/limit (to resolve error)
- remove comments
- add placeholder 'refresh date' message and css
- move css for main body to accomodate above message

* add firefly icon

---------

Co-authored-by: Tyrone Tse <[email protected]>

* ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

* Added function hideQuickLinks()

* Added the hide field to the  shared-quicklinks config/worksheet
/blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
/scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
/scripts/site-config.js : Updated function to include the hide field

* Refactored the If statement logic

* Assets 98992- Campaign details/overview (#69)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

* gmo-campagin-list refactored to use  persisted query function
	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

* Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
Refactored the code for Repaginate for when the number of items page is changed
Show current page status

* graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
Deleted function  graphqlCampaignPaginated(first,cursor)

Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

* Fixed logic in calculating the nextCursor

* Removed all debug console.log statements

* Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

* Renamed the variable testConfig to headerConfig

* Campaign details block (#71)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* add status bar display

Also adjusted demo data slightly to include due date and lead

* update css/html to align with mockup and mvp

* resolve border bug

* implemented requested changes

* ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

---------

Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

* Updated function toggleOption : To only allow a single option to be selected in the dropdown list

---------

Co-authored-by: Shivani gupta <[email protected]>

* Assets 98993 (#75)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* resolve pr comments

* Release 05.09.2024 (#78)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

---------

Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>

* ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Assets 98994 (#81)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* initial changeover from static to dynamic data

* adjustments based on feedback

* additional changes based on feedback

* minor bugfix, null checks

* squash final bug with read more

* final touches

* combine two graphql functions with duplicated code

* bugfixes per pr review

* ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
Updated Geo dropdown list to be populated by graphql persisted query getGeoList

* Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
When a Business Line option is deselected then the Products List shows all products.

* Reduced the sample dropdown list options

* make links configurable, remove extraneous logs (#83)

* ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Removed comment

* ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Added function searchAsset(programName, campaignName) to get the asset URL

* Changed alt text to use assets repo-name property

* Renamed/Moved AssetsDatasource.js to /scripts/assets
gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
otherwise the values from blockConfig are overwritten when paginating to next page.

gmo-campaign-details.js : Added campaign Image
gmo-campaign-details.css : Updated CSS to display campaign Image

* gmo-campaign-list.js : Deleted comment
/scripts/assets.js : Updated to use createSearchEndpoint
/scripts/scripts.js : Added export to  export function createSearchEndpoint() {

* Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

* gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
/scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

* Assets 98996 (#88)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* ASSETS-88905 : Add Fields to the Overview Tab (#87)

* Added Target Market Area lists

function function createKPI(kpi)  is renamed createLI(li)

Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

* gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
gmo-campaign-details.js : Added Target Market Area and Platforms
refactored async function buildChannelScope(scopeTypeId, scopes, block)
to be able to display data for data based for a specified  CSS ID

* Added function getUniqueItems(items, property)
to get unique values for deliverableType and platforms

* Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
to  async function buildFieldScopes(scopeTypeId, scopes, block)

* Added global variable globalGraphFliter (#92)

Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
with graphFilter = currentGraphqlFilter

* Assets 98996 (#93)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* add deliverabletype graphql

- todo: refactor, some superfluous function(s) can be removed

* refactor product list to use graphql

* fix deliverable type tags, fix multiline text

* fix sort on marketing moments column

* removing merge artifact

* resolve PR comments

* platforms mapping with graphql (#94)

- also cleaned up extraneous/defunct code

* Refactor sort icons (#95)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

* assets.js : Refactored code to eliminate console.log error
gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

* Eliminated  JavaScript errors when image is not found

* Display total assets = 0 when the campaign image does not exist

* Code cleanup (#98)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

* Code cleanup part 2 (#100)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* Added  function closeAllDropDowns() (#101)

Added function handleClickOutside(event)

Updated function attachEventListeners()
    // Add event listener for clicks outside of dropdowns
    document.addEventListener('click', handleClickOutside);

Added function  resetProductsDropDown();

Updated  function resetAllFilters() to call function   resetProductsDropDown();

* Sticky deliverables header, update graphql endpoints (#102)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* update query endpoints, css tweak on deliverables

* Added tool tip for Program Name and Campaign Name (#103)

* remove duplicate icons

---------

Co-authored-by: TyroneAEM <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Tyrone Tse <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88912 : [Issue] Last page number is not matching with total number of pages (#105)

* ASSETS-88894 GRAPHQL Persisted Query Code (#53)

* GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

* Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

* Renamed file test-graphql.js to graphql.js

Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

* Changed queryName to getAllCampaings

* Rollback to 3/15/24 Commit a519a5155c3dd57f0c54ea8bd336cd0a231cffab before adding GraphQL test code

* Delete test graphql code

* ASSETS-88895 : Show HCV report pages to limited users (#55)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Campaign List block for Marketing Dashboard page (#56)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

---------

Co-authored-by: Michael Dickson <[email protected]>

* updated hydration-utils.js (#54)

MH: Added Firefly  product to AA Modal 'Product' Field List

* Assets 98990 - Dynamic campaign list (#61)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

* Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

Which calls the persisted query gmo/filter-on-marketing-initiative
with example parameters

{
  "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
}

https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

* Campaign List filters display (#65)

* initial html structure setup

* refactor from select to div implementation

Select with multiselect displays as a list, not a dropdown

* finish refactor, enable visual functionality

- added all javascript needed for visual functionality
- finished refactoring structure

* Assets 98990 (#66)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* minor updates

- update graphql query to have hardcoded offset/limit (to resolve error)
- remove comments
- add placeholder 'refresh date' message and css
- move css for main body to accomodate above message

* add firefly icon

---------

Co-authored-by: Tyrone Tse <[email protected]>

* ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

* Added function hideQuickLinks()

* Added the hide field to the  shared-quicklinks config/worksheet
/blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
/scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
/scripts/site-config.js : Updated function to include the hide field

* Refactored the If statement logic

* Assets 98992- Campaign details/overview (#69)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

* gmo-campagin-list refactored to use  persisted query function
	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

* Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
Refactored the code for Repaginate for when the number of items page is changed
Show current page status

* graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
Deleted function  graphqlCampaignPaginated(first,cursor)

Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

* Fixed logic in calculating the nextCursor

* Removed all debug console.log statements

* Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

* Renamed the variable testConfig to headerConfig

* Campaign details block (#71)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* add status bar display

Also adjusted demo data slightly to include due date and lead

* update css/html to align with mockup and mvp

* resolve border bug

* implemented requested changes

* ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

---------

Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

* Updated function toggleOption : To only allow a single option to be selected in the dropdown list

---------

Co-authored-by: Shivani gupta <[email protected]>

* Assets 98993 (#75)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* resolve pr comments

* Release 05.09.2024 (#78)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

---------

Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>

* ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Assets 98994 (#81)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* initial changeover from static to dynamic data

* adjustments based on feedback

* additional changes based on feedback

* minor bugfix, null checks

* squash final bug with read more

* final touches

* combine two graphql functions with duplicated code

* bugfixes per pr review

* ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
Updated Geo dropdown list to be populated by graphql persisted query getGeoList

* Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
When a Business Line option is deselected then the Products List shows all products.

* Reduced the sample dropdown list options

* make links configurable, remove extraneous logs (#83)

* ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Removed comment

* ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Added function searchAsset(programName, campaignName) to get the asset URL

* Changed alt text to use assets repo-name property

* Renamed/Moved AssetsDatasource.js to /scripts/assets
gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
otherwise the values from blockConfig are overwritten when paginating to next page.

gmo-campaign-details.js : Added campaign Image
gmo-campaign-details.css : Updated CSS to display campaign Image

* gmo-campaign-list.js : Deleted comment
/scripts/assets.js : Updated to use createSearchEndpoint
/scripts/scripts.js : Added export to  export function createSearchEndpoint() {

* Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

* gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
/scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

* Assets 98996 (#88)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* ASSETS-88905 : Add Fields to the Overview Tab (#87)

* Added Target Market Area lists

function function createKPI(kpi)  is renamed createLI(li)

Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

* gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
gmo-campaign-details.js : Added Target Market Area and Platforms
refactored async function buildChannelScope(scopeTypeId, scopes, block)
to be able to display data for data based for a specified  CSS ID

* Added function getUniqueItems(items, property)
to get unique values for deliverableType and platforms

* Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
to  async function buildFieldScopes(scopeTypeId, scopes, block)

* Added global variable globalGraphFliter (#92)

Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
with graphFilter = currentGraphqlFilter

* Assets 98996 (#93)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* add deliverabletype graphql

- todo: refactor, some superfluous function(s) can be removed

* refactor product list to use graphql

* fix deliverable type tags, fix multiline text

* fix sort on marketing moments column

* removing merge artifact

* resolve PR comments

* platforms mapping with graphql (#94)

- also cleaned up extraneous/defunct code

* Refactor sort icons (#95)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

* assets.js : Refactored code to eliminate console.log error
gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

* Eliminated  JavaScript errors when image is not found

* Display total assets = 0 when the campaign image does not exist

* Code cleanup (#98)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

* Code cleanup part 2 (#100)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* Added  function closeAllDropDowns() (#101)

Added function handleClickOutside(event)

Updated function attachEventListeners()
    // Add event listener for clicks outside of dropdowns
    document.addEventListener('click', handleClickOutside);

Added function  resetProductsDropDown();

Updated  function resetAllFilters() to call function   resetProductsDropDown();

* Sticky deliverables header, update graphql endpoints (#102)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* update query endpoints, css tweak on deliverables

* Added tool tip for Program Name and Campaign Name (#103)

* remove duplicate icons

* Change default items per page from 4 to 8
Changed undefined message for Campaign to  Marketing Moment Not Available

* Remove debugging from graphql.js

* Deleted function debug_console()

---------

Co-authored-by: Shivani Gupta <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>

* Performance refactoring (#107)

* performance refactoring

- improve thumbnail performance by makin async
- format date property to yyyy-mm-dd
- fix margin issue in program header
- refactor function that builds header dropdown for increased
  performance

* resolve bug with event listeners not attaching

* add programID parameter to deliverable query (#109)

* add programID parameter to deliverable query

* quick null check for status color

* remove console log

* Update query names, handle formatting (#110)

* update query names

* handle null deliverable types

* make dateFormat function available to detail block

* remove unused function

* remove console log messages

* fix typo in graphql query name (#111)

* ASSETS-88914 : Fix Pagination Frontend Code (#108)

* Changed the default number items per page to 4
Added function  debounce(func, wait)  to delay the Previous and Next page to wait 0.5 seconds between each click, to stop the user clicking too fast and breaking pagination

* Decrease debounce timeout to 200 milliseconds (0.2 secs)

* Added check that next page cannot go past last page
Added check that prev page cannot go back past page 1

* fix(pagination): Ensure proper handling of next/prev buttons and page boundaries

- Added totalPages calculation and checks to ensure "Next" button is disabled on the last page
- Updated nextPage function to correctly enable/disable pagination buttons
- Improved prevPage function to ensure it navigates back to the first page correctly
- Applied debounce to prevent rapid clicking issues
- Refactored logic for enabling/disabling pagination buttons based on current page state

* - Changed default items per page to 8
- Removed 4 items per page from filter
- Removed cusorArray, and replaced it with  currentPageInfo.previousCursor =  currentPageInfo.currentCursor;
- Set next cursor to  data.programPaginated.pageInfo.endCursor;
- Function prevPage now uses  currentPage.previousCursor as the cursor parameter value, and calculating the cursor value to use from cursorArray is no longer needed.

* Increased the click delay to 500 milliseconds

* Disabled the Previous and Next Button as soon as they are clicked, to prevent the user multiple clicking the button.

* Restored previous logic using cursorArray to manage the calculation of the cursor for the previous page. (#113)

* Adjust height of deliverables tab on program-details block (#114)

* minor css changes for program details

* adjust deliverables table height

* add min height to deliverables table

* remove commented css

* Sort deliverable type array before rows are made

* DXI-26587- Modify landing page for v3 Hub, so Signin goes to CH/v4 (#116)

* Replace throwing 404 error when the asset is not found, with asset.svg icon (#119)

* Make content fragment path for WF mappings configurable (#118)

* refactoring to use single graphql endpoint for map

* refactor 'mapping' functions

- refactor mapping retrieval functions in all three hcv blocks

* Remove comments

* remove unused function stub

* resolve bug in header filter refresh

* remove unused import

* Fixed issue where header didn't load if the user didn't have a profile yet (#121)

Co-authored-by: Mathieu Lessard <[email protected]>

* add checks for null 'review link' and 'final asset' (#122)

* Refactor header and query variable extraction (#123)

* add checks for null 'review link' and 'final asset'

* Add msg for programs with no data available

* refactor header so it can be used with no data

* wrap msg with div for styling

* refactor query variable extraction

- had to account for ampersand in program name

* Updated Product List (#117)

* Product list updated

* N/A value and label now match

* Fixed formatting

---------

Co-authored-by: Mathieu Lessard <[email protected]>

* Restored calling the function attatchEventListerners() at the end of the function decorate(block) (#124)

* Fix text wrapping issue in Project Owner column for smaller viewports (#125)

- Adjusted CSS to ensure text in the "Project Owner" column wraps properly
- Set row height to auto and adjusted line-height for better spacing
- Added media query for responsive width adjustments
- Ensured consistent display and improved readability across different viewport sizes

* ASSETS-88920 : Cosmetic Updates from MVP Feedback (#126)

* feat: Add Geo column to program list and adjust column widths for proper alignment

- Updated `gmo-program-list.js` to include Geo column in the header configuration and campaign list
- Adjusted column widths in `gmo-program-list.css` to ensure proper alignment under each column heading
- Add function `formatGeos` to format Geo array as comma-delimited list, that is displayed in the Geo column

* - Added a tooltip to the "Total Approved Assets" field in the Deliverables tab.
- Tooltip text provides instructions to view assets: "To view the assets, go to the 'All Asset' search page and use Program and Campaign name facet to filter the assets."
- Styled the tooltip to match the color and background of the Launch Date tooltip.
- Ensured the tooltip text appears on one line and positioned it correctly.
- Updated the "Total Asset" label to "Total Approved Asset"
- Updated the "Deliverable Name" column name to "Deliverable Task Name"

* - Added the Driver detail in Overview Tab next to Launch date like "Project Owner: Aina Tchoshanova"
- Update the Project "Owner column" label to "Task Owner"

* ASSETS-88921 : Marketing Moments Clickable Title and Underdevelopment Icon for ProgramNames/Campaigns (#128)

* feat: Change cursor to pointer for campaign name label and text

- Added CSS to change cursor to pointer on hover for .campaign-name-label and .campaign-name span.

feat: Add click event to campaign name label and text

- Updated buildCampaignList function to add click event listener to campaign name label and text.
- Clicking on the campaign name label or text now navigates to campaignDetailsLink.
- Ensured the appearance of the label and text remains unchanged while adding navigation functionality.

feat:  Rename "Review Link" to "QA Files" in the "Deliverable" task tab

- Updated Program Details column text/header to  QA files
- Updated CSS class from review-link to qa-files

* - feature :  When a campaign does not have an image assigned display the underdevelopment icon
Updated function searchAsset(programName, campaignName, imageWidth = 80) to get the  underdevelopment icon from site-config worksheet shared-branding worksheet

* Sorted the options in the dropdown lists alphabetically on the options text field (#131)

* ASSETS-88922 : Review the Deliverable page load time (#130)

* Improve page load time by parallelizing API calls and adding debug logs

- Updated `decorate` function to fetch program details and deliverables in parallel using `Promise.all`.
- Added console logs before and after API calls to help with debugging.
- Maintained existing functionality while optimizing performance by reducing sequential API calls.

* Remove logging messages

* feat: Improve performance of gmo-program-details.js

- Implement parallel GraphQL queries to reduce load times.
- Lazy load images using the `loading="lazy"` attribute to improve initial load performance.
- Batch DOM updates using `document.createDocumentFragment()` to minimize reflows and repaints.
- Debounce event listeners to prevent performance issues caused by rapid firing of events.

These optimizations should enhance the overall performance and responsiveness of the page.

* Optimize header rendering and asynchronous data fetching

- Initiate parallel fetching of program details and deliverables.
- Render a placeholder header immediately to improve perceived load time.
- Update header with actual data once program details are fetched.
- Ensure images are loaded asynchronously without blocking header rendering.

* feat: Inject additional HTML content into main-body-wrapper after header update

- Added HTML content including tab-wrapper, overview, and deliverables sections to the main-body-wrapper div after the header.
- Updated the main-body-wrapper div to include newly provided HTML content for improved user interface and navigation.
- Ensured the content injection occurs after the header update to maintain correct rendering order.

* Added back displaying the back button with arrow icon and program name not available message and no data available message when program

* Updated logic to display the total asset count for an image

* Reverted back to
const programData = await executeQuery(programQueryString);
const deliverables = await executeQuery(deliverableQueryString);

* Restored constant variables for Marketing Goal, KPIs, Target Market, Audiences
    const p0TargetMarketArea = program.p0TargetMarketArea;
    const p1TargetMarketArea = program.p1TargetMarketArea;
    const kpis = buildKPIList(program).outerHTML;
    const targetMarketAreas = buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea).outerHTML;
    const audiences = buildAudienceList(program).outerHTML;
    const artifactLinks = buildArtifactLinks(program).outerHTML;

To make the code more readable, they were removed when the structure of the code was refactored to incrementally build the block.innerHTML, to make the page appear to load faster.

* assets.js (#132)

Added helper function async function getUnderdevelopmentIcon() to display the underdevelopment icon.
Also display the under development icon when  programName and campaignName is null
gmo-program-details.js
When programName and campaignName is null display the under development icon

* gmo-program-details.js
PR Code review change to

* Revert "gmo-program-details.js"

This reverts commit 18ddd12c8fef2fbcb9c56b54735e907f421f17ad.

* gmo-program-details.js
PR code review change to
let imageObject = {imageUrl : '', imageAltText: '', assetCount: 0};
assets.js
PR code review change to
if (!progamName && !campaginName)

* Resolved typo in variable programName

from
  if (!progamName && !campaginName)
to
 if (!programName && !campaignName)

* feat: Improve page load speed and add lazy loading for images (#134)

- Implement debounce for search input to reduce the number of API calls.
- Refactor the `decorate` function for better readability and performance.
- Add lazy loading for images using `IntersectionObserver` to load images only when they come into view.
- Move pagination button toggling to a separate `togglePaginationButtons` function.
- Ensure strict comparison (`===`) for block configuration check.

* ASSETS-88926 : Review and Improve Page Performance of Marketing Moment Landing page (Push Failed) (#137)

* feat: Improve page load speed and add lazy loading for images

- Implement debounce for search input to reduce the number of API calls.
- Refactor the `decorate` function for better readability and performance.
- Add lazy loading for images using `IntersectionObserver` to load images only when they come into view.
- Move pagination button toggling to a separate `togglePaginationButtons` function.
- Ensure strict comparison (`===`) for block configuration check.

* feat: Improve page load speed and add lazy loading for images

- Removed debounce for search
- Added lazy loading for images using `IntersectionObserver` to load images only when they come into view.

* ASSETS-88927 : Toggle Read More Button (#138)

* feat: Add Read More/Read Less toggle functionality

- Added event listener for Read More buttons to toggle text visibility in Marketing Goal and Product Value sections.
- Updated the decorate function to handle Read More/Read Less functionality.

* style: Add hide-overflow class for text truncation

- Added .hide-overflow class to handle text truncation with ellipsis.
- Ensured compatibility with the Read More/Read Less functionality.

* Modified FAQ Nav (#139)

Co-authored-by: Mathieu Lessard <[email protected]>

* Updated function  searchAsset(programName, campaignName, deliverableType = '', imageWidth = 80) (#142)

Added new parameter deliverableType, moved parameter  imageWidth to be the last parameter.

* Updated Launch Date label to Proposed Launch Date in Program List (#145)

Updated Launch Date tool tip to and Proposed Launch Date in Program Details page

* Added redirect block which supports regex (#148)

Co-authored-by: Mathieu Lessard <[email protected]>

* Replaced console.log with console.info (#149)

* Added redirect block which supports regex

* Added alert for redirect

* Changed log to info

* Added alert for redirect

* Changed log to info

---------

Co-authored-by: Mathieu Lessard <[email protected]>

* Added alert letting people know their content as moved (#154)

* Added redirect block which supports regex

* Added alert for redirect

* Changed log to info

* Added alert for redirect

* Changed log to info

* Added alert for redirect

---------

Co-authored-by: Mathieu Lessard <[email protected]>

* Squashed commit of the following:

commit 0659922c04ac5a76e29b135dc534b56ffd1d554d
Author: TyroneAEM <[email protected]>
Date:   Thu Aug 1 12:16:47 2024 -0500

    Branch rc to main => Update the 'Launch Date' label to "Proposed Launch Date" (#147)

    * Added mapping for uuid (#74)

    Co-authored-by: Mathieu Lessard <[email protected]>

    * Removed Prefix from Displayed UUID Value on Assets (#76)

    * Modified formatAssetMetadata() to allow custom dc-format Labels (#79)

    * Removed "required" and custom values for fields (#86)

    Co-authored-by: Mathieu Lessard <[email protected]>

    * Added getBaseConfigPath to Collections Back Button (#89)

    * Releasing HCV Dashboard code (#106)

    * ASSETS-88894 GRAPHQL Persisted Query Code (#53)

    * GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

    * Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

    * Renamed file test-graphql.js to graphql.js

    Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
    Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
    Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the conf…
shiv-gup added a commit that referenced this pull request Sep 4, 2024
* ASSETS-88928 : Update Deliverables Page Fields for Phase 2 to branch assets-72024 (#143)

* feat: Add default values for Release Tier and Categories in program details

- Updated the `buildHeader` function in `gmo-program-details.js` to display "Unavailable" for `releaseTier` if it does not exist.
- Updated the `buildHeader` function to display "Unavailable" for `categories` if it does not exist or is empty.
- Ensured the changes display the correct SVG icons and handle the presence and absence of the values correctly.
- Added new SVG icons folderOpenOutline and launch

* Updated Unavailable to Not Available

* Program details calendar view (#144)

* initial commit, calendar table

- todo: add a function to populate async since this loads hidden
  initially

* Continue iterating on static html

* styling grouped content

* refactor html

'month' columns were not extending to the edges of container.
Experimented and found working fix.

* continue iterating group/item placement

* make width of groups dynamic based on properties

* Make widths and placement programmatic

* functional javascript

- add ability to expand/collapse groups
- add ability to scroll year left/right (todo: dropdown)
- major cleanup of console log

* add in year-changing controls

* add current month indicator

* remove todo, restore normal default tab

* update indicator to reflect actual date

* start refactoring dropdown, fix indicator

* allow switching between year/quarter view

* final bugfixes for quarter-switching

* finish task filtering

- tasks that start in view and end out of view show correctly
- resolve bug with start positioning
- todo: remove logging

* year view functionality restored with refactor

* finish quarter  view

* add function to resize groups if members overflow

* change start date to end date for tasks

* slight cleanup

* resolve issue w/ merge

* Added code to display the thumbnail for the programName and campaignName
Fixed split error in  function getUniqueYears(items)

* Added thumbnail for programName and campaignName without using await

* Refactored code to use function async function addThumbnailToItem(itemEl, programName, campaignName)

* slightly refactor group-building logic

* cleanup

* Removed debug console.log code
Removed commented out code
Get thumbnail for  searchAsset(programName, campaignName,deliverableType)

* Calendar view update (#150)

* fix 'today' button and current day indicator

* fix buttons

* width adjustments for 'quarter' view

* handle missing start/end dates

* light cleanup

* merge 72024 in, perform cleanup

* ASSETS-72026 : Use taskStatus CF for mapping to get the task status label (#151)

* Added taskStatus colored dots from  /content/dam/gmo-cf/en/wf-picklist-data-source/taskStatus JSON object

* feat: Add tooltip to task status dot with dynamic status text and color

- Implemented tooltip functionality for task status dots in the calendar view.
- Added a helper function `getTaskStatusMapping` to retrieve task status details from `taskStatusMappings`.
- Updated the HTML generation for task status dots to include a tooltip displaying the corresponding status text.

* ASSETS-72027 : [Issue] Fix Number Alignment on Calendar Page View (#152)

* Added CSS adjustments for group-heading alignment and implemented title attribute for tooltips in program-calendar.js

- Updated .group-header and .left-block CSS classes to prevent text wrapping and ensure proper alignment of group heading and count elements.
- Applied text-overflow: ellipsis to .group-heading to handle long text and prevent it from breaking the layout.
- Added a title attribute to the group-heading div in program-calendar.js to display the full text as a tooltip when truncated.

* Implemented absolute positioning for .group-count and adjusted .group-heading for improved text visibility

- Changed .group-count to use absolute positioning within .group-header to optimize layout and provide more space for .group-heading text.
- Adjusted .group-heading max-width to 100% to allow it to occupy the full available width within its container before applying text overflow.
- Applied top: 50% and transform: translateY(-50%) to .group-count for vertical centering.
- Fine-tuned padding, margins, and alignment to ensure elements are properly aligned and the layout remains consistent across different screen sizes.

* MH3.FY24.0808 Release  (#155)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

* Modified formatAssetMetadata() to allow custom dc-format Labels (#79)

* Removed "required" and custom values for fields (#86)

Co-authored-by: Mathieu Lessard <[email protected]>

* Added getBaseConfigPath to Collections Back Button (#89)

* Releasing HCV Dashboard code (#106)

* ASSETS-88894 GRAPHQL Persisted Query Code (#53)

* GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

* Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

* Renamed file test-graphql.js to graphql.js

Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

* Changed queryName to getAllCampaings

* Rollback to 3/15/24 Commit a519a5155c3dd57f0c54ea8bd336cd0a231cffab before adding GraphQL test code

* Delete test graphql code

* ASSETS-88895 : Show HCV report pages to limited users (#55)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Campaign List block for Marketing Dashboard page (#56)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

---------

Co-authored-by: Michael Dickson <[email protected]>

* updated hydration-utils.js (#54)

MH: Added Firefly  product to AA Modal 'Product' Field List

* Assets 98990 - Dynamic campaign list (#61)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

* Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

Which calls the persisted query gmo/filter-on-marketing-initiative
with example parameters

{
  "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
}

https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

* Campaign List filters display (#65)

* initial html structure setup

* refactor from select to div implementation

Select with multiselect displays as a list, not a dropdown

* finish refactor, enable visual functionality

- added all javascript needed for visual functionality
- finished refactoring structure

* Assets 98990 (#66)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* minor updates

- update graphql query to have hardcoded offset/limit (to resolve error)
- remove comments
- add placeholder 'refresh date' message and css
- move css for main body to accomodate above message

* add firefly icon

---------

Co-authored-by: Tyrone Tse <[email protected]>

* ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

* Added function hideQuickLinks()

* Added the hide field to the  shared-quicklinks config/worksheet
/blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
/scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
/scripts/site-config.js : Updated function to include the hide field

* Refactored the If statement logic

* Assets 98992- Campaign details/overview (#69)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

* gmo-campagin-list refactored to use  persisted query function
	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

* Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
Refactored the code for Repaginate for when the number of items page is changed
Show current page status

* graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
Deleted function  graphqlCampaignPaginated(first,cursor)

Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

* Fixed logic in calculating the nextCursor

* Removed all debug console.log statements

* Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

* Renamed the variable testConfig to headerConfig

* Campaign details block (#71)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* add status bar display

Also adjusted demo data slightly to include due date and lead

* update css/html to align with mockup and mvp

* resolve border bug

* implemented requested changes

* ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

---------

Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

* Updated function toggleOption : To only allow a single option to be selected in the dropdown list

---------

Co-authored-by: Shivani gupta <[email protected]>

* Assets 98993 (#75)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* resolve pr comments

* Release 05.09.2024 (#78)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

---------

Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>

* ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Assets 98994 (#81)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* initial changeover from static to dynamic data

* adjustments based on feedback

* additional changes based on feedback

* minor bugfix, null checks

* squash final bug with read more

* final touches

* combine two graphql functions with duplicated code

* bugfixes per pr review

* ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
Updated Geo dropdown list to be populated by graphql persisted query getGeoList

* Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
When a Business Line option is deselected then the Products List shows all products.

* Reduced the sample dropdown list options

* make links configurable, remove extraneous logs (#83)

* ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Removed comment

* ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Added function searchAsset(programName, campaignName) to get the asset URL

* Changed alt text to use assets repo-name property

* Renamed/Moved AssetsDatasource.js to /scripts/assets
gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
otherwise the values from blockConfig are overwritten when paginating to next page.

gmo-campaign-details.js : Added campaign Image
gmo-campaign-details.css : Updated CSS to display campaign Image

* gmo-campaign-list.js : Deleted comment
/scripts/assets.js : Updated to use createSearchEndpoint
/scripts/scripts.js : Added export to  export function createSearchEndpoint() {

* Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

* gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
/scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

* Assets 98996 (#88)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* ASSETS-88905 : Add Fields to the Overview Tab (#87)

* Added Target Market Area lists

function function createKPI(kpi)  is renamed createLI(li)

Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

* gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
gmo-campaign-details.js : Added Target Market Area and Platforms
refactored async function buildChannelScope(scopeTypeId, scopes, block)
to be able to display data for data based for a specified  CSS ID

* Added function getUniqueItems(items, property)
to get unique values for deliverableType and platforms

* Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
to  async function buildFieldScopes(scopeTypeId, scopes, block)

* Added global variable globalGraphFliter (#92)

Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
with graphFilter = currentGraphqlFilter

* Assets 98996 (#93)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* add deliverabletype graphql

- todo: refactor, some superfluous function(s) can be removed

* refactor product list to use graphql

* fix deliverable type tags, fix multiline text

* fix sort on marketing moments column

* removing merge artifact

* resolve PR comments

* platforms mapping with graphql (#94)

- also cleaned up extraneous/defunct code

* Refactor sort icons (#95)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

* assets.js : Refactored code to eliminate console.log error
gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

* Eliminated  JavaScript errors when image is not found

* Display total assets = 0 when the campaign image does not exist

* Code cleanup (#98)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

* Code cleanup part 2 (#100)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* Added  function closeAllDropDowns() (#101)

Added function handleClickOutside(event)

Updated function attachEventListeners()
    // Add event listener for clicks outside of dropdowns
    document.addEventListener('click', handleClickOutside);

Added function  resetProductsDropDown();

Updated  function resetAllFilters() to call function   resetProductsDropDown();

* Sticky deliverables header, update graphql endpoints (#102)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* update query endpoints, css tweak on deliverables

* Added tool tip for Program Name and Campaign Name (#103)

* remove duplicate icons

---------

Co-authored-by: TyroneAEM <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Tyrone Tse <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88912 : [Issue] Last page number is not matching with total number of pages (#105)

* ASSETS-88894 GRAPHQL Persisted Query Code (#53)

* GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

* Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

* Renamed file test-graphql.js to graphql.js

Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

* Changed queryName to getAllCampaings

* Rollback to 3/15/24 Commit a519a5155c3dd57f0c54ea8bd336cd0a231cffab before adding GraphQL test code

* Delete test graphql code

* ASSETS-88895 : Show HCV report pages to limited users (#55)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Campaign List block for Marketing Dashboard page (#56)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

---------

Co-authored-by: Michael Dickson <[email protected]>

* updated hydration-utils.js (#54)

MH: Added Firefly  product to AA Modal 'Product' Field List

* Assets 98990 - Dynamic campaign list (#61)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

* Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

Which calls the persisted query gmo/filter-on-marketing-initiative
with example parameters

{
  "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
}

https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

* Campaign List filters display (#65)

* initial html structure setup

* refactor from select to div implementation

Select with multiselect displays as a list, not a dropdown

* finish refactor, enable visual functionality

- added all javascript needed for visual functionality
- finished refactoring structure

* Assets 98990 (#66)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* minor updates

- update graphql query to have hardcoded offset/limit (to resolve error)
- remove comments
- add placeholder 'refresh date' message and css
- move css for main body to accomodate above message

* add firefly icon

---------

Co-authored-by: Tyrone Tse <[email protected]>

* ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

* Added function hideQuickLinks()

* Added the hide field to the  shared-quicklinks config/worksheet
/blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
/scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
/scripts/site-config.js : Updated function to include the hide field

* Refactored the If statement logic

* Assets 98992- Campaign details/overview (#69)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

* gmo-campagin-list refactored to use  persisted query function
	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

* Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
Refactored the code for Repaginate for when the number of items page is changed
Show current page status

* graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
Deleted function  graphqlCampaignPaginated(first,cursor)

Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

* Fixed logic in calculating the nextCursor

* Removed all debug console.log statements

* Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

* Renamed the variable testConfig to headerConfig

* Campaign details block (#71)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* add status bar display

Also adjusted demo data slightly to include due date and lead

* update css/html to align with mockup and mvp

* resolve border bug

* implemented requested changes

* ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

---------

Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

* Updated function toggleOption : To only allow a single option to be selected in the dropdown list

---------

Co-authored-by: Shivani gupta <[email protected]>

* Assets 98993 (#75)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* resolve pr comments

* Release 05.09.2024 (#78)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

---------

Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>

* ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Assets 98994 (#81)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* initial changeover from static to dynamic data

* adjustments based on feedback

* additional changes based on feedback

* minor bugfix, null checks

* squash final bug with read more

* final touches

* combine two graphql functions with duplicated code

* bugfixes per pr review

* ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
Updated Geo dropdown list to be populated by graphql persisted query getGeoList

* Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
When a Business Line option is deselected then the Products List shows all products.

* Reduced the sample dropdown list options

* make links configurable, remove extraneous logs (#83)

* ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Removed comment

* ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Added function searchAsset(programName, campaignName) to get the asset URL

* Changed alt text to use assets repo-name property

* Renamed/Moved AssetsDatasource.js to /scripts/assets
gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
otherwise the values from blockConfig are overwritten when paginating to next page.

gmo-campaign-details.js : Added campaign Image
gmo-campaign-details.css : Updated CSS to display campaign Image

* gmo-campaign-list.js : Deleted comment
/scripts/assets.js : Updated to use createSearchEndpoint
/scripts/scripts.js : Added export to  export function createSearchEndpoint() {

* Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

* gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
/scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

* Assets 98996 (#88)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* ASSETS-88905 : Add Fields to the Overview Tab (#87)

* Added Target Market Area lists

function function createKPI(kpi)  is renamed createLI(li)

Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

* gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
gmo-campaign-details.js : Added Target Market Area and Platforms
refactored async function buildChannelScope(scopeTypeId, scopes, block)
to be able to display data for data based for a specified  CSS ID

* Added function getUniqueItems(items, property)
to get unique values for deliverableType and platforms

* Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
to  async function buildFieldScopes(scopeTypeId, scopes, block)

* Added global variable globalGraphFliter (#92)

Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
with graphFilter = currentGraphqlFilter

* Assets 98996 (#93)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* add deliverabletype graphql

- todo: refactor, some superfluous function(s) can be removed

* refactor product list to use graphql

* fix deliverable type tags, fix multiline text

* fix sort on marketing moments column

* removing merge artifact

* resolve PR comments

* platforms mapping with graphql (#94)

- also cleaned up extraneous/defunct code

* Refactor sort icons (#95)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

* assets.js : Refactored code to eliminate console.log error
gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

* Eliminated  JavaScript errors when image is not found

* Display total assets = 0 when the campaign image does not exist

* Code cleanup (#98)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

* Code cleanup part 2 (#100)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* Added  function closeAllDropDowns() (#101)

Added function handleClickOutside(event)

Updated function attachEventListeners()
    // Add event listener for clicks outside of dropdowns
    document.addEventListener('click', handleClickOutside);

Added function  resetProductsDropDown();

Updated  function resetAllFilters() to call function   resetProductsDropDown();

* Sticky deliverables header, update graphql endpoints (#102)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* update query endpoints, css tweak on deliverables

* Added tool tip for Program Name and Campaign Name (#103)

* remove duplicate icons

* Change default items per page from 4 to 8
Changed undefined message for Campaign to  Marketing Moment Not Available

* Remove debugging from graphql.js

* Deleted function debug_console()

---------

Co-authored-by: Shivani Gupta <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>

* Performance refactoring (#107)

* performance refactoring

- improve thumbnail performance by makin async
- format date property to yyyy-mm-dd
- fix margin issue in program header
- refactor function that builds header dropdown for increased
  performance

* resolve bug with event listeners not attaching

* add programID parameter to deliverable query (#109)

* add programID parameter to deliverable query

* quick null check for status color

* remove console log

* Update query names, handle formatting (#110)

* update query names

* handle null deliverable types

* make dateFormat function available to detail block

* remove unused function

* remove console log messages

* fix typo in graphql query name (#111)

* ASSETS-88914 : Fix Pagination Frontend Code (#108)

* Changed the default number items per page to 4
Added function  debounce(func, wait)  to delay the Previous and Next page to wait 0.5 seconds between each click, to stop the user clicking too fast and breaking pagination

* Decrease debounce timeout to 200 milliseconds (0.2 secs)

* Added check that next page cannot go past last page
Added check that prev page cannot go back past page 1

* fix(pagination): Ensure proper handling of next/prev buttons and page boundaries

- Added totalPages calculation and checks to ensure "Next" button is disabled on the last page
- Updated nextPage function to correctly enable/disable pagination buttons
- Improved prevPage function to ensure it navigates back to the first page correctly
- Applied debounce to prevent rapid clicking issues
- Refactored logic for enabling/disabling pagination buttons based on current page state

* - Changed default items per page to 8
- Removed 4 items per page from filter
- Removed cusorArray, and replaced it with  currentPageInfo.previousCursor =  currentPageInfo.currentCursor;
- Set next cursor to  data.programPaginated.pageInfo.endCursor;
- Function prevPage now uses  currentPage.previousCursor as the cursor parameter value, and calculating the cursor value to use from cursorArray is no longer needed.

* Increased the click delay to 500 milliseconds

* Disabled the Previous and Next Button as soon as they are clicked, to prevent the user multiple clicking the button.

* Restored previous logic using cursorArray to manage the calculation of the cursor for the previous page. (#113)

* Adjust height of deliverables tab on program-details block (#114)

* minor css changes for program details

* adjust deliverables table height

* add min height to deliverables table

* remove commented css

* Sort deliverable type array before rows are made

* DXI-26587- Modify landing page for v3 Hub, so Signin goes to CH/v4 (#116)

* Replace throwing 404 error when the asset is not found, with asset.svg icon (#119)

* Make content fragment path for WF mappings configurable (#118)

* refactoring to use single graphql endpoint for map

* refactor 'mapping' functions

- refactor mapping retrieval functions in all three hcv blocks

* Remove comments

* remove unused function stub

* resolve bug in header filter refresh

* remove unused import

* Fixed issue where header didn't load if the user didn't have a profile yet (#121)

Co-authored-by: Mathieu Lessard <[email protected]>

* add checks for null 'review link' and 'final asset' (#122)

* Refactor header and query variable extraction (#123)

* add checks for null 'review link' and 'final asset'

* Add msg for programs with no data available

* refactor header so it can be used with no data

* wrap msg with div for styling

* refactor query variable extraction

- had to account for ampersand in program name

* Updated Product List (#117)

* Product list updated

* N/A value and label now match

* Fixed formatting

---------

Co-authored-by: Mathieu Lessard <[email protected]>

* Restored calling the function attatchEventListerners() at the end of the function decorate(block) (#124)

* Fix text wrapping issue in Project Owner column for smaller viewports (#125)

- Adjusted CSS to ensure text in the "Project Owner" column wraps properly
- Set row height to auto and adjusted line-height for better spacing
- Added media query for responsive width adjustments
- Ensured consistent display and improved readability across different viewport sizes

* ASSETS-88920 : Cosmetic Updates from MVP Feedback (#126)

* feat: Add Geo column to program list and adjust column widths for proper alignment

- Updated `gmo-program-list.js` to include Geo column in the header configuration and campaign list
- Adjusted column widths in `gmo-program-list.css` to ensure proper alignment under each column heading
- Add function `formatGeos` to format Geo array as comma-delimited list, that is displayed in the Geo column

* - Added a tooltip to the "Total Approved Assets" field in the Deliverables tab.
- Tooltip text provides instructions to view assets: "To view the assets, go to the 'All Asset' search page and use Program and Campaign name facet to filter the assets."
- Styled the tooltip to match the color and background of the Launch Date tooltip.
- Ensured the tooltip text appears on one line and positioned it correctly.
- Updated the "Total Asset" label to "Total Approved Asset"
- Updated the "Deliverable Name" column name to "Deliverable Task Name"

* - Added the Driver detail in Overview Tab next to Launch date like "Project Owner: Aina Tchoshanova"
- Update the Project "Owner column" label to "Task Owner"

* ASSETS-88921 : Marketing Moments Clickable Title and Underdevelopment Icon for ProgramNames/Campaigns (#128)

* feat: Change cursor to pointer for campaign name label and text

- Added CSS to change cursor to pointer on hover for .campaign-name-label and .campaign-name span.

feat: Add click event to campaign name label and text

- Updated buildCampaignList function to add click event listener to campaign name label and text.
- Clicking on the campaign name label or text now navigates to campaignDetailsLink.
- Ensured the appearance of the label and text remains unchanged while adding navigation functionality.

feat:  Rename "Review Link" to "QA Files" in the "Deliverable" task tab

- Updated Program Details column text/header to  QA files
- Updated CSS class from review-link to qa-files

* - feature :  When a campaign does not have an image assigned display the underdevelopment icon
Updated function searchAsset(programName, campaignName, imageWidth = 80) to get the  underdevelopment icon from site-config worksheet shared-branding worksheet

* Sorted the options in the dropdown lists alphabetically on the options text field (#131)

* ASSETS-88922 : Review the Deliverable page load time (#130)

* Improve page load time by parallelizing API calls and adding debug logs

- Updated `decorate` function to fetch program details and deliverables in parallel using `Promise.all`.
- Added console logs before and after API calls to help with debugging.
- Maintained existing functionality while optimizing performance by reducing sequential API calls.

* Remove logging messages

* feat: Improve performance of gmo-program-details.js

- Implement parallel GraphQL queries to reduce load times.
- Lazy load images using the `loading="lazy"` attribute to improve initial load performance.
- Batch DOM updates using `document.createDocumentFragment()` to minimize reflows and repaints.
- Debounce event listeners to prevent performance issues caused by rapid firing of events.

These optimizations should enhance the overall performance and responsiveness of the page.

* Optimize header rendering and asynchronous data fetching

- Initiate parallel fetching of program details and deliverables.
- Render a placeholder header immediately to improve perceived load time.
- Update header with actual data once program details are fetched.
- Ensure images are loaded asynchronously without blocking header rendering.

* feat: Inject additional HTML content into main-body-wrapper after header update

- Added HTML content including tab-wrapper, overview, and deliverables sections to the main-body-wrapper div after the header.
- Updated the main-body-wrapper div to include newly provided HTML content for improved user interface and navigation.
- Ensured the content injection occurs after the header update to maintain correct rendering order.

* Added back displaying the back button with arrow icon and program name not available message and no data available message when program

* Updated logic to display the total asset count for an image

* Reverted back to
const programData = await executeQuery(programQueryString);
const deliverables = await executeQuery(deliverableQueryString);

* Restored constant variables for Marketing Goal, KPIs, Target Market, Audiences
    const p0TargetMarketArea = program.p0TargetMarketArea;
    const p1TargetMarketArea = program.p1TargetMarketArea;
    const kpis = buildKPIList(program).outerHTML;
    const targetMarketAreas = buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea).outerHTML;
    const audiences = buildAudienceList(program).outerHTML;
    const artifactLinks = buildArtifactLinks(program).outerHTML;

To make the code more readable, they were removed when the structure of the code was refactored to incrementally build the block.innerHTML, to make the page appear to load faster.

* assets.js (#132)

Added helper function async function getUnderdevelopmentIcon() to display the underdevelopment icon.
Also display the under development icon when  programName and campaignName is null
gmo-program-details.js
When programName and campaignName is null display the under development icon

* gmo-program-details.js
PR Code review change to

* Revert "gmo-program-details.js"

This reverts commit 18ddd12c8fef2fbcb9c56b54735e907f421f17ad.

* gmo-program-details.js
PR code review change to
let imageObject = {imageUrl : '', imageAltText: '', assetCount: 0};
assets.js…
shiv-gup added a commit that referenced this pull request Sep 5, 2024
* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

* Modified formatAssetMetadata() to allow custom dc-format Labels (#79)

* Removed "required" and custom values for fields (#86)

Co-authored-by: Mathieu Lessard <[email protected]>

* Added getBaseConfigPath to Collections Back Button (#89)

* Releasing HCV Dashboard code (#106)

* ASSETS-88894 GRAPHQL Persisted Query Code (#53)

* GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

* Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

* Renamed file test-graphql.js to graphql.js

Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

* Changed queryName to getAllCampaings

* Rollback to 3/15/24 Commit a519a5155c3dd57f0c54ea8bd336cd0a231cffab before adding GraphQL test code

* Delete test graphql code

* ASSETS-88895 : Show HCV report pages to limited users (#55)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Campaign List block for Marketing Dashboard page (#56)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

---------

Co-authored-by: Michael Dickson <[email protected]>

* updated hydration-utils.js (#54)

MH: Added Firefly  product to AA Modal 'Product' Field List

* Assets 98990 - Dynamic campaign list (#61)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

* Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

Which calls the persisted query gmo/filter-on-marketing-initiative
with example parameters

{
  "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
}

https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

* Campaign List filters display (#65)

* initial html structure setup

* refactor from select to div implementation

Select with multiselect displays as a list, not a dropdown

* finish refactor, enable visual functionality

- added all javascript needed for visual functionality
- finished refactoring structure

* Assets 98990 (#66)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* minor updates

- update graphql query to have hardcoded offset/limit (to resolve error)
- remove comments
- add placeholder 'refresh date' message and css
- move css for main body to accomodate above message

* add firefly icon

---------

Co-authored-by: Tyrone Tse <[email protected]>

* ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

* Added function hideQuickLinks()

* Added the hide field to the  shared-quicklinks config/worksheet
/blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
/scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
/scripts/site-config.js : Updated function to include the hide field

* Refactored the If statement logic

* Assets 98992- Campaign details/overview (#69)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

* gmo-campagin-list refactored to use  persisted query function
	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

* Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
Refactored the code for Repaginate for when the number of items page is changed
Show current page status

* graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
Deleted function  graphqlCampaignPaginated(first,cursor)

Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

* Fixed logic in calculating the nextCursor

* Removed all debug console.log statements

* Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

* Renamed the variable testConfig to headerConfig

* Campaign details block (#71)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* add status bar display

Also adjusted demo data slightly to include due date and lead

* update css/html to align with mockup and mvp

* resolve border bug

* implemented requested changes

* ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

---------

Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

* Updated function toggleOption : To only allow a single option to be selected in the dropdown list

---------

Co-authored-by: Shivani gupta <[email protected]>

* Assets 98993 (#75)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* resolve pr comments

* Release 05.09.2024 (#78)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

---------

Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>

* ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Assets 98994 (#81)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* initial changeover from static to dynamic data

* adjustments based on feedback

* additional changes based on feedback

* minor bugfix, null checks

* squash final bug with read more

* final touches

* combine two graphql functions with duplicated code

* bugfixes per pr review

* ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
Updated Geo dropdown list to be populated by graphql persisted query getGeoList

* Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
When a Business Line option is deselected then the Products List shows all products.

* Reduced the sample dropdown list options

* make links configurable, remove extraneous logs (#83)

* ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Removed comment

* ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Added function searchAsset(programName, campaignName) to get the asset URL

* Changed alt text to use assets repo-name property

* Renamed/Moved AssetsDatasource.js to /scripts/assets
gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
otherwise the values from blockConfig are overwritten when paginating to next page.

gmo-campaign-details.js : Added campaign Image
gmo-campaign-details.css : Updated CSS to display campaign Image

* gmo-campaign-list.js : Deleted comment
/scripts/assets.js : Updated to use createSearchEndpoint
/scripts/scripts.js : Added export to  export function createSearchEndpoint() {

* Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

* gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
/scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

* Assets 98996 (#88)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* ASSETS-88905 : Add Fields to the Overview Tab (#87)

* Added Target Market Area lists

function function createKPI(kpi)  is renamed createLI(li)

Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

* gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
gmo-campaign-details.js : Added Target Market Area and Platforms
refactored async function buildChannelScope(scopeTypeId, scopes, block)
to be able to display data for data based for a specified  CSS ID

* Added function getUniqueItems(items, property)
to get unique values for deliverableType and platforms

* Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
to  async function buildFieldScopes(scopeTypeId, scopes, block)

* Added global variable globalGraphFliter (#92)

Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
with graphFilter = currentGraphqlFilter

* Assets 98996 (#93)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* add deliverabletype graphql

- todo: refactor, some superfluous function(s) can be removed

* refactor product list to use graphql

* fix deliverable type tags, fix multiline text

* fix sort on marketing moments column

* removing merge artifact

* resolve PR comments

* platforms mapping with graphql (#94)

- also cleaned up extraneous/defunct code

* Refactor sort icons (#95)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

* assets.js : Refactored code to eliminate console.log error
gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

* Eliminated  JavaScript errors when image is not found

* Display total assets = 0 when the campaign image does not exist

* Code cleanup (#98)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

* Code cleanup part 2 (#100)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* Added  function closeAllDropDowns() (#101)

Added function handleClickOutside(event)

Updated function attachEventListeners()
    // Add event listener for clicks outside of dropdowns
    document.addEventListener('click', handleClickOutside);

Added function  resetProductsDropDown();

Updated  function resetAllFilters() to call function   resetProductsDropDown();

* Sticky deliverables header, update graphql endpoints (#102)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* update query endpoints, css tweak on deliverables

* Added tool tip for Program Name and Campaign Name (#103)

* remove duplicate icons

---------

Co-authored-by: TyroneAEM <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Tyrone Tse <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88912 : [Issue] Last page number is not matching with total number of pages (#105)

* ASSETS-88894 GRAPHQL Persisted Query Code (#53)

* GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

* Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

* Renamed file test-graphql.js to graphql.js

Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

* Changed queryName to getAllCampaings

* Rollback to 3/15/24 Commit a519a5155c3dd57f0c54ea8bd336cd0a231cffab before adding GraphQL test code

* Delete test graphql code

* ASSETS-88895 : Show HCV report pages to limited users (#55)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Campaign List block for Marketing Dashboard page (#56)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

---------

Co-authored-by: Michael Dickson <[email protected]>

* updated hydration-utils.js (#54)

MH: Added Firefly  product to AA Modal 'Product' Field List

* Assets 98990 - Dynamic campaign list (#61)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

* Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

Which calls the persisted query gmo/filter-on-marketing-initiative
with example parameters

{
  "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
}

https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

* Campaign List filters display (#65)

* initial html structure setup

* refactor from select to div implementation

Select with multiselect displays as a list, not a dropdown

* finish refactor, enable visual functionality

- added all javascript needed for visual functionality
- finished refactoring structure

* Assets 98990 (#66)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* minor updates

- update graphql query to have hardcoded offset/limit (to resolve error)
- remove comments
- add placeholder 'refresh date' message and css
- move css for main body to accomodate above message

* add firefly icon

---------

Co-authored-by: Tyrone Tse <[email protected]>

* ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

* Added function hideQuickLinks()

* Added the hide field to the  shared-quicklinks config/worksheet
/blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
/scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
/scripts/site-config.js : Updated function to include the hide field

* Refactored the If statement logic

* Assets 98992- Campaign details/overview (#69)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

* gmo-campagin-list refactored to use  persisted query function
	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

* Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
Refactored the code for Repaginate for when the number of items page is changed
Show current page status

* graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
Deleted function  graphqlCampaignPaginated(first,cursor)

Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

* Fixed logic in calculating the nextCursor

* Removed all debug console.log statements

* Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

* Renamed the variable testConfig to headerConfig

* Campaign details block (#71)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* add status bar display

Also adjusted demo data slightly to include due date and lead

* update css/html to align with mockup and mvp

* resolve border bug

* implemented requested changes

* ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

---------

Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

* Updated function toggleOption : To only allow a single option to be selected in the dropdown list

---------

Co-authored-by: Shivani gupta <[email protected]>

* Assets 98993 (#75)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* resolve pr comments

* Release 05.09.2024 (#78)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

---------

Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>

* ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Assets 98994 (#81)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* initial changeover from static to dynamic data

* adjustments based on feedback

* additional changes based on feedback

* minor bugfix, null checks

* squash final bug with read more

* final touches

* combine two graphql functions with duplicated code

* bugfixes per pr review

* ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
Updated Geo dropdown list to be populated by graphql persisted query getGeoList

* Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
When a Business Line option is deselected then the Products List shows all products.

* Reduced the sample dropdown list options

* make links configurable, remove extraneous logs (#83)

* ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Removed comment

* ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Added function searchAsset(programName, campaignName) to get the asset URL

* Changed alt text to use assets repo-name property

* Renamed/Moved AssetsDatasource.js to /scripts/assets
gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
otherwise the values from blockConfig are overwritten when paginating to next page.

gmo-campaign-details.js : Added campaign Image
gmo-campaign-details.css : Updated CSS to display campaign Image

* gmo-campaign-list.js : Deleted comment
/scripts/assets.js : Updated to use createSearchEndpoint
/scripts/scripts.js : Added export to  export function createSearchEndpoint() {

* Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

* gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
/scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

* Assets 98996 (#88)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* ASSETS-88905 : Add Fields to the Overview Tab (#87)

* Added Target Market Area lists

function function createKPI(kpi)  is renamed createLI(li)

Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

* gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
gmo-campaign-details.js : Added Target Market Area and Platforms
refactored async function buildChannelScope(scopeTypeId, scopes, block)
to be able to display data for data based for a specified  CSS ID

* Added function getUniqueItems(items, property)
to get unique values for deliverableType and platforms

* Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
to  async function buildFieldScopes(scopeTypeId, scopes, block)

* Added global variable globalGraphFliter (#92)

Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
with graphFilter = currentGraphqlFilter

* Assets 98996 (#93)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* add deliverabletype graphql

- todo: refactor, some superfluous function(s) can be removed

* refactor product list to use graphql

* fix deliverable type tags, fix multiline text

* fix sort on marketing moments column

* removing merge artifact

* resolve PR comments

* platforms mapping with graphql (#94)

- also cleaned up extraneous/defunct code

* Refactor sort icons (#95)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

* assets.js : Refactored code to eliminate console.log error
gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

* Eliminated  JavaScript errors when image is not found

* Display total assets = 0 when the campaign image does not exist

* Code cleanup (#98)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

* Code cleanup part 2 (#100)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* Added  function closeAllDropDowns() (#101)

Added function handleClickOutside(event)

Updated function attachEventListeners()
    // Add event listener for clicks outside of dropdowns
    document.addEventListener('click', handleClickOutside);

Added function  resetProductsDropDown();

Updated  function resetAllFilters() to call function   resetProductsDropDown();

* Sticky deliverables header, update graphql endpoints (#102)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* update query endpoints, css tweak on deliverables

* Added tool tip for Program Name and Campaign Name (#103)

* remove duplicate icons

* Change default items per page from 4 to 8
Changed undefined message for Campaign to  Marketing Moment Not Available

* Remove debugging from graphql.js

* Deleted function debug_console()

---------

Co-authored-by: Shivani Gupta <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>

* Performance refactoring (#107)

* performance refactoring

- improve thumbnail performance by makin async
- format date property to yyyy-mm-dd
- fix margin issue in program header
- refactor function that builds header dropdown for increased
  performance

* resolve bug with event listeners not attaching

* add programID parameter to deliverable query (#109)

* add programID parameter to deliverable query

* quick null check for status color

* remove console log

* Update query names, handle formatting (#110)

* update query names

* handle null deliverable types

* make dateFormat function available to detail block

* remove unused function

* remove console log messages

* fix typo in graphql query name (#111)

* ASSETS-88914 : Fix Pagination Frontend Code (#108)

* Changed the default number items per page to 4
Added function  debounce(func, wait)  to delay the Previous and Next page to wait 0.5 seconds between each click, to stop the user clicking too fast and breaking pagination

* Decrease debounce timeout to 200 milliseconds (0.2 secs)

* Added check that next page cannot go past last page
Added check that prev page cannot go back past page 1

* fix(pagination): Ensure proper handling of next/prev buttons and page boundaries

- Added totalPages calculation and checks to ensure "Next" button is disabled on the last page
- Updated nextPage function to correctly enable/disable pagination buttons
- Improved prevPage function to ensure it navigates back to the first page correctly
- Applied debounce to prevent rapid clicking issues
- Refactored logic for enabling/disabling pagination buttons based on current page state

* - Changed default items per page to 8
- Removed 4 items per page from filter
- Removed cusorArray, and replaced it with  currentPageInfo.previousCursor =  currentPageInfo.currentCursor;
- Set next cursor to  data.programPaginated.pageInfo.endCursor;
- Function prevPage now uses  currentPage.previousCursor as the cursor parameter value, and calculating the cursor value to use from cursorArray is no longer needed.

* Increased the click delay to 500 milliseconds

* Disabled the Previous and Next Button as soon as they are clicked, to prevent the user multiple clicking the button.

* Restored previous logic using cursorArray to manage the calculation of the cursor for the previous page. (#113)

* Adjust height of deliverables tab on program-details block (#114)

* minor css changes for program details

* adjust deliverables table height

* add min height to deliverables table

* remove commented css

* Sort deliverable type array before rows are made

* DXI-26587- Modify landing page for v3 Hub, so Signin goes to CH/v4 (#116)

* Replace throwing 404 error when the asset is not found, with asset.svg icon (#119)

* Make content fragment path for WF mappings configurable (#118)

* refactoring to use single graphql endpoint for map

* refactor 'mapping' functions

- refactor mapping retrieval functions in all three hcv blocks

* Remove comments

* remove unused function stub

* resolve bug in header filter refresh

* remove unused import

* Fixed issue where header didn't load if the user didn't have a profile yet (#121)

Co-authored-by: Mathieu Lessard <[email protected]>

* add checks for null 'review link' and 'final asset' (#122)

* Refactor header and query variable extraction (#123)

* add checks for null 'review link' and 'final asset'

* Add msg for programs with no data available

* refactor header so it can be used with no data

* wrap msg with div for styling

* refactor query variable extraction

- had to account for ampersand in program name

* Updated Product List (#117)

* Product list updated

* N/A value and label now match

* Fixed formatting

---------

Co-authored-by: Mathieu Lessard <[email protected]>

* Restored calling the function attatchEventListerners() at the end of the function decorate(block) (#124)

* Fix text wrapping issue in Project Owner column for smaller viewports (#125)

- Adjusted CSS to ensure text in the "Project Owner" column wraps properly
- Set row height to auto and adjusted line-height for better spacing
- Added media query for responsive width adjustments
- Ensured consistent display and improved readability across different viewport sizes

* ASSETS-88920 : Cosmetic Updates from MVP Feedback (#126)

* feat: Add Geo column to program list and adjust column widths for proper alignment

- Updated `gmo-program-list.js` to include Geo column in the header configuration and campaign list
- Adjusted column widths in `gmo-program-list.css` to ensure proper alignment under each column heading
- Add function `formatGeos` to format Geo array as comma-delimited list, that is displayed in the Geo column

* - Added a tooltip to the "Total Approved Assets" field in the Deliverables tab.
- Tooltip text provides instructions to view assets: "To view the assets, go to the 'All Asset' search page and use Program and Campaign name facet to filter the assets."
- Styled the tooltip to match the color and background of the Launch Date tooltip.
- Ensured the tooltip text appears on one line and positioned it correctly.
- Updated the "Total Asset" label to "Total Approved Asset"
- Updated the "Deliverable Name" column name to "Deliverable Task Name"

* - Added the Driver detail in Overview Tab next to Launch date like "Project Owner: Aina Tchoshanova"
- Update the Project "Owner column" label to "Task Owner"

* ASSETS-88921 : Marketing Moments Clickable Title and Underdevelopment Icon for ProgramNames/Campaigns (#128)

* feat: Change cursor to pointer for campaign name label and text

- Added CSS to change cursor to pointer on hover for .campaign-name-label and .campaign-name span.

feat: Add click event to campaign name label and text

- Updated buildCampaignList function to add click event listener to campaign name label and text.
- Clicking on the campaign name label or text now navigates to campaignDetailsLink.
- Ensured the appearance of the label and text remains unchanged while adding navigation functionality.

feat:  Rename "Review Link" to "QA Files" in the "Deliverable" task tab

- Updated Program Details column text/header to  QA files
- Updated CSS class from review-link to qa-files

* - feature :  When a campaign does not have an image assigned display the underdevelopment icon
Updated function searchAsset(programName, campaignName, imageWidth = 80) to get the  underdevelopment icon from site-config worksheet shared-branding worksheet

* Sorted the options in the dropdown lists alphabetically on the options text field (#131)

* ASSETS-88922 : Review the Deliverable page load time (#130)

* Improve page load time by parallelizing API calls and adding debug logs

- Updated `decorate` function to fetch program details and deliverables in parallel using `Promise.all`.
- Added console logs before and after API calls to help with debugging.
- Maintained existing functionality while optimizing performance by reducing sequential API calls.

* Remove logging messages

* feat: Improve performance of gmo-program-details.js

- Implement parallel GraphQL queries to reduce load times.
- Lazy load images using the `loading="lazy"` attribute to improve initial load performance.
- Batch DOM updates using `document.createDocumentFragment()` to minimize reflows and repaints.
- Debounce event listeners to prevent performance issues caused by rapid firing of events.

These optimizations should enhance the overall performance and responsiveness of the page.

* Optimize header rendering and asynchronous data fetching

- Initiate parallel fetching of program details and deliverables.
- Render a placeholder header immediately to improve perceived load time.
- Update header with actual data once program details are fetched.
- Ensure images are loaded asynchronously without blocking header rendering.

* feat: Inject additional HTML content into main-body-wrapper after header update

- Added HTML content including tab-wrapper, overview, and deliverables sections to the main-body-wrapper div after the header.
- Updated the main-body-wrapper div to include newly provided HTML content for improved user interface and navigation.
- Ensured the content injection occurs after the header update to maintain correct rendering order.

* Added back displaying the back button with arrow icon and program name not available message and no data available message when program

* Updated logic to display the total asset count for an image

* Reverted back to
const programData = await executeQuery(programQueryString);
const deliverables = await executeQuery(deliverableQueryString);

* Restored constant variables for Marketing Goal, KPIs, Target Market, Audiences
    const p0TargetMarketArea = program.p0TargetMarketArea;
    const p1TargetMarketArea = program.p1TargetMarketArea;
    const kpis = buildKPIList(program).outerHTML;
    const targetMarketAreas = buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea).outerHTML;
    const audiences = buildAudienceList(program).outerHTML;
    const artifactLinks = buildArtifactLinks(program).outerHTML;

To make the code more readable, they were removed when the structure of the code was refactored to incrementally build the block.innerHTML, to make the page appear to load faster.

* assets.js (#132)

Added helper function async function getUnderdevelopmentIcon() to display the underdevelopment icon.
Also display the under development icon when  programName and campaignName is null
gmo-program-details.js
When programName and campaignName is null display the under development icon

* gmo-program-details.js
PR Code review change to

* Revert "gmo-program-details.js"

This reverts commit 18ddd12c8fef2fbcb9c56b54735e907f421f17ad.

* gmo-program-details.js
PR code review change to
let imageObject = {imageUrl : '', imageAltText: '', assetCount: 0};
assets.js
PR code review change to
if (!progamName && !campaginName)

* Resolved typo in variable programName

from
  if (!progamName && !campaginName)
to
 if (!programName && !campaignName)

* feat: Improve page load speed and add lazy loading for images (#134)

- Implement debounce for search input to reduce the number of API calls.
- Refactor the `decorate` function for better readability and performance.
- Add lazy loading for images using `IntersectionObserver` to load images only when they come into view.
- Move pagination button toggling to a separate `togglePaginationButtons` function.
- Ensure strict comparison (`===`) for block configuration check.

* ASSETS-88926 : Review and Improve Page Performance of Marketing Moment Landing page (Push Failed) (#137)

* feat: Improve page load speed and add lazy loading for images

- Implement debounce for search input to reduce the number of API calls.
- Refactor the `decorate` function for better readability and performance.
- Add lazy loading for images using `IntersectionObserver` to load images only when they come into view.
- Move pagination button toggling to a separate `togglePaginationButtons` function.
- Ensure strict comparison (`===`) for block configuration check.

* feat: Improve page load speed and add lazy loading for images

- Removed debounce for search
- Added lazy loading for images using `IntersectionObserver` to load images only when they come into view.

* ASSETS-88927 : Toggle Read More Button (#138)

* feat: Add Read More/Read Less toggle functionality

- Added event listener for Read More buttons to toggle text visibility in Marketing Goal and Product Value sections.
- Updated the decorate function to handle Read More/Read Less functionality.

* style: Add hide-overflow class for text truncation

- Added .hide-overflow class to handle text truncation with ellipsis.
- Ensured compatibility with the Read More/Read Less functionality.

* Modified FAQ Nav (#139)

Co-authored-by: Mathieu Lessard <[email protected]>

* Updated function  searchAsset(programName, campaignName, deliverableType = '', imageWidth = 80) (#142)

Added new parameter deliverableType, moved parameter  imageWidth to be the last parameter.

* Updated Launch Date label to Proposed Launch Date in Program List (#145)

Updated Launch Date tool tip to and Proposed Launch Date in Program Details page

* Added redirect block which supports regex (#148)

Co-authored-by: Mathieu Lessard <[email protected]>

* Replaced console.log with console.info (#149)

* Added redirect block which supports regex

* Added alert for redirect

* Changed log to info

* Added alert for redirect

* Changed log to info

---------

Co-authored-by: Mathieu Lessard <[email protected]>

* Added alert letting people know their content as moved (#154)

* Added redirect block which supports regex

* Added alert for redirect

* Changed log to info

* Added alert for redirect

* Changed log to info

* Added alert for redirect

---------

Co-authored-by: Mathieu Lessard <[email protected]>

* Squashed commit of the following:

commit 0659922c04ac5a76e29b135dc534b56ffd1d554d
Author: TyroneAEM <[email protected]>
Date:   Thu Aug 1 12:16:47 2024 -0500

    Branch rc to main => Update the 'Launch Date' label to "Proposed Launch Date" (#147)

    * Added mapping for uuid (#74)

    Co-authored-by: Mathieu Lessard <[email protected]>

    * Removed Prefix from Displayed UUID Value on Assets (#76)

    * Modified formatAssetMetadata() to allow custom dc-format Labels (#79)

    * Removed "required" and custom values for fields (#86)

    Co-authored-by: Mathieu Lessard <[email protected]>

    * Added getBaseConfigPath to Collections Back Button (#89)

    * Releasing HCV Dashboard code (#106)

    * ASSETS-88894 GRAPHQL Persisted Query Code (#53)

    * GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

    * Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

    * Renamed file test-graphql.js to graphql.js

    Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
    Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
    Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admi…
shiv-gup added a commit that referenced this pull request Sep 19, 2024
* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

* Modified formatAssetMetadata() to allow custom dc-format Labels (#79)

* Removed "required" and custom values for fields (#86)

Co-authored-by: Mathieu Lessard <[email protected]>

* Added getBaseConfigPath to Collections Back Button (#89)

* Releasing HCV Dashboard code (#106)

* ASSETS-88894 GRAPHQL Persisted Query Code (#53)

* GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

* Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

* Renamed file test-graphql.js to graphql.js

Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

* Changed queryName to getAllCampaings

* Rollback to 3/15/24 Commit a519a5155c3dd57f0c54ea8bd336cd0a231cffab before adding GraphQL test code

* Delete test graphql code

* ASSETS-88895 : Show HCV report pages to limited users (#55)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Campaign List block for Marketing Dashboard page (#56)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

---------

Co-authored-by: Michael Dickson <[email protected]>

* updated hydration-utils.js (#54)

MH: Added Firefly  product to AA Modal 'Product' Field List

* Assets 98990 - Dynamic campaign list (#61)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

* Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

Which calls the persisted query gmo/filter-on-marketing-initiative
with example parameters

{
  "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
}

https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

* Campaign List filters display (#65)

* initial html structure setup

* refactor from select to div implementation

Select with multiselect displays as a list, not a dropdown

* finish refactor, enable visual functionality

- added all javascript needed for visual functionality
- finished refactoring structure

* Assets 98990 (#66)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* minor updates

- update graphql query to have hardcoded offset/limit (to resolve error)
- remove comments
- add placeholder 'refresh date' message and css
- move css for main body to accomodate above message

* add firefly icon

---------

Co-authored-by: Tyrone Tse <[email protected]>

* ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

* Added function hideQuickLinks()

* Added the hide field to the  shared-quicklinks config/worksheet
/blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
/scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
/scripts/site-config.js : Updated function to include the hide field

* Refactored the If statement logic

* Assets 98992- Campaign details/overview (#69)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

* gmo-campagin-list refactored to use  persisted query function
	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

* Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
Refactored the code for Repaginate for when the number of items page is changed
Show current page status

* graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
Deleted function  graphqlCampaignPaginated(first,cursor)

Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

* Fixed logic in calculating the nextCursor

* Removed all debug console.log statements

* Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

* Renamed the variable testConfig to headerConfig

* Campaign details block (#71)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* add status bar display

Also adjusted demo data slightly to include due date and lead

* update css/html to align with mockup and mvp

* resolve border bug

* implemented requested changes

* ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

---------

Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

* Updated function toggleOption : To only allow a single option to be selected in the dropdown list

---------

Co-authored-by: Shivani gupta <[email protected]>

* Assets 98993 (#75)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* resolve pr comments

* Release 05.09.2024 (#78)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

---------

Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>

* ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Assets 98994 (#81)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* initial changeover from static to dynamic data

* adjustments based on feedback

* additional changes based on feedback

* minor bugfix, null checks

* squash final bug with read more

* final touches

* combine two graphql functions with duplicated code

* bugfixes per pr review

* ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
Updated Geo dropdown list to be populated by graphql persisted query getGeoList

* Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
When a Business Line option is deselected then the Products List shows all products.

* Reduced the sample dropdown list options

* make links configurable, remove extraneous logs (#83)

* ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Removed comment

* ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Added function searchAsset(programName, campaignName) to get the asset URL

* Changed alt text to use assets repo-name property

* Renamed/Moved AssetsDatasource.js to /scripts/assets
gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
otherwise the values from blockConfig are overwritten when paginating to next page.

gmo-campaign-details.js : Added campaign Image
gmo-campaign-details.css : Updated CSS to display campaign Image

* gmo-campaign-list.js : Deleted comment
/scripts/assets.js : Updated to use createSearchEndpoint
/scripts/scripts.js : Added export to  export function createSearchEndpoint() {

* Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

* gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
/scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

* Assets 98996 (#88)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* ASSETS-88905 : Add Fields to the Overview Tab (#87)

* Added Target Market Area lists

function function createKPI(kpi)  is renamed createLI(li)

Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

* gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
gmo-campaign-details.js : Added Target Market Area and Platforms
refactored async function buildChannelScope(scopeTypeId, scopes, block)
to be able to display data for data based for a specified  CSS ID

* Added function getUniqueItems(items, property)
to get unique values for deliverableType and platforms

* Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
to  async function buildFieldScopes(scopeTypeId, scopes, block)

* Added global variable globalGraphFliter (#92)

Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
with graphFilter = currentGraphqlFilter

* Assets 98996 (#93)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* add deliverabletype graphql

- todo: refactor, some superfluous function(s) can be removed

* refactor product list to use graphql

* fix deliverable type tags, fix multiline text

* fix sort on marketing moments column

* removing merge artifact

* resolve PR comments

* platforms mapping with graphql (#94)

- also cleaned up extraneous/defunct code

* Refactor sort icons (#95)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

* assets.js : Refactored code to eliminate console.log error
gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

* Eliminated  JavaScript errors when image is not found

* Display total assets = 0 when the campaign image does not exist

* Code cleanup (#98)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

* Code cleanup part 2 (#100)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* Added  function closeAllDropDowns() (#101)

Added function handleClickOutside(event)

Updated function attachEventListeners()
    // Add event listener for clicks outside of dropdowns
    document.addEventListener('click', handleClickOutside);

Added function  resetProductsDropDown();

Updated  function resetAllFilters() to call function   resetProductsDropDown();

* Sticky deliverables header, update graphql endpoints (#102)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* update query endpoints, css tweak on deliverables

* Added tool tip for Program Name and Campaign Name (#103)

* remove duplicate icons

---------

Co-authored-by: TyroneAEM <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Tyrone Tse <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88912 : [Issue] Last page number is not matching with total number of pages (#105)

* ASSETS-88894 GRAPHQL Persisted Query Code (#53)

* GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

* Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

* Renamed file test-graphql.js to graphql.js

Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

* Changed queryName to getAllCampaings

* Rollback to 3/15/24 Commit a519a5155c3dd57f0c54ea8bd336cd0a231cffab before adding GraphQL test code

* Delete test graphql code

* ASSETS-88895 : Show HCV report pages to limited users (#55)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Campaign List block for Marketing Dashboard page (#56)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

---------

Co-authored-by: Michael Dickson <[email protected]>

* updated hydration-utils.js (#54)

MH: Added Firefly  product to AA Modal 'Product' Field List

* Assets 98990 - Dynamic campaign list (#61)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

* Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

Which calls the persisted query gmo/filter-on-marketing-initiative
with example parameters

{
  "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
}

https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

* Campaign List filters display (#65)

* initial html structure setup

* refactor from select to div implementation

Select with multiselect displays as a list, not a dropdown

* finish refactor, enable visual functionality

- added all javascript needed for visual functionality
- finished refactoring structure

* Assets 98990 (#66)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* minor updates

- update graphql query to have hardcoded offset/limit (to resolve error)
- remove comments
- add placeholder 'refresh date' message and css
- move css for main body to accomodate above message

* add firefly icon

---------

Co-authored-by: Tyrone Tse <[email protected]>

* ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

* Added function hideQuickLinks()

* Added the hide field to the  shared-quicklinks config/worksheet
/blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
/scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
/scripts/site-config.js : Updated function to include the hide field

* Refactored the If statement logic

* Assets 98992- Campaign details/overview (#69)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

* gmo-campagin-list refactored to use  persisted query function
	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

* Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
Refactored the code for Repaginate for when the number of items page is changed
Show current page status

* graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
Deleted function  graphqlCampaignPaginated(first,cursor)

Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

* Fixed logic in calculating the nextCursor

* Removed all debug console.log statements

* Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

* Renamed the variable testConfig to headerConfig

* Campaign details block (#71)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* add status bar display

Also adjusted demo data slightly to include due date and lead

* update css/html to align with mockup and mvp

* resolve border bug

* implemented requested changes

* ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

---------

Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

* Updated function toggleOption : To only allow a single option to be selected in the dropdown list

---------

Co-authored-by: Shivani gupta <[email protected]>

* Assets 98993 (#75)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* resolve pr comments

* Release 05.09.2024 (#78)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

---------

Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>

* ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Assets 98994 (#81)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* initial changeover from static to dynamic data

* adjustments based on feedback

* additional changes based on feedback

* minor bugfix, null checks

* squash final bug with read more

* final touches

* combine two graphql functions with duplicated code

* bugfixes per pr review

* ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
Updated Geo dropdown list to be populated by graphql persisted query getGeoList

* Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
When a Business Line option is deselected then the Products List shows all products.

* Reduced the sample dropdown list options

* make links configurable, remove extraneous logs (#83)

* ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Removed comment

* ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Added function searchAsset(programName, campaignName) to get the asset URL

* Changed alt text to use assets repo-name property

* Renamed/Moved AssetsDatasource.js to /scripts/assets
gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
otherwise the values from blockConfig are overwritten when paginating to next page.

gmo-campaign-details.js : Added campaign Image
gmo-campaign-details.css : Updated CSS to display campaign Image

* gmo-campaign-list.js : Deleted comment
/scripts/assets.js : Updated to use createSearchEndpoint
/scripts/scripts.js : Added export to  export function createSearchEndpoint() {

* Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

* gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
/scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

* Assets 98996 (#88)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* ASSETS-88905 : Add Fields to the Overview Tab (#87)

* Added Target Market Area lists

function function createKPI(kpi)  is renamed createLI(li)

Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

* gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
gmo-campaign-details.js : Added Target Market Area and Platforms
refactored async function buildChannelScope(scopeTypeId, scopes, block)
to be able to display data for data based for a specified  CSS ID

* Added function getUniqueItems(items, property)
to get unique values for deliverableType and platforms

* Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
to  async function buildFieldScopes(scopeTypeId, scopes, block)

* Added global variable globalGraphFliter (#92)

Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
with graphFilter = currentGraphqlFilter

* Assets 98996 (#93)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* add deliverabletype graphql

- todo: refactor, some superfluous function(s) can be removed

* refactor product list to use graphql

* fix deliverable type tags, fix multiline text

* fix sort on marketing moments column

* removing merge artifact

* resolve PR comments

* platforms mapping with graphql (#94)

- also cleaned up extraneous/defunct code

* Refactor sort icons (#95)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

* assets.js : Refactored code to eliminate console.log error
gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

* Eliminated  JavaScript errors when image is not found

* Display total assets = 0 when the campaign image does not exist

* Code cleanup (#98)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

* Code cleanup part 2 (#100)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* Added  function closeAllDropDowns() (#101)

Added function handleClickOutside(event)

Updated function attachEventListeners()
    // Add event listener for clicks outside of dropdowns
    document.addEventListener('click', handleClickOutside);

Added function  resetProductsDropDown();

Updated  function resetAllFilters() to call function   resetProductsDropDown();

* Sticky deliverables header, update graphql endpoints (#102)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* update query endpoints, css tweak on deliverables

* Added tool tip for Program Name and Campaign Name (#103)

* remove duplicate icons

* Change default items per page from 4 to 8
Changed undefined message for Campaign to  Marketing Moment Not Available

* Remove debugging from graphql.js

* Deleted function debug_console()

---------

Co-authored-by: Shivani Gupta <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>

* Performance refactoring (#107)

* performance refactoring

- improve thumbnail performance by makin async
- format date property to yyyy-mm-dd
- fix margin issue in program header
- refactor function that builds header dropdown for increased
  performance

* resolve bug with event listeners not attaching

* add programID parameter to deliverable query (#109)

* add programID parameter to deliverable query

* quick null check for status color

* remove console log

* Update query names, handle formatting (#110)

* update query names

* handle null deliverable types

* make dateFormat function available to detail block

* remove unused function

* remove console log messages

* fix typo in graphql query name (#111)

* ASSETS-88914 : Fix Pagination Frontend Code (#108)

* Changed the default number items per page to 4
Added function  debounce(func, wait)  to delay the Previous and Next page to wait 0.5 seconds between each click, to stop the user clicking too fast and breaking pagination

* Decrease debounce timeout to 200 milliseconds (0.2 secs)

* Added check that next page cannot go past last page
Added check that prev page cannot go back past page 1

* fix(pagination): Ensure proper handling of next/prev buttons and page boundaries

- Added totalPages calculation and checks to ensure "Next" button is disabled on the last page
- Updated nextPage function to correctly enable/disable pagination buttons
- Improved prevPage function to ensure it navigates back to the first page correctly
- Applied debounce to prevent rapid clicking issues
- Refactored logic for enabling/disabling pagination buttons based on current page state

* - Changed default items per page to 8
- Removed 4 items per page from filter
- Removed cusorArray, and replaced it with  currentPageInfo.previousCursor =  currentPageInfo.currentCursor;
- Set next cursor to  data.programPaginated.pageInfo.endCursor;
- Function prevPage now uses  currentPage.previousCursor as the cursor parameter value, and calculating the cursor value to use from cursorArray is no longer needed.

* Increased the click delay to 500 milliseconds

* Disabled the Previous and Next Button as soon as they are clicked, to prevent the user multiple clicking the button.

* Restored previous logic using cursorArray to manage the calculation of the cursor for the previous page. (#113)

* Adjust height of deliverables tab on program-details block (#114)

* minor css changes for program details

* adjust deliverables table height

* add min height to deliverables table

* remove commented css

* Sort deliverable type array before rows are made

* DXI-26587- Modify landing page for v3 Hub, so Signin goes to CH/v4 (#116)

* Replace throwing 404 error when the asset is not found, with asset.svg icon (#119)

* Make content fragment path for WF mappings configurable (#118)

* refactoring to use single graphql endpoint for map

* refactor 'mapping' functions

- refactor mapping retrieval functions in all three hcv blocks

* Remove comments

* remove unused function stub

* resolve bug in header filter refresh

* remove unused import

* Fixed issue where header didn't load if the user didn't have a profile yet (#121)

Co-authored-by: Mathieu Lessard <[email protected]>

* add checks for null 'review link' and 'final asset' (#122)

* Refactor header and query variable extraction (#123)

* add checks for null 'review link' and 'final asset'

* Add msg for programs with no data available

* refactor header so it can be used with no data

* wrap msg with div for styling

* refactor query variable extraction

- had to account for ampersand in program name

* Updated Product List (#117)

* Product list updated

* N/A value and label now match

* Fixed formatting

---------

Co-authored-by: Mathieu Lessard <[email protected]>

* Restored calling the function attatchEventListerners() at the end of the function decorate(block) (#124)

* Fix text wrapping issue in Project Owner column for smaller viewports (#125)

- Adjusted CSS to ensure text in the "Project Owner" column wraps properly
- Set row height to auto and adjusted line-height for better spacing
- Added media query for responsive width adjustments
- Ensured consistent display and improved readability across different viewport sizes

* ASSETS-88920 : Cosmetic Updates from MVP Feedback (#126)

* feat: Add Geo column to program list and adjust column widths for proper alignment

- Updated `gmo-program-list.js` to include Geo column in the header configuration and campaign list
- Adjusted column widths in `gmo-program-list.css` to ensure proper alignment under each column heading
- Add function `formatGeos` to format Geo array as comma-delimited list, that is displayed in the Geo column

* - Added a tooltip to the "Total Approved Assets" field in the Deliverables tab.
- Tooltip text provides instructions to view assets: "To view the assets, go to the 'All Asset' search page and use Program and Campaign name facet to filter the assets."
- Styled the tooltip to match the color and background of the Launch Date tooltip.
- Ensured the tooltip text appears on one line and positioned it correctly.
- Updated the "Total Asset" label to "Total Approved Asset"
- Updated the "Deliverable Name" column name to "Deliverable Task Name"

* - Added the Driver detail in Overview Tab next to Launch date like "Project Owner: Aina Tchoshanova"
- Update the Project "Owner column" label to "Task Owner"

* ASSETS-88921 : Marketing Moments Clickable Title and Underdevelopment Icon for ProgramNames/Campaigns (#128)

* feat: Change cursor to pointer for campaign name label and text

- Added CSS to change cursor to pointer on hover for .campaign-name-label and .campaign-name span.

feat: Add click event to campaign name label and text

- Updated buildCampaignList function to add click event listener to campaign name label and text.
- Clicking on the campaign name label or text now navigates to campaignDetailsLink.
- Ensured the appearance of the label and text remains unchanged while adding navigation functionality.

feat:  Rename "Review Link" to "QA Files" in the "Deliverable" task tab

- Updated Program Details column text/header to  QA files
- Updated CSS class from review-link to qa-files

* - feature :  When a campaign does not have an image assigned display the underdevelopment icon
Updated function searchAsset(programName, campaignName, imageWidth = 80) to get the  underdevelopment icon from site-config worksheet shared-branding worksheet

* Sorted the options in the dropdown lists alphabetically on the options text field (#131)

* ASSETS-88922 : Review the Deliverable page load time (#130)

* Improve page load time by parallelizing API calls and adding debug logs

- Updated `decorate` function to fetch program details and deliverables in parallel using `Promise.all`.
- Added console logs before and after API calls to help with debugging.
- Maintained existing functionality while optimizing performance by reducing sequential API calls.

* Remove logging messages

* feat: Improve performance of gmo-program-details.js

- Implement parallel GraphQL queries to reduce load times.
- Lazy load images using the `loading="lazy"` attribute to improve initial load performance.
- Batch DOM updates using `document.createDocumentFragment()` to minimize reflows and repaints.
- Debounce event listeners to prevent performance issues caused by rapid firing of events.

These optimizations should enhance the overall performance and responsiveness of the page.

* Optimize header rendering and asynchronous data fetching

- Initiate parallel fetching of program details and deliverables.
- Render a placeholder header immediately to improve perceived load time.
- Update header with actual data once program details are fetched.
- Ensure images are loaded asynchronously without blocking header rendering.

* feat: Inject additional HTML content into main-body-wrapper after header update

- Added HTML content including tab-wrapper, overview, and deliverables sections to the main-body-wrapper div after the header.
- Updated the main-body-wrapper div to include newly provided HTML content for improved user interface and navigation.
- Ensured the content injection occurs after the header update to maintain correct rendering order.

* Added back displaying the back button with arrow icon and program name not available message and no data available message when program

* Updated logic to display the total asset count for an image

* Reverted back to
const programData = await executeQuery(programQueryString);
const deliverables = await executeQuery(deliverableQueryString);

* Restored constant variables for Marketing Goal, KPIs, Target Market, Audiences
    const p0TargetMarketArea = program.p0TargetMarketArea;
    const p1TargetMarketArea = program.p1TargetMarketArea;
    const kpis = buildKPIList(program).outerHTML;
    const targetMarketAreas = buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea).outerHTML;
    const audiences = buildAudienceList(program).outerHTML;
    const artifactLinks = buildArtifactLinks(program).outerHTML;

To make the code more readable, they were removed when the structure of the code was refactored to incrementally build the block.innerHTML, to make the page appear to load faster.

* assets.js (#132)

Added helper function async function getUnderdevelopmentIcon() to display the underdevelopment icon.
Also display the under development icon when  programName and campaignName is null
gmo-program-details.js
When programName and campaignName is null display the under development icon

* gmo-program-details.js
PR Code review change to

* Revert "gmo-program-details.js"

This reverts commit 18ddd12c8fef2fbcb9c56b54735e907f421f17ad.

* gmo-program-details.js
PR code review change to
let imageObject = {imageUrl : '', imageAltText: '', assetCount: 0};
assets.js
PR code review change to
if (!progamName && !campaginName)

* Resolved typo in variable programName

from
  if (!progamName && !campaginName)
to
 if (!programName && !campaignName)

* feat: Improve page load speed and add lazy loading for images (#134)

- Implement debounce for search input to reduce the number of API calls.
- Refactor the `decorate` function for better readability and performance.
- Add lazy loading for images using `IntersectionObserver` to load images only when they come into view.
- Move pagination button toggling to a separate `togglePaginationButtons` function.
- Ensure strict comparison (`===`) for block configuration check.

* ASSETS-88926 : Review and Improve Page Performance of Marketing Moment Landing page (Push Failed) (#137)

* feat: Improve page load speed and add lazy loading for images

- Implement debounce for search input to reduce the number of API calls.
- Refactor the `decorate` function for better readability and performance.
- Add lazy loading for images using `IntersectionObserver` to load images only when they come into view.
- Move pagination button toggling to a separate `togglePaginationButtons` function.
- Ensure strict comparison (`===`) for block configuration check.

* feat: Improve page load speed and add lazy loading for images

- Removed debounce for search
- Added lazy loading for images using `IntersectionObserver` to load images only when they come into view.

* ASSETS-88927 : Toggle Read More Button (#138)

* feat: Add Read More/Read Less toggle functionality

- Added event listener for Read More buttons to toggle text visibility in Marketing Goal and Product Value sections.
- Updated the decorate function to handle Read More/Read Less functionality.

* style: Add hide-overflow class for text truncation

- Added .hide-overflow class to handle text truncation with ellipsis.
- Ensured compatibility with the Read More/Read Less functionality.

* Modified FAQ Nav (#139)

Co-authored-by: Mathieu Lessard <[email protected]>

* Updated function  searchAsset(programName, campaignName, deliverableType = '', imageWidth = 80) (#142)

Added new parameter deliverableType, moved parameter  imageWidth to be the last parameter.

* Updated Launch Date label to Proposed Launch Date in Program List (#145)

Updated Launch Date tool tip to and Proposed Launch Date in Program Details page

* Added redirect block which supports regex (#148)

Co-authored-by: Mathieu Lessard <[email protected]>

* Replaced console.log with console.info (#149)

* Added redirect block which supports regex

* Added alert for redirect

* Changed log to info

* Added alert for redirect

* Changed log to info

---------

Co-authored-by: Mathieu Lessard <[email protected]>

* Added alert letting people know their content as moved (#154)

* Added redirect block which supports regex

* Added alert for redirect

* Changed log to info

* Added alert for redirect

* Changed log to info

* Added alert for redirect

---------

Co-authored-by: Mathieu Lessard <[email protected]>

* Squashed commit of the following:

commit 0659922c04ac5a76e29b135dc534b56ffd1d554d
Author: TyroneAEM <[email protected]>
Date:   Thu Aug 1 12:16:47 2024 -0500

    Branch rc to main => Update the 'Launch Date' label to "Proposed Launch Date" (#147)

    * Added mapping for uuid (#74)

    Co-authored-by: Mathieu Lessard <[email protected]>

    * Removed Prefix from Displayed UUID Value on Assets (#76)

    * Modified formatAssetMetadata() to allow custom dc-format Labels (#79)

    * Removed "required" and custom values for fields (#86)

    Co-authored-by: Mathieu Lessard <[email protected]>

    * Added getBaseConfigPath to Collections Back Button (#89)

    * Releasing HCV Dashboard code (#106)

    * ASSETS-88894 GRAPHQL Persisted Query Code (#53)

    * GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

    * Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

    * Renamed file test-graphql.js to graphql.js

    Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
    Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
    Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the conf…
shiv-gup added a commit that referenced this pull request Oct 1, 2024
* ASSETS-88894 GRAPHQL Persisted Query Code (#53)

* GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

* Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

* Renamed file test-graphql.js to graphql.js

Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

* Changed queryName to getAllCampaings

* Rollback to 3/15/24 Commit a519a51 before adding GraphQL test code

* Delete test graphql code

* ASSETS-88895 : Show HCV report pages to limited users (#55)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Campaign List block for Marketing Dashboard page (#56)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

---------

Co-authored-by: Michael Dickson <[email protected]>

* updated hydration-utils.js (#54)

MH: Added Firefly  product to AA Modal 'Product' Field List

* Assets 98990 - Dynamic campaign list (#61)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

* Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

Which calls the persisted query gmo/filter-on-marketing-initiative
with example parameters

{
  "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
}

https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

* Campaign List filters display (#65)

* initial html structure setup

* refactor from select to div implementation

Select with multiselect displays as a list, not a dropdown

* finish refactor, enable visual functionality

- added all javascript needed for visual functionality
- finished refactoring structure

* Assets 98990 (#66)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* minor updates

- update graphql query to have hardcoded offset/limit (to resolve error)
- remove comments
- add placeholder 'refresh date' message and css
- move css for main body to accomodate above message

* add firefly icon

---------

Co-authored-by: Tyrone Tse <[email protected]>

* ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

* Added function hideQuickLinks()

* Added the hide field to the  shared-quicklinks config/worksheet
/blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
/scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
/scripts/site-config.js : Updated function to include the hide field

* Refactored the If statement logic

* Assets 98992- Campaign details/overview (#69)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

* gmo-campagin-list refactored to use  persisted query function
	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

* Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
Refactored the code for Repaginate for when the number of items page is changed
Show current page status

* graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
Deleted function  graphqlCampaignPaginated(first,cursor)

Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

* Fixed logic in calculating the nextCursor

* Removed all debug console.log statements

* Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

* Renamed the variable testConfig to headerConfig

* Campaign details block (#71)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* add status bar display

Also adjusted demo data slightly to include due date and lead

* update css/html to align with mockup and mvp

* resolve border bug

* implemented requested changes

* ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

---------

Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

* Updated function toggleOption : To only allow a single option to be selected in the dropdown list

---------

Co-authored-by: Shivani gupta <[email protected]>

* Assets 98993 (#75)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* resolve pr comments

* Release 05.09.2024 (#78)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

---------

Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>

* ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Assets 98994 (#81)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* initial changeover from static to dynamic data

* adjustments based on feedback

* additional changes based on feedback

* minor bugfix, null checks

* squash final bug with read more

* final touches

* combine two graphql functions with duplicated code

* bugfixes per pr review

* ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
Updated Geo dropdown list to be populated by graphql persisted query getGeoList

* Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
When a Business Line option is deselected then the Products List shows all products.

* Reduced the sample dropdown list options

* make links configurable, remove extraneous logs (#83)

* ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Removed comment

* ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Added function searchAsset(programName, campaignName) to get the asset URL

* Changed alt text to use assets repo-name property

* Renamed/Moved AssetsDatasource.js to /scripts/assets
gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
otherwise the values from blockConfig are overwritten when paginating to next page.

gmo-campaign-details.js : Added campaign Image
gmo-campaign-details.css : Updated CSS to display campaign Image

* gmo-campaign-list.js : Deleted comment
/scripts/assets.js : Updated to use createSearchEndpoint
/scripts/scripts.js : Added export to  export function createSearchEndpoint() {

* Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

* gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
/scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

* Assets 98996 (#88)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* ASSETS-88905 : Add Fields to the Overview Tab (#87)

* Added Target Market Area lists

function function createKPI(kpi)  is renamed createLI(li)

Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

* gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
gmo-campaign-details.js : Added Target Market Area and Platforms
refactored async function buildChannelScope(scopeTypeId, scopes, block)
to be able to display data for data based for a specified  CSS ID

* Added function getUniqueItems(items, property)
to get unique values for deliverableType and platforms

* Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
to  async function buildFieldScopes(scopeTypeId, scopes, block)

* Added global variable globalGraphFliter (#92)

Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
with graphFilter = currentGraphqlFilter

* Assets 98996 (#93)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* add deliverabletype graphql

- todo: refactor, some superfluous function(s) can be removed

* refactor product list to use graphql

* fix deliverable type tags, fix multiline text

* fix sort on marketing moments column

* removing merge artifact

* resolve PR comments

* platforms mapping with graphql (#94)

- also cleaned up extraneous/defunct code

* Refactor sort icons (#95)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

* assets.js : Refactored code to eliminate console.log error
gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

* Eliminated  JavaScript errors when image is not found

* Display total assets = 0 when the campaign image does not exist

* Code cleanup (#98)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

* Code cleanup part 2 (#100)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* Added  function closeAllDropDowns() (#101)

Added function handleClickOutside(event)

Updated function attachEventListeners()
    // Add event listener for clicks outside of dropdowns
    document.addEventListener('click', handleClickOutside);

Added function  resetProductsDropDown();

Updated  function resetAllFilters() to call function   resetProductsDropDown();

* Sticky deliverables header, update graphql endpoints (#102)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* update query endpoints, css tweak on deliverables

* Added tool tip for Program Name and Campaign Name (#103)

* remove duplicate icons

---------

Co-authored-by: TyroneAEM <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Tyrone Tse <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
shiv-gup added a commit that referenced this pull request Oct 1, 2024
…mber of pages (#105)

* ASSETS-88894 GRAPHQL Persisted Query Code (#53)

* GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

* Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

* Renamed file test-graphql.js to graphql.js

Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

* Changed queryName to getAllCampaings

* Rollback to 3/15/24 Commit a519a51 before adding GraphQL test code

* Delete test graphql code

* ASSETS-88895 : Show HCV report pages to limited users (#55)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Campaign List block for Marketing Dashboard page (#56)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

---------

Co-authored-by: Michael Dickson <[email protected]>

* updated hydration-utils.js (#54)

MH: Added Firefly  product to AA Modal 'Product' Field List

* Assets 98990 - Dynamic campaign list (#61)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

* Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

Which calls the persisted query gmo/filter-on-marketing-initiative
with example parameters

{
  "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
}

https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

* Campaign List filters display (#65)

* initial html structure setup

* refactor from select to div implementation

Select with multiselect displays as a list, not a dropdown

* finish refactor, enable visual functionality

- added all javascript needed for visual functionality
- finished refactoring structure

* Assets 98990 (#66)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* minor updates

- update graphql query to have hardcoded offset/limit (to resolve error)
- remove comments
- add placeholder 'refresh date' message and css
- move css for main body to accomodate above message

* add firefly icon

---------

Co-authored-by: Tyrone Tse <[email protected]>

* ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

* Added function hideQuickLinks()

* Added the hide field to the  shared-quicklinks config/worksheet
/blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
/scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
/scripts/site-config.js : Updated function to include the hide field

* Refactored the If statement logic

* Assets 98992- Campaign details/overview (#69)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

* gmo-campagin-list refactored to use  persisted query function
	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

* Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
Refactored the code for Repaginate for when the number of items page is changed
Show current page status

* graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
Deleted function  graphqlCampaignPaginated(first,cursor)

Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

* Fixed logic in calculating the nextCursor

* Removed all debug console.log statements

* Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

* Renamed the variable testConfig to headerConfig

* Campaign details block (#71)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* add status bar display

Also adjusted demo data slightly to include due date and lead

* update css/html to align with mockup and mvp

* resolve border bug

* implemented requested changes

* ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

---------

Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

* Updated function toggleOption : To only allow a single option to be selected in the dropdown list

---------

Co-authored-by: Shivani gupta <[email protected]>

* Assets 98993 (#75)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* resolve pr comments

* Release 05.09.2024 (#78)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

---------

Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>

* ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Assets 98994 (#81)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* initial changeover from static to dynamic data

* adjustments based on feedback

* additional changes based on feedback

* minor bugfix, null checks

* squash final bug with read more

* final touches

* combine two graphql functions with duplicated code

* bugfixes per pr review

* ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
Updated Geo dropdown list to be populated by graphql persisted query getGeoList

* Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
When a Business Line option is deselected then the Products List shows all products.

* Reduced the sample dropdown list options

* make links configurable, remove extraneous logs (#83)

* ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Removed comment

* ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Added function searchAsset(programName, campaignName) to get the asset URL

* Changed alt text to use assets repo-name property

* Renamed/Moved AssetsDatasource.js to /scripts/assets
gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
otherwise the values from blockConfig are overwritten when paginating to next page.

gmo-campaign-details.js : Added campaign Image
gmo-campaign-details.css : Updated CSS to display campaign Image

* gmo-campaign-list.js : Deleted comment
/scripts/assets.js : Updated to use createSearchEndpoint
/scripts/scripts.js : Added export to  export function createSearchEndpoint() {

* Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

* gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
/scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

* Assets 98996 (#88)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* ASSETS-88905 : Add Fields to the Overview Tab (#87)

* Added Target Market Area lists

function function createKPI(kpi)  is renamed createLI(li)

Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

* gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
gmo-campaign-details.js : Added Target Market Area and Platforms
refactored async function buildChannelScope(scopeTypeId, scopes, block)
to be able to display data for data based for a specified  CSS ID

* Added function getUniqueItems(items, property)
to get unique values for deliverableType and platforms

* Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
to  async function buildFieldScopes(scopeTypeId, scopes, block)

* Added global variable globalGraphFliter (#92)

Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
with graphFilter = currentGraphqlFilter

* Assets 98996 (#93)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* add deliverabletype graphql

- todo: refactor, some superfluous function(s) can be removed

* refactor product list to use graphql

* fix deliverable type tags, fix multiline text

* fix sort on marketing moments column

* removing merge artifact

* resolve PR comments

* platforms mapping with graphql (#94)

- also cleaned up extraneous/defunct code

* Refactor sort icons (#95)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

* assets.js : Refactored code to eliminate console.log error
gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

* Eliminated  JavaScript errors when image is not found

* Display total assets = 0 when the campaign image does not exist

* Code cleanup (#98)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

* Code cleanup part 2 (#100)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* Added  function closeAllDropDowns() (#101)

Added function handleClickOutside(event)

Updated function attachEventListeners()
    // Add event listener for clicks outside of dropdowns
    document.addEventListener('click', handleClickOutside);

Added function  resetProductsDropDown();

Updated  function resetAllFilters() to call function   resetProductsDropDown();

* Sticky deliverables header, update graphql endpoints (#102)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* update query endpoints, css tweak on deliverables

* Added tool tip for Program Name and Campaign Name (#103)

* remove duplicate icons

* Change default items per page from 4 to 8
Changed undefined message for Campaign to  Marketing Moment Not Available

* Remove debugging from graphql.js

* Deleted function debug_console()

---------

Co-authored-by: Shivani Gupta <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
shiv-gup pushed a commit that referenced this pull request Oct 1, 2024
commit 0659922c04ac5a76e29b135dc534b56ffd1d554d
Author: TyroneAEM <[email protected]>
Date:   Thu Aug 1 12:16:47 2024 -0500

    Branch rc to main => Update the 'Launch Date' label to "Proposed Launch Date" (#147)

    * Added mapping for uuid (#74)

    Co-authored-by: Mathieu Lessard <[email protected]>

    * Removed Prefix from Displayed UUID Value on Assets (#76)

    * Modified formatAssetMetadata() to allow custom dc-format Labels (#79)

    * Removed "required" and custom values for fields (#86)

    Co-authored-by: Mathieu Lessard <[email protected]>

    * Added getBaseConfigPath to Collections Back Button (#89)

    * Releasing HCV Dashboard code (#106)

    * ASSETS-88894 GRAPHQL Persisted Query Code (#53)

    * GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

    * Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

    * Renamed file test-graphql.js to graphql.js

    Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
    Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
    Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

    * Changed queryName to getAllCampaings

    * Rollback to 3/15/24 Commit a519a5155c3dd57f0c54ea8bd336cd0a231cffab before adding GraphQL test code

    * Delete test graphql code

    * ASSETS-88895 : Show HCV report pages to limited users (#55)

    * security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

    site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

    * securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
    Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
    The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

    Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

    * Campaign List block for Marketing Dashboard page (#56)

    * initial commit, new blocks/files

    * rename files, start implementing

    * continuing to implement/adjust styling

    * numerous changes

    - finish building bones of list component
    - build bones of pagination/footer
    - add icons for products (will likely need more)
    - build javascript for pagination (cleanup needed)
    - build javascript for sorting list

    ---------

    Co-authored-by: Michael Dickson <[email protected]>

    * updated hydration-utils.js (#54)

    MH: Added Firefly  product to AA Modal 'Product' Field List

    * Assets 98990 - Dynamic campaign list (#61)

    * initial commit, new blocks/files

    * rename files, start implementing

    * continuing to implement/adjust styling

    * numerous changes

    - finish building bones of list component
    - build bones of pagination/footer
    - add icons for products (will likely need more)
    - build javascript for pagination (cleanup needed)
    - build javascript for sorting list

    * finish pagination

    * Updates to css/js to better align to mockup

    * ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

    * security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

    site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

    * securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
    Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
    The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

    Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

    * Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

    * Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

    Which calls the persisted query gmo/filter-on-marketing-initiative
    with example parameters

    {
      "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
    }

    https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

    * Campaign List filters display (#65)

    * initial html structure setup

    * refactor from select to div implementation

    Select with multiselect displays as a list, not a dropdown

    * finish refactor, enable visual functionality

    - added all javascript needed for visual functionality
    - finished refactoring structure

    * Assets 98990 (#66)

    * initial commit, new blocks/files

    * rename files, start implementing

    * continuing to implement/adjust styling

    * numerous changes

    - finish building bones of list component
    - build bones of pagination/footer
    - add icons for products (will likely need more)
    - build javascript for pagination (cleanup needed)
    - build javascript for sorting list

    * finish pagination

    * Updates to css/js to better align to mockup

    * minor updates

    - update graphql query to have hardcoded offset/limit (to resolve error)
    - remove comments
    - add placeholder 'refresh date' message and css
    - move css for main body to accomodate above message

    * add firefly icon

    ---------

    Co-authored-by: Tyrone Tse <[email protected]>

    * ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

    * Added function hideQuickLinks()

    * Added the hide field to the  shared-quicklinks config/worksheet
    /blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
    /scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
    /scripts/site-config.js : Updated function to include the hide field

    * Refactored the If statement logic

    * Assets 98992- Campaign details/overview (#69)

    * initial block structure

    * start mocking up structure

    * many changes

    - finish overview tab mockup
    - (mostly) finish deliverables tab

    * fix css- add top/bottom borders to rows

    * delete invalid metadata from new svgs

    * updates for mvp

    - Rename and hide various elements of page
    - Refactor tablebuilding function to deal with items that are missing
      categorization properties

    * hide total assets

    * ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

    * gmo-campagin-list refactored to use  persisted query function
    	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

    * Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
    Refactored the code for Repaginate for when the number of items page is changed
    Show current page status

    * graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
    Deleted function  graphqlCampaignPaginated(first,cursor)

    Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

    * Fixed logic in calculating the nextCursor

    * Removed all debug console.log statements

    * Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

    * Renamed the variable testConfig to headerConfig

    * Campaign details block (#71)

    * initial block structure

    * start mocking up structure

    * many changes

    - finish overview tab mockup
    - (mostly) finish deliverables tab

    * fix css- add top/bottom borders to rows

    * delete invalid metadata from new svgs

    * updates for mvp

    - Rename and hide various elements of page
    - Refactor tablebuilding function to deal with items that are missing
      categorization properties

    * hide total assets

    * add status bar display

    Also adjusted demo data slightly to include due date and lead

    * update css/html to align with mockup and mvp

    * resolve border bug

    * implemented requested changes

    * ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

    * graphql.js : Added functions graphqlProductList and graphqlStatusList
    gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
    Updated code to build Product dropdown from function graphqlProductList

    * /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
    which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

    /blocks/gmo-campaign-header/gmo-campaign-header.js :
    Created new function sendGmoCampaignListBlockEvent()
    that calls the custom event   gmoCampaignListBlock
    from the gmo-campaign-header.

    This will trigger the custom event in the /blocks/gmo-campaign-list
    to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
    Business Line
    Status and Product

    * graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
    Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

    /blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

    /blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
    Updated the function decorate to have new parameter graphQLFilter
    So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

    * Adde autocomplete list CSS, JS and HMTL for the campaign search field.

    * graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
    gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
    /gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

    * gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
    gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
    graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

    * Removed console.log messages

    * Fixed bug with currentPageInfo.nextCursor

    * Fixed bug in calculation of cursor to use for the previous page logic

    * graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
    Variables baseApiUrl and projectId are now global/class level variables.

    gmo-campaign-header.js : Close dropdown list when a value is selected

    * update campaign with program

    ---------

    Co-authored-by: Shivani gupta <[email protected]>

    * ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

    * graphql.js : Added functions graphqlProductList and graphqlStatusList
    gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
    Updated code to build Product dropdown from function graphqlProductList

    * /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
    which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

    /blocks/gmo-campaign-header/gmo-campaign-header.js :
    Created new function sendGmoCampaignListBlockEvent()
    that calls the custom event   gmoCampaignListBlock
    from the gmo-campaign-header.

    This will trigger the custom event in the /blocks/gmo-campaign-list
    to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
    Business Line
    Status and Product

    * graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
    Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

    /blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

    /blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
    Updated the function decorate to have new parameter graphQLFilter
    So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

    * Adde autocomplete list CSS, JS and HMTL for the campaign search field.

    * graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
    gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
    /gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

    * gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
    gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
    graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

    * Removed console.log messages

    * Fixed bug with currentPageInfo.nextCursor

    * Fixed bug in calculation of cursor to use for the previous page logic

    * graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
    Variables baseApiUrl and projectId are now global/class level variables.

    gmo-campaign-header.js : Close dropdown list when a value is selected

    * update campaign with program

    * Updated function toggleOption : To only allow a single option to be selected in the dropdown list

    ---------

    Co-authored-by: Shivani gupta <[email protected]>

    * Assets 98993 (#75)

    * many updates

    * finish dynamic properties

    - all properties should be dynamic based on graphql data
    - refactored some common lookups to a shared javascript file
    - updated overflow for overview/description
    - made status, products more presentable
    - more elegant handling of empty audience and kpi lists

    * test rename svg to resolve issue

    * finish updating icon names and mapping

    * resolve pr comments

    * Release 05.09.2024 (#78)

    * Added mapping for uuid (#74)

    Co-authored-by: Mathieu Lessard <[email protected]>

    * Removed Prefix from Displayed UUID Value on Assets (#76)

    ---------

    Co-authored-by: Mathieu Lessard <[email protected]>
    Co-authored-by: Christopher Heintzman <[email protected]>

    * ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

    * Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

    * Fixed Previous Page pagination logic for calculating the cursor for the Previous page

    * Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

    * Assets 98994 (#81)

    * many updates

    * finish dynamic properties

    - all properties should be dynamic based on graphql data
    - refactored some common lookups to a shared javascript file
    - updated overflow for overview/description
    - made status, products more presentable
    - more elegant handling of empty audience and kpi lists

    * test rename svg to resolve issue

    * finish updating icon names and mapping

    * initial changeover from static to dynamic data

    * adjustments based on feedback

    * additional changes based on feedback

    * minor bugfix, null checks

    * squash final bug with read more

    * final touches

    * combine two graphql functions with duplicated code

    * bugfixes per pr review

    * ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

    * Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

    * Fixed Previous Page pagination logic for calculating the cursor for the Previous page

    * Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

    * Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
    Updated Geo dropdown list to be populated by graphql persisted query getGeoList

    * Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
    When a Business Line option is deselected then the Products List shows all products.

    * Reduced the sample dropdown list options

    * make links configurable, remove extraneous logs (#83)

    * ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

    * Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

    * Removed comment

    * ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

    * Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

    * Added function searchAsset(programName, campaignName) to get the asset URL

    * Changed alt text to use assets repo-name property

    * Renamed/Moved AssetsDatasource.js to /scripts/assets
    gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
    otherwise the values from blockConfig are overwritten when paginating to next page.

    gmo-campaign-details.js : Added campaign Image
    gmo-campaign-details.css : Updated CSS to display campaign Image

    * gmo-campaign-list.js : Deleted comment
    /scripts/assets.js : Updated to use createSearchEndpoint
    /scripts/scripts.js : Added export to  export function createSearchEndpoint() {

    * Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

    * gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
    /scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

    * Assets 98996 (#88)

    * initial grouping functionality

    * add sorting, label mappings

    * readd expand/collapse chevrons, add counts

    * add sort by date in groups

    * add important links dynamic generation

    * resolve bug with detailpage link

    * adjust width on links in deliverables tab

    * merge 12024 in and adjust width for links

    * update property name for revised completion date

    * implement graphql query for status mapping

    * ASSETS-88905 : Add Fields to the Overview Tab (#87)

    * Added Target Market Area lists

    function function createKPI(kpi)  is renamed createLI(li)

    Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

    * gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
    gmo-campaign-details.js : Added Target Market Area and Platforms
    refactored async function buildChannelScope(scopeTypeId, scopes, block)
    to be able to display data for data based for a specified  CSS ID

    * Added function getUniqueItems(items, property)
    to get unique values for deliverableType and platforms

    * Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
    to  async function buildFieldScopes(scopeTypeId, scopes, block)

    * Added global variable globalGraphFliter (#92)

    Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
    with graphFilter = currentGraphqlFilter

    * Assets 98996 (#93)

    * initial grouping functionality

    * add sorting, label mappings

    * readd expand/collapse chevrons, add counts

    * add sort by date in groups

    * add important links dynamic generation

    * resolve bug with detailpage link

    * adjust width on links in deliverables tab

    * merge 12024 in and adjust width for links

    * update property name for revised completion date

    * implement graphql query for status mapping

    * add deliverabletype graphql

    - todo: refactor, some superfluous function(s) can be removed

    * refactor product list to use graphql

    * fix deliverable type tags, fix multiline text

    * fix sort on marketing moments column

    * removing merge artifact

    * resolve PR comments

    * platforms mapping with graphql (#94)

    - also cleaned up extraneous/defunct code

    * Refactor sort icons (#95)

    * platforms mapping with graphql

    - also cleaned up extraneous/defunct code

    * refactor chevrons for column sort

    * add title attribs

    * ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

    * assets.js : Refactored code to eliminate console.log error
    gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

    * Eliminated  JavaScript errors when image is not found

    * Display total assets = 0 when the campaign image does not exist

    * Code cleanup (#98)

    * platforms mapping with graphql

    - also cleaned up extraneous/defunct code

    * refactor chevrons for column sort

    * add title attribs

    * remove kpi column

    * rename blocks

    * cleaning up redundant code

    * continuing cleanup

    * fix pagination bug

    * fix css bug in audience card

    * Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

    * Code cleanup part 2 (#100)

    * platforms mapping with graphql

    - also cleaned up extraneous/defunct code

    * refactor chevrons for column sort

    * add title attribs

    * remove kpi column

    * rename blocks

    * cleaning up redundant code

    * continuing cleanup

    * fix pagination bug

    * fix css bug in audience card

    * cleanup, readd missing row

    - remove commented code
    - remove commented html
    - readd campaign name to overview tab if available

    * resolve undone null check for product label

    * handle bad response from product icon map

    * Added  function closeAllDropDowns() (#101)

    Added function handleClickOutside(event)

    Updated function attachEventListeners()
        // Add event listener for clicks outside of dropdowns
        document.addEventListener('click', handleClickOutside);

    Added function  resetProductsDropDown();

    Updated  function resetAllFilters() to call function   resetProductsDropDown();

    * Sticky deliverables header, update graphql endpoints (#102)

    * platforms mapping with graphql

    - also cleaned up extraneous/defunct code

    * refactor chevrons for column sort

    * add title attribs

    * remove kpi column

    * rename blocks

    * cleaning up redundant code

    * continuing cleanup

    * fix pagination bug

    * fix css bug in audience card

    * cleanup, readd missing row

    - remove commented code
    - remove commented html
    - readd campaign name to overview tab if available

    * resolve undone null check for product label

    * handle bad response from product icon map

    * update query endpoints, css tweak on deliverables

    * Added tool tip for Program Name and Campaign Name (#103)

    * remove duplicate icons

    ---------

    Co-authored-by: TyroneAEM <[email protected]>
    Co-authored-by: Michael Dickson <[email protected]>
    Co-authored-by: Samruddhi <[email protected]>
    Co-authored-by: mdickson-adbe <[email protected]>
    Co-authored-by: Tyrone Tse <[email protected]>
    Co-authored-by: Shivani gupta <[email protected]>
    Co-authored-by: mathieu-lessard <[email protected]>
    Co-authored-by: Mathieu Lessard <[email protected]>
    Co-authored-by: Christopher Heintzman <[email protected]>
    Co-authored-by: Shivani gupta <[email protected]>

    * ASSETS-88912 : [Issue] Last page number is not matching with total number of pages (#105)

    * ASSETS-88894 GRAPHQL Persisted Query Code (#53)

    * GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

    * Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

    * Renamed file test-graphql.js to graphql.js

    Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
    Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
    Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

    * Changed queryName to getAllCampaings

    * Rollback to 3/15/24 Commit a519a5155c3dd57f0c54ea8bd336cd0a231cffab before adding GraphQL test code

    * Delete test graphql code

    * ASSETS-88895 : Show HCV report pages to limited users (#55)

    * security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

    site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

    * securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
    Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
    The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

    Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

    * Campaign List block for Marketing Dashboard page (#56)

    * initial commit, new blocks/files

    * rename files, start implementing

    * continuing to implement/adjust styling

    * numerous changes

    - finish building bones of list component
    - build bones of pagination/footer
    - add icons for products (will likely need more)
    - build javascript for pagination (cleanup needed)
    - build javascript for sorting list

    ---------

    Co-authored-by: Michael Dickson <[email protected]>

    * updated hydration-utils.js (#54)

    MH: Added Firefly  product to AA Modal 'Product' Field List

    * Assets 98990 - Dynamic campaign list (#61)

    * initial commit, new blocks/files

    * rename files, start implementing

    * continuing to implement/adjust styling

    * numerous changes

    - finish building bones of list component
    - build bones of pagination/footer
    - add icons for products (will likely need more)
    - build javascript for pagination (cleanup needed)
    - build javascript for sorting list

    * finish pagination

    * Updates to css/js to better align to mockup

    * ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

    * security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

    site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

    * securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
    Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
    The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

    Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

    * Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

    * Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

    Which calls the persisted query gmo/filter-on-marketing-initiative
    with example parameters

    {
      "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
    }

    https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

    * Campaign List filters display (#65)

    * initial html structure setup

    * refactor from select to div implementation

    Select with multiselect displays as a list, not a dropdown

    * finish refactor, enable visual functionality

    - added all javascript needed for visual functionality
    - finished refactoring structure

    * Assets 98990 (#66)

    * initial commit, new blocks/files

    * rename files, start implementing

    * continuing to implement/adjust styling

    * numerous changes

    - finish building bones of list component
    - build bones of pagination/footer
    - add icons for products (will likely need more)
    - build javascript for pagination (cleanup needed)
    - build javascript for sorting list

    * finish pagination

    * Updates to css/js to better align to mockup

    * minor updates

    - update graphql query to have hardcoded offset/limit (to resolve error)
    - remove comments
    - add placeholder 'refresh date' message and css
    - move css for main body to accomodate above message

    * add firefly icon

    ---------

    Co-authored-by: Tyrone Tse <[email protected]>

    * ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

    * Added function hideQuickLinks()

    * Added the hide field to the  shared-quicklinks config/worksheet
    /blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
    /scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
    /scripts/site-config.js : Updated function to include the hide field

    * Refactored the If statement logic

    * Assets 98992- Campaign details/overview (#69)

    * initial block structure

    * start mocking up structure

    * many changes

    - finish overview tab mockup
    - (mostly) finish deliverables tab

    * fix css- add top/bottom borders to rows

    * delete invalid metadata from new svgs

    * updates for mvp

    - Rename and hide various elements of page
    - Refactor tablebuilding function to deal with items that are missing
      categorization properties

    * hide total assets

    * ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

    * gmo-campagin-list refactored to use  persisted query function
    	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

    * Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
    Refactored the code for Repaginate for when the number of items page is changed
    Show current page status

    * graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
    Deleted function  graphqlCampaignPaginated(first,cursor)

    Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

    * Fixed logic in calculating the nextCursor

    * Removed all debug console.log statements

    * Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

    * Renamed the variable testConfig to headerConfig

    * Campaign details block (#71)

    * initial block structure

    * start mocking up structure

    * many changes

    - finish overview tab mockup
    - (mostly) finish deliverables tab

    * fix css- add top/bottom borders to rows

    * delete invalid metadata from new svgs

    * updates for mvp

    - Rename and hide various elements of page
    - Refactor tablebuilding function to deal with items that are missing
      categorization properties

    * hide total assets

    * add status bar display

    Also adjusted demo data slightly to include due date and lead

    * update css/html to align with mockup and mvp

    * resolve border bug

    * implemented requested changes

    * ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

    * graphql.js : Added functions graphqlProductList and graphqlStatusList
    gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
    Updated code to build Product dropdown from function graphqlProductList

    * /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
    which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

    /blocks/gmo-campaign-header/gmo-campaign-header.js :
    Created new function sendGmoCampaignListBlockEvent()
    that calls the custom event   gmoCampaignListBlock
    from the gmo-campaign-header.

    This will trigger the custom event in the /blocks/gmo-campaign-list
    to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
    Business Line
    Status and Product

    * graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
    Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

    /blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

    /blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
    Updated the function decorate to have new parameter graphQLFilter
    So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

    * Adde autocomplete list CSS, JS and HMTL for the campaign search field.

    * graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
    gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
    /gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

    * gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
    gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
    graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

    * Removed console.log messages

    * Fixed bug with currentPageInfo.nextCursor

    * Fixed bug in calculation of cursor to use for the previous page logic

    * graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
    Variables baseApiUrl and projectId are now global/class level variables.

    gmo-campaign-header.js : Close dropdown list when a value is selected

    * update campaign with program

    ---------

    Co-authored-by: Shivani gupta <[email protected]>

    * ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

    * graphql.js : Added functions graphqlProductList and graphqlStatusList
    gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
    Updated code to build Product dropdown from function graphqlProductList

    * /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
    which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

    /blocks/gmo-campaign-header/gmo-campaign-header.js :
    Created new function sendGmoCampaignListBlockEvent()
    that calls the custom event   gmoCampaignListBlock
    from the gmo-campaign-header.

    This will trigger the custom event in the /blocks/gmo-campaign-list
    to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
    Business Line
    Status and Product

    * graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
    Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

    /blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

    /blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
    Updated the function decorate to have new parameter graphQLFilter
    So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

    * Adde autocomplete list CSS, JS and HMTL for the campaign search field.

    * graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
    gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
    /gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

    * gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
    gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
    graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

    * Removed console.log messages

    * Fixed bug with currentPageInfo.nextCursor

    * Fixed bug in calculation of cursor to use for the previous page logic

    * graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
    Variables baseApiUrl and projectId are now global/class level variables.

    gmo-campaign-header.js : Close dropdown list when a value is selected

    * update campaign with program

    * Updated function toggleOption : To only allow a single option to be selected in the dropdown list

    ---------

    Co-authored-by: Shivani gupta <[email protected]>

    * Assets 98993 (#75)

    * many updates

    * finish dynamic properties

    - all properties should be dynamic based on graphql data
    - refactored some common lookups to a shared javascript file
    - updated overflow for overview/description
    - made status, products more presentable
    - more elegant handling of empty audience and kpi lists

    * test rename svg to resolve issue

    * finish updating icon names and mapping

    * resolve pr comments

    * Release 05.09.2024 (#78)

    * Added mapping for uuid (#74)

    Co-authored-by: Mathieu Lessard <[email protected]>

    * Removed Prefix from Displayed UUID Value on Assets (#76)

    ---------

    Co-authored-by: Mathieu Lessard <[email protected]>
    Co-authored-by: Christopher Heintzman <[email protected]>

    * ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

    * Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

    * Fixed Previous Page pagination logic for calculating the cursor for the Previous page

    * Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

    * Assets 98994 (#81)

    * many updates

    * finish dynamic properties

    - all properties should be dynamic based on graphql data
    - refactored some common lookups to a shared javascript file
    - updated overflow for overview/description
    - made status, products more presentable
    - more elegant handling of empty audience and kpi lists

    * test rename svg to resolve issue

    * finish updating icon names and mapping

    * initial changeover from static to dynamic data

    * adjustments based on feedback

    * additional changes based on feedback

    * minor bugfix, null checks

    * squash final bug with read more

    * final touches

    * combine two graphql functions with duplicated code

    * bugfixes per pr review

    * ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

    * Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

    * Fixed Previous Page pagination logic for calculating the cursor for the Previous page

    * Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

    * Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
    Updated Geo dropdown list to be populated by graphql persisted query getGeoList

    * Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
    When a Business Line option is deselected then the Products List shows all products.

    * Reduced the sample dropdown list options

    * make links configurable, remove extraneous logs (#83)

    * ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

    * Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

    * Removed comment

    * ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

    * Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

    * Added function searchAsset(programName, campaignName) to get the asset URL

    * Changed alt text to use assets repo-name property

    * Renamed/Moved AssetsDatasource.js to /scripts/assets
    gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
    otherwise the values from blockConfig are overwritten when paginating to next page.

    gmo-campaign-details.js : Added campaign Image
    gmo-campaign-details.css : Updated CSS to display campaign Image

    * gmo-campaign-list.js : Deleted comment
    /scripts/assets.js : Updated to use createSearchEndpoint
    /scripts/scripts.js : Added export to  export function createSearchEndpoint() {

    * Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

    * gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
    /scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

    * Assets 98996 (#88)

    * initial grouping functionality

    * add sorting, label mappings

    * readd expand/collapse chevrons, add counts

    * add sort by date in groups

    * add important links dynamic generation

    * resolve bug with detailpage link

    * adjust width on links in deliverables tab

    * merge 12024 in and adjust width for links

    * update property name for revised completion date

    * implement graphql query for status mapping

    * ASSETS-88905 : Add Fields to the Overview Tab (#87)

    * Added Target Market Area lists

    function function createKPI(kpi)  is renamed createLI(li)

    Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

    * gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
    gmo-campaign-details.js : Added Target Market Area and Platforms
    refactored async function buildChannelScope(scopeTypeId, scopes, block)
    to be able to display data for data based for a specified  CSS ID

    * Added function getUniqueItems(items, property)
    to get unique values for deliverableType and platforms

    * Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
    to  async function buildFieldScopes(scopeTypeId, scopes, block)

    * Added global variable globalGraphFliter (#92)

    Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
    with graphFilter = currentGraphqlFilter

    * Assets 98996 (#93)

    * initial grouping functionality

    * add sorting, label mappings

    * readd expand/collapse chevrons, add counts

    * add sort by date in groups

    * add important links dynamic generation

    * resolve bug with detailpage link

    * adjust width on links in deliverables tab

    * merge 12024 in and adjust width for links

    * update property name for revised completion date

    * implement graphql query for status mapping

    * add deliverabletype graphql

    - todo: refactor, some superfluous function(s) can be removed

    * refactor product list to use graphql

    * fix deliverable type tags, fix multiline text

    * fix sort on marketing moments column

    * removing merge artifact

    * resolve PR comments

    * platforms mapping with graphql (#94)

    - also cleaned up extraneous/defunct code

    * Refactor sort icons (#95)

    * platforms mapping with graphql

    - also cleaned up extraneous/defunct code

    * refactor chevrons for column sort

    * add title attribs

    * ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

    * assets.js : Refactored code to eliminate console.log error
    gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

    * Eliminated  JavaScript errors when image is not found

    * Display total assets = 0 when the campaign image does not exist

    * Code cleanup (#98)

    * platforms mapping with graphql

    - also cleaned up extraneous/defunct code

    * refactor chevrons for column sort

    * add title attribs

    * remove kpi column

    * rename blocks

    * cleaning up redundant code

    * continuing cleanup

    * fix pagination bug

    * fix css bug in audience card

    * Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

    * Code cleanup part 2 (#100)

    * platforms mapping with graphql

    - also cleaned up extraneous/defunct code

    * refactor chevrons for column sort

    * add title attribs

    * remove kpi column

    * rename blocks

    * cleaning up redundant code

    * continuing cleanup

    * fix pagination bug

    * fix css bug in audience card

    * cleanup, readd missing row

    - remove commented code
    - remove commented html
    - readd campaign name to overview tab if available

    * resolve undone null check for product label

    * handle bad response from product icon map

    * Added  function closeAllDropDowns() (#101)

    Added function handleClickOutside(event)

    Updated function attachEventListeners()
        // Add event listener for clicks outside of dropdowns
        document.addEventListener('click', handleClickOutside);

    Added function  resetProductsDropDown();

    Updated  function resetAllFilters() to call function   resetProductsDropDown();

    * Sticky deliverables header, update graphql endpoints (#102)

    * platforms mapping with graphql

    - also cleaned up extraneous/defunct code

    * refactor chevrons for column sort

    * add title attribs

    * remove kpi column

    * rename blocks

    * cleaning up redundant code

    * continuing cleanup

    * fix pagination bug

    * fix css bug in audience card

    * cleanup, readd missing row

    - remove commented code
    - remove commented html
    - readd campaign name to overview tab if available

    * resolve undone null check for product label

    * handle bad response from product icon map

    * update query endpoints, css tweak on deliverables

    * Added tool tip for Program Name and Campaign Name (#103)

    * remove duplicate icons

    * Change default items per page from 4 to 8
    Changed undefined message for Campaign to  Marketing Moment Not Available

    * Remove debugging from graphql.js

    * Deleted function debug_console()

    ---------

    Co-authored-by: Shivani Gupta <[email protected]>
    Co-authored-by: Michael Dickson <[email protected]>
    Co-authored-by: Samruddhi <[email protected]>
    Co-authored-by: mdickson-adbe <[email protected]>
    Co-authored-by: Shivani gupta <[email protected]>
    Co-authored-by: mathieu-lessard <[email protected]>
    Co-authored-by: Mathieu Lessard <[email protected]>
    Co-authored-by: Christopher Heintzman <[email protected]>
    Co-authored-by: Shivani gupta <[email protected]>

    * Performance refactoring (#107)

    * performance refactoring

    - improve thumbnail performance by makin async
    - format date property to yyyy-mm-dd
    - fix margin issue in program header
    - refactor function that builds header dropdown for increased
      performance

    * resolve bug with event listeners not attaching

    * add programID parameter to deliverable query (#109)

    * add programID parameter to deliverable query

    * quick null check for status color

    * remove console log

    * Update query names, handle formatting (#110)

    * update query names

    * handle null deliverable types

    * make dateFormat function available to detail block

    * remove unused function

    * remove console log messages

    * fix typo in graphql query name (#111)

    * ASSETS-88914 : Fix Pagination Frontend Code (#108)

    * Changed the default number items per page to 4
    Added function  debounce(func, wait)  to delay the Previous and Next page to wait 0.5 seconds between each click, to stop the user clicking too fast and breaking pagination

    * Decrease debounce timeout to 200 milliseconds (0.2 secs)

    * Added check that next page cannot go past last page
    Added check that prev page cannot go back past page 1

    * fix(pagination): Ensure proper handling of next/prev buttons and page boundaries

    - Added totalPages calculation and checks to ensure "Next" button is disabled on the last page
    - Updated nextPage function to correctly enable/disable pagination buttons
    - Improved prevPage function to ensure it navigates back to the first page correctly
    - Applied debounce to prevent rapid clicking issues
    - Refactored logic for enabling/disabling pagination buttons based on current page state

    * - Changed default items per page to 8
    - Removed 4 items per page from filter
    - Removed cusorArray, and replaced it with  currentPageInfo.previousCursor =  currentPageInfo.currentCursor;
    - Set next cursor to  data.programPaginated.pageInfo.endCursor;
    - Function prevPage now uses  currentPage.previousCursor as the cursor parameter value, and calculating the cursor value to use from cursorArray is no longer needed.

    * Increased the click delay to 500 milliseconds

    * Disabled the Previous and Next Button as soon as they are clicked, to prevent the user multiple clicking the button.

    * Restored previous logic using cursorArray to manage the calculation of the cursor for the previous page. (#113)

    * Adjust height of deliverables tab on program-details block (#114)

    * minor css changes for program details

    * adjust deliverables table height

    * add min height to deliverables table

    * remove commented css

    * Sort deliverable type array before rows are made

    * DXI-26587- Modify landing page for v3 Hub, so Signin goes to CH/v4 (#116)

    * Replace throwing 404 error when the asset is not found, with asset.svg icon (#119)

    * Make content fragment path for WF mappings configurable (#118)

    * refactoring to use single graphql endpoint for map

    * refactor 'mapping' functions

    - refactor mapping retrieval functions in all three hcv blocks

    * Remove comments

    * remove unused function stub

    * resolve bug in header filter refresh

    * remove unused import

    * Fixed issue where header didn't load if the user didn't have a profile yet (#121)

    Co-authored-by: Mathieu Lessard <[email protected]>

    * add checks for null 'review link' and 'final asset' (#122)

    * Refactor header and query variable extraction (#123)

    * add checks for null 'review link' and 'final asset'

    * Add msg for programs with no data available

    * refactor header so it can be used with no data

    * wrap msg with div for styling

    * refactor query variable extraction

    - had to account for ampersand in program name

    * Updated Product List (#117)

    * Product list updated

    * N/A value and label now match

    * Fixed formatting

    ---------

    Co-authored-by: Mathieu Lessard <[email protected]>

    * Restored calling the function attatchEventListerners() at the end of the function decorate(block) (#124)

    * Fix text wrapping issue in Project Owner column for smaller viewports (#125)

    - Adjusted CSS to ensure text in the "Project Owner" column wraps properly
    - Set row height to auto and adjusted line-height for better spacing
    - Added media query for responsive width adjustments
    - Ensured consistent display and improved readability across different viewport sizes

    * ASSETS-88920 : Cosmetic Updates from MVP Feedback (#126)

    * feat: Add Geo column to program list and adjust column widths for proper alignment

    - Updated `gmo-program-list.js` to include Geo column in the header configuration and campaign list
    - Adjusted column widths in `gmo-program-list.css` to ensure proper alignment under each column heading
    - Add function `formatGeos` to format Geo array as comma-delimited list, that is displayed in the Geo column

    * - Added a tooltip to the "Total Approved Assets" field in the Deliverables tab.
    - Tooltip text provides instructions to view assets: "To view the assets, go to the 'All Asset' search page and use Program and Campaign name facet to filter the assets."
    - Styled the tooltip to match the color and background of the Launch Date tooltip.
    - Ensured the tooltip text appears on one line and positioned it correctly.
    - Updated the "Total Asset" label to "Total Approved Asset"
    - Updated the "Deliverable Name" column name to "Deliverable Task Name"

    * - Added the Driver detail in Overview Tab next to Launch date like "Project Owner: Aina Tchoshanova"
    - Update the Project "Owner column" label to "Task Owner"

    * ASSETS-88921 : Marketing Moments Clickable Title and Underdevelopment Icon for ProgramNames/Campaigns (#128)

    * feat: Change cursor to pointer for campaign name label and text

    - Added CSS to change cursor to pointer on hover for .campaign-name-label and .campaign-name span.

    feat: Add click event to campaign name label and text

    - Updated buildCampaignList function to add click event listener to campaign name label and text.
    - Clicking on the campaign name label or text now navigates to campaignDetailsLink.
    - Ensured the appearance of the label and text remains unchanged while adding navigation functionality.

    feat:  Rename "Review Link" to "QA Files" in the "Deliverable" task tab

    - Updated Program Details column text/header to  QA files
    - Updated CSS class from review-link to qa-files

    * - feature :  When a campaign does not have an image assigned display the underdevelopment icon
    Updated function searchAsset(programName, campaignName, imageWidth = 80) to get the  underdevelopment icon from site-config worksheet shared-branding worksheet

    * Sorted the options in the dropdown lists alphabetically on the options text field (#131)

    * ASSETS-88922 : Review the Deliverable page load time (#130)

    * Improve page load time by parallelizing API calls and adding debug logs

    - Updated `decorate` function to fetch program details and deliverables in parallel using `Promise.all`.
    - Added console logs before and after API calls to help with debugging.
    - Maintained existing functionality while optimizing performance by reducing sequential API calls.

    * Remove logging messages

    * feat: Improve performance of gmo-program-details.js

    - Implement parallel GraphQL queries to reduce load times.
    - Lazy load images using the `loading="lazy"` attribute to improve initial load performance.
    - Batch DOM updates using `document.createDocumentFragment()` to minimize reflows and repaints.
    - Debounce event listeners to prevent performance issues caused by rapid firing of events.

    These optimizations should enhance the overall performance and responsiveness of the page.

    * Optimize header rendering and asynchronous data fetching

    - Initiate parallel fetching of program details and deliverables.
    - Render a placeholder header immediately to improve perceived load time.
    - Update header with actual data once program details are fetched.
    - Ensure images are loaded asynchronously without blocking header rendering.

    * feat: Inject additional HTML content into main-body-wrapper after header update

    - Added HTML content including tab-wrapper, overview, and deliverables sections to the main-body-wrapper div after the header.
    - Updated the main-body-wrapper div to include newly provided HTML content for improved user interface and navigation.
    - Ensured the content injection occurs after the header update to maintain correct rendering order.

    * Added back displaying the back button with arrow icon and program name not available message and no data available message when program

    * Updated logic to display the total asset count for an image

    * Reverted back to
    const programData = await executeQuery(programQueryString);
    const deliverables = await executeQuery(deliverableQueryString);

    * Restored constant variables for Marketing Goal, KPIs, Target Market, Audiences
        const p0TargetMarketArea = program.p0TargetMarketArea;
        const p1TargetMarketArea = program.p1TargetMarketArea;
        const kpis = buildKPIList(program).outerHTML;
        const targetMarketAreas = buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea).outerHTML;
        const audiences = buildAudienceList(program).outerHTML;
        const artifactLinks = buildArtifactLinks(program).outerHTML;

    To make the code more readable, they were removed when the structure of the code was refactored to incrementally build the block.innerHTML, to make the page appear to load faster.

    * assets.js (#132)

    Added helper function async function getUnderdevelopmentIcon() to display the underdevelopment icon.
    Also display the under development icon when  programName and campaignName is null
    gmo-program-details.js
    When programName and campaignName is null display the under development icon

    * gmo-program-details.js
    PR Code review change to

    * Revert "gmo-program-details.js"

    This reverts commit 18ddd12c8fef2fbcb9c56b54735e907f421f17ad.

    * gmo-program-details.js
    PR code review change to
    let imageObject = {imageUrl : '', imageAltText: '', assetCount: 0};
    assets.js
    PR code review change to
    if (!progamName && !campaginName)

    * Resolved typo in variable programName

    from
      if (!progamName && !campaginName)
    to
     if (!programName && !campaignName)

    * feat: Improve page load speed and add lazy loading for images (#134)

    - Implement debounce for search input to reduce the number of API calls.
    - Refactor the `decorate` function for better readability and performance.
    - Add lazy loading for images using `IntersectionObserver` to load images only when they come into view.
    - Move pagination button toggling to a separate `togglePaginationButtons` function.
    - Ensure strict comparison (`===`) for block configuration check.

    * ASSETS-88926 : Review and Improve Page Performance of Marketing Moment Landing page (Push Failed) (#137)

    * feat: Improve page load speed and add lazy loading for images

    - Implement debounce for search input to reduce the number of API calls.
    - Refactor the `decorate` function for better readability and performance.
    - Add lazy loading for images using `IntersectionObserver` to load images only when they come into view.
    - Move pagination button toggling to a separate `togglePaginationButtons` function.
    - Ensure strict comparison (`===`) for block configuration check.

    * feat: Improve page load speed and add lazy loading for images

    - Removed debounce for search
    - Added lazy loading for images using `IntersectionObserver` to load images only when they come into view.

    * ASSETS-88927 : Toggle Read More Button (#138)

    * feat: Add Read More/Read Less toggle functionality

    - Added event listener for Read More buttons to toggle text visibility in Marketing Goal and Product Value sections.
    - Updated the decorate function to handle Read More/Read Less functionality.

    * style: Add hide-overflow class for text truncation

    - Added .hide-overflow class to handle text truncation with ellipsis.
    - Ensured compatibility with the Read More/Read Less functionality.

    * Modified FAQ Nav (#139)

    Co-authored-by: Mathieu…
shiv-gup added a commit that referenced this pull request Oct 1, 2024
* ASSETS-88928 : Update Deliverables Page Fields for Phase 2 to branch assets-72024 (#143)

* feat: Add default values for Release Tier and Categories in program details

- Updated the `buildHeader` function in `gmo-program-details.js` to display "Unavailable" for `releaseTier` if it does not exist.
- Updated the `buildHeader` function to display "Unavailable" for `categories` if it does not exist or is empty.
- Ensured the changes display the correct SVG icons and handle the presence and absence of the values correctly.
- Added new SVG icons folderOpenOutline and launch

* Updated Unavailable to Not Available

* Program details calendar view (#144)

* initial commit, calendar table

- todo: add a function to populate async since this loads hidden
  initially

* Continue iterating on static html

* styling grouped content

* refactor html

'month' columns were not extending to the edges of container.
Experimented and found working fix.

* continue iterating group/item placement

* make width of groups dynamic based on properties

* Make widths and placement programmatic

* functional javascript

- add ability to expand/collapse groups
- add ability to scroll year left/right (todo: dropdown)
- major cleanup of console log

* add in year-changing controls

* add current month indicator

* remove todo, restore normal default tab

* update indicator to reflect actual date

* start refactoring dropdown, fix indicator

* allow switching between year/quarter view

* final bugfixes for quarter-switching

* finish task filtering

- tasks that start in view and end out of view show correctly
- resolve bug with start positioning
- todo: remove logging

* year view functionality restored with refactor

* finish quarter  view

* add function to resize groups if members overflow

* change start date to end date for tasks

* slight cleanup

* resolve issue w/ merge

* Added code to display the thumbnail for the programName and campaignName
Fixed split error in  function getUniqueYears(items)

* Added thumbnail for programName and campaignName without using await

* Refactored code to use function async function addThumbnailToItem(itemEl, programName, campaignName)

* slightly refactor group-building logic

* cleanup

* Removed debug console.log code
Removed commented out code
Get thumbnail for  searchAsset(programName, campaignName,deliverableType)

* Calendar view update (#150)

* fix 'today' button and current day indicator

* fix buttons

* width adjustments for 'quarter' view

* handle missing start/end dates

* light cleanup

* merge 72024 in, perform cleanup

* ASSETS-72026 : Use taskStatus CF for mapping to get the task status label (#151)

* Added taskStatus colored dots from  /content/dam/gmo-cf/en/wf-picklist-data-source/taskStatus JSON object

* feat: Add tooltip to task status dot with dynamic status text and color

- Implemented tooltip functionality for task status dots in the calendar view.
- Added a helper function `getTaskStatusMapping` to retrieve task status details from `taskStatusMappings`.
- Updated the HTML generation for task status dots to include a tooltip displaying the corresponding status text.

* ASSETS-72027 : [Issue] Fix Number Alignment on Calendar Page View (#152)

* Added CSS adjustments for group-heading alignment and implemented title attribute for tooltips in program-calendar.js

- Updated .group-header and .left-block CSS classes to prevent text wrapping and ensure proper alignment of group heading and count elements.
- Applied text-overflow: ellipsis to .group-heading to handle long text and prevent it from breaking the layout.
- Added a title attribute to the group-heading div in program-calendar.js to display the full text as a tooltip when truncated.

* Implemented absolute positioning for .group-count and adjusted .group-heading for improved text visibility

- Changed .group-count to use absolute positioning within .group-header to optimize layout and provide more space for .group-heading text.
- Adjusted .group-heading max-width to 100% to allow it to occupy the full available width within its container before applying text overflow.
- Applied top: 50% and transform: translateY(-50%) to .group-count for vertical centering.
- Fine-tuned padding, margins, and alignment to ensure elements are properly aligned and the layout remains consistent across different screen sizes.

* MH3.FY24.0808 Release  (#155)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

* Modified formatAssetMetadata() to allow custom dc-format Labels (#79)

* Removed "required" and custom values for fields (#86)

Co-authored-by: Mathieu Lessard <[email protected]>

* Added getBaseConfigPath to Collections Back Button (#89)

* Releasing HCV Dashboard code (#106)

* ASSETS-88894 GRAPHQL Persisted Query Code (#53)

* GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

* Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

* Renamed file test-graphql.js to graphql.js

Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

* Changed queryName to getAllCampaings

* Rollback to 3/15/24 Commit a519a5155c3dd57f0c54ea8bd336cd0a231cffab before adding GraphQL test code

* Delete test graphql code

* ASSETS-88895 : Show HCV report pages to limited users (#55)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Campaign List block for Marketing Dashboard page (#56)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

---------

Co-authored-by: Michael Dickson <[email protected]>

* updated hydration-utils.js (#54)

MH: Added Firefly  product to AA Modal 'Product' Field List

* Assets 98990 - Dynamic campaign list (#61)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

* Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

Which calls the persisted query gmo/filter-on-marketing-initiative
with example parameters

{
  "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
}

https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

* Campaign List filters display (#65)

* initial html structure setup

* refactor from select to div implementation

Select with multiselect displays as a list, not a dropdown

* finish refactor, enable visual functionality

- added all javascript needed for visual functionality
- finished refactoring structure

* Assets 98990 (#66)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* minor updates

- update graphql query to have hardcoded offset/limit (to resolve error)
- remove comments
- add placeholder 'refresh date' message and css
- move css for main body to accomodate above message

* add firefly icon

---------

Co-authored-by: Tyrone Tse <[email protected]>

* ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

* Added function hideQuickLinks()

* Added the hide field to the  shared-quicklinks config/worksheet
/blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
/scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
/scripts/site-config.js : Updated function to include the hide field

* Refactored the If statement logic

* Assets 98992- Campaign details/overview (#69)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

* gmo-campagin-list refactored to use  persisted query function
	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

* Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
Refactored the code for Repaginate for when the number of items page is changed
Show current page status

* graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
Deleted function  graphqlCampaignPaginated(first,cursor)

Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

* Fixed logic in calculating the nextCursor

* Removed all debug console.log statements

* Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

* Renamed the variable testConfig to headerConfig

* Campaign details block (#71)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* add status bar display

Also adjusted demo data slightly to include due date and lead

* update css/html to align with mockup and mvp

* resolve border bug

* implemented requested changes

* ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

---------

Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

* Updated function toggleOption : To only allow a single option to be selected in the dropdown list

---------

Co-authored-by: Shivani gupta <[email protected]>

* Assets 98993 (#75)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* resolve pr comments

* Release 05.09.2024 (#78)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

---------

Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>

* ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Assets 98994 (#81)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* initial changeover from static to dynamic data

* adjustments based on feedback

* additional changes based on feedback

* minor bugfix, null checks

* squash final bug with read more

* final touches

* combine two graphql functions with duplicated code

* bugfixes per pr review

* ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
Updated Geo dropdown list to be populated by graphql persisted query getGeoList

* Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
When a Business Line option is deselected then the Products List shows all products.

* Reduced the sample dropdown list options

* make links configurable, remove extraneous logs (#83)

* ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Removed comment

* ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Added function searchAsset(programName, campaignName) to get the asset URL

* Changed alt text to use assets repo-name property

* Renamed/Moved AssetsDatasource.js to /scripts/assets
gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
otherwise the values from blockConfig are overwritten when paginating to next page.

gmo-campaign-details.js : Added campaign Image
gmo-campaign-details.css : Updated CSS to display campaign Image

* gmo-campaign-list.js : Deleted comment
/scripts/assets.js : Updated to use createSearchEndpoint
/scripts/scripts.js : Added export to  export function createSearchEndpoint() {

* Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

* gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
/scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

* Assets 98996 (#88)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* ASSETS-88905 : Add Fields to the Overview Tab (#87)

* Added Target Market Area lists

function function createKPI(kpi)  is renamed createLI(li)

Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

* gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
gmo-campaign-details.js : Added Target Market Area and Platforms
refactored async function buildChannelScope(scopeTypeId, scopes, block)
to be able to display data for data based for a specified  CSS ID

* Added function getUniqueItems(items, property)
to get unique values for deliverableType and platforms

* Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
to  async function buildFieldScopes(scopeTypeId, scopes, block)

* Added global variable globalGraphFliter (#92)

Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
with graphFilter = currentGraphqlFilter

* Assets 98996 (#93)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* add deliverabletype graphql

- todo: refactor, some superfluous function(s) can be removed

* refactor product list to use graphql

* fix deliverable type tags, fix multiline text

* fix sort on marketing moments column

* removing merge artifact

* resolve PR comments

* platforms mapping with graphql (#94)

- also cleaned up extraneous/defunct code

* Refactor sort icons (#95)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

* assets.js : Refactored code to eliminate console.log error
gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

* Eliminated  JavaScript errors when image is not found

* Display total assets = 0 when the campaign image does not exist

* Code cleanup (#98)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

* Code cleanup part 2 (#100)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* Added  function closeAllDropDowns() (#101)

Added function handleClickOutside(event)

Updated function attachEventListeners()
    // Add event listener for clicks outside of dropdowns
    document.addEventListener('click', handleClickOutside);

Added function  resetProductsDropDown();

Updated  function resetAllFilters() to call function   resetProductsDropDown();

* Sticky deliverables header, update graphql endpoints (#102)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* update query endpoints, css tweak on deliverables

* Added tool tip for Program Name and Campaign Name (#103)

* remove duplicate icons

---------

Co-authored-by: TyroneAEM <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Tyrone Tse <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88912 : [Issue] Last page number is not matching with total number of pages (#105)

* ASSETS-88894 GRAPHQL Persisted Query Code (#53)

* GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

* Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

* Renamed file test-graphql.js to graphql.js

Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

* Changed queryName to getAllCampaings

* Rollback to 3/15/24 Commit a519a5155c3dd57f0c54ea8bd336cd0a231cffab before adding GraphQL test code

* Delete test graphql code

* ASSETS-88895 : Show HCV report pages to limited users (#55)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Campaign List block for Marketing Dashboard page (#56)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

---------

Co-authored-by: Michael Dickson <[email protected]>

* updated hydration-utils.js (#54)

MH: Added Firefly  product to AA Modal 'Product' Field List

* Assets 98990 - Dynamic campaign list (#61)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

* Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

Which calls the persisted query gmo/filter-on-marketing-initiative
with example parameters

{
  "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
}

https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

* Campaign List filters display (#65)

* initial html structure setup

* refactor from select to div implementation

Select with multiselect displays as a list, not a dropdown

* finish refactor, enable visual functionality

- added all javascript needed for visual functionality
- finished refactoring structure

* Assets 98990 (#66)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* minor updates

- update graphql query to have hardcoded offset/limit (to resolve error)
- remove comments
- add placeholder 'refresh date' message and css
- move css for main body to accomodate above message

* add firefly icon

---------

Co-authored-by: Tyrone Tse <[email protected]>

* ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

* Added function hideQuickLinks()

* Added the hide field to the  shared-quicklinks config/worksheet
/blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
/scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
/scripts/site-config.js : Updated function to include the hide field

* Refactored the If statement logic

* Assets 98992- Campaign details/overview (#69)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

* gmo-campagin-list refactored to use  persisted query function
	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

* Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
Refactored the code for Repaginate for when the number of items page is changed
Show current page status

* graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
Deleted function  graphqlCampaignPaginated(first,cursor)

Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

* Fixed logic in calculating the nextCursor

* Removed all debug console.log statements

* Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

* Renamed the variable testConfig to headerConfig

* Campaign details block (#71)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* add status bar display

Also adjusted demo data slightly to include due date and lead

* update css/html to align with mockup and mvp

* resolve border bug

* implemented requested changes

* ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

---------

Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

* Updated function toggleOption : To only allow a single option to be selected in the dropdown list

---------

Co-authored-by: Shivani gupta <[email protected]>

* Assets 98993 (#75)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* resolve pr comments

* Release 05.09.2024 (#78)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

---------

Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>

* ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Assets 98994 (#81)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* initial changeover from static to dynamic data

* adjustments based on feedback

* additional changes based on feedback

* minor bugfix, null checks

* squash final bug with read more

* final touches

* combine two graphql functions with duplicated code

* bugfixes per pr review

* ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
Updated Geo dropdown list to be populated by graphql persisted query getGeoList

* Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
When a Business Line option is deselected then the Products List shows all products.

* Reduced the sample dropdown list options

* make links configurable, remove extraneous logs (#83)

* ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Removed comment

* ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Added function searchAsset(programName, campaignName) to get the asset URL

* Changed alt text to use assets repo-name property

* Renamed/Moved AssetsDatasource.js to /scripts/assets
gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
otherwise the values from blockConfig are overwritten when paginating to next page.

gmo-campaign-details.js : Added campaign Image
gmo-campaign-details.css : Updated CSS to display campaign Image

* gmo-campaign-list.js : Deleted comment
/scripts/assets.js : Updated to use createSearchEndpoint
/scripts/scripts.js : Added export to  export function createSearchEndpoint() {

* Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

* gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
/scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

* Assets 98996 (#88)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* ASSETS-88905 : Add Fields to the Overview Tab (#87)

* Added Target Market Area lists

function function createKPI(kpi)  is renamed createLI(li)

Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

* gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
gmo-campaign-details.js : Added Target Market Area and Platforms
refactored async function buildChannelScope(scopeTypeId, scopes, block)
to be able to display data for data based for a specified  CSS ID

* Added function getUniqueItems(items, property)
to get unique values for deliverableType and platforms

* Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
to  async function buildFieldScopes(scopeTypeId, scopes, block)

* Added global variable globalGraphFliter (#92)

Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
with graphFilter = currentGraphqlFilter

* Assets 98996 (#93)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* add deliverabletype graphql

- todo: refactor, some superfluous function(s) can be removed

* refactor product list to use graphql

* fix deliverable type tags, fix multiline text

* fix sort on marketing moments column

* removing merge artifact

* resolve PR comments

* platforms mapping with graphql (#94)

- also cleaned up extraneous/defunct code

* Refactor sort icons (#95)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

* assets.js : Refactored code to eliminate console.log error
gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

* Eliminated  JavaScript errors when image is not found

* Display total assets = 0 when the campaign image does not exist

* Code cleanup (#98)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

* Code cleanup part 2 (#100)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* Added  function closeAllDropDowns() (#101)

Added function handleClickOutside(event)

Updated function attachEventListeners()
    // Add event listener for clicks outside of dropdowns
    document.addEventListener('click', handleClickOutside);

Added function  resetProductsDropDown();

Updated  function resetAllFilters() to call function   resetProductsDropDown();

* Sticky deliverables header, update graphql endpoints (#102)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* update query endpoints, css tweak on deliverables

* Added tool tip for Program Name and Campaign Name (#103)

* remove duplicate icons

* Change default items per page from 4 to 8
Changed undefined message for Campaign to  Marketing Moment Not Available

* Remove debugging from graphql.js

* Deleted function debug_console()

---------

Co-authored-by: Shivani Gupta <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>

* Performance refactoring (#107)

* performance refactoring

- improve thumbnail performance by makin async
- format date property to yyyy-mm-dd
- fix margin issue in program header
- refactor function that builds header dropdown for increased
  performance

* resolve bug with event listeners not attaching

* add programID parameter to deliverable query (#109)

* add programID parameter to deliverable query

* quick null check for status color

* remove console log

* Update query names, handle formatting (#110)

* update query names

* handle null deliverable types

* make dateFormat function available to detail block

* remove unused function

* remove console log messages

* fix typo in graphql query name (#111)

* ASSETS-88914 : Fix Pagination Frontend Code (#108)

* Changed the default number items per page to 4
Added function  debounce(func, wait)  to delay the Previous and Next page to wait 0.5 seconds between each click, to stop the user clicking too fast and breaking pagination

* Decrease debounce timeout to 200 milliseconds (0.2 secs)

* Added check that next page cannot go past last page
Added check that prev page cannot go back past page 1

* fix(pagination): Ensure proper handling of next/prev buttons and page boundaries

- Added totalPages calculation and checks to ensure "Next" button is disabled on the last page
- Updated nextPage function to correctly enable/disable pagination buttons
- Improved prevPage function to ensure it navigates back to the first page correctly
- Applied debounce to prevent rapid clicking issues
- Refactored logic for enabling/disabling pagination buttons based on current page state

* - Changed default items per page to 8
- Removed 4 items per page from filter
- Removed cusorArray, and replaced it with  currentPageInfo.previousCursor =  currentPageInfo.currentCursor;
- Set next cursor to  data.programPaginated.pageInfo.endCursor;
- Function prevPage now uses  currentPage.previousCursor as the cursor parameter value, and calculating the cursor value to use from cursorArray is no longer needed.

* Increased the click delay to 500 milliseconds

* Disabled the Previous and Next Button as soon as they are clicked, to prevent the user multiple clicking the button.

* Restored previous logic using cursorArray to manage the calculation of the cursor for the previous page. (#113)

* Adjust height of deliverables tab on program-details block (#114)

* minor css changes for program details

* adjust deliverables table height

* add min height to deliverables table

* remove commented css

* Sort deliverable type array before rows are made

* DXI-26587- Modify landing page for v3 Hub, so Signin goes to CH/v4 (#116)

* Replace throwing 404 error when the asset is not found, with asset.svg icon (#119)

* Make content fragment path for WF mappings configurable (#118)

* refactoring to use single graphql endpoint for map

* refactor 'mapping' functions

- refactor mapping retrieval functions in all three hcv blocks

* Remove comments

* remove unused function stub

* resolve bug in header filter refresh

* remove unused import

* Fixed issue where header didn't load if the user didn't have a profile yet (#121)

Co-authored-by: Mathieu Lessard <[email protected]>

* add checks for null 'review link' and 'final asset' (#122)

* Refactor header and query variable extraction (#123)

* add checks for null 'review link' and 'final asset'

* Add msg for programs with no data available

* refactor header so it can be used with no data

* wrap msg with div for styling

* refactor query variable extraction

- had to account for ampersand in program name

* Updated Product List (#117)

* Product list updated

* N/A value and label now match

* Fixed formatting

---------

Co-authored-by: Mathieu Lessard <[email protected]>

* Restored calling the function attatchEventListerners() at the end of the function decorate(block) (#124)

* Fix text wrapping issue in Project Owner column for smaller viewports (#125)

- Adjusted CSS to ensure text in the "Project Owner" column wraps properly
- Set row height to auto and adjusted line-height for better spacing
- Added media query for responsive width adjustments
- Ensured consistent display and improved readability across different viewport sizes

* ASSETS-88920 : Cosmetic Updates from MVP Feedback (#126)

* feat: Add Geo column to program list and adjust column widths for proper alignment

- Updated `gmo-program-list.js` to include Geo column in the header configuration and campaign list
- Adjusted column widths in `gmo-program-list.css` to ensure proper alignment under each column heading
- Add function `formatGeos` to format Geo array as comma-delimited list, that is displayed in the Geo column

* - Added a tooltip to the "Total Approved Assets" field in the Deliverables tab.
- Tooltip text provides instructions to view assets: "To view the assets, go to the 'All Asset' search page and use Program and Campaign name facet to filter the assets."
- Styled the tooltip to match the color and background of the Launch Date tooltip.
- Ensured the tooltip text appears on one line and positioned it correctly.
- Updated the "Total Asset" label to "Total Approved Asset"
- Updated the "Deliverable Name" column name to "Deliverable Task Name"

* - Added the Driver detail in Overview Tab next to Launch date like "Project Owner: Aina Tchoshanova"
- Update the Project "Owner column" label to "Task Owner"

* ASSETS-88921 : Marketing Moments Clickable Title and Underdevelopment Icon for ProgramNames/Campaigns (#128)

* feat: Change cursor to pointer for campaign name label and text

- Added CSS to change cursor to pointer on hover for .campaign-name-label and .campaign-name span.

feat: Add click event to campaign name label and text

- Updated buildCampaignList function to add click event listener to campaign name label and text.
- Clicking on the campaign name label or text now navigates to campaignDetailsLink.
- Ensured the appearance of the label and text remains unchanged while adding navigation functionality.

feat:  Rename "Review Link" to "QA Files" in the "Deliverable" task tab

- Updated Program Details column text/header to  QA files
- Updated CSS class from review-link to qa-files

* - feature :  When a campaign does not have an image assigned display the underdevelopment icon
Updated function searchAsset(programName, campaignName, imageWidth = 80) to get the  underdevelopment icon from site-config worksheet shared-branding worksheet

* Sorted the options in the dropdown lists alphabetically on the options text field (#131)

* ASSETS-88922 : Review the Deliverable page load time (#130)

* Improve page load time by parallelizing API calls and adding debug logs

- Updated `decorate` function to fetch program details and deliverables in parallel using `Promise.all`.
- Added console logs before and after API calls to help with debugging.
- Maintained existing functionality while optimizing performance by reducing sequential API calls.

* Remove logging messages

* feat: Improve performance of gmo-program-details.js

- Implement parallel GraphQL queries to reduce load times.
- Lazy load images using the `loading="lazy"` attribute to improve initial load performance.
- Batch DOM updates using `document.createDocumentFragment()` to minimize reflows and repaints.
- Debounce event listeners to prevent performance issues caused by rapid firing of events.

These optimizations should enhance the overall performance and responsiveness of the page.

* Optimize header rendering and asynchronous data fetching

- Initiate parallel fetching of program details and deliverables.
- Render a placeholder header immediately to improve perceived load time.
- Update header with actual data once program details are fetched.
- Ensure images are loaded asynchronously without blocking header rendering.

* feat: Inject additional HTML content into main-body-wrapper after header update

- Added HTML content including tab-wrapper, overview, and deliverables sections to the main-body-wrapper div after the header.
- Updated the main-body-wrapper div to include newly provided HTML content for improved user interface and navigation.
- Ensured the content injection occurs after the header update to maintain correct rendering order.

* Added back displaying the back button with arrow icon and program name not available message and no data available message when program

* Updated logic to display the total asset count for an image

* Reverted back to
const programData = await executeQuery(programQueryString);
const deliverables = await executeQuery(deliverableQueryString);

* Restored constant variables for Marketing Goal, KPIs, Target Market, Audiences
    const p0TargetMarketArea = program.p0TargetMarketArea;
    const p1TargetMarketArea = program.p1TargetMarketArea;
    const kpis = buildKPIList(program).outerHTML;
    const targetMarketAreas = buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea).outerHTML;
    const audiences = buildAudienceList(program).outerHTML;
    const artifactLinks = buildArtifactLinks(program).outerHTML;

To make the code more readable, they were removed when the structure of the code was refactored to incrementally build the block.innerHTML, to make the page appear to load faster.

* assets.js (#132)

Added helper function async function getUnderdevelopmentIcon() to display the underdevelopment icon.
Also display the under development icon when  programName and campaignName is null
gmo-program-details.js
When programName and campaignName is null display the under development icon

* gmo-program-details.js
PR Code review change to

* Revert "gmo-program-details.js"

This reverts commit 18ddd12c8fef2fbcb9c56b54735e907f421f17ad.

* gmo-program-details.js
PR code review change to
let imageObject = {imageUrl : '', imageAltText: '', assetCount: 0};
assets.js…
shiv-gup added a commit that referenced this pull request Oct 2, 2024
* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

* Modified formatAssetMetadata() to allow custom dc-format Labels (#79)

* Removed "required" and custom values for fields (#86)

Co-authored-by: Mathieu Lessard <[email protected]>

* Added getBaseConfigPath to Collections Back Button (#89)

* Releasing HCV Dashboard code (#106)

* ASSETS-88894 GRAPHQL Persisted Query Code (#53)

* GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

* Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

* Renamed file test-graphql.js to graphql.js

Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

* Changed queryName to getAllCampaings

* Rollback to 3/15/24 Commit a519a5155c3dd57f0c54ea8bd336cd0a231cffab before adding GraphQL test code

* Delete test graphql code

* ASSETS-88895 : Show HCV report pages to limited users (#55)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Campaign List block for Marketing Dashboard page (#56)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

---------

Co-authored-by: Michael Dickson <[email protected]>

* updated hydration-utils.js (#54)

MH: Added Firefly  product to AA Modal 'Product' Field List

* Assets 98990 - Dynamic campaign list (#61)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

* Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

Which calls the persisted query gmo/filter-on-marketing-initiative
with example parameters

{
  "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
}

https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

* Campaign List filters display (#65)

* initial html structure setup

* refactor from select to div implementation

Select with multiselect displays as a list, not a dropdown

* finish refactor, enable visual functionality

- added all javascript needed for visual functionality
- finished refactoring structure

* Assets 98990 (#66)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* minor updates

- update graphql query to have hardcoded offset/limit (to resolve error)
- remove comments
- add placeholder 'refresh date' message and css
- move css for main body to accomodate above message

* add firefly icon

---------

Co-authored-by: Tyrone Tse <[email protected]>

* ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

* Added function hideQuickLinks()

* Added the hide field to the  shared-quicklinks config/worksheet
/blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
/scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
/scripts/site-config.js : Updated function to include the hide field

* Refactored the If statement logic

* Assets 98992- Campaign details/overview (#69)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

* gmo-campagin-list refactored to use  persisted query function
	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

* Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
Refactored the code for Repaginate for when the number of items page is changed
Show current page status

* graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
Deleted function  graphqlCampaignPaginated(first,cursor)

Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

* Fixed logic in calculating the nextCursor

* Removed all debug console.log statements

* Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

* Renamed the variable testConfig to headerConfig

* Campaign details block (#71)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* add status bar display

Also adjusted demo data slightly to include due date and lead

* update css/html to align with mockup and mvp

* resolve border bug

* implemented requested changes

* ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

---------

Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

* Updated function toggleOption : To only allow a single option to be selected in the dropdown list

---------

Co-authored-by: Shivani gupta <[email protected]>

* Assets 98993 (#75)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* resolve pr comments

* Release 05.09.2024 (#78)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

---------

Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>

* ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Assets 98994 (#81)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* initial changeover from static to dynamic data

* adjustments based on feedback

* additional changes based on feedback

* minor bugfix, null checks

* squash final bug with read more

* final touches

* combine two graphql functions with duplicated code

* bugfixes per pr review

* ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
Updated Geo dropdown list to be populated by graphql persisted query getGeoList

* Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
When a Business Line option is deselected then the Products List shows all products.

* Reduced the sample dropdown list options

* make links configurable, remove extraneous logs (#83)

* ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Removed comment

* ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Added function searchAsset(programName, campaignName) to get the asset URL

* Changed alt text to use assets repo-name property

* Renamed/Moved AssetsDatasource.js to /scripts/assets
gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
otherwise the values from blockConfig are overwritten when paginating to next page.

gmo-campaign-details.js : Added campaign Image
gmo-campaign-details.css : Updated CSS to display campaign Image

* gmo-campaign-list.js : Deleted comment
/scripts/assets.js : Updated to use createSearchEndpoint
/scripts/scripts.js : Added export to  export function createSearchEndpoint() {

* Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

* gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
/scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

* Assets 98996 (#88)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* ASSETS-88905 : Add Fields to the Overview Tab (#87)

* Added Target Market Area lists

function function createKPI(kpi)  is renamed createLI(li)

Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

* gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
gmo-campaign-details.js : Added Target Market Area and Platforms
refactored async function buildChannelScope(scopeTypeId, scopes, block)
to be able to display data for data based for a specified  CSS ID

* Added function getUniqueItems(items, property)
to get unique values for deliverableType and platforms

* Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
to  async function buildFieldScopes(scopeTypeId, scopes, block)

* Added global variable globalGraphFliter (#92)

Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
with graphFilter = currentGraphqlFilter

* Assets 98996 (#93)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* add deliverabletype graphql

- todo: refactor, some superfluous function(s) can be removed

* refactor product list to use graphql

* fix deliverable type tags, fix multiline text

* fix sort on marketing moments column

* removing merge artifact

* resolve PR comments

* platforms mapping with graphql (#94)

- also cleaned up extraneous/defunct code

* Refactor sort icons (#95)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

* assets.js : Refactored code to eliminate console.log error
gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

* Eliminated  JavaScript errors when image is not found

* Display total assets = 0 when the campaign image does not exist

* Code cleanup (#98)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

* Code cleanup part 2 (#100)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* Added  function closeAllDropDowns() (#101)

Added function handleClickOutside(event)

Updated function attachEventListeners()
    // Add event listener for clicks outside of dropdowns
    document.addEventListener('click', handleClickOutside);

Added function  resetProductsDropDown();

Updated  function resetAllFilters() to call function   resetProductsDropDown();

* Sticky deliverables header, update graphql endpoints (#102)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* update query endpoints, css tweak on deliverables

* Added tool tip for Program Name and Campaign Name (#103)

* remove duplicate icons

---------

Co-authored-by: TyroneAEM <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Tyrone Tse <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88912 : [Issue] Last page number is not matching with total number of pages (#105)

* ASSETS-88894 GRAPHQL Persisted Query Code (#53)

* GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

* Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

* Renamed file test-graphql.js to graphql.js

Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

* Changed queryName to getAllCampaings

* Rollback to 3/15/24 Commit a519a5155c3dd57f0c54ea8bd336cd0a231cffab before adding GraphQL test code

* Delete test graphql code

* ASSETS-88895 : Show HCV report pages to limited users (#55)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Campaign List block for Marketing Dashboard page (#56)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

---------

Co-authored-by: Michael Dickson <[email protected]>

* updated hydration-utils.js (#54)

MH: Added Firefly  product to AA Modal 'Product' Field List

* Assets 98990 - Dynamic campaign list (#61)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

* Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

Which calls the persisted query gmo/filter-on-marketing-initiative
with example parameters

{
  "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
}

https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

* Campaign List filters display (#65)

* initial html structure setup

* refactor from select to div implementation

Select with multiselect displays as a list, not a dropdown

* finish refactor, enable visual functionality

- added all javascript needed for visual functionality
- finished refactoring structure

* Assets 98990 (#66)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* minor updates

- update graphql query to have hardcoded offset/limit (to resolve error)
- remove comments
- add placeholder 'refresh date' message and css
- move css for main body to accomodate above message

* add firefly icon

---------

Co-authored-by: Tyrone Tse <[email protected]>

* ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

* Added function hideQuickLinks()

* Added the hide field to the  shared-quicklinks config/worksheet
/blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
/scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
/scripts/site-config.js : Updated function to include the hide field

* Refactored the If statement logic

* Assets 98992- Campaign details/overview (#69)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

* gmo-campagin-list refactored to use  persisted query function
	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

* Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
Refactored the code for Repaginate for when the number of items page is changed
Show current page status

* graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
Deleted function  graphqlCampaignPaginated(first,cursor)

Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

* Fixed logic in calculating the nextCursor

* Removed all debug console.log statements

* Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

* Renamed the variable testConfig to headerConfig

* Campaign details block (#71)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* add status bar display

Also adjusted demo data slightly to include due date and lead

* update css/html to align with mockup and mvp

* resolve border bug

* implemented requested changes

* ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

---------

Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

* Updated function toggleOption : To only allow a single option to be selected in the dropdown list

---------

Co-authored-by: Shivani gupta <[email protected]>

* Assets 98993 (#75)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* resolve pr comments

* Release 05.09.2024 (#78)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

---------

Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>

* ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Assets 98994 (#81)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* initial changeover from static to dynamic data

* adjustments based on feedback

* additional changes based on feedback

* minor bugfix, null checks

* squash final bug with read more

* final touches

* combine two graphql functions with duplicated code

* bugfixes per pr review

* ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
Updated Geo dropdown list to be populated by graphql persisted query getGeoList

* Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
When a Business Line option is deselected then the Products List shows all products.

* Reduced the sample dropdown list options

* make links configurable, remove extraneous logs (#83)

* ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Removed comment

* ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Added function searchAsset(programName, campaignName) to get the asset URL

* Changed alt text to use assets repo-name property

* Renamed/Moved AssetsDatasource.js to /scripts/assets
gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
otherwise the values from blockConfig are overwritten when paginating to next page.

gmo-campaign-details.js : Added campaign Image
gmo-campaign-details.css : Updated CSS to display campaign Image

* gmo-campaign-list.js : Deleted comment
/scripts/assets.js : Updated to use createSearchEndpoint
/scripts/scripts.js : Added export to  export function createSearchEndpoint() {

* Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

* gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
/scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

* Assets 98996 (#88)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* ASSETS-88905 : Add Fields to the Overview Tab (#87)

* Added Target Market Area lists

function function createKPI(kpi)  is renamed createLI(li)

Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

* gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
gmo-campaign-details.js : Added Target Market Area and Platforms
refactored async function buildChannelScope(scopeTypeId, scopes, block)
to be able to display data for data based for a specified  CSS ID

* Added function getUniqueItems(items, property)
to get unique values for deliverableType and platforms

* Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
to  async function buildFieldScopes(scopeTypeId, scopes, block)

* Added global variable globalGraphFliter (#92)

Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
with graphFilter = currentGraphqlFilter

* Assets 98996 (#93)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* add deliverabletype graphql

- todo: refactor, some superfluous function(s) can be removed

* refactor product list to use graphql

* fix deliverable type tags, fix multiline text

* fix sort on marketing moments column

* removing merge artifact

* resolve PR comments

* platforms mapping with graphql (#94)

- also cleaned up extraneous/defunct code

* Refactor sort icons (#95)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

* assets.js : Refactored code to eliminate console.log error
gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

* Eliminated  JavaScript errors when image is not found

* Display total assets = 0 when the campaign image does not exist

* Code cleanup (#98)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

* Code cleanup part 2 (#100)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* Added  function closeAllDropDowns() (#101)

Added function handleClickOutside(event)

Updated function attachEventListeners()
    // Add event listener for clicks outside of dropdowns
    document.addEventListener('click', handleClickOutside);

Added function  resetProductsDropDown();

Updated  function resetAllFilters() to call function   resetProductsDropDown();

* Sticky deliverables header, update graphql endpoints (#102)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* update query endpoints, css tweak on deliverables

* Added tool tip for Program Name and Campaign Name (#103)

* remove duplicate icons

* Change default items per page from 4 to 8
Changed undefined message for Campaign to  Marketing Moment Not Available

* Remove debugging from graphql.js

* Deleted function debug_console()

---------

Co-authored-by: Shivani Gupta <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>

* Performance refactoring (#107)

* performance refactoring

- improve thumbnail performance by makin async
- format date property to yyyy-mm-dd
- fix margin issue in program header
- refactor function that builds header dropdown for increased
  performance

* resolve bug with event listeners not attaching

* add programID parameter to deliverable query (#109)

* add programID parameter to deliverable query

* quick null check for status color

* remove console log

* Update query names, handle formatting (#110)

* update query names

* handle null deliverable types

* make dateFormat function available to detail block

* remove unused function

* remove console log messages

* fix typo in graphql query name (#111)

* ASSETS-88914 : Fix Pagination Frontend Code (#108)

* Changed the default number items per page to 4
Added function  debounce(func, wait)  to delay the Previous and Next page to wait 0.5 seconds between each click, to stop the user clicking too fast and breaking pagination

* Decrease debounce timeout to 200 milliseconds (0.2 secs)

* Added check that next page cannot go past last page
Added check that prev page cannot go back past page 1

* fix(pagination): Ensure proper handling of next/prev buttons and page boundaries

- Added totalPages calculation and checks to ensure "Next" button is disabled on the last page
- Updated nextPage function to correctly enable/disable pagination buttons
- Improved prevPage function to ensure it navigates back to the first page correctly
- Applied debounce to prevent rapid clicking issues
- Refactored logic for enabling/disabling pagination buttons based on current page state

* - Changed default items per page to 8
- Removed 4 items per page from filter
- Removed cusorArray, and replaced it with  currentPageInfo.previousCursor =  currentPageInfo.currentCursor;
- Set next cursor to  data.programPaginated.pageInfo.endCursor;
- Function prevPage now uses  currentPage.previousCursor as the cursor parameter value, and calculating the cursor value to use from cursorArray is no longer needed.

* Increased the click delay to 500 milliseconds

* Disabled the Previous and Next Button as soon as they are clicked, to prevent the user multiple clicking the button.

* Restored previous logic using cursorArray to manage the calculation of the cursor for the previous page. (#113)

* Adjust height of deliverables tab on program-details block (#114)

* minor css changes for program details

* adjust deliverables table height

* add min height to deliverables table

* remove commented css

* Sort deliverable type array before rows are made

* DXI-26587- Modify landing page for v3 Hub, so Signin goes to CH/v4 (#116)

* Replace throwing 404 error when the asset is not found, with asset.svg icon (#119)

* Make content fragment path for WF mappings configurable (#118)

* refactoring to use single graphql endpoint for map

* refactor 'mapping' functions

- refactor mapping retrieval functions in all three hcv blocks

* Remove comments

* remove unused function stub

* resolve bug in header filter refresh

* remove unused import

* Fixed issue where header didn't load if the user didn't have a profile yet (#121)

Co-authored-by: Mathieu Lessard <[email protected]>

* add checks for null 'review link' and 'final asset' (#122)

* Refactor header and query variable extraction (#123)

* add checks for null 'review link' and 'final asset'

* Add msg for programs with no data available

* refactor header so it can be used with no data

* wrap msg with div for styling

* refactor query variable extraction

- had to account for ampersand in program name

* Updated Product List (#117)

* Product list updated

* N/A value and label now match

* Fixed formatting

---------

Co-authored-by: Mathieu Lessard <[email protected]>

* Restored calling the function attatchEventListerners() at the end of the function decorate(block) (#124)

* Fix text wrapping issue in Project Owner column for smaller viewports (#125)

- Adjusted CSS to ensure text in the "Project Owner" column wraps properly
- Set row height to auto and adjusted line-height for better spacing
- Added media query for responsive width adjustments
- Ensured consistent display and improved readability across different viewport sizes

* ASSETS-88920 : Cosmetic Updates from MVP Feedback (#126)

* feat: Add Geo column to program list and adjust column widths for proper alignment

- Updated `gmo-program-list.js` to include Geo column in the header configuration and campaign list
- Adjusted column widths in `gmo-program-list.css` to ensure proper alignment under each column heading
- Add function `formatGeos` to format Geo array as comma-delimited list, that is displayed in the Geo column

* - Added a tooltip to the "Total Approved Assets" field in the Deliverables tab.
- Tooltip text provides instructions to view assets: "To view the assets, go to the 'All Asset' search page and use Program and Campaign name facet to filter the assets."
- Styled the tooltip to match the color and background of the Launch Date tooltip.
- Ensured the tooltip text appears on one line and positioned it correctly.
- Updated the "Total Asset" label to "Total Approved Asset"
- Updated the "Deliverable Name" column name to "Deliverable Task Name"

* - Added the Driver detail in Overview Tab next to Launch date like "Project Owner: Aina Tchoshanova"
- Update the Project "Owner column" label to "Task Owner"

* ASSETS-88921 : Marketing Moments Clickable Title and Underdevelopment Icon for ProgramNames/Campaigns (#128)

* feat: Change cursor to pointer for campaign name label and text

- Added CSS to change cursor to pointer on hover for .campaign-name-label and .campaign-name span.

feat: Add click event to campaign name label and text

- Updated buildCampaignList function to add click event listener to campaign name label and text.
- Clicking on the campaign name label or text now navigates to campaignDetailsLink.
- Ensured the appearance of the label and text remains unchanged while adding navigation functionality.

feat:  Rename "Review Link" to "QA Files" in the "Deliverable" task tab

- Updated Program Details column text/header to  QA files
- Updated CSS class from review-link to qa-files

* - feature :  When a campaign does not have an image assigned display the underdevelopment icon
Updated function searchAsset(programName, campaignName, imageWidth = 80) to get the  underdevelopment icon from site-config worksheet shared-branding worksheet

* Sorted the options in the dropdown lists alphabetically on the options text field (#131)

* ASSETS-88922 : Review the Deliverable page load time (#130)

* Improve page load time by parallelizing API calls and adding debug logs

- Updated `decorate` function to fetch program details and deliverables in parallel using `Promise.all`.
- Added console logs before and after API calls to help with debugging.
- Maintained existing functionality while optimizing performance by reducing sequential API calls.

* Remove logging messages

* feat: Improve performance of gmo-program-details.js

- Implement parallel GraphQL queries to reduce load times.
- Lazy load images using the `loading="lazy"` attribute to improve initial load performance.
- Batch DOM updates using `document.createDocumentFragment()` to minimize reflows and repaints.
- Debounce event listeners to prevent performance issues caused by rapid firing of events.

These optimizations should enhance the overall performance and responsiveness of the page.

* Optimize header rendering and asynchronous data fetching

- Initiate parallel fetching of program details and deliverables.
- Render a placeholder header immediately to improve perceived load time.
- Update header with actual data once program details are fetched.
- Ensure images are loaded asynchronously without blocking header rendering.

* feat: Inject additional HTML content into main-body-wrapper after header update

- Added HTML content including tab-wrapper, overview, and deliverables sections to the main-body-wrapper div after the header.
- Updated the main-body-wrapper div to include newly provided HTML content for improved user interface and navigation.
- Ensured the content injection occurs after the header update to maintain correct rendering order.

* Added back displaying the back button with arrow icon and program name not available message and no data available message when program

* Updated logic to display the total asset count for an image

* Reverted back to
const programData = await executeQuery(programQueryString);
const deliverables = await executeQuery(deliverableQueryString);

* Restored constant variables for Marketing Goal, KPIs, Target Market, Audiences
    const p0TargetMarketArea = program.p0TargetMarketArea;
    const p1TargetMarketArea = program.p1TargetMarketArea;
    const kpis = buildKPIList(program).outerHTML;
    const targetMarketAreas = buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea).outerHTML;
    const audiences = buildAudienceList(program).outerHTML;
    const artifactLinks = buildArtifactLinks(program).outerHTML;

To make the code more readable, they were removed when the structure of the code was refactored to incrementally build the block.innerHTML, to make the page appear to load faster.

* assets.js (#132)

Added helper function async function getUnderdevelopmentIcon() to display the underdevelopment icon.
Also display the under development icon when  programName and campaignName is null
gmo-program-details.js
When programName and campaignName is null display the under development icon

* gmo-program-details.js
PR Code review change to

* Revert "gmo-program-details.js"

This reverts commit 18ddd12c8fef2fbcb9c56b54735e907f421f17ad.

* gmo-program-details.js
PR code review change to
let imageObject = {imageUrl : '', imageAltText: '', assetCount: 0};
assets.js
PR code review change to
if (!progamName && !campaginName)

* Resolved typo in variable programName

from
  if (!progamName && !campaginName)
to
 if (!programName && !campaignName)

* feat: Improve page load speed and add lazy loading for images (#134)

- Implement debounce for search input to reduce the number of API calls.
- Refactor the `decorate` function for better readability and performance.
- Add lazy loading for images using `IntersectionObserver` to load images only when they come into view.
- Move pagination button toggling to a separate `togglePaginationButtons` function.
- Ensure strict comparison (`===`) for block configuration check.

* ASSETS-88926 : Review and Improve Page Performance of Marketing Moment Landing page (Push Failed) (#137)

* feat: Improve page load speed and add lazy loading for images

- Implement debounce for search input to reduce the number of API calls.
- Refactor the `decorate` function for better readability and performance.
- Add lazy loading for images using `IntersectionObserver` to load images only when they come into view.
- Move pagination button toggling to a separate `togglePaginationButtons` function.
- Ensure strict comparison (`===`) for block configuration check.

* feat: Improve page load speed and add lazy loading for images

- Removed debounce for search
- Added lazy loading for images using `IntersectionObserver` to load images only when they come into view.

* ASSETS-88927 : Toggle Read More Button (#138)

* feat: Add Read More/Read Less toggle functionality

- Added event listener for Read More buttons to toggle text visibility in Marketing Goal and Product Value sections.
- Updated the decorate function to handle Read More/Read Less functionality.

* style: Add hide-overflow class for text truncation

- Added .hide-overflow class to handle text truncation with ellipsis.
- Ensured compatibility with the Read More/Read Less functionality.

* Modified FAQ Nav (#139)

Co-authored-by: Mathieu Lessard <[email protected]>

* Updated function  searchAsset(programName, campaignName, deliverableType = '', imageWidth = 80) (#142)

Added new parameter deliverableType, moved parameter  imageWidth to be the last parameter.

* Updated Launch Date label to Proposed Launch Date in Program List (#145)

Updated Launch Date tool tip to and Proposed Launch Date in Program Details page

* Added redirect block which supports regex (#148)

Co-authored-by: Mathieu Lessard <[email protected]>

* Replaced console.log with console.info (#149)

* Added redirect block which supports regex

* Added alert for redirect

* Changed log to info

* Added alert for redirect

* Changed log to info

---------

Co-authored-by: Mathieu Lessard <[email protected]>

* Added alert letting people know their content as moved (#154)

* Added redirect block which supports regex

* Added alert for redirect

* Changed log to info

* Added alert for redirect

* Changed log to info

* Added alert for redirect

---------

Co-authored-by: Mathieu Lessard <[email protected]>

* Squashed commit of the following:

commit 0659922c04ac5a76e29b135dc534b56ffd1d554d
Author: TyroneAEM <[email protected]>
Date:   Thu Aug 1 12:16:47 2024 -0500

    Branch rc to main => Update the 'Launch Date' label to "Proposed Launch Date" (#147)

    * Added mapping for uuid (#74)

    Co-authored-by: Mathieu Lessard <[email protected]>

    * Removed Prefix from Displayed UUID Value on Assets (#76)

    * Modified formatAssetMetadata() to allow custom dc-format Labels (#79)

    * Removed "required" and custom values for fields (#86)

    Co-authored-by: Mathieu Lessard <[email protected]>

    * Added getBaseConfigPath to Collections Back Button (#89)

    * Releasing HCV Dashboard code (#106)

    * ASSETS-88894 GRAPHQL Persisted Query Code (#53)

    * GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

    * Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

    * Renamed file test-graphql.js to graphql.js

    Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
    Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
    Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from …
shiv-gup added a commit that referenced this pull request Oct 24, 2024
* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

* Modified formatAssetMetadata() to allow custom dc-format Labels (#79)

* Removed "required" and custom values for fields (#86)

Co-authored-by: Mathieu Lessard <[email protected]>

* Added getBaseConfigPath to Collections Back Button (#89)

* Releasing HCV Dashboard code (#106)

* ASSETS-88894 GRAPHQL Persisted Query Code (#53)

* GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

* Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

* Renamed file test-graphql.js to graphql.js

Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

* Changed queryName to getAllCampaings

* Rollback to 3/15/24 Commit a519a5155c3dd57f0c54ea8bd336cd0a231cffab before adding GraphQL test code

* Delete test graphql code

* ASSETS-88895 : Show HCV report pages to limited users (#55)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Campaign List block for Marketing Dashboard page (#56)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

---------

Co-authored-by: Michael Dickson <[email protected]>

* updated hydration-utils.js (#54)

MH: Added Firefly  product to AA Modal 'Product' Field List

* Assets 98990 - Dynamic campaign list (#61)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

* Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

Which calls the persisted query gmo/filter-on-marketing-initiative
with example parameters

{
  "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
}

https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

* Campaign List filters display (#65)

* initial html structure setup

* refactor from select to div implementation

Select with multiselect displays as a list, not a dropdown

* finish refactor, enable visual functionality

- added all javascript needed for visual functionality
- finished refactoring structure

* Assets 98990 (#66)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* minor updates

- update graphql query to have hardcoded offset/limit (to resolve error)
- remove comments
- add placeholder 'refresh date' message and css
- move css for main body to accomodate above message

* add firefly icon

---------

Co-authored-by: Tyrone Tse <[email protected]>

* ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

* Added function hideQuickLinks()

* Added the hide field to the  shared-quicklinks config/worksheet
/blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
/scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
/scripts/site-config.js : Updated function to include the hide field

* Refactored the If statement logic

* Assets 98992- Campaign details/overview (#69)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

* gmo-campagin-list refactored to use  persisted query function
	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

* Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
Refactored the code for Repaginate for when the number of items page is changed
Show current page status

* graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
Deleted function  graphqlCampaignPaginated(first,cursor)

Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

* Fixed logic in calculating the nextCursor

* Removed all debug console.log statements

* Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

* Renamed the variable testConfig to headerConfig

* Campaign details block (#71)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* add status bar display

Also adjusted demo data slightly to include due date and lead

* update css/html to align with mockup and mvp

* resolve border bug

* implemented requested changes

* ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

---------

Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

* Updated function toggleOption : To only allow a single option to be selected in the dropdown list

---------

Co-authored-by: Shivani gupta <[email protected]>

* Assets 98993 (#75)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* resolve pr comments

* Release 05.09.2024 (#78)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

---------

Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>

* ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Assets 98994 (#81)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* initial changeover from static to dynamic data

* adjustments based on feedback

* additional changes based on feedback

* minor bugfix, null checks

* squash final bug with read more

* final touches

* combine two graphql functions with duplicated code

* bugfixes per pr review

* ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
Updated Geo dropdown list to be populated by graphql persisted query getGeoList

* Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
When a Business Line option is deselected then the Products List shows all products.

* Reduced the sample dropdown list options

* make links configurable, remove extraneous logs (#83)

* ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Removed comment

* ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Added function searchAsset(programName, campaignName) to get the asset URL

* Changed alt text to use assets repo-name property

* Renamed/Moved AssetsDatasource.js to /scripts/assets
gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
otherwise the values from blockConfig are overwritten when paginating to next page.

gmo-campaign-details.js : Added campaign Image
gmo-campaign-details.css : Updated CSS to display campaign Image

* gmo-campaign-list.js : Deleted comment
/scripts/assets.js : Updated to use createSearchEndpoint
/scripts/scripts.js : Added export to  export function createSearchEndpoint() {

* Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

* gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
/scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

* Assets 98996 (#88)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* ASSETS-88905 : Add Fields to the Overview Tab (#87)

* Added Target Market Area lists

function function createKPI(kpi)  is renamed createLI(li)

Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

* gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
gmo-campaign-details.js : Added Target Market Area and Platforms
refactored async function buildChannelScope(scopeTypeId, scopes, block)
to be able to display data for data based for a specified  CSS ID

* Added function getUniqueItems(items, property)
to get unique values for deliverableType and platforms

* Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
to  async function buildFieldScopes(scopeTypeId, scopes, block)

* Added global variable globalGraphFliter (#92)

Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
with graphFilter = currentGraphqlFilter

* Assets 98996 (#93)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* add deliverabletype graphql

- todo: refactor, some superfluous function(s) can be removed

* refactor product list to use graphql

* fix deliverable type tags, fix multiline text

* fix sort on marketing moments column

* removing merge artifact

* resolve PR comments

* platforms mapping with graphql (#94)

- also cleaned up extraneous/defunct code

* Refactor sort icons (#95)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

* assets.js : Refactored code to eliminate console.log error
gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

* Eliminated  JavaScript errors when image is not found

* Display total assets = 0 when the campaign image does not exist

* Code cleanup (#98)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

* Code cleanup part 2 (#100)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* Added  function closeAllDropDowns() (#101)

Added function handleClickOutside(event)

Updated function attachEventListeners()
    // Add event listener for clicks outside of dropdowns
    document.addEventListener('click', handleClickOutside);

Added function  resetProductsDropDown();

Updated  function resetAllFilters() to call function   resetProductsDropDown();

* Sticky deliverables header, update graphql endpoints (#102)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* update query endpoints, css tweak on deliverables

* Added tool tip for Program Name and Campaign Name (#103)

* remove duplicate icons

---------

Co-authored-by: TyroneAEM <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Tyrone Tse <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88912 : [Issue] Last page number is not matching with total number of pages (#105)

* ASSETS-88894 GRAPHQL Persisted Query Code (#53)

* GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

* Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

* Renamed file test-graphql.js to graphql.js

Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

* Changed queryName to getAllCampaings

* Rollback to 3/15/24 Commit a519a5155c3dd57f0c54ea8bd336cd0a231cffab before adding GraphQL test code

* Delete test graphql code

* ASSETS-88895 : Show HCV report pages to limited users (#55)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Campaign List block for Marketing Dashboard page (#56)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

---------

Co-authored-by: Michael Dickson <[email protected]>

* updated hydration-utils.js (#54)

MH: Added Firefly  product to AA Modal 'Product' Field List

* Assets 98990 - Dynamic campaign list (#61)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

* Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

Which calls the persisted query gmo/filter-on-marketing-initiative
with example parameters

{
  "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
}

https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

* Campaign List filters display (#65)

* initial html structure setup

* refactor from select to div implementation

Select with multiselect displays as a list, not a dropdown

* finish refactor, enable visual functionality

- added all javascript needed for visual functionality
- finished refactoring structure

* Assets 98990 (#66)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* minor updates

- update graphql query to have hardcoded offset/limit (to resolve error)
- remove comments
- add placeholder 'refresh date' message and css
- move css for main body to accomodate above message

* add firefly icon

---------

Co-authored-by: Tyrone Tse <[email protected]>

* ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

* Added function hideQuickLinks()

* Added the hide field to the  shared-quicklinks config/worksheet
/blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
/scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
/scripts/site-config.js : Updated function to include the hide field

* Refactored the If statement logic

* Assets 98992- Campaign details/overview (#69)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

* gmo-campagin-list refactored to use  persisted query function
	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

* Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
Refactored the code for Repaginate for when the number of items page is changed
Show current page status

* graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
Deleted function  graphqlCampaignPaginated(first,cursor)

Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

* Fixed logic in calculating the nextCursor

* Removed all debug console.log statements

* Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

* Renamed the variable testConfig to headerConfig

* Campaign details block (#71)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* add status bar display

Also adjusted demo data slightly to include due date and lead

* update css/html to align with mockup and mvp

* resolve border bug

* implemented requested changes

* ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

---------

Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

* Updated function toggleOption : To only allow a single option to be selected in the dropdown list

---------

Co-authored-by: Shivani gupta <[email protected]>

* Assets 98993 (#75)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* resolve pr comments

* Release 05.09.2024 (#78)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

---------

Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>

* ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Assets 98994 (#81)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* initial changeover from static to dynamic data

* adjustments based on feedback

* additional changes based on feedback

* minor bugfix, null checks

* squash final bug with read more

* final touches

* combine two graphql functions with duplicated code

* bugfixes per pr review

* ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
Updated Geo dropdown list to be populated by graphql persisted query getGeoList

* Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
When a Business Line option is deselected then the Products List shows all products.

* Reduced the sample dropdown list options

* make links configurable, remove extraneous logs (#83)

* ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Removed comment

* ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Added function searchAsset(programName, campaignName) to get the asset URL

* Changed alt text to use assets repo-name property

* Renamed/Moved AssetsDatasource.js to /scripts/assets
gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
otherwise the values from blockConfig are overwritten when paginating to next page.

gmo-campaign-details.js : Added campaign Image
gmo-campaign-details.css : Updated CSS to display campaign Image

* gmo-campaign-list.js : Deleted comment
/scripts/assets.js : Updated to use createSearchEndpoint
/scripts/scripts.js : Added export to  export function createSearchEndpoint() {

* Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

* gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
/scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

* Assets 98996 (#88)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* ASSETS-88905 : Add Fields to the Overview Tab (#87)

* Added Target Market Area lists

function function createKPI(kpi)  is renamed createLI(li)

Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

* gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
gmo-campaign-details.js : Added Target Market Area and Platforms
refactored async function buildChannelScope(scopeTypeId, scopes, block)
to be able to display data for data based for a specified  CSS ID

* Added function getUniqueItems(items, property)
to get unique values for deliverableType and platforms

* Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
to  async function buildFieldScopes(scopeTypeId, scopes, block)

* Added global variable globalGraphFliter (#92)

Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
with graphFilter = currentGraphqlFilter

* Assets 98996 (#93)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* add deliverabletype graphql

- todo: refactor, some superfluous function(s) can be removed

* refactor product list to use graphql

* fix deliverable type tags, fix multiline text

* fix sort on marketing moments column

* removing merge artifact

* resolve PR comments

* platforms mapping with graphql (#94)

- also cleaned up extraneous/defunct code

* Refactor sort icons (#95)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

* assets.js : Refactored code to eliminate console.log error
gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

* Eliminated  JavaScript errors when image is not found

* Display total assets = 0 when the campaign image does not exist

* Code cleanup (#98)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

* Code cleanup part 2 (#100)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* Added  function closeAllDropDowns() (#101)

Added function handleClickOutside(event)

Updated function attachEventListeners()
    // Add event listener for clicks outside of dropdowns
    document.addEventListener('click', handleClickOutside);

Added function  resetProductsDropDown();

Updated  function resetAllFilters() to call function   resetProductsDropDown();

* Sticky deliverables header, update graphql endpoints (#102)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* update query endpoints, css tweak on deliverables

* Added tool tip for Program Name and Campaign Name (#103)

* remove duplicate icons

* Change default items per page from 4 to 8
Changed undefined message for Campaign to  Marketing Moment Not Available

* Remove debugging from graphql.js

* Deleted function debug_console()

---------

Co-authored-by: Shivani Gupta <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>

* Performance refactoring (#107)

* performance refactoring

- improve thumbnail performance by makin async
- format date property to yyyy-mm-dd
- fix margin issue in program header
- refactor function that builds header dropdown for increased
  performance

* resolve bug with event listeners not attaching

* add programID parameter to deliverable query (#109)

* add programID parameter to deliverable query

* quick null check for status color

* remove console log

* Update query names, handle formatting (#110)

* update query names

* handle null deliverable types

* make dateFormat function available to detail block

* remove unused function

* remove console log messages

* fix typo in graphql query name (#111)

* ASSETS-88914 : Fix Pagination Frontend Code (#108)

* Changed the default number items per page to 4
Added function  debounce(func, wait)  to delay the Previous and Next page to wait 0.5 seconds between each click, to stop the user clicking too fast and breaking pagination

* Decrease debounce timeout to 200 milliseconds (0.2 secs)

* Added check that next page cannot go past last page
Added check that prev page cannot go back past page 1

* fix(pagination): Ensure proper handling of next/prev buttons and page boundaries

- Added totalPages calculation and checks to ensure "Next" button is disabled on the last page
- Updated nextPage function to correctly enable/disable pagination buttons
- Improved prevPage function to ensure it navigates back to the first page correctly
- Applied debounce to prevent rapid clicking issues
- Refactored logic for enabling/disabling pagination buttons based on current page state

* - Changed default items per page to 8
- Removed 4 items per page from filter
- Removed cusorArray, and replaced it with  currentPageInfo.previousCursor =  currentPageInfo.currentCursor;
- Set next cursor to  data.programPaginated.pageInfo.endCursor;
- Function prevPage now uses  currentPage.previousCursor as the cursor parameter value, and calculating the cursor value to use from cursorArray is no longer needed.

* Increased the click delay to 500 milliseconds

* Disabled the Previous and Next Button as soon as they are clicked, to prevent the user multiple clicking the button.

* Restored previous logic using cursorArray to manage the calculation of the cursor for the previous page. (#113)

* Adjust height of deliverables tab on program-details block (#114)

* minor css changes for program details

* adjust deliverables table height

* add min height to deliverables table

* remove commented css

* Sort deliverable type array before rows are made

* DXI-26587- Modify landing page for v3 Hub, so Signin goes to CH/v4 (#116)

* Replace throwing 404 error when the asset is not found, with asset.svg icon (#119)

* Make content fragment path for WF mappings configurable (#118)

* refactoring to use single graphql endpoint for map

* refactor 'mapping' functions

- refactor mapping retrieval functions in all three hcv blocks

* Remove comments

* remove unused function stub

* resolve bug in header filter refresh

* remove unused import

* Fixed issue where header didn't load if the user didn't have a profile yet (#121)

Co-authored-by: Mathieu Lessard <[email protected]>

* add checks for null 'review link' and 'final asset' (#122)

* Refactor header and query variable extraction (#123)

* add checks for null 'review link' and 'final asset'

* Add msg for programs with no data available

* refactor header so it can be used with no data

* wrap msg with div for styling

* refactor query variable extraction

- had to account for ampersand in program name

* Updated Product List (#117)

* Product list updated

* N/A value and label now match

* Fixed formatting

---------

Co-authored-by: Mathieu Lessard <[email protected]>

* Restored calling the function attatchEventListerners() at the end of the function decorate(block) (#124)

* Fix text wrapping issue in Project Owner column for smaller viewports (#125)

- Adjusted CSS to ensure text in the "Project Owner" column wraps properly
- Set row height to auto and adjusted line-height for better spacing
- Added media query for responsive width adjustments
- Ensured consistent display and improved readability across different viewport sizes

* ASSETS-88920 : Cosmetic Updates from MVP Feedback (#126)

* feat: Add Geo column to program list and adjust column widths for proper alignment

- Updated `gmo-program-list.js` to include Geo column in the header configuration and campaign list
- Adjusted column widths in `gmo-program-list.css` to ensure proper alignment under each column heading
- Add function `formatGeos` to format Geo array as comma-delimited list, that is displayed in the Geo column

* - Added a tooltip to the "Total Approved Assets" field in the Deliverables tab.
- Tooltip text provides instructions to view assets: "To view the assets, go to the 'All Asset' search page and use Program and Campaign name facet to filter the assets."
- Styled the tooltip to match the color and background of the Launch Date tooltip.
- Ensured the tooltip text appears on one line and positioned it correctly.
- Updated the "Total Asset" label to "Total Approved Asset"
- Updated the "Deliverable Name" column name to "Deliverable Task Name"

* - Added the Driver detail in Overview Tab next to Launch date like "Project Owner: Aina Tchoshanova"
- Update the Project "Owner column" label to "Task Owner"

* ASSETS-88921 : Marketing Moments Clickable Title and Underdevelopment Icon for ProgramNames/Campaigns (#128)

* feat: Change cursor to pointer for campaign name label and text

- Added CSS to change cursor to pointer on hover for .campaign-name-label and .campaign-name span.

feat: Add click event to campaign name label and text

- Updated buildCampaignList function to add click event listener to campaign name label and text.
- Clicking on the campaign name label or text now navigates to campaignDetailsLink.
- Ensured the appearance of the label and text remains unchanged while adding navigation functionality.

feat:  Rename "Review Link" to "QA Files" in the "Deliverable" task tab

- Updated Program Details column text/header to  QA files
- Updated CSS class from review-link to qa-files

* - feature :  When a campaign does not have an image assigned display the underdevelopment icon
Updated function searchAsset(programName, campaignName, imageWidth = 80) to get the  underdevelopment icon from site-config worksheet shared-branding worksheet

* Sorted the options in the dropdown lists alphabetically on the options text field (#131)

* ASSETS-88922 : Review the Deliverable page load time (#130)

* Improve page load time by parallelizing API calls and adding debug logs

- Updated `decorate` function to fetch program details and deliverables in parallel using `Promise.all`.
- Added console logs before and after API calls to help with debugging.
- Maintained existing functionality while optimizing performance by reducing sequential API calls.

* Remove logging messages

* feat: Improve performance of gmo-program-details.js

- Implement parallel GraphQL queries to reduce load times.
- Lazy load images using the `loading="lazy"` attribute to improve initial load performance.
- Batch DOM updates using `document.createDocumentFragment()` to minimize reflows and repaints.
- Debounce event listeners to prevent performance issues caused by rapid firing of events.

These optimizations should enhance the overall performance and responsiveness of the page.

* Optimize header rendering and asynchronous data fetching

- Initiate parallel fetching of program details and deliverables.
- Render a placeholder header immediately to improve perceived load time.
- Update header with actual data once program details are fetched.
- Ensure images are loaded asynchronously without blocking header rendering.

* feat: Inject additional HTML content into main-body-wrapper after header update

- Added HTML content including tab-wrapper, overview, and deliverables sections to the main-body-wrapper div after the header.
- Updated the main-body-wrapper div to include newly provided HTML content for improved user interface and navigation.
- Ensured the content injection occurs after the header update to maintain correct rendering order.

* Added back displaying the back button with arrow icon and program name not available message and no data available message when program

* Updated logic to display the total asset count for an image

* Reverted back to
const programData = await executeQuery(programQueryString);
const deliverables = await executeQuery(deliverableQueryString);

* Restored constant variables for Marketing Goal, KPIs, Target Market, Audiences
    const p0TargetMarketArea = program.p0TargetMarketArea;
    const p1TargetMarketArea = program.p1TargetMarketArea;
    const kpis = buildKPIList(program).outerHTML;
    const targetMarketAreas = buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea).outerHTML;
    const audiences = buildAudienceList(program).outerHTML;
    const artifactLinks = buildArtifactLinks(program).outerHTML;

To make the code more readable, they were removed when the structure of the code was refactored to incrementally build the block.innerHTML, to make the page appear to load faster.

* assets.js (#132)

Added helper function async function getUnderdevelopmentIcon() to display the underdevelopment icon.
Also display the under development icon when  programName and campaignName is null
gmo-program-details.js
When programName and campaignName is null display the under development icon

* gmo-program-details.js
PR Code review change to

* Revert "gmo-program-details.js"

This reverts commit 18ddd12c8fef2fbcb9c56b54735e907f421f17ad.

* gmo-program-details.js
PR code review change to
let imageObject = {imageUrl : '', imageAltText: '', assetCount: 0};
assets.js
PR code review change to
if (!progamName && !campaginName)

* Resolved typo in variable programName

from
  if (!progamName && !campaginName)
to
 if (!programName && !campaignName)

* feat: Improve page load speed and add lazy loading for images (#134)

- Implement debounce for search input to reduce the number of API calls.
- Refactor the `decorate` function for better readability and performance.
- Add lazy loading for images using `IntersectionObserver` to load images only when they come into view.
- Move pagination button toggling to a separate `togglePaginationButtons` function.
- Ensure strict comparison (`===`) for block configuration check.

* ASSETS-88926 : Review and Improve Page Performance of Marketing Moment Landing page (Push Failed) (#137)

* feat: Improve page load speed and add lazy loading for images

- Implement debounce for search input to reduce the number of API calls.
- Refactor the `decorate` function for better readability and performance.
- Add lazy loading for images using `IntersectionObserver` to load images only when they come into view.
- Move pagination button toggling to a separate `togglePaginationButtons` function.
- Ensure strict comparison (`===`) for block configuration check.

* feat: Improve page load speed and add lazy loading for images

- Removed debounce for search
- Added lazy loading for images using `IntersectionObserver` to load images only when they come into view.

* ASSETS-88927 : Toggle Read More Button (#138)

* feat: Add Read More/Read Less toggle functionality

- Added event listener for Read More buttons to toggle text visibility in Marketing Goal and Product Value sections.
- Updated the decorate function to handle Read More/Read Less functionality.

* style: Add hide-overflow class for text truncation

- Added .hide-overflow class to handle text truncation with ellipsis.
- Ensured compatibility with the Read More/Read Less functionality.

* Modified FAQ Nav (#139)

Co-authored-by: Mathieu Lessard <[email protected]>

* Updated function  searchAsset(programName, campaignName, deliverableType = '', imageWidth = 80) (#142)

Added new parameter deliverableType, moved parameter  imageWidth to be the last parameter.

* Updated Launch Date label to Proposed Launch Date in Program List (#145)

Updated Launch Date tool tip to and Proposed Launch Date in Program Details page

* Added redirect block which supports regex (#148)

Co-authored-by: Mathieu Lessard <[email protected]>

* Replaced console.log with console.info (#149)

* Added redirect block which supports regex

* Added alert for redirect

* Changed log to info

* Added alert for redirect

* Changed log to info

---------

Co-authored-by: Mathieu Lessard <[email protected]>

* Added alert letting people know their content as moved (#154)

* Added redirect block which supports regex

* Added alert for redirect

* Changed log to info

* Added alert for redirect

* Changed log to info

* Added alert for redirect

---------

Co-authored-by: Mathieu Lessard <[email protected]>

* Squashed commit of the following:

commit 0659922c04ac5a76e29b135dc534b56ffd1d554d
Author: TyroneAEM <[email protected]>
Date:   Thu Aug 1 12:16:47 2024 -0500

    Branch rc to main => Update the 'Launch Date' label to "Proposed Launch Date" (#147)

    * Added mapping for uuid (#74)

    Co-authored-by: Mathieu Lessard <[email protected]>

    * Removed Prefix from Displayed UUID Value on Assets (#76)

    * Modified formatAssetMetadata() to allow custom dc-format Labels (#79)

    * Removed "required" and custom values for fields (#86)

    Co-authored-by: Mathieu Lessard <[email protected]>

    * Added getBaseConfigPath to Collections Back Button (#89)

    * Releasing HCV Dashboard code (#106)

    * ASSETS-88894 GRAPHQL Persisted Query Code (#53)

    * GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

    * Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

    * Renamed file test-graphql.js to graphql.js

    Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
    Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
    Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the conf…
staware30 added a commit that referenced this pull request Dec 5, 2024
* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

* Modified formatAssetMetadata() to allow custom dc-format Labels (#79)

* Removed "required" and custom values for fields (#86)

Co-authored-by: Mathieu Lessard <[email protected]>

* Added getBaseConfigPath to Collections Back Button (#89)

* Releasing HCV Dashboard code (#106)

* ASSETS-88894 GRAPHQL Persisted Query Code (#53)

* GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

* Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

* Renamed file test-graphql.js to graphql.js

Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

* Changed queryName to getAllCampaings

* Rollback to 3/15/24 Commit a519a5155c3dd57f0c54ea8bd336cd0a231cffab before adding GraphQL test code

* Delete test graphql code

* ASSETS-88895 : Show HCV report pages to limited users (#55)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Campaign List block for Marketing Dashboard page (#56)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

---------

Co-authored-by: Michael Dickson <[email protected]>

* updated hydration-utils.js (#54)

MH: Added Firefly  product to AA Modal 'Product' Field List

* Assets 98990 - Dynamic campaign list (#61)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

* Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

Which calls the persisted query gmo/filter-on-marketing-initiative
with example parameters

{
  "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
}

https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

* Campaign List filters display (#65)

* initial html structure setup

* refactor from select to div implementation

Select with multiselect displays as a list, not a dropdown

* finish refactor, enable visual functionality

- added all javascript needed for visual functionality
- finished refactoring structure

* Assets 98990 (#66)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* minor updates

- update graphql query to have hardcoded offset/limit (to resolve error)
- remove comments
- add placeholder 'refresh date' message and css
- move css for main body to accomodate above message

* add firefly icon

---------

Co-authored-by: Tyrone Tse <[email protected]>

* ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

* Added function hideQuickLinks()

* Added the hide field to the  shared-quicklinks config/worksheet
/blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
/scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
/scripts/site-config.js : Updated function to include the hide field

* Refactored the If statement logic

* Assets 98992- Campaign details/overview (#69)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

* gmo-campagin-list refactored to use  persisted query function
	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

* Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
Refactored the code for Repaginate for when the number of items page is changed
Show current page status

* graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
Deleted function  graphqlCampaignPaginated(first,cursor)

Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

* Fixed logic in calculating the nextCursor

* Removed all debug console.log statements

* Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

* Renamed the variable testConfig to headerConfig

* Campaign details block (#71)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* add status bar display

Also adjusted demo data slightly to include due date and lead

* update css/html to align with mockup and mvp

* resolve border bug

* implemented requested changes

* ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

---------

Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

* Updated function toggleOption : To only allow a single option to be selected in the dropdown list

---------

Co-authored-by: Shivani gupta <[email protected]>

* Assets 98993 (#75)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* resolve pr comments

* Release 05.09.2024 (#78)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

---------

Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>

* ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Assets 98994 (#81)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* initial changeover from static to dynamic data

* adjustments based on feedback

* additional changes based on feedback

* minor bugfix, null checks

* squash final bug with read more

* final touches

* combine two graphql functions with duplicated code

* bugfixes per pr review

* ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
Updated Geo dropdown list to be populated by graphql persisted query getGeoList

* Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
When a Business Line option is deselected then the Products List shows all products.

* Reduced the sample dropdown list options

* make links configurable, remove extraneous logs (#83)

* ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Removed comment

* ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Added function searchAsset(programName, campaignName) to get the asset URL

* Changed alt text to use assets repo-name property

* Renamed/Moved AssetsDatasource.js to /scripts/assets
gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
otherwise the values from blockConfig are overwritten when paginating to next page.

gmo-campaign-details.js : Added campaign Image
gmo-campaign-details.css : Updated CSS to display campaign Image

* gmo-campaign-list.js : Deleted comment
/scripts/assets.js : Updated to use createSearchEndpoint
/scripts/scripts.js : Added export to  export function createSearchEndpoint() {

* Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

* gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
/scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

* Assets 98996 (#88)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* ASSETS-88905 : Add Fields to the Overview Tab (#87)

* Added Target Market Area lists

function function createKPI(kpi)  is renamed createLI(li)

Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

* gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
gmo-campaign-details.js : Added Target Market Area and Platforms
refactored async function buildChannelScope(scopeTypeId, scopes, block)
to be able to display data for data based for a specified  CSS ID

* Added function getUniqueItems(items, property)
to get unique values for deliverableType and platforms

* Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
to  async function buildFieldScopes(scopeTypeId, scopes, block)

* Added global variable globalGraphFliter (#92)

Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
with graphFilter = currentGraphqlFilter

* Assets 98996 (#93)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* add deliverabletype graphql

- todo: refactor, some superfluous function(s) can be removed

* refactor product list to use graphql

* fix deliverable type tags, fix multiline text

* fix sort on marketing moments column

* removing merge artifact

* resolve PR comments

* platforms mapping with graphql (#94)

- also cleaned up extraneous/defunct code

* Refactor sort icons (#95)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

* assets.js : Refactored code to eliminate console.log error
gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

* Eliminated  JavaScript errors when image is not found

* Display total assets = 0 when the campaign image does not exist

* Code cleanup (#98)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

* Code cleanup part 2 (#100)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* Added  function closeAllDropDowns() (#101)

Added function handleClickOutside(event)

Updated function attachEventListeners()
    // Add event listener for clicks outside of dropdowns
    document.addEventListener('click', handleClickOutside);

Added function  resetProductsDropDown();

Updated  function resetAllFilters() to call function   resetProductsDropDown();

* Sticky deliverables header, update graphql endpoints (#102)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* update query endpoints, css tweak on deliverables

* Added tool tip for Program Name and Campaign Name (#103)

* remove duplicate icons

---------

Co-authored-by: TyroneAEM <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Tyrone Tse <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88912 : [Issue] Last page number is not matching with total number of pages (#105)

* ASSETS-88894 GRAPHQL Persisted Query Code (#53)

* GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

* Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

* Renamed file test-graphql.js to graphql.js

Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

* Changed queryName to getAllCampaings

* Rollback to 3/15/24 Commit a519a5155c3dd57f0c54ea8bd336cd0a231cffab before adding GraphQL test code

* Delete test graphql code

* ASSETS-88895 : Show HCV report pages to limited users (#55)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Campaign List block for Marketing Dashboard page (#56)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

---------

Co-authored-by: Michael Dickson <[email protected]>

* updated hydration-utils.js (#54)

MH: Added Firefly  product to AA Modal 'Product' Field List

* Assets 98990 - Dynamic campaign list (#61)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

* Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

Which calls the persisted query gmo/filter-on-marketing-initiative
with example parameters

{
  "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
}

https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

* Campaign List filters display (#65)

* initial html structure setup

* refactor from select to div implementation

Select with multiselect displays as a list, not a dropdown

* finish refactor, enable visual functionality

- added all javascript needed for visual functionality
- finished refactoring structure

* Assets 98990 (#66)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* minor updates

- update graphql query to have hardcoded offset/limit (to resolve error)
- remove comments
- add placeholder 'refresh date' message and css
- move css for main body to accomodate above message

* add firefly icon

---------

Co-authored-by: Tyrone Tse <[email protected]>

* ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

* Added function hideQuickLinks()

* Added the hide field to the  shared-quicklinks config/worksheet
/blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
/scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
/scripts/site-config.js : Updated function to include the hide field

* Refactored the If statement logic

* Assets 98992- Campaign details/overview (#69)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

* gmo-campagin-list refactored to use  persisted query function
	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

* Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
Refactored the code for Repaginate for when the number of items page is changed
Show current page status

* graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
Deleted function  graphqlCampaignPaginated(first,cursor)

Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

* Fixed logic in calculating the nextCursor

* Removed all debug console.log statements

* Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

* Renamed the variable testConfig to headerConfig

* Campaign details block (#71)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* add status bar display

Also adjusted demo data slightly to include due date and lead

* update css/html to align with mockup and mvp

* resolve border bug

* implemented requested changes

* ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

---------

Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

* Updated function toggleOption : To only allow a single option to be selected in the dropdown list

---------

Co-authored-by: Shivani gupta <[email protected]>

* Assets 98993 (#75)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* resolve pr comments

* Release 05.09.2024 (#78)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

---------

Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>

* ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Assets 98994 (#81)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* initial changeover from static to dynamic data

* adjustments based on feedback

* additional changes based on feedback

* minor bugfix, null checks

* squash final bug with read more

* final touches

* combine two graphql functions with duplicated code

* bugfixes per pr review

* ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
Updated Geo dropdown list to be populated by graphql persisted query getGeoList

* Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
When a Business Line option is deselected then the Products List shows all products.

* Reduced the sample dropdown list options

* make links configurable, remove extraneous logs (#83)

* ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Removed comment

* ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Added function searchAsset(programName, campaignName) to get the asset URL

* Changed alt text to use assets repo-name property

* Renamed/Moved AssetsDatasource.js to /scripts/assets
gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
otherwise the values from blockConfig are overwritten when paginating to next page.

gmo-campaign-details.js : Added campaign Image
gmo-campaign-details.css : Updated CSS to display campaign Image

* gmo-campaign-list.js : Deleted comment
/scripts/assets.js : Updated to use createSearchEndpoint
/scripts/scripts.js : Added export to  export function createSearchEndpoint() {

* Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

* gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
/scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

* Assets 98996 (#88)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* ASSETS-88905 : Add Fields to the Overview Tab (#87)

* Added Target Market Area lists

function function createKPI(kpi)  is renamed createLI(li)

Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

* gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
gmo-campaign-details.js : Added Target Market Area and Platforms
refactored async function buildChannelScope(scopeTypeId, scopes, block)
to be able to display data for data based for a specified  CSS ID

* Added function getUniqueItems(items, property)
to get unique values for deliverableType and platforms

* Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
to  async function buildFieldScopes(scopeTypeId, scopes, block)

* Added global variable globalGraphFliter (#92)

Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
with graphFilter = currentGraphqlFilter

* Assets 98996 (#93)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* add deliverabletype graphql

- todo: refactor, some superfluous function(s) can be removed

* refactor product list to use graphql

* fix deliverable type tags, fix multiline text

* fix sort on marketing moments column

* removing merge artifact

* resolve PR comments

* platforms mapping with graphql (#94)

- also cleaned up extraneous/defunct code

* Refactor sort icons (#95)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

* assets.js : Refactored code to eliminate console.log error
gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

* Eliminated  JavaScript errors when image is not found

* Display total assets = 0 when the campaign image does not exist

* Code cleanup (#98)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

* Code cleanup part 2 (#100)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* Added  function closeAllDropDowns() (#101)

Added function handleClickOutside(event)

Updated function attachEventListeners()
    // Add event listener for clicks outside of dropdowns
    document.addEventListener('click', handleClickOutside);

Added function  resetProductsDropDown();

Updated  function resetAllFilters() to call function   resetProductsDropDown();

* Sticky deliverables header, update graphql endpoints (#102)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* update query endpoints, css tweak on deliverables

* Added tool tip for Program Name and Campaign Name (#103)

* remove duplicate icons

* Change default items per page from 4 to 8
Changed undefined message for Campaign to  Marketing Moment Not Available

* Remove debugging from graphql.js

* Deleted function debug_console()

---------

Co-authored-by: Shivani Gupta <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>

* Performance refactoring (#107)

* performance refactoring

- improve thumbnail performance by makin async
- format date property to yyyy-mm-dd
- fix margin issue in program header
- refactor function that builds header dropdown for increased
  performance

* resolve bug with event listeners not attaching

* add programID parameter to deliverable query (#109)

* add programID parameter to deliverable query

* quick null check for status color

* remove console log

* Update query names, handle formatting (#110)

* update query names

* handle null deliverable types

* make dateFormat function available to detail block

* remove unused function

* remove console log messages

* fix typo in graphql query name (#111)

* ASSETS-88914 : Fix Pagination Frontend Code (#108)

* Changed the default number items per page to 4
Added function  debounce(func, wait)  to delay the Previous and Next page to wait 0.5 seconds between each click, to stop the user clicking too fast and breaking pagination

* Decrease debounce timeout to 200 milliseconds (0.2 secs)

* Added check that next page cannot go past last page
Added check that prev page cannot go back past page 1

* fix(pagination): Ensure proper handling of next/prev buttons and page boundaries

- Added totalPages calculation and checks to ensure "Next" button is disabled on the last page
- Updated nextPage function to correctly enable/disable pagination buttons
- Improved prevPage function to ensure it navigates back to the first page correctly
- Applied debounce to prevent rapid clicking issues
- Refactored logic for enabling/disabling pagination buttons based on current page state

* - Changed default items per page to 8
- Removed 4 items per page from filter
- Removed cusorArray, and replaced it with  currentPageInfo.previousCursor =  currentPageInfo.currentCursor;
- Set next cursor to  data.programPaginated.pageInfo.endCursor;
- Function prevPage now uses  currentPage.previousCursor as the cursor parameter value, and calculating the cursor value to use from cursorArray is no longer needed.

* Increased the click delay to 500 milliseconds

* Disabled the Previous and Next Button as soon as they are clicked, to prevent the user multiple clicking the button.

* Restored previous logic using cursorArray to manage the calculation of the cursor for the previous page. (#113)

* Adjust height of deliverables tab on program-details block (#114)

* minor css changes for program details

* adjust deliverables table height

* add min height to deliverables table

* remove commented css

* Sort deliverable type array before rows are made

* DXI-26587- Modify landing page for v3 Hub, so Signin goes to CH/v4 (#116)

* Replace throwing 404 error when the asset is not found, with asset.svg icon (#119)

* Make content fragment path for WF mappings configurable (#118)

* refactoring to use single graphql endpoint for map

* refactor 'mapping' functions

- refactor mapping retrieval functions in all three hcv blocks

* Remove comments

* remove unused function stub

* resolve bug in header filter refresh

* remove unused import

* Fixed issue where header didn't load if the user didn't have a profile yet (#121)

Co-authored-by: Mathieu Lessard <[email protected]>

* add checks for null 'review link' and 'final asset' (#122)

* Refactor header and query variable extraction (#123)

* add checks for null 'review link' and 'final asset'

* Add msg for programs with no data available

* refactor header so it can be used with no data

* wrap msg with div for styling

* refactor query variable extraction

- had to account for ampersand in program name

* Updated Product List (#117)

* Product list updated

* N/A value and label now match

* Fixed formatting

---------

Co-authored-by: Mathieu Lessard <[email protected]>

* Restored calling the function attatchEventListerners() at the end of the function decorate(block) (#124)

* Fix text wrapping issue in Project Owner column for smaller viewports (#125)

- Adjusted CSS to ensure text in the "Project Owner" column wraps properly
- Set row height to auto and adjusted line-height for better spacing
- Added media query for responsive width adjustments
- Ensured consistent display and improved readability across different viewport sizes

* ASSETS-88920 : Cosmetic Updates from MVP Feedback (#126)

* feat: Add Geo column to program list and adjust column widths for proper alignment

- Updated `gmo-program-list.js` to include Geo column in the header configuration and campaign list
- Adjusted column widths in `gmo-program-list.css` to ensure proper alignment under each column heading
- Add function `formatGeos` to format Geo array as comma-delimited list, that is displayed in the Geo column

* - Added a tooltip to the "Total Approved Assets" field in the Deliverables tab.
- Tooltip text provides instructions to view assets: "To view the assets, go to the 'All Asset' search page and use Program and Campaign name facet to filter the assets."
- Styled the tooltip to match the color and background of the Launch Date tooltip.
- Ensured the tooltip text appears on one line and positioned it correctly.
- Updated the "Total Asset" label to "Total Approved Asset"
- Updated the "Deliverable Name" column name to "Deliverable Task Name"

* - Added the Driver detail in Overview Tab next to Launch date like "Project Owner: Aina Tchoshanova"
- Update the Project "Owner column" label to "Task Owner"

* ASSETS-88921 : Marketing Moments Clickable Title and Underdevelopment Icon for ProgramNames/Campaigns (#128)

* feat: Change cursor to pointer for campaign name label and text

- Added CSS to change cursor to pointer on hover for .campaign-name-label and .campaign-name span.

feat: Add click event to campaign name label and text

- Updated buildCampaignList function to add click event listener to campaign name label and text.
- Clicking on the campaign name label or text now navigates to campaignDetailsLink.
- Ensured the appearance of the label and text remains unchanged while adding navigation functionality.

feat:  Rename "Review Link" to "QA Files" in the "Deliverable" task tab

- Updated Program Details column text/header to  QA files
- Updated CSS class from review-link to qa-files

* - feature :  When a campaign does not have an image assigned display the underdevelopment icon
Updated function searchAsset(programName, campaignName, imageWidth = 80) to get the  underdevelopment icon from site-config worksheet shared-branding worksheet

* Sorted the options in the dropdown lists alphabetically on the options text field (#131)

* ASSETS-88922 : Review the Deliverable page load time (#130)

* Improve page load time by parallelizing API calls and adding debug logs

- Updated `decorate` function to fetch program details and deliverables in parallel using `Promise.all`.
- Added console logs before and after API calls to help with debugging.
- Maintained existing functionality while optimizing performance by reducing sequential API calls.

* Remove logging messages

* feat: Improve performance of gmo-program-details.js

- Implement parallel GraphQL queries to reduce load times.
- Lazy load images using the `loading="lazy"` attribute to improve initial load performance.
- Batch DOM updates using `document.createDocumentFragment()` to minimize reflows and repaints.
- Debounce event listeners to prevent performance issues caused by rapid firing of events.

These optimizations should enhance the overall performance and responsiveness of the page.

* Optimize header rendering and asynchronous data fetching

- Initiate parallel fetching of program details and deliverables.
- Render a placeholder header immediately to improve perceived load time.
- Update header with actual data once program details are fetched.
- Ensure images are loaded asynchronously without blocking header rendering.

* feat: Inject additional HTML content into main-body-wrapper after header update

- Added HTML content including tab-wrapper, overview, and deliverables sections to the main-body-wrapper div after the header.
- Updated the main-body-wrapper div to include newly provided HTML content for improved user interface and navigation.
- Ensured the content injection occurs after the header update to maintain correct rendering order.

* Added back displaying the back button with arrow icon and program name not available message and no data available message when program

* Updated logic to display the total asset count for an image

* Reverted back to
const programData = await executeQuery(programQueryString);
const deliverables = await executeQuery(deliverableQueryString);

* Restored constant variables for Marketing Goal, KPIs, Target Market, Audiences
    const p0TargetMarketArea = program.p0TargetMarketArea;
    const p1TargetMarketArea = program.p1TargetMarketArea;
    const kpis = buildKPIList(program).outerHTML;
    const targetMarketAreas = buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea).outerHTML;
    const audiences = buildAudienceList(program).outerHTML;
    const artifactLinks = buildArtifactLinks(program).outerHTML;

To make the code more readable, they were removed when the structure of the code was refactored to incrementally build the block.innerHTML, to make the page appear to load faster.

* assets.js (#132)

Added helper function async function getUnderdevelopmentIcon() to display the underdevelopment icon.
Also display the under development icon when  programName and campaignName is null
gmo-program-details.js
When programName and campaignName is null display the under development icon

* gmo-program-details.js
PR Code review change to

* Revert "gmo-program-details.js"

This reverts commit 18ddd12c8fef2fbcb9c56b54735e907f421f17ad.

* gmo-program-details.js
PR code review change to
let imageObject = {imageUrl : '', imageAltText: '', assetCount: 0};
assets.js
PR code review change to
if (!progamName && !campaginName)

* Resolved typo in variable programName

from
  if (!progamName && !campaginName)
to
 if (!programName && !campaignName)

* feat: Improve page load speed and add lazy loading for images (#134)

- Implement debounce for search input to reduce the number of API calls.
- Refactor the `decorate` function for better readability and performance.
- Add lazy loading for images using `IntersectionObserver` to load images only when they come into view.
- Move pagination button toggling to a separate `togglePaginationButtons` function.
- Ensure strict comparison (`===`) for block configuration check.

* ASSETS-88926 : Review and Improve Page Performance of Marketing Moment Landing page (Push Failed) (#137)

* feat: Improve page load speed and add lazy loading for images

- Implement debounce for search input to reduce the number of API calls.
- Refactor the `decorate` function for better readability and performance.
- Add lazy loading for images using `IntersectionObserver` to load images only when they come into view.
- Move pagination button toggling to a separate `togglePaginationButtons` function.
- Ensure strict comparison (`===`) for block configuration check.

* feat: Improve page load speed and add lazy loading for images

- Removed debounce for search
- Added lazy loading for images using `IntersectionObserver` to load images only when they come into view.

* ASSETS-88927 : Toggle Read More Button (#138)

* feat: Add Read More/Read Less toggle functionality

- Added event listener for Read More buttons to toggle text visibility in Marketing Goal and Product Value sections.
- Updated the decorate function to handle Read More/Read Less functionality.

* style: Add hide-overflow class for text truncation

- Added .hide-overflow class to handle text truncation with ellipsis.
- Ensured compatibility with the Read More/Read Less functionality.

* Modified FAQ Nav (#139)

Co-authored-by: Mathieu Lessard <[email protected]>

* Updated function  searchAsset(programName, campaignName, deliverableType = '', imageWidth = 80) (#142)

Added new parameter deliverableType, moved parameter  imageWidth to be the last parameter.

* Updated Launch Date label to Proposed Launch Date in Program List (#145)

Updated Launch Date tool tip to and Proposed Launch Date in Program Details page

* Added redirect block which supports regex (#148)

Co-authored-by: Mathieu Lessard <[email protected]>

* Replaced console.log with console.info (#149)

* Added redirect block which supports regex

* Added alert for redirect

* Changed log to info

* Added alert for redirect

* Changed log to info

---------

Co-authored-by: Mathieu Lessard <[email protected]>

* Added alert letting people know their content as moved (#154)

* Added redirect block which supports regex

* Added alert for redirect

* Changed log to info

* Added alert for redirect

* Changed log to info

* Added alert for redirect

---------

Co-authored-by: Mathieu Lessard <[email protected]>

* Squashed commit of the following:

commit 0659922c04ac5a76e29b135dc534b56ffd1d554d
Author: TyroneAEM <[email protected]>
Date:   Thu Aug 1 12:16:47 2024 -0500

    Branch rc to main => Update the 'Launch Date' label to "Proposed Launch Date" (#147)

    * Added mapping for uuid (#74)

    Co-authored-by: Mathieu Lessard <[email protected]>

    * Removed Prefix from Displayed UUID Value on Assets (#76)

    * Modified formatAssetMetadata() to allow custom dc-format Labels (#79)

    * Removed "required" and custom values for fields (#86)

    Co-authored-by: Mathieu Lessard <[email protected]>

    * Added getBaseConfigPath to Collections Back Button (#89)

    * Releasing HCV Dashboard code (#106)

    * ASSETS-88894 GRAPHQL Persisted Query Code (#53)

    * GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

    * Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

    * Renamed file test-graphql.js to graphql.js

    Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
    Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
    Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

    * Changed queryName to getAllCampaings

    * Rollback to 3/15/24 Commit a519a5155c3dd57f0c54ea8bd336cd0a231cffab before adding GraphQL test code

    * Dele…
staware30 added a commit that referenced this pull request Dec 5, 2024
* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

* Modified formatAssetMetadata() to allow custom dc-format Labels (#79)

* Removed "required" and custom values for fields (#86)

Co-authored-by: Mathieu Lessard <[email protected]>

* Added getBaseConfigPath to Collections Back Button (#89)

* Releasing HCV Dashboard code (#106)

* ASSETS-88894 GRAPHQL Persisted Query Code (#53)

* GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

* Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

* Renamed file test-graphql.js to graphql.js

Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

* Changed queryName to getAllCampaings

* Rollback to 3/15/24 Commit a519a5155c3dd57f0c54ea8bd336cd0a231cffab before adding GraphQL test code

* Delete test graphql code

* ASSETS-88895 : Show HCV report pages to limited users (#55)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Campaign List block for Marketing Dashboard page (#56)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

---------

Co-authored-by: Michael Dickson <[email protected]>

* updated hydration-utils.js (#54)

MH: Added Firefly  product to AA Modal 'Product' Field List

* Assets 98990 - Dynamic campaign list (#61)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

* Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

Which calls the persisted query gmo/filter-on-marketing-initiative
with example parameters

{
  "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
}

https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

* Campaign List filters display (#65)

* initial html structure setup

* refactor from select to div implementation

Select with multiselect displays as a list, not a dropdown

* finish refactor, enable visual functionality

- added all javascript needed for visual functionality
- finished refactoring structure

* Assets 98990 (#66)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* minor updates

- update graphql query to have hardcoded offset/limit (to resolve error)
- remove comments
- add placeholder 'refresh date' message and css
- move css for main body to accomodate above message

* add firefly icon

---------

Co-authored-by: Tyrone Tse <[email protected]>

* ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

* Added function hideQuickLinks()

* Added the hide field to the  shared-quicklinks config/worksheet
/blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
/scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
/scripts/site-config.js : Updated function to include the hide field

* Refactored the If statement logic

* Assets 98992- Campaign details/overview (#69)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

* gmo-campagin-list refactored to use  persisted query function
	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

* Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
Refactored the code for Repaginate for when the number of items page is changed
Show current page status

* graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
Deleted function  graphqlCampaignPaginated(first,cursor)

Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

* Fixed logic in calculating the nextCursor

* Removed all debug console.log statements

* Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

* Renamed the variable testConfig to headerConfig

* Campaign details block (#71)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* add status bar display

Also adjusted demo data slightly to include due date and lead

* update css/html to align with mockup and mvp

* resolve border bug

* implemented requested changes

* ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

---------

Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

* Updated function toggleOption : To only allow a single option to be selected in the dropdown list

---------

Co-authored-by: Shivani gupta <[email protected]>

* Assets 98993 (#75)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* resolve pr comments

* Release 05.09.2024 (#78)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

---------

Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>

* ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Assets 98994 (#81)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* initial changeover from static to dynamic data

* adjustments based on feedback

* additional changes based on feedback

* minor bugfix, null checks

* squash final bug with read more

* final touches

* combine two graphql functions with duplicated code

* bugfixes per pr review

* ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
Updated Geo dropdown list to be populated by graphql persisted query getGeoList

* Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
When a Business Line option is deselected then the Products List shows all products.

* Reduced the sample dropdown list options

* make links configurable, remove extraneous logs (#83)

* ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Removed comment

* ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Added function searchAsset(programName, campaignName) to get the asset URL

* Changed alt text to use assets repo-name property

* Renamed/Moved AssetsDatasource.js to /scripts/assets
gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
otherwise the values from blockConfig are overwritten when paginating to next page.

gmo-campaign-details.js : Added campaign Image
gmo-campaign-details.css : Updated CSS to display campaign Image

* gmo-campaign-list.js : Deleted comment
/scripts/assets.js : Updated to use createSearchEndpoint
/scripts/scripts.js : Added export to  export function createSearchEndpoint() {

* Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

* gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
/scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

* Assets 98996 (#88)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* ASSETS-88905 : Add Fields to the Overview Tab (#87)

* Added Target Market Area lists

function function createKPI(kpi)  is renamed createLI(li)

Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

* gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
gmo-campaign-details.js : Added Target Market Area and Platforms
refactored async function buildChannelScope(scopeTypeId, scopes, block)
to be able to display data for data based for a specified  CSS ID

* Added function getUniqueItems(items, property)
to get unique values for deliverableType and platforms

* Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
to  async function buildFieldScopes(scopeTypeId, scopes, block)

* Added global variable globalGraphFliter (#92)

Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
with graphFilter = currentGraphqlFilter

* Assets 98996 (#93)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* add deliverabletype graphql

- todo: refactor, some superfluous function(s) can be removed

* refactor product list to use graphql

* fix deliverable type tags, fix multiline text

* fix sort on marketing moments column

* removing merge artifact

* resolve PR comments

* platforms mapping with graphql (#94)

- also cleaned up extraneous/defunct code

* Refactor sort icons (#95)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

* assets.js : Refactored code to eliminate console.log error
gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

* Eliminated  JavaScript errors when image is not found

* Display total assets = 0 when the campaign image does not exist

* Code cleanup (#98)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

* Code cleanup part 2 (#100)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* Added  function closeAllDropDowns() (#101)

Added function handleClickOutside(event)

Updated function attachEventListeners()
    // Add event listener for clicks outside of dropdowns
    document.addEventListener('click', handleClickOutside);

Added function  resetProductsDropDown();

Updated  function resetAllFilters() to call function   resetProductsDropDown();

* Sticky deliverables header, update graphql endpoints (#102)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* update query endpoints, css tweak on deliverables

* Added tool tip for Program Name and Campaign Name (#103)

* remove duplicate icons

---------

Co-authored-by: TyroneAEM <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Tyrone Tse <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88912 : [Issue] Last page number is not matching with total number of pages (#105)

* ASSETS-88894 GRAPHQL Persisted Query Code (#53)

* GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

* Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

* Renamed file test-graphql.js to graphql.js

Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

* Changed queryName to getAllCampaings

* Rollback to 3/15/24 Commit a519a5155c3dd57f0c54ea8bd336cd0a231cffab before adding GraphQL test code

* Delete test graphql code

* ASSETS-88895 : Show HCV report pages to limited users (#55)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Campaign List block for Marketing Dashboard page (#56)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

---------

Co-authored-by: Michael Dickson <[email protected]>

* updated hydration-utils.js (#54)

MH: Added Firefly  product to AA Modal 'Product' Field List

* Assets 98990 - Dynamic campaign list (#61)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* ASSETS-88895 : Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist (#60)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist

* Added function export async function graphqlFilterOnMarketingInitiative(marketingInitiative) (#64)

Which calls the persisted query gmo/filter-on-marketing-initiative
with example parameters

{
  "marketingInitiative": "FY24Q1-Q2_AdobeExpress_level Up"
}

https://author-p108396-e1046543.adobeaemcloud.com/graphql/execute.json/gmo/filter-on-marketing-initiative%3BmarketingInitiative=FY24Q1-Q2_AdobeExpress_level%20Up

* Campaign List filters display (#65)

* initial html structure setup

* refactor from select to div implementation

Select with multiselect displays as a list, not a dropdown

* finish refactor, enable visual functionality

- added all javascript needed for visual functionality
- finished refactoring structure

* Assets 98990 (#66)

* initial commit, new blocks/files

* rename files, start implementing

* continuing to implement/adjust styling

* numerous changes

- finish building bones of list component
- build bones of pagination/footer
- add icons for products (will likely need more)
- build javascript for pagination (cleanup needed)
- build javascript for sorting list

* finish pagination

* Updates to css/js to better align to mockup

* minor updates

- update graphql query to have hardcoded offset/limit (to resolve error)
- remove comments
- add placeholder 'refresh date' message and css
- move css for main body to accomodate above message

* add firefly icon

---------

Co-authored-by: Tyrone Tse <[email protected]>

* ASSETS-88899 : [Issue] Collection Detail Page is Redirecting to No-Access Page (#68)

* Added function hideQuickLinks()

* Added the hide field to the  shared-quicklinks config/worksheet
/blocks/adp-header/adp-header.js : Updated the code to only show links if hide!=='true'
/scripts/security.js : Updated function checkUserAccess to get the current URL without the parameters for /collection/<collection id> and /share/<asset id>
/scripts/site-config.js : Updated function to include the hide field

* Refactored the If statement logic

* Assets 98992- Campaign details/overview (#69)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* ASSETS-88900 : Update Pagination for gmo-campiagn-list Block (#70)

* gmo-campagin-list refactored to use  persisted query function
	function graphqlCampaignPaginated(first,cursor) to get a page of Campaigns at a time

* Refactored the Navigation code for Previous Page, Next Page, Select Number of Items on a Page.
Refactored the code for Repaginate for when the number of items page is changed
Show current page status

* graphql.js : Updated function graphqlAllCampaigns(first,cursor)  to call getAllCampaigns persisted query with parameters first and cursor
Deleted function  graphqlCampaignPaginated(first,cursor)

Updated gmo-campaign-list/gmo-campaign-list.js : To use persisted query graphqlAllCampaigns(first,cursor) and refactored the pagination to call the decorate function to call the graphql query each time to get the next or previous page

* Fixed logic in calculating the nextCursor

* Removed all debug console.log statements

* Removed  testCampaigns array of test campaign data, which now has been replaced by data from graphql

* Renamed the variable testConfig to headerConfig

* Campaign details block (#71)

* initial block structure

* start mocking up structure

* many changes

- finish overview tab mockup
- (mostly) finish deliverables tab

* fix css- add top/bottom borders to rows

* delete invalid metadata from new svgs

* updates for mvp

- Rename and hide various elements of page
- Refactor tablebuilding function to deal with items that are missing
  categorization properties

* hide total assets

* add status bar display

Also adjusted demo data slightly to include due date and lead

* update css/html to align with mockup and mvp

* resolve border bug

* implemented requested changes

* ASSETS-88901 : (Backend) Campaign Page: Filters (#72)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

---------

Co-authored-by: Shivani gupta <[email protected]>

* ASSETS-88901 : Campaign Header: Dropdown List Only Allow Single Value to Be Selected (#73)

* graphql.js : Added functions graphqlProductList and graphqlStatusList
gmo-campaign-header.js : Updated code to build Status dropdown from function graphqlStatusList
Updated code to build Product dropdown from function graphqlProductList

* /blocks/gmo-campaign-list/gmo-campaign-list.js => Added custom event listener for custom event  gmoCampaignListBlock
which allows the event gmoCampaignListBlock to be called from the block component gmo-campaign-header.js

/blocks/gmo-campaign-header/gmo-campaign-header.js :
Created new function sendGmoCampaignListBlockEvent()
that calls the custom event   gmoCampaignListBlock
from the gmo-campaign-header.

This will trigger the custom event in the /blocks/gmo-campaign-list
to call the graphql persisted query getAllCampaigns with a filter based on the selected values from the dropdown lists for
Business Line
Status and Product

* graphql.js : Added test function graphAllCampaignsFilterfirst,cursor,filter) : Which has the filter parameter which is the graphQL filter object
Added function generateFilterJSON(filterParams)  which generates the graphQL filter object from an Array of parameters.

/blocks/gmo-campaign-header/gmo-campaign-header.js : Added event on the campaign-search field, to trigger the sendGmoCampaignBlockEvent after 3 characters are typed, later this will be replaced by a Campaign Suggested List generated as the user types

/blocks/gmo-campaign-list/gmo-campaign-list.js : Added code build the graphQL filter object from the Campaign Search fields and Drop Downs
Updated the function decorate to have new parameter graphQLFilter
So that the function graphqlAllCampaignsFilter(numPerPage,  cursor,graphQLFilter) can be called

* Adde autocomplete list CSS, JS and HMTL for the campaign search field.

* graphql.js Update function graphCampaignByName to use persisted query getCampaignNames used for autocomplete list for Campaign Name search
gmo-campaign-list.js : Changed campaignName search to use filter operater : '='
/gmo-campaign-header.js : Updated campaign search autocompleteList to trigger sendCampaignListBlockEvent to make autocomplete search work

* gmo-campaign-header.js : Updated function resetAllFilters() to call function sendGmoCampaignListBlockEvent();
gmo-campaign-list.js : Updated campaignCount to call function graphqlCampaignCount(graphqlFilter) with graphqlFilter
graphql.js : Updated function graphCampaignCount : Added filter parameter, and call persisted query  getCampaignNameFilter

* Removed console.log messages

* Fixed bug with currentPageInfo.nextCursor

* Fixed bug in calculation of cursor to use for the previous page logic

* graphql.js : Deleted function graphqlAllCampaigns(first,cursor) , replaced function  graphqlStatusList()  and  graphqlProductList()  with  function graphqlQueryNameList(queryNameList)
Variables baseApiUrl and projectId are now global/class level variables.

gmo-campaign-header.js : Close dropdown list when a value is selected

* update campaign with program

* Updated function toggleOption : To only allow a single option to be selected in the dropdown list

---------

Co-authored-by: Shivani gupta <[email protected]>

* Assets 98993 (#75)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* resolve pr comments

* Release 05.09.2024 (#78)

* Added mapping for uuid (#74)

Co-authored-by: Mathieu Lessard <[email protected]>

* Removed Prefix from Displayed UUID Value on Assets (#76)

---------

Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>

* ASSETS-88902 : Add Target Geo Filter in the Landing Page (update all dropdown lists to use updated graphql queries) (#77)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Assets 98994 (#81)

* many updates

* finish dynamic properties

- all properties should be dynamic based on graphql data
- refactored some common lookups to a shared javascript file
- updated overflow for overview/description
- made status, products more presentable
- more elegant handling of empty audience and kpi lists

* test rename svg to resolve issue

* finish updating icon names and mapping

* initial changeover from static to dynamic data

* adjustments based on feedback

* additional changes based on feedback

* minor bugfix, null checks

* squash final bug with read more

* final touches

* combine two graphql functions with duplicated code

* bugfixes per pr review

* ASSETS-88902 :  Make the Business Line Dropdown List filter values in the Product Dropdown List filter (#82)

* Add hardcoded Geo(graphy) dropdown list filter to Campaign Header

* Fixed Previous Page pagination logic for calculating the cursor for the Previous page

* Updated Products and Status Dropdown Lists code to use updated graphql persisted queries

* Updated Business Line dropdown list to be populated by graphql persisted query getBusinessLine.
Updated Geo dropdown list to be populated by graphql persisted query getGeoList

* Updated the Business Line dropdown list to filter the Products List when a Business Line is selected.
When a Business Line option is deselected then the Products List shows all products.

* Reduced the sample dropdown list options

* make links configurable, remove extraneous logs (#83)

* ASSETS-88903 : [Issue] Product Name and Label are Undefined (#84)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Removed comment

* ASSETS-88904 : Update Asset Thumbnail for Campaign List Entries (#85)

* Refactored the function buildProduct(product) to handle the condition when a product is not defined in the JSON object productMappings[product] which is defined in /scripts/shared-campaigns.js

* Added function searchAsset(programName, campaignName) to get the asset URL

* Changed alt text to use assets repo-name property

* Renamed/Moved AssetsDatasource.js to /scripts/assets
gmo-campaign-list.js : Added logic to only allow blockConfig to be set on initial call to function decorate(block ...
otherwise the values from blockConfig are overwritten when paginating to next page.

gmo-campaign-details.js : Added campaign Image
gmo-campaign-details.css : Updated CSS to display campaign Image

* gmo-campaign-list.js : Deleted comment
/scripts/assets.js : Updated to use createSearchEndpoint
/scripts/scripts.js : Added export to  export function createSearchEndpoint() {

* Fixed bug when product is not defined in productMappings in /scripts/shared-campaigns.js

* gmo-campaign-list.js : Removed  iconImage.alt = "Failed to load image";
/scripts/assets.js : Updated facetFilters to an Array of Stings instead of Array of objects

* Assets 98996 (#88)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* ASSETS-88905 : Add Fields to the Overview Tab (#87)

* Added Target Market Area lists

function function createKPI(kpi)  is renamed createLI(li)

Added function buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea) {

* gmo-campaign-details.css : CSS fixes for scope-tag to not wrap
gmo-campaign-details.js : Added Target Market Area and Platforms
refactored async function buildChannelScope(scopeTypeId, scopes, block)
to be able to display data for data based for a specified  CSS ID

* Added function getUniqueItems(items, property)
to get unique values for deliverableType and platforms

* Renamed function async function buildChannelScope(scopeTypeId, scopes, block)
to  async function buildFieldScopes(scopeTypeId, scopes, block)

* Added global variable globalGraphFliter (#92)

Previous and Next Buttons now call function decorate(block, numPerPage = currentNumberPerPage, cursor = '', previousPage = false, nextPage = false, graphQLFilter = {})
with graphFilter = currentGraphqlFilter

* Assets 98996 (#93)

* initial grouping functionality

* add sorting, label mappings

* readd expand/collapse chevrons, add counts

* add sort by date in groups

* add important links dynamic generation

* resolve bug with detailpage link

* adjust width on links in deliverables tab

* merge 12024 in and adjust width for links

* update property name for revised completion date

* implement graphql query for status mapping

* add deliverabletype graphql

- todo: refactor, some superfluous function(s) can be removed

* refactor product list to use graphql

* fix deliverable type tags, fix multiline text

* fix sort on marketing moments column

* removing merge artifact

* resolve PR comments

* platforms mapping with graphql (#94)

- also cleaned up extraneous/defunct code

* Refactor sort icons (#95)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* ASSETS-88908 : Remove Console Error in Marketing Dashboard page  and Campaign Details when no image is found (#96)

* assets.js : Refactored code to eliminate console.log error
gmo-campaign-list.js : Removed  console.error("No campaign image found:", error);

* Eliminated  JavaScript errors when image is not found

* Display total assets = 0 when the campaign image does not exist

* Code cleanup (#98)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* Updated product mapping label to text "Not Available" when the product mapping label is null (#99)

* Code cleanup part 2 (#100)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* Added  function closeAllDropDowns() (#101)

Added function handleClickOutside(event)

Updated function attachEventListeners()
    // Add event listener for clicks outside of dropdowns
    document.addEventListener('click', handleClickOutside);

Added function  resetProductsDropDown();

Updated  function resetAllFilters() to call function   resetProductsDropDown();

* Sticky deliverables header, update graphql endpoints (#102)

* platforms mapping with graphql

- also cleaned up extraneous/defunct code

* refactor chevrons for column sort

* add title attribs

* remove kpi column

* rename blocks

* cleaning up redundant code

* continuing cleanup

* fix pagination bug

* fix css bug in audience card

* cleanup, readd missing row

- remove commented code
- remove commented html
- readd campaign name to overview tab if available

* resolve undone null check for product label

* handle bad response from product icon map

* update query endpoints, css tweak on deliverables

* Added tool tip for Program Name and Campaign Name (#103)

* remove duplicate icons

* Change default items per page from 4 to 8
Changed undefined message for Campaign to  Marketing Moment Not Available

* Remove debugging from graphql.js

* Deleted function debug_console()

---------

Co-authored-by: Shivani Gupta <[email protected]>
Co-authored-by: Michael Dickson <[email protected]>
Co-authored-by: Samruddhi <[email protected]>
Co-authored-by: mdickson-adbe <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>
Co-authored-by: mathieu-lessard <[email protected]>
Co-authored-by: Mathieu Lessard <[email protected]>
Co-authored-by: Christopher Heintzman <[email protected]>
Co-authored-by: Shivani gupta <[email protected]>

* Performance refactoring (#107)

* performance refactoring

- improve thumbnail performance by makin async
- format date property to yyyy-mm-dd
- fix margin issue in program header
- refactor function that builds header dropdown for increased
  performance

* resolve bug with event listeners not attaching

* add programID parameter to deliverable query (#109)

* add programID parameter to deliverable query

* quick null check for status color

* remove console log

* Update query names, handle formatting (#110)

* update query names

* handle null deliverable types

* make dateFormat function available to detail block

* remove unused function

* remove console log messages

* fix typo in graphql query name (#111)

* ASSETS-88914 : Fix Pagination Frontend Code (#108)

* Changed the default number items per page to 4
Added function  debounce(func, wait)  to delay the Previous and Next page to wait 0.5 seconds between each click, to stop the user clicking too fast and breaking pagination

* Decrease debounce timeout to 200 milliseconds (0.2 secs)

* Added check that next page cannot go past last page
Added check that prev page cannot go back past page 1

* fix(pagination): Ensure proper handling of next/prev buttons and page boundaries

- Added totalPages calculation and checks to ensure "Next" button is disabled on the last page
- Updated nextPage function to correctly enable/disable pagination buttons
- Improved prevPage function to ensure it navigates back to the first page correctly
- Applied debounce to prevent rapid clicking issues
- Refactored logic for enabling/disabling pagination buttons based on current page state

* - Changed default items per page to 8
- Removed 4 items per page from filter
- Removed cusorArray, and replaced it with  currentPageInfo.previousCursor =  currentPageInfo.currentCursor;
- Set next cursor to  data.programPaginated.pageInfo.endCursor;
- Function prevPage now uses  currentPage.previousCursor as the cursor parameter value, and calculating the cursor value to use from cursorArray is no longer needed.

* Increased the click delay to 500 milliseconds

* Disabled the Previous and Next Button as soon as they are clicked, to prevent the user multiple clicking the button.

* Restored previous logic using cursorArray to manage the calculation of the cursor for the previous page. (#113)

* Adjust height of deliverables tab on program-details block (#114)

* minor css changes for program details

* adjust deliverables table height

* add min height to deliverables table

* remove commented css

* Sort deliverable type array before rows are made

* DXI-26587- Modify landing page for v3 Hub, so Signin goes to CH/v4 (#116)

* Replace throwing 404 error when the asset is not found, with asset.svg icon (#119)

* Make content fragment path for WF mappings configurable (#118)

* refactoring to use single graphql endpoint for map

* refactor 'mapping' functions

- refactor mapping retrieval functions in all three hcv blocks

* Remove comments

* remove unused function stub

* resolve bug in header filter refresh

* remove unused import

* Fixed issue where header didn't load if the user didn't have a profile yet (#121)

Co-authored-by: Mathieu Lessard <[email protected]>

* add checks for null 'review link' and 'final asset' (#122)

* Refactor header and query variable extraction (#123)

* add checks for null 'review link' and 'final asset'

* Add msg for programs with no data available

* refactor header so it can be used with no data

* wrap msg with div for styling

* refactor query variable extraction

- had to account for ampersand in program name

* Updated Product List (#117)

* Product list updated

* N/A value and label now match

* Fixed formatting

---------

Co-authored-by: Mathieu Lessard <[email protected]>

* Restored calling the function attatchEventListerners() at the end of the function decorate(block) (#124)

* Fix text wrapping issue in Project Owner column for smaller viewports (#125)

- Adjusted CSS to ensure text in the "Project Owner" column wraps properly
- Set row height to auto and adjusted line-height for better spacing
- Added media query for responsive width adjustments
- Ensured consistent display and improved readability across different viewport sizes

* ASSETS-88920 : Cosmetic Updates from MVP Feedback (#126)

* feat: Add Geo column to program list and adjust column widths for proper alignment

- Updated `gmo-program-list.js` to include Geo column in the header configuration and campaign list
- Adjusted column widths in `gmo-program-list.css` to ensure proper alignment under each column heading
- Add function `formatGeos` to format Geo array as comma-delimited list, that is displayed in the Geo column

* - Added a tooltip to the "Total Approved Assets" field in the Deliverables tab.
- Tooltip text provides instructions to view assets: "To view the assets, go to the 'All Asset' search page and use Program and Campaign name facet to filter the assets."
- Styled the tooltip to match the color and background of the Launch Date tooltip.
- Ensured the tooltip text appears on one line and positioned it correctly.
- Updated the "Total Asset" label to "Total Approved Asset"
- Updated the "Deliverable Name" column name to "Deliverable Task Name"

* - Added the Driver detail in Overview Tab next to Launch date like "Project Owner: Aina Tchoshanova"
- Update the Project "Owner column" label to "Task Owner"

* ASSETS-88921 : Marketing Moments Clickable Title and Underdevelopment Icon for ProgramNames/Campaigns (#128)

* feat: Change cursor to pointer for campaign name label and text

- Added CSS to change cursor to pointer on hover for .campaign-name-label and .campaign-name span.

feat: Add click event to campaign name label and text

- Updated buildCampaignList function to add click event listener to campaign name label and text.
- Clicking on the campaign name label or text now navigates to campaignDetailsLink.
- Ensured the appearance of the label and text remains unchanged while adding navigation functionality.

feat:  Rename "Review Link" to "QA Files" in the "Deliverable" task tab

- Updated Program Details column text/header to  QA files
- Updated CSS class from review-link to qa-files

* - feature :  When a campaign does not have an image assigned display the underdevelopment icon
Updated function searchAsset(programName, campaignName, imageWidth = 80) to get the  underdevelopment icon from site-config worksheet shared-branding worksheet

* Sorted the options in the dropdown lists alphabetically on the options text field (#131)

* ASSETS-88922 : Review the Deliverable page load time (#130)

* Improve page load time by parallelizing API calls and adding debug logs

- Updated `decorate` function to fetch program details and deliverables in parallel using `Promise.all`.
- Added console logs before and after API calls to help with debugging.
- Maintained existing functionality while optimizing performance by reducing sequential API calls.

* Remove logging messages

* feat: Improve performance of gmo-program-details.js

- Implement parallel GraphQL queries to reduce load times.
- Lazy load images using the `loading="lazy"` attribute to improve initial load performance.
- Batch DOM updates using `document.createDocumentFragment()` to minimize reflows and repaints.
- Debounce event listeners to prevent performance issues caused by rapid firing of events.

These optimizations should enhance the overall performance and responsiveness of the page.

* Optimize header rendering and asynchronous data fetching

- Initiate parallel fetching of program details and deliverables.
- Render a placeholder header immediately to improve perceived load time.
- Update header with actual data once program details are fetched.
- Ensure images are loaded asynchronously without blocking header rendering.

* feat: Inject additional HTML content into main-body-wrapper after header update

- Added HTML content including tab-wrapper, overview, and deliverables sections to the main-body-wrapper div after the header.
- Updated the main-body-wrapper div to include newly provided HTML content for improved user interface and navigation.
- Ensured the content injection occurs after the header update to maintain correct rendering order.

* Added back displaying the back button with arrow icon and program name not available message and no data available message when program

* Updated logic to display the total asset count for an image

* Reverted back to
const programData = await executeQuery(programQueryString);
const deliverables = await executeQuery(deliverableQueryString);

* Restored constant variables for Marketing Goal, KPIs, Target Market, Audiences
    const p0TargetMarketArea = program.p0TargetMarketArea;
    const p1TargetMarketArea = program.p1TargetMarketArea;
    const kpis = buildKPIList(program).outerHTML;
    const targetMarketAreas = buildTargetMarketAreaList(p0TargetMarketArea,p1TargetMarketArea).outerHTML;
    const audiences = buildAudienceList(program).outerHTML;
    const artifactLinks = buildArtifactLinks(program).outerHTML;

To make the code more readable, they were removed when the structure of the code was refactored to incrementally build the block.innerHTML, to make the page appear to load faster.

* assets.js (#132)

Added helper function async function getUnderdevelopmentIcon() to display the underdevelopment icon.
Also display the under development icon when  programName and campaignName is null
gmo-program-details.js
When programName and campaignName is null display the under development icon

* gmo-program-details.js
PR Code review change to

* Revert "gmo-program-details.js"

This reverts commit 18ddd12c8fef2fbcb9c56b54735e907f421f17ad.

* gmo-program-details.js
PR code review change to
let imageObject = {imageUrl : '', imageAltText: '', assetCount: 0};
assets.js
PR code review change to
if (!progamName && !campaginName)

* Resolved typo in variable programName

from
  if (!progamName && !campaginName)
to
 if (!programName && !campaignName)

* feat: Improve page load speed and add lazy loading for images (#134)

- Implement debounce for search input to reduce the number of API calls.
- Refactor the `decorate` function for better readability and performance.
- Add lazy loading for images using `IntersectionObserver` to load images only when they come into view.
- Move pagination button toggling to a separate `togglePaginationButtons` function.
- Ensure strict comparison (`===`) for block configuration check.

* ASSETS-88926 : Review and Improve Page Performance of Marketing Moment Landing page (Push Failed) (#137)

* feat: Improve page load speed and add lazy loading for images

- Implement debounce for search input to reduce the number of API calls.
- Refactor the `decorate` function for better readability and performance.
- Add lazy loading for images using `IntersectionObserver` to load images only when they come into view.
- Move pagination button toggling to a separate `togglePaginationButtons` function.
- Ensure strict comparison (`===`) for block configuration check.

* feat: Improve page load speed and add lazy loading for images

- Removed debounce for search
- Added lazy loading for images using `IntersectionObserver` to load images only when they come into view.

* ASSETS-88927 : Toggle Read More Button (#138)

* feat: Add Read More/Read Less toggle functionality

- Added event listener for Read More buttons to toggle text visibility in Marketing Goal and Product Value sections.
- Updated the decorate function to handle Read More/Read Less functionality.

* style: Add hide-overflow class for text truncation

- Added .hide-overflow class to handle text truncation with ellipsis.
- Ensured compatibility with the Read More/Read Less functionality.

* Modified FAQ Nav (#139)

Co-authored-by: Mathieu Lessard <[email protected]>

* Updated function  searchAsset(programName, campaignName, deliverableType = '', imageWidth = 80) (#142)

Added new parameter deliverableType, moved parameter  imageWidth to be the last parameter.

* Updated Launch Date label to Proposed Launch Date in Program List (#145)

Updated Launch Date tool tip to and Proposed Launch Date in Program Details page

* Added redirect block which supports regex (#148)

Co-authored-by: Mathieu Lessard <[email protected]>

* Replaced console.log with console.info (#149)

* Added redirect block which supports regex

* Added alert for redirect

* Changed log to info

* Added alert for redirect

* Changed log to info

---------

Co-authored-by: Mathieu Lessard <[email protected]>

* Added alert letting people know their content as moved (#154)

* Added redirect block which supports regex

* Added alert for redirect

* Changed log to info

* Added alert for redirect

* Changed log to info

* Added alert for redirect

---------

Co-authored-by: Mathieu Lessard <[email protected]>

* Squashed commit of the following:

commit 0659922c04ac5a76e29b135dc534b56ffd1d554d
Author: TyroneAEM <[email protected]>
Date:   Thu Aug 1 12:16:47 2024 -0500

    Branch rc to main => Update the 'Launch Date' label to "Proposed Launch Date" (#147)

    * Added mapping for uuid (#74)

    Co-authored-by: Mathieu Lessard <[email protected]>

    * Removed Prefix from Displayed UUID Value on Assets (#76)

    * Modified formatAssetMetadata() to allow custom dc-format Labels (#79)

    * Removed "required" and custom values for fields (#86)

    Co-authored-by: Mathieu Lessard <[email protected]>

    * Added getBaseConfigPath to Collections Back Button (#89)

    * Releasing HCV Dashboard code (#106)

    * ASSETS-88894 GRAPHQL Persisted Query Code (#53)

    * GRAPHQL POC Demo code to call a Persisted GraphQL query for Content Fragments

    * Updated the code call the GraphQL Persisted query from the QA AEM Author server, and also to authenticate using the JWT Bearer token

    * Renamed file test-graphql.js to graphql.js

    Added function graphqlAllCampaign() to get call GraphQL persisted query for All Campains
    Added function graphqlCampaignByName(campaignName) to get call GraphQL persisted query to get campaign by campaign name.
    Added function getGraphqlEndpoint() to get the value of property  aemGraphqlEndpoint from the config file admin-config.json

    * Changed queryName to getAllCampaings

    * Rollback to 3/15/24 Commit a519a5155c3dd57f0c54ea8bd336cd0a231cffab before adding GraphQL test code

    * Delete test graph…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants