@esri/hub-common 15.2.0 → 15.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -64,4 +64,36 @@ export const CatalogSchema = {
64
64
  },
65
65
  },
66
66
  };
67
+ /**
68
+ * JSON schema for the appearance of a gallery display
69
+ * This can be for a catalog, a collection, a gallery card, etc
70
+ */
71
+ export const GalleryDisplayConfigSchema = {
72
+ type: "object",
73
+ properties: {
74
+ hidden: { type: "boolean", default: false },
75
+ },
76
+ };
77
+ /**
78
+ * JSON schema for the appearance of an IHubCollection
79
+ */
80
+ export const CollectionAppearanceSchema = {
81
+ type: "object",
82
+ properties: {
83
+ displayConfig: GalleryDisplayConfigSchema,
84
+ },
85
+ };
86
+ /**
87
+ * JSON schema for the appearance of a catalog
88
+ */
89
+ export const CatalogAppearanceSchema = {
90
+ type: "object",
91
+ properties: {
92
+ displayConfig: GalleryDisplayConfigSchema,
93
+ collections: {
94
+ type: "array",
95
+ items: CollectionAppearanceSchema,
96
+ },
97
+ },
98
+ };
67
99
  //# sourceMappingURL=CatalogSchema.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CatalogSchema.js","sourceRoot":"","sources":["../../../../../src/core/schemas/shared/CatalogSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAG/E,oCAAoC;AACpC,MAAM,CAAC,MAAM,eAAe,GAAyB;IACnD,IAAI,EAAE,QAAQ;CACf,CAAC;AAEF,iCAAiC;AACjC,MAAM,CAAC,MAAM,YAAY,GAAyB;IAChD,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC;SACpB;QACD,UAAU,EAAE;YACV,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,CAAC;YACX,KAAK,EAAE,eAAe;SACvB;KACF;CACF,CAAC;AAEF,gCAAgC;AAChC,MAAM,CAAC,MAAM,WAAW,GAAyB;IAC/C,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,CAAC,cAAc,CAAC;IAC1B,UAAU,EAAE;QACV,YAAY,EAAE;YACZ,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,CAAC,GAAG,cAAc,CAAC;SAC1B;QACD,OAAO,EAAE;YACP,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,YAAY;SACpB;KACF;CACF,CAAC;AAEF,wCAAwC;AACxC,MAAM,CAAC,MAAM,gBAAgB,GAAyB;IACpD,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,CAAC,OAAO,CAAC;IACnB,UAAU,EAAE;QACV,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;SACf;QACD,KAAK,EAAE,WAAW;KACnB;CACF,CAAC;AAEF,qCAAqC;AACrC,MAAM,CAAC,MAAM,aAAa,GAAyB;IACjD,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;SACf;QACD,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,cAAc,CAAC,MAAM,CAC/B,CAAC,GAA4B,EAAE,YAAwB,EAAE,EAAE;gBACzD,GAAG,CAAC,YAAY,CAAC,GAAG,WAAW,CAAC;gBAChC,OAAO,GAAG,CAAC;YACb,CAAC,EACD,EAA6B,CAC9B;SACF;QACD,WAAW,EAAE;YACX,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,gBAAgB;SACxB;KACF;CACF,CAAC"}
1
+ {"version":3,"file":"CatalogSchema.js","sourceRoot":"","sources":["../../../../../src/core/schemas/shared/CatalogSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAG/E,oCAAoC;AACpC,MAAM,CAAC,MAAM,eAAe,GAAyB;IACnD,IAAI,EAAE,QAAQ;CACf,CAAC;AAEF,iCAA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,EAAE,gBAAgB;SACxB;KACF;CACF,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAyB;IAC9D,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE;KAE5C;CACF,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAyB;IAC9D,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,aAAa,EAAE,0BAA0B;KAC1C;CACF,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAyB;IAC3D,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,aAAa,EAAE,0BAA0B;QACzC,WAAW,EAAE;YACX,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,0BAA0B;SAClC;KACF;CACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"IHubCatalog.js","sourceRoot":"","sources":["../../../../src/search/types/IHubCatalog.ts"],"names":[],"mappings":"AAyEA,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,MAAM;IACN,OAAO;IACP,MAAM;IACN,YAAY;IACZ,eAAe;IACf,aAAa;IACb,OAAO;IACP,SAAS;IACT,gBAAgB;IAChB,eAAe;CACP,CAAC"}
1
+ {"version":3,"file":"IHubCatalog.js","sourceRoot":"","sources":["../../../../src/search/types/IHubCatalog.ts"],"names":[],"mappings":"AA8EA,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,MAAM;IACN,OAAO;IACP,MAAM;IACN,YAAY;IACZ,eAAe;IACf,aAAa;IACb,OAAO;IACP,SAAS;IACT,gBAAgB;IAChB,eAAe;CACP,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CatalogSchema = exports.CollectionSchema = exports.QuerySchema = exports.FilterSchema = exports.PredicateSchema = void 0;
3
+ exports.CatalogAppearanceSchema = exports.CollectionAppearanceSchema = exports.GalleryDisplayConfigSchema = exports.CatalogSchema = exports.CollectionSchema = exports.QuerySchema = exports.FilterSchema = exports.PredicateSchema = void 0;
4
4
  const IHubCatalog_1 = require("../../../search/types/IHubCatalog");
5
5
  /** JSON schema for an IPredicate */
6
6
  exports.PredicateSchema = {
@@ -67,4 +67,36 @@ exports.CatalogSchema = {
67
67
  },
68
68
  },
69
69
  };
70
+ /**
71
+ * JSON schema for the appearance of a gallery display
72
+ * This can be for a catalog, a collection, a gallery card, etc
73
+ */
74
+ exports.GalleryDisplayConfigSchema = {
75
+ type: "object",
76
+ properties: {
77
+ hidden: { type: "boolean", default: false },
78
+ },
79
+ };
80
+ /**
81
+ * JSON schema for the appearance of an IHubCollection
82
+ */
83
+ exports.CollectionAppearanceSchema = {
84
+ type: "object",
85
+ properties: {
86
+ displayConfig: exports.GalleryDisplayConfigSchema,
87
+ },
88
+ };
89
+ /**
90
+ * JSON schema for the appearance of a catalog
91
+ */
92
+ exports.CatalogAppearanceSchema = {
93
+ type: "object",
94
+ properties: {
95
+ displayConfig: exports.GalleryDisplayConfigSchema,
96
+ collections: {
97
+ type: "array",
98
+ items: exports.CollectionAppearanceSchema,
99
+ },
100
+ },
101
+ };
70
102
  //# sourceMappingURL=CatalogSchema.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CatalogSchema.js","sourceRoot":"","sources":["../../../../../src/core/schemas/shared/CatalogSchema.ts"],"names":[],"mappings":";;;AAAA,mEAA+E;AAG/E,oCAAoC;AACvB,QAAA,eAAe,GAAyB;IACnD,IAAI,EAAE,QAAQ;CACf,CAAC;AAEF,iCAAiC;AACpB,QAAA,YAAY,GAAyB;IAChD,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC;SACpB;QACD,UAAU,EAAE;YACV,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,CAAC;YACX,KAAK,EAAE,uBAAe;SACvB;KACF;CACF,CAAC;AAEF,gCAAgC;AACnB,QAAA,WAAW,GAAyB;IAC/C,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,CAAC,cAAc,CAAC;IAC1B,UAAU,EAAE;QACV,YAAY,EAAE;YACZ,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,CAAC,GAAG,4BAAc,CAAC;SAC1B;QACD,OAAO,EAAE;YACP,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,oBAAY;SACpB;KACF;CACF,CAAC;AAEF,wCAAwC;AAC3B,QAAA,gBAAgB,GAAyB;IACpD,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,CAAC,OAAO,CAAC;IACnB,UAAU,EAAE;QACV,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;SACf;QACD,KAAK,EAAE,mBAAW;KACnB;CACF,CAAC;AAEF,qCAAqC;AACxB,QAAA,aAAa,GAAyB;IACjD,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;SACf;QACD,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,4BAAc,CAAC,MAAM,CAC/B,CAAC,GAA4B,EAAE,YAAwB,EAAE,EAAE;gBACzD,GAAG,CAAC,YAAY,CAAC,GAAG,mBAAW,CAAC;gBAChC,OAAO,GAAG,CAAC;YACb,CAAC,EACD,EAA6B,CAC9B;SACF;QACD,WAAW,EAAE;YACX,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,wBAAgB;SACxB;KACF;CACF,CAAC"}
1
+ {"version":3,"file":"CatalogSchema.js","sourceRoot":"","sources":["../../../../../src/core/schemas/shared/CatalogSchema.ts"],"names":[],"mappings":";;;AAAA,mEAA+E;AAG/E,oCAAoC;AACvB,QAAA,eAAe,GAAyB;IACnD,IAAI,EAAE,QAAQ;CACf,CAAC;AAEF,iCAAiC;AACpB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GG;AACU,QAAA,0BAA0B,GAAyB;IAC9D,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE;KAE5C;CACF,CAAC;AAEF;;GAEG;AACU,QAAA,0BAA0B,GAAyB;IAC9D,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,aAAa,EAAE,kCAA0B;KAC1C;CACF,CAAC;AAEF;;GAEG;AACU,QAAA,uBAAuB,GAAyB;IAC3D,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,aAAa,EAAE,kCAA0B;QACzC,WAAW,EAAE;YACX,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,kCAA0B;SAClC;KACF;CACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"IHubCatalog.js","sourceRoot":"","sources":["../../../../src/search/types/IHubCatalog.ts"],"names":[],"mappings":";;;AAyEa,QAAA,cAAc,GAAG;IAC5B,MAAM;IACN,OAAO;IACP,MAAM;IACN,YAAY;IACZ,eAAe;IACf,aAAa;IACb,OAAO;IACP,SAAS;IACT,gBAAgB;IAChB,eAAe;CACP,CAAC"}
1
+ {"version":3,"file":"IHubCatalog.js","sourceRoot":"","sources":["../../../../src/search/types/IHubCatalog.ts"],"names":[],"mappings":";;;AA8Ea,QAAA,cAAc,GAAG;IAC5B,MAAM;IACN,OAAO;IACP,MAAM;IACN,YAAY;IACZ,eAAe;IACf,aAAa;IACb,OAAO;IACP,SAAS;IACT,gBAAgB;IAChB,eAAe;CACP,CAAC"}
@@ -9,3 +9,16 @@ export declare const QuerySchema: IConfigurationSchema;
9
9
  export declare const CollectionSchema: IConfigurationSchema;
10
10
  /** JSON schema for an IHubCatalog */
11
11
  export declare const CatalogSchema: IConfigurationSchema;
12
+ /**
13
+ * JSON schema for the appearance of a gallery display
14
+ * This can be for a catalog, a collection, a gallery card, etc
15
+ */
16
+ export declare const GalleryDisplayConfigSchema: IConfigurationSchema;
17
+ /**
18
+ * JSON schema for the appearance of an IHubCollection
19
+ */
20
+ export declare const CollectionAppearanceSchema: IConfigurationSchema;
21
+ /**
22
+ * JSON schema for the appearance of a catalog
23
+ */
24
+ export declare const CatalogAppearanceSchema: IConfigurationSchema;
@@ -65,6 +65,10 @@ export interface IHubCollection {
65
65
  * ensure we query the correct API
66
66
  */
67
67
  targetEntity: EntityType;
68
+ /**
69
+ * Optional display configuration to control a collection's appearance in the UI
70
+ */
71
+ displayConfig?: IGalleryDisplayConfig;
68
72
  }
69
73
  export declare const targetEntities: readonly ["item", "group", "user", "portalUser", "communityUser", "groupMember", "event", "channel", "discussionPost", "eventAttendee"];
70
74
  export declare type EntityType = (typeof targetEntities)[number];
@@ -149,3 +153,14 @@ export interface IPredicate {
149
153
  */
150
154
  [key: string]: any;
151
155
  }
156
+ /**
157
+ * Configuration for how to display a gallery. This can apply to a catalog's display,
158
+ * a collection's display, the gallery-card's display, etc.
159
+ */
160
+ export interface IGalleryDisplayConfig {
161
+ /**s
162
+ * Used for collections to determine if the collection should be hidden in the gallery.
163
+ * If this is true on a collection's display config, that collection will not be shown in the gallery.
164
+ */
165
+ hidden?: boolean;
166
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/hub-common",
3
- "version": "15.2.0",
3
+ "version": "15.3.0",
4
4
  "description": "Common TypeScript types and utility functions for @esri/hub.js.",
5
5
  "main": "dist/node/index.js",
6
6
  "module": "dist/esm/index.js",