Skip to content

Commit

Permalink
Merge branch 'master' into c/11612-org-banner-link-hjs
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvinPerry committed Nov 18, 2024
2 parents e680b3c + 1915be1 commit 2dd0ead
Show file tree
Hide file tree
Showing 6 changed files with 143 additions and 11 deletions.
7 changes: 7 additions & 0 deletions packages/common/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## @esri/hub-common [15.6.1](https://github.com/Esri/hub.js/compare/@esri/[email protected]...@esri/[email protected]) (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/[email protected]...@esri/[email protected]) (2024-11-14)


Expand Down
4 changes: 2 additions & 2 deletions packages/common/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
122 changes: 118 additions & 4 deletions packages/common/src/collections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"];
Expand All @@ -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) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as PortalModule from "@esri/arcgis-rest-portal";
describe("UserUiSchemaSettings:", () => {
let portalSettingsSpy: jasmine.Spy;

afterAll(() => {
afterEach(() => {
portalSettingsSpy.calls.reset();
});

Expand Down
17 changes: 14 additions & 3 deletions packages/common/test/users/_internal/computeProps.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -123,9 +137,6 @@ describe("HubUser computeProps:", () => {
);

expect(getSelfSpy).toHaveBeenCalledTimes(1);
expect(getSelfSpy).toHaveBeenCalledWith(
authdCtxMgr.context.requestOptions
);
expect(chk.hubOrgSettings?.showInformationalBanner).toBeTruthy();
});
});
Expand Down

0 comments on commit 2dd0ead

Please sign in to comment.