diff --git a/packages/common/CHANGELOG.md b/packages/common/CHANGELOG.md index 44cd243b225..da77a2410c9 100644 --- a/packages/common/CHANGELOG.md +++ b/packages/common/CHANGELOG.md @@ -1,3 +1,10 @@ +## @esri/hub-common [15.6.1](https://github.com/Esri/hub.js/compare/@esri/hub-common@15.6.0...@esri/hub-common@15.6.1) (2024-11-15) + + +### Bug Fixes + +* add new item types from AGO to collections ([#1724](https://github.com/Esri/hub.js/issues/1724)) ([c87c8ef](https://github.com/Esri/hub.js/commit/c87c8ef55e797d66f61ff3865cffd7ed984a3879)) + # @esri/hub-common [15.6.0](https://github.com/Esri/hub.js/compare/@esri/hub-common@15.5.0...@esri/hub-common@15.6.0) (2024-11-14) diff --git a/packages/common/package-lock.json b/packages/common/package-lock.json index 33642d966ab..3c554ae9012 100644 --- a/packages/common/package-lock.json +++ b/packages/common/package-lock.json @@ -1,12 +1,12 @@ { "name": "@esri/hub-common", - "version": "15.6.0", + "version": "15.6.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@esri/hub-common", - "version": "15.6.0", + "version": "15.6.1", "license": "Apache-2.0", "dependencies": { "@terraformer/arcgis": "^2.1.2", diff --git a/packages/common/package.json b/packages/common/package.json index a18baebb24c..ae816da7453 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,6 +1,6 @@ { "name": "@esri/hub-common", - "version": "15.6.0", + "version": "15.6.1", "description": "Common TypeScript types and utility functions for @esri/hub.js.", "main": "dist/node/index.js", "module": "dist/esm/index.js", diff --git a/packages/common/src/collections.ts b/packages/common/src/collections.ts index d8526b0053f..ad56b6b8c29 100644 --- a/packages/common/src/collections.ts +++ b/packages/common/src/collections.ts @@ -78,49 +78,163 @@ const map: string[] = [ const other: string[] = [ "360 VR Experience", + "3DTiles Package", + "3DTiles Service", + "API Key", + "Activity", + "Addin Package", + "Administrative Report", + "AllSource Project", + "Analysis Model", + "Apache Parquet", + "App Bundle", + "AppBuilder Extension", "AppBuilder Widget Package", "Application Configuration", + "Application SDK", + "ArcGIS Pro Add In", + "ArcGIS Pro Configuration", "ArcPad Package", + "Arcade Module", + "Basemap Package", + "Big Data Analytic", + "Big Data File Share", "Code Attachment", "Code Sample", + "Color Set", + "Compact Tile Package", + "Content Category Set", + "Data Package Collection", + "Data Pipeline", + "Data Store", + "Deep Learning Package", + "Deep Learning Studio Project", "Desktop Add In", - "Desktop Application Template", "Desktop Application", + "Desktop Application Template", "Desktop Style", + "Earth Configuration", + "Esri Classification Schema", + "Esri Classifier Definition", + "Excalibur Imagery Project", + "Experience Builder Widget", + "Experience Builder Widget Package", "Explorer Add In", "Explorer Layer", + "Explorer Map", + "Export Package", + "Featured Items", + "Feed", + "GML", + "GeoBIM Application", + "GeoBIM Project", + "GeoPackage", "Geocoding Service", + "Geodata Service", + "Geoenrichment Service", "Geometry Service", "Geoprocessing Package", "Geoprocessing Sample", "Geoprocessing Service", + "Globe Document", + "Globe Service", + "Group Layer", + "IPS Configuration", + "Indoors Map Configuration", + "Insights Data Engineering Model", + "Insights Data Engineering Workbook", + "Insights Model", + "Insights Script", + "Insights Theme", + "Insights Workbook Package", + "Kernel Gateway Connection", + "Knowledge Graph", + "Knowledge Graph Layer", + "Knowledge Graph Web Investigation", + "Knowledge Studio Project", + "Layer", "Layer File", "Layer Package", "Layer Template", - "Layer", "Layout", + "Legend", + "Living Atlas Export Package", "Locator Package", "Map Area", "Map Document", "Map Package", "Map Service Definition", "Map Template", + "Media Layer", + "Mission", + "Mission Report", + "Mission Template", "Mobile Application", + "Mobile Basemap Package", "Mobile Map Package", + "Mobile Scene Package", "Native Application", + "Native Application Installer", + "Native Application Template", "Network Analysis Service", + "Notebook Code Snippet Library", + "Notebook Code Snippets", + "OGCFeatureServer", "Operations Dashboard Add In", + "Operations Dashboard Extension", + "Oriented Imagery Catalog", + "Ortho Mapping Project", + "Ortho Mapping Template", + "Pro Presentation", + "Pro Project", + "Pro Report", + "Pro Report Template", "Project Package", "Project Template", + "Published Map", + "QuickCapture Project", "Raster Function Template", + "Real Time Analytic", + "Reality Mapping Project", + "Reality Studio Project", + "Relational Database Connection", + "Replication Package", "Rule Package", + "SMX Item", + "SMX Map", + "SMX Theme", + "SQLite Geodatabase", + "Scene Document", "Scene Package", + "Scene Package Part", + "Server", "Service Definition", - "SQLite Geodatabase", + "Statistical Data Collection", + "StoryMap Theme", "Style", + "Suitability Model", + "Survey123 Add In", + "Symbol Service", + "Symbol Set", + "Task File", "Tile Package", + "Urban Project", + "User License Type Extension", "Vector Tile Package", + "Video Service", + "Viewer Configuration", + "Visio Document", + "WCS", + "Web AppBuilder Widget", + "Web Experience Template", + "Web Link Chart", + "Windows Mobile Package", + "Windows Viewer Add In", + "Workflow", "Workflow Manager Package", + "Workflow Manager Service", + "Workforce Project", + "netCDF", ]; const site: string[] = ["Hub Site Application", "Site Application"]; @@ -145,7 +259,7 @@ export const getCollection = (type?: string) => { /** * The converse of getCollection, returns associated types of provided collection * @param collection The Hub collection - * @returns An array of types or undefined if collection is not found + * @returns An array of types, or undefined if collection is not found * @private */ export const getCollectionTypes = (collection?: string) => { diff --git a/packages/common/test/users/_internal/UserUiSchemaSettings.test.ts b/packages/common/test/users/_internal/UserUiSchemaSettings.test.ts index a2a5f8dbc3f..8779a202fa8 100644 --- a/packages/common/test/users/_internal/UserUiSchemaSettings.test.ts +++ b/packages/common/test/users/_internal/UserUiSchemaSettings.test.ts @@ -7,7 +7,7 @@ import * as PortalModule from "@esri/arcgis-rest-portal"; describe("UserUiSchemaSettings:", () => { let portalSettingsSpy: jasmine.Spy; - afterAll(() => { + afterEach(() => { portalSettingsSpy.calls.reset(); }); diff --git a/packages/common/test/users/_internal/computeProps.test.ts b/packages/common/test/users/_internal/computeProps.test.ts index 796d5d5f11a..996c2474f0a 100644 --- a/packages/common/test/users/_internal/computeProps.test.ts +++ b/packages/common/test/users/_internal/computeProps.test.ts @@ -46,6 +46,20 @@ describe("HubUser computeProps:", () => { }); }); + const getPortalSelfSpy = spyOn(PortalModule, "getSelf").and.callFake( + () => { + return Promise.resolve({ + portalProperties: { + hub: { + settings: { + informationalBanner: false, + }, + }, + }, + }); + } + ); + const requestSpy = spyOn(requestModule, "request").and.callFake(() => { return Promise.resolve({ termsAndConditions: "terms", @@ -123,9 +137,6 @@ describe("HubUser computeProps:", () => { ); expect(getSelfSpy).toHaveBeenCalledTimes(1); - expect(getSelfSpy).toHaveBeenCalledWith( - authdCtxMgr.context.requestOptions - ); expect(chk.hubOrgSettings?.showInformationalBanner).toBeTruthy(); }); });