@esri/hub-common 9.48.0 → 10.0.0-next.2
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.
- package/dist/es2017/core/traits/WithCatalog.js +1 -0
- package/dist/es2017/core/traits/WithCatalog.js.map +1 -0
- package/dist/es2017/index.js +1 -0
- package/dist/es2017/index.js.map +1 -1
- package/dist/es2017/projects/HubProjects.js.map +1 -1
- package/dist/es2017/search/Catalog.js +346 -0
- package/dist/es2017/search/Catalog.js.map +1 -0
- package/dist/es2017/search/Collection.js +38 -19
- package/dist/es2017/search/Collection.js.map +1 -1
- package/dist/es2017/search/_internal/{ipredicate-utils.js → expandPredicate.js} +1 -1
- package/dist/es2017/search/_internal/expandPredicate.js.map +1 -0
- package/dist/es2017/search/_internal/hubSearchItems.js +3 -137
- package/dist/es2017/search/_internal/hubSearchItems.js.map +1 -1
- package/dist/es2017/search/_internal/index.js +0 -1
- package/dist/es2017/search/_internal/index.js.map +1 -1
- package/dist/es2017/search/_internal/portalSearchGroups.js +1 -2
- package/dist/es2017/search/_internal/portalSearchGroups.js.map +1 -1
- package/dist/es2017/search/_internal/portalSearchItems.js +5 -30
- package/dist/es2017/search/_internal/portalSearchItems.js.map +1 -1
- package/dist/es2017/search/_internal/portalSearchUsers.js +1 -2
- package/dist/es2017/search/_internal/portalSearchUsers.js.map +1 -1
- package/dist/es2017/search/fetchCatalog.js +46 -0
- package/dist/es2017/search/fetchCatalog.js.map +1 -0
- package/dist/es2017/search/hubSearch.js +1 -1
- package/dist/es2017/search/hubSearch.js.map +1 -1
- package/dist/es2017/search/index.js +3 -9
- package/dist/es2017/search/index.js.map +1 -1
- package/dist/es2017/search/serializeQueryForPortal.js +1 -1
- package/dist/es2017/search/serializeQueryForPortal.js.map +1 -1
- package/dist/es2017/search/types/index.js +0 -5
- package/dist/es2017/search/types/index.js.map +1 -1
- package/dist/es2017/search/upgradeCatalogSchema.js +66 -0
- package/dist/es2017/search/upgradeCatalogSchema.js.map +1 -0
- package/dist/es2017/search/utils.js +1 -207
- package/dist/es2017/search/utils.js.map +1 -1
- package/dist/es2017/types/IMessage.js +1 -0
- package/dist/es2017/types/IMessage.js.map +1 -0
- package/dist/es2017/types/index.js +2 -0
- package/dist/es2017/types/index.js.map +1 -0
- package/dist/es2017/types.js.map +1 -1
- package/dist/esm/core/traits/WithCatalog.js +1 -0
- package/dist/esm/core/traits/WithCatalog.js.map +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/projects/HubProjects.js.map +1 -1
- package/dist/esm/search/Catalog.js +404 -0
- package/dist/esm/search/Catalog.js.map +1 -0
- package/dist/esm/search/Collection.js +40 -24
- package/dist/esm/search/Collection.js.map +1 -1
- package/dist/esm/search/_internal/{ipredicate-utils.js → expandPredicate.js} +1 -1
- package/dist/esm/search/_internal/expandPredicate.js.map +1 -0
- package/dist/esm/search/_internal/hubSearchItems.js +4 -146
- package/dist/esm/search/_internal/hubSearchItems.js.map +1 -1
- package/dist/esm/search/_internal/index.js +0 -1
- package/dist/esm/search/_internal/index.js.map +1 -1
- package/dist/esm/search/_internal/portalSearchGroups.js +1 -2
- package/dist/esm/search/_internal/portalSearchGroups.js.map +1 -1
- package/dist/esm/search/_internal/portalSearchItems.js +6 -30
- package/dist/esm/search/_internal/portalSearchItems.js.map +1 -1
- package/dist/esm/search/_internal/portalSearchUsers.js +1 -2
- package/dist/esm/search/_internal/portalSearchUsers.js.map +1 -1
- package/dist/esm/search/fetchCatalog.js +59 -0
- package/dist/esm/search/fetchCatalog.js.map +1 -0
- package/dist/esm/search/hubSearch.js +1 -1
- package/dist/esm/search/hubSearch.js.map +1 -1
- package/dist/esm/search/index.js +3 -9
- package/dist/esm/search/index.js.map +1 -1
- package/dist/esm/search/serializeQueryForPortal.js +1 -1
- package/dist/esm/search/serializeQueryForPortal.js.map +1 -1
- package/dist/esm/search/types/index.js +0 -5
- package/dist/esm/search/types/index.js.map +1 -1
- package/dist/esm/search/upgradeCatalogSchema.js +66 -0
- package/dist/esm/search/upgradeCatalogSchema.js.map +1 -0
- package/dist/esm/search/utils.js +1 -204
- package/dist/esm/search/utils.js.map +1 -1
- package/dist/esm/types/IMessage.js +1 -0
- package/dist/esm/types/IMessage.js.map +1 -0
- package/dist/esm/types/index.js +2 -0
- package/dist/esm/types/index.js.map +1 -0
- package/dist/esm/types.js.map +1 -1
- package/dist/node/{search/types/ICollection.js → core/traits/WithCatalog.js} +1 -1
- package/dist/node/core/traits/WithCatalog.js.map +1 -0
- package/dist/node/index.js +1 -0
- package/dist/node/index.js.map +1 -1
- package/dist/node/projects/HubProjects.js.map +1 -1
- package/dist/node/search/Catalog.js +350 -0
- package/dist/node/search/Catalog.js.map +1 -0
- package/dist/node/search/Collection.js +37 -18
- package/dist/node/search/Collection.js.map +1 -1
- package/dist/node/search/_internal/{ipredicate-utils.js → expandPredicate.js} +1 -1
- package/dist/node/search/_internal/expandPredicate.js.map +1 -0
- package/dist/node/search/_internal/hubSearchItems.js +4 -139
- package/dist/node/search/_internal/hubSearchItems.js.map +1 -1
- package/dist/node/search/_internal/index.js +0 -1
- package/dist/node/search/_internal/index.js.map +1 -1
- package/dist/node/search/_internal/portalSearchGroups.js +2 -3
- package/dist/node/search/_internal/portalSearchGroups.js.map +1 -1
- package/dist/node/search/_internal/portalSearchItems.js +6 -31
- package/dist/node/search/_internal/portalSearchItems.js.map +1 -1
- package/dist/node/search/_internal/portalSearchUsers.js +2 -3
- package/dist/node/search/_internal/portalSearchUsers.js.map +1 -1
- package/dist/node/search/fetchCatalog.js +50 -0
- package/dist/node/search/fetchCatalog.js.map +1 -0
- package/dist/node/search/hubSearch.js +1 -1
- package/dist/node/search/hubSearch.js.map +1 -1
- package/dist/node/search/index.js +3 -9
- package/dist/node/search/index.js.map +1 -1
- package/dist/node/search/serializeQueryForPortal.js +2 -2
- package/dist/node/search/serializeQueryForPortal.js.map +1 -1
- package/dist/node/search/types/index.js +0 -5
- package/dist/node/search/types/index.js.map +1 -1
- package/dist/node/search/upgradeCatalogSchema.js +71 -0
- package/dist/node/search/upgradeCatalogSchema.js.map +1 -0
- package/dist/node/search/utils.js +1 -213
- package/dist/node/search/utils.js.map +1 -1
- package/dist/node/{search/types/ICatalog.js → types/IMessage.js} +1 -1
- package/dist/node/types/IMessage.js.map +1 -0
- package/dist/node/types/index.js +5 -0
- package/dist/node/types/index.js.map +1 -0
- package/dist/node/types.js.map +1 -1
- package/dist/types/core/traits/WithCatalog.d.ts +7 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/search/Catalog.d.ts +143 -0
- package/dist/types/search/Collection.d.ts +23 -2
- package/dist/types/search/_internal/{ipredicate-utils.d.ts → expandPredicate.d.ts} +0 -0
- package/dist/types/search/_internal/hubSearchItems.d.ts +3 -4
- package/dist/types/search/_internal/index.d.ts +0 -1
- package/dist/types/search/_internal/portalSearchItems.d.ts +15 -15
- package/dist/types/search/fetchCatalog.d.ts +10 -0
- package/dist/types/search/index.d.ts +3 -9
- package/dist/types/search/types/IHubSearchOptions.d.ts +5 -1
- package/dist/types/search/types/IHubSearchResponse.d.ts +3 -3
- package/dist/types/search/types/index.d.ts +0 -5
- package/dist/types/search/types/types.d.ts +0 -206
- package/dist/types/search/upgradeCatalogSchema.d.ts +12 -0
- package/dist/types/search/utils.d.ts +2 -58
- package/dist/types/types/IMessage.d.ts +32 -0
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types/types.d.ts +0 -2
- package/dist/umd/common.umd.js +1374 -2450
- package/dist/umd/common.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/es2017/search/_internal/ipredicate-utils.js.map +0 -1
- package/dist/es2017/search/_internal/state.js +0 -155
- package/dist/es2017/search/_internal/state.js.map +0 -1
- package/dist/es2017/search/_searchContent.js +0 -116
- package/dist/es2017/search/_searchContent.js.map +0 -1
- package/dist/es2017/search/_searchGroups.js +0 -88
- package/dist/es2017/search/_searchGroups.js.map +0 -1
- package/dist/es2017/search/_searchUsers.js +0 -89
- package/dist/es2017/search/_searchUsers.js.map +0 -1
- package/dist/es2017/search/collectionState.js +0 -60
- package/dist/es2017/search/collectionState.js.map +0 -1
- package/dist/es2017/search/content-utils.js +0 -455
- package/dist/es2017/search/content-utils.js.map +0 -1
- package/dist/es2017/search/convertCatalog.js +0 -33
- package/dist/es2017/search/convertCatalog.js.map +0 -1
- package/dist/es2017/search/filter-utils.js +0 -31
- package/dist/es2017/search/filter-utils.js.map +0 -1
- package/dist/es2017/search/group-utils.js +0 -142
- package/dist/es2017/search/group-utils.js.map +0 -1
- package/dist/es2017/search/types/ICatalog.js +0 -1
- package/dist/es2017/search/types/ICatalog.js.map +0 -1
- package/dist/es2017/search/types/ICollection.js +0 -1
- package/dist/es2017/search/types/ICollection.js.map +0 -1
- package/dist/es2017/search/types/IFacet.js +0 -1
- package/dist/es2017/search/types/IFacet.js.map +0 -1
- package/dist/es2017/search/types/IFacetOption.js +0 -1
- package/dist/es2017/search/types/IFacetOption.js.map +0 -1
- package/dist/es2017/search/types/IHubApiSearchRequest.js +0 -1
- package/dist/es2017/search/types/IHubApiSearchRequest.js.map +0 -1
- package/dist/es2017/search/user-utils.js +0 -139
- package/dist/es2017/search/user-utils.js.map +0 -1
- package/dist/esm/search/_internal/ipredicate-utils.js.map +0 -1
- package/dist/esm/search/_internal/state.js +0 -155
- package/dist/esm/search/_internal/state.js.map +0 -1
- package/dist/esm/search/_searchContent.js +0 -118
- package/dist/esm/search/_searchContent.js.map +0 -1
- package/dist/esm/search/_searchGroups.js +0 -91
- package/dist/esm/search/_searchGroups.js.map +0 -1
- package/dist/esm/search/_searchUsers.js +0 -92
- package/dist/esm/search/_searchUsers.js.map +0 -1
- package/dist/esm/search/collectionState.js +0 -61
- package/dist/esm/search/collectionState.js.map +0 -1
- package/dist/esm/search/content-utils.js +0 -462
- package/dist/esm/search/content-utils.js.map +0 -1
- package/dist/esm/search/convertCatalog.js +0 -33
- package/dist/esm/search/convertCatalog.js.map +0 -1
- package/dist/esm/search/filter-utils.js +0 -31
- package/dist/esm/search/filter-utils.js.map +0 -1
- package/dist/esm/search/group-utils.js +0 -146
- package/dist/esm/search/group-utils.js.map +0 -1
- package/dist/esm/search/types/ICatalog.js +0 -1
- package/dist/esm/search/types/ICatalog.js.map +0 -1
- package/dist/esm/search/types/ICollection.js +0 -1
- package/dist/esm/search/types/ICollection.js.map +0 -1
- package/dist/esm/search/types/IFacet.js +0 -1
- package/dist/esm/search/types/IFacet.js.map +0 -1
- package/dist/esm/search/types/IFacetOption.js +0 -1
- package/dist/esm/search/types/IFacetOption.js.map +0 -1
- package/dist/esm/search/types/IHubApiSearchRequest.js +0 -1
- package/dist/esm/search/types/IHubApiSearchRequest.js.map +0 -1
- package/dist/esm/search/user-utils.js +0 -143
- package/dist/esm/search/user-utils.js.map +0 -1
- package/dist/node/search/_internal/ipredicate-utils.js.map +0 -1
- package/dist/node/search/_internal/state.js +0 -166
- package/dist/node/search/_internal/state.js.map +0 -1
- package/dist/node/search/_searchContent.js +0 -120
- package/dist/node/search/_searchContent.js.map +0 -1
- package/dist/node/search/_searchGroups.js +0 -92
- package/dist/node/search/_searchGroups.js.map +0 -1
- package/dist/node/search/_searchUsers.js +0 -93
- package/dist/node/search/_searchUsers.js.map +0 -1
- package/dist/node/search/collectionState.js +0 -65
- package/dist/node/search/collectionState.js.map +0 -1
- package/dist/node/search/content-utils.js +0 -466
- package/dist/node/search/content-utils.js.map +0 -1
- package/dist/node/search/convertCatalog.js +0 -37
- package/dist/node/search/convertCatalog.js.map +0 -1
- package/dist/node/search/filter-utils.js +0 -36
- package/dist/node/search/filter-utils.js.map +0 -1
- package/dist/node/search/group-utils.js +0 -148
- package/dist/node/search/group-utils.js.map +0 -1
- package/dist/node/search/types/ICatalog.js.map +0 -1
- package/dist/node/search/types/ICollection.js.map +0 -1
- package/dist/node/search/types/IFacet.js +0 -3
- package/dist/node/search/types/IFacet.js.map +0 -1
- package/dist/node/search/types/IFacetOption.js +0 -3
- package/dist/node/search/types/IFacetOption.js.map +0 -1
- package/dist/node/search/types/IHubApiSearchRequest.js +0 -3
- package/dist/node/search/types/IHubApiSearchRequest.js.map +0 -1
- package/dist/node/search/user-utils.js +0 -145
- package/dist/node/search/user-utils.js.map +0 -1
- package/dist/types/search/_internal/state.d.ts +0 -70
- package/dist/types/search/_searchContent.d.ts +0 -9
- package/dist/types/search/_searchGroups.d.ts +0 -17
- package/dist/types/search/_searchUsers.d.ts +0 -31
- package/dist/types/search/collectionState.d.ts +0 -19
- package/dist/types/search/content-utils.d.ts +0 -83
- package/dist/types/search/convertCatalog.d.ts +0 -6
- package/dist/types/search/filter-utils.d.ts +0 -13
- package/dist/types/search/group-utils.d.ts +0 -36
- package/dist/types/search/types/ICatalog.d.ts +0 -87
- package/dist/types/search/types/ICollection.d.ts +0 -28
- package/dist/types/search/types/IFacet.d.ts +0 -62
- package/dist/types/search/types/IFacetOption.d.ts +0 -30
- package/dist/types/search/types/IHubApiSearchRequest.d.ts +0 -16
- package/dist/types/search/user-utils.d.ts +0 -35
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { ICollection } from "./ICollection";
|
|
2
|
-
import { IFacet } from "./IFacet";
|
|
3
|
-
import { Filter, FilterType, IFilterGroup, ISortOption } from "./types";
|
|
4
|
-
/**
|
|
5
|
-
* Catalog is the definition which powers what options
|
|
6
|
-
* are available in a Gallery. It controls not only
|
|
7
|
-
* the scoping of the search, but also the options
|
|
8
|
-
* available to the UX.
|
|
9
|
-
*
|
|
10
|
-
* Thus the lower-level `searchContent`, `searchUser`, `searchGroup` functions
|
|
11
|
-
* do not take Catalogs, rather they accept [Filters](../Filter)
|
|
12
|
-
*
|
|
13
|
-
* ```ts
|
|
14
|
-
* const simpleCatalog:Catalog = {
|
|
15
|
-
* title: "Select Map",
|
|
16
|
-
* filters: [
|
|
17
|
-
* {
|
|
18
|
-
* fitlerType: "item",
|
|
19
|
-
* operation: "AND",
|
|
20
|
-
* fitlers
|
|
21
|
-
* filterType: "content",
|
|
22
|
-
* type: "Web Map",
|
|
23
|
-
* owner: "jsmith"
|
|
24
|
-
* }
|
|
25
|
-
* }
|
|
26
|
-
* ```
|
|
27
|
-
*
|
|
28
|
-
* ## Collections
|
|
29
|
-
* The key feature of a Catalog is the ability to defined [Collections](../Collection).
|
|
30
|
-
* These are essentially sub-sets of content, typically organized around
|
|
31
|
-
* generalized content types, i.e. "Datasets", vs "Maps", vs "Documents"
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* ```ts
|
|
35
|
-
* const complex:Catalog = {
|
|
36
|
-
* filter: {
|
|
37
|
-
* type: "content",
|
|
38
|
-
* groups: ["3ef", "bc4"]
|
|
39
|
-
* },
|
|
40
|
-
* collections: [
|
|
41
|
-
* {
|
|
42
|
-
* label: "Documents",
|
|
43
|
-
* filter: {
|
|
44
|
-
* filterType: "content",
|
|
45
|
-
* type: ["Microsoft Word", "PDF", "Microsoft Excel"]
|
|
46
|
-
* }
|
|
47
|
-
* },
|
|
48
|
-
* {
|
|
49
|
-
* label: "Datasets",
|
|
50
|
-
* filter: {
|
|
51
|
-
* filterType: "content",
|
|
52
|
-
* type: ["Feature Layer", "Feature Service", "Map Service", "CSV"]
|
|
53
|
-
* }
|
|
54
|
-
* }
|
|
55
|
-
* ]
|
|
56
|
-
* }
|
|
57
|
-
* ```
|
|
58
|
-
*/
|
|
59
|
-
export interface ICatalog {
|
|
60
|
-
/**
|
|
61
|
-
* Title for the Gallery
|
|
62
|
-
*/
|
|
63
|
-
title?: string;
|
|
64
|
-
/**
|
|
65
|
-
* Scope is a set of FilterGroups which define the limits of the Catalog.
|
|
66
|
-
* Typically it is just a set of group ids, but it may be arbitrarily complex.
|
|
67
|
-
* If one was to "search a catalog", this is the description of what would be returned.
|
|
68
|
-
*/
|
|
69
|
-
scope?: Array<IFilterGroup<FilterType>>;
|
|
70
|
-
/**
|
|
71
|
-
* Filter defines the "scope" of the Catalog, typically a set of groups or orgids
|
|
72
|
-
* DEPRECATED: Use `scope`
|
|
73
|
-
*/
|
|
74
|
-
filter?: Filter<FilterType>;
|
|
75
|
-
/**
|
|
76
|
-
* Sort options to be shown in the Gallery
|
|
77
|
-
*/
|
|
78
|
-
sort?: ISortOption[];
|
|
79
|
-
/**
|
|
80
|
-
* Collections within the Catalog
|
|
81
|
-
*/
|
|
82
|
-
collections?: ICollection[];
|
|
83
|
-
/**
|
|
84
|
-
* Facets to use with all Collections
|
|
85
|
-
*/
|
|
86
|
-
facets?: IFacet[];
|
|
87
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { IFacet } from "./IFacet";
|
|
2
|
-
import { Filter, FilterType, IFilterGroup, ISortOption } from "./types";
|
|
3
|
-
/**
|
|
4
|
-
* A Collection is a subset of a Catalog, but can be used independently
|
|
5
|
-
* in Galleries
|
|
6
|
-
*/
|
|
7
|
-
export interface ICollection {
|
|
8
|
-
label: string;
|
|
9
|
-
key: string;
|
|
10
|
-
/**
|
|
11
|
-
* Filter Type used in this collection
|
|
12
|
-
*/
|
|
13
|
-
filterType?: FilterType;
|
|
14
|
-
/**
|
|
15
|
-
* Scope is a set of FilterGroups which define the limits of the Collection.
|
|
16
|
-
* Typically it is just a set of group ids, but it may be arbitrarily complex.
|
|
17
|
-
* If one was to "search the collection", this is the description of what would be returned.
|
|
18
|
-
*/
|
|
19
|
-
scope?: Array<IFilterGroup<FilterType>>;
|
|
20
|
-
/**
|
|
21
|
-
* Specify the includes to be requested when working with this collection
|
|
22
|
-
*/
|
|
23
|
-
include?: string[];
|
|
24
|
-
sortOption: ISortOption;
|
|
25
|
-
facets?: IFacet[];
|
|
26
|
-
filter?: Filter<FilterType>;
|
|
27
|
-
defaultQuery?: string;
|
|
28
|
-
}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { IFacetOption } from "./IFacetOption";
|
|
2
|
-
/**
|
|
3
|
-
* Definition of a Facet shown in the Gallery UI.
|
|
4
|
-
*
|
|
5
|
-
* If a `field` is specified, the Facet will be "dynamic" in that
|
|
6
|
-
* it will request aggregations for the field and use the returned
|
|
7
|
-
* values to create the FacetOptions.
|
|
8
|
-
*
|
|
9
|
-
* `Facet` contains and array if `FacetOptions`. When selected
|
|
10
|
-
* in the UI, a FilterGroup is constructed from the `Facet.operation`
|
|
11
|
-
* and the `Filters` are from the selected `FacetOptions`.
|
|
12
|
-
*/
|
|
13
|
-
export interface IFacet {
|
|
14
|
-
/**
|
|
15
|
-
* Translated label for the facet
|
|
16
|
-
*/
|
|
17
|
-
label?: string;
|
|
18
|
-
/**
|
|
19
|
-
* Unique key, used for query params and telemetry
|
|
20
|
-
*/
|
|
21
|
-
key?: string;
|
|
22
|
-
/**
|
|
23
|
-
* field to generate the facet from
|
|
24
|
-
*/
|
|
25
|
-
field?: string;
|
|
26
|
-
/**
|
|
27
|
-
* limit of aggregates returned. Max 200
|
|
28
|
-
*/
|
|
29
|
-
aggLimit?: number;
|
|
30
|
-
/**
|
|
31
|
-
* Display for this facet. Not all facets will be compatible with all displays
|
|
32
|
-
*/
|
|
33
|
-
display?: "map" | "single-select" | "multi-select" | "date-range" | "histogram";
|
|
34
|
-
/**
|
|
35
|
-
* State of the Facet
|
|
36
|
-
*/
|
|
37
|
-
state?: "open" | "closed";
|
|
38
|
-
/**
|
|
39
|
-
* Individual options for this Facet
|
|
40
|
-
*/
|
|
41
|
-
options?: IFacetOption[];
|
|
42
|
-
/**
|
|
43
|
-
* Operation is passed into the FilterGroup that is constructed
|
|
44
|
-
* when the Facet is serialized.
|
|
45
|
-
* Implemetations should default to "OR" if not specified
|
|
46
|
-
*/
|
|
47
|
-
operation?: "OR" | "AND";
|
|
48
|
-
/**
|
|
49
|
-
* Number of facet options to show by default. Only applies to `multi-select`, and defaults to all.
|
|
50
|
-
*/
|
|
51
|
-
optionLimit?: number;
|
|
52
|
-
/**
|
|
53
|
-
* Specifies how to order the facet options. Only applies to `multi-select`, and defaults to count.
|
|
54
|
-
* - count: orders by `option.count` in descending order of frequency
|
|
55
|
-
* - label: orders by `option.label` in ascending alphabetical order
|
|
56
|
-
*/
|
|
57
|
-
orderBy?: "count" | "label";
|
|
58
|
-
accordionClosed?: boolean;
|
|
59
|
-
type?: "single-select" | "multi-select" | "date-range" | "histogram";
|
|
60
|
-
pageSize?: number;
|
|
61
|
-
aggField?: string;
|
|
62
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Filter, FilterType } from "./types";
|
|
2
|
-
/**
|
|
3
|
-
* Facet Option shown in the UI as either a radio button or checkbox
|
|
4
|
-
*/
|
|
5
|
-
export interface IFacetOption {
|
|
6
|
-
/**
|
|
7
|
-
* Translated label for the option
|
|
8
|
-
*/
|
|
9
|
-
label: string;
|
|
10
|
-
/**
|
|
11
|
-
* Unique key, used for query params and telemetry
|
|
12
|
-
*/
|
|
13
|
-
key: string;
|
|
14
|
-
/**
|
|
15
|
-
* For aggregate based Facets, the count of entries in the index with this value
|
|
16
|
-
*/
|
|
17
|
-
count?: number;
|
|
18
|
-
/**
|
|
19
|
-
* Is this option selected when the UI loads
|
|
20
|
-
*/
|
|
21
|
-
selected: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Filters to be applied when this option is selected
|
|
24
|
-
*/
|
|
25
|
-
filters?: Array<Filter<FilterType>>;
|
|
26
|
-
/**
|
|
27
|
-
* DEPRECATED: Filter to be applied when this option is selected
|
|
28
|
-
*/
|
|
29
|
-
filter?: Filter<FilterType>;
|
|
30
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Filter, IFilterGroup, FilterType } from "./types";
|
|
2
|
-
import { IHubSearchOptions } from "./IHubSearchOptions";
|
|
3
|
-
/**
|
|
4
|
-
* Structure for making Hub API Search Requests
|
|
5
|
-
*/
|
|
6
|
-
export interface IHubApiSearchRequest {
|
|
7
|
-
/**
|
|
8
|
-
* Can be a string like `term:"water"`, a single filter like `{ filterType: "item", term: "water" }`
|
|
9
|
-
* or an array of IFilterGroups, which allows for complex queries.
|
|
10
|
-
*/
|
|
11
|
-
q: string | Filter<FilterType> | Array<IFilterGroup<FilterType>>;
|
|
12
|
-
/**
|
|
13
|
-
* Search options like the number of results to return, sorting, aggregations etc
|
|
14
|
-
*/
|
|
15
|
-
options: IHubSearchOptions;
|
|
16
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { ISearchOptions } from "@esri/arcgis-rest-portal";
|
|
2
|
-
import { Filter, IUserFilterDefinition } from "..";
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
* Merge `Filter<"user">` objects
|
|
6
|
-
*
|
|
7
|
-
* Useful in components which may get partial filters from a variety of
|
|
8
|
-
* sub-components, which are then combined into a single filter prior
|
|
9
|
-
* to executing the search.
|
|
10
|
-
* @param filters
|
|
11
|
-
* @returns
|
|
12
|
-
*/
|
|
13
|
-
export declare function mergeUserFilters(filters: Array<Filter<"user">>): Filter<"user">;
|
|
14
|
-
/**
|
|
15
|
-
* Prior to serialization into the query syntax for the backing APIs, we first expand [Filters](../Filter)
|
|
16
|
-
*
|
|
17
|
-
* Filter's can express their intent in a very terse form, but to ensure consistent structures
|
|
18
|
-
* we expand them into their more verbose form.
|
|
19
|
-
*
|
|
20
|
-
* i.e. `firstname: "John"` expands into `firstname: { any: ["John"]}`
|
|
21
|
-
*
|
|
22
|
-
* - Fields defined as `string | string[] | MatchOptions` will be converted to a `MatchOptions`
|
|
23
|
-
* - RelativeDate fields are converted to DateRange<number>
|
|
24
|
-
* @param filter
|
|
25
|
-
* @returns
|
|
26
|
-
*/
|
|
27
|
-
export declare function expandUserFilter(filter: Filter<"user">): IUserFilterDefinition;
|
|
28
|
-
/**
|
|
29
|
-
* @private
|
|
30
|
-
* Serialize an `IUserFilterDefinition` into an `ISearchOptions` for use
|
|
31
|
-
* with `searchUsers`
|
|
32
|
-
* @param filter
|
|
33
|
-
* @returns
|
|
34
|
-
*/
|
|
35
|
-
export declare function serializeUserFilterForPortal(filter: IUserFilterDefinition): ISearchOptions;
|