@conterra/ct-mapapps-typings 4.19.3-next.20250530040706 → 4.19.3-next.20250627112807

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.
Files changed (44) hide show
  1. package/apprt-core/Types.d.ts +1 -1
  2. package/coordinateconversion/api.d.ts +181 -0
  3. package/{omnisearch → coordinateconversion}/package.json +1 -1
  4. package/package.json +1 -1
  5. package/search-api/api.d.ts +16 -2
  6. package/apprt-core/Observable.d.ts +0 -55
  7. package/ct/api/omnisearch/ResultHandler.d.ts +0 -3
  8. package/ct/api/omnisearch/Store.d.ts +0 -3
  9. package/ct/ui/controls/mobile/DropDownMenu.d.ts +0 -3
  10. package/omnisearch/ActionsHandler.d.ts +0 -9
  11. package/omnisearch/DrawHandler.d.ts +0 -9
  12. package/omnisearch/DropDownMenu.d.ts +0 -3
  13. package/omnisearch/OmniSearchFactory.d.ts +0 -3
  14. package/omnisearch/OmniSearchModel.d.ts +0 -3
  15. package/omnisearch/RadioButton.d.ts +0 -3
  16. package/omnisearch/ResultCommand.d.ts +0 -9
  17. package/omnisearch/SearchUI.d.ts +0 -3
  18. package/omnisearch/SettingsWidget.d.ts +0 -3
  19. package/omnisearch/ZoomHandler.d.ts +0 -8
  20. package/resultcenter/ActionController.d.ts +0 -3
  21. package/resultcenter/BaseCommand.d.ts +0 -3
  22. package/resultcenter/DataModel.d.ts +0 -3
  23. package/resultcenter/DataModelBroadcaster.d.ts +0 -3
  24. package/resultcenter/DataModelMapController.d.ts +0 -25
  25. package/resultcenter/DataViewController.d.ts +0 -3
  26. package/resultcenter/DataViewStore.d.ts +0 -3
  27. package/resultcenter/ExportResultsCommand.d.ts +0 -12
  28. package/resultcenter/FeatureMapVisualizer.d.ts +0 -35
  29. package/resultcenter/GraphicResolverFactory.d.ts +0 -15
  30. package/resultcenter/OpenPopupService.d.ts +0 -5
  31. package/resultcenter/PostfixAttributeTableLookupStrategy.d.ts +0 -3
  32. package/resultcenter/RemoveResultsCommand.d.ts +0 -6
  33. package/resultcenter/RestrictQueriesToView.d.ts +0 -3
  34. package/resultcenter/ResultcenterToolRuleProcessor.d.ts +0 -3
  35. package/resultcenter/SearchStoreHandler.d.ts +0 -8
  36. package/resultcenter/SelectAllResultsCommand.d.ts +0 -11
  37. package/resultcenter/StoreEventReceiver.d.ts +0 -3
  38. package/resultcenter/StoreRegistration.d.ts +0 -3
  39. package/resultcenter/TriggerShowResultCenter.d.ts +0 -3
  40. package/resultcenter/VisualizationLayerResolver.d.ts +0 -13
  41. package/resultcenter/package.json +0 -5
  42. package/selection-resultcenter/CachingStore.d.ts +0 -229
  43. package/selection-resultcenter/MemoryStore.d.ts +0 -10
  44. package/selection-resultcenter/package.json +0 -5
@@ -100,7 +100,7 @@ type WatchCallback<NameType, ValueType> = (event: WatchEvent<NameType, ValueType
100
100
  * It matches the apprt-core/Mutable watch interface.
101
101
  */
102
102
  interface Watchable<WatchableProperties> {
103
- watch<Name extends keyof WatchableProperties>(name: Name, callBack: WatchCallback<Name, WatchableProperties[Name]>): Handle;
103
+ watch<Name extends keyof WatchableProperties>(name: Name, callback: WatchCallback<Name, WatchableProperties[Name]>): Handle;
104
104
  }
105
105
  /**
106
106
  * Helper type to express a set of statically known values (with autocompletion) that can still be extended.
@@ -0,0 +1,181 @@
1
+ import { SpatialReference, Point } from 'esri/geometry';
2
+
3
+ /**
4
+ * Parsing succeeded and returned a valid value.
5
+ */
6
+ interface ParseSuccess<T> {
7
+ kind: "success";
8
+ value: T;
9
+ }
10
+ /**
11
+ * Parsing resulted in an error.
12
+ */
13
+ interface ParseError {
14
+ kind: "error";
15
+ /**
16
+ * Human readable error message.
17
+ * This message may be presented to the user.
18
+ */
19
+ message?: string;
20
+ }
21
+ /**
22
+ * The result of parsing inputs.
23
+ */
24
+ type ParseResult<T> = ParseSuccess<T> | ParseError;
25
+ /**
26
+ * Implements a format for coordinate conversions.
27
+ *
28
+ * You can extend the builtin set of formats by providing a service with `"coordinateconversion.SegmentedFormat"`.
29
+ */
30
+ interface SegmentedFormat {
31
+ /**
32
+ * Unique id of this format.
33
+ */
34
+ readonly id: string;
35
+ /**
36
+ * Human readable label of this format.
37
+ */
38
+ readonly label: string;
39
+ /**
40
+ * Input segments required by the format, for example `x` and `y` coordinates.
41
+ * The coordinate conversion widget shows one input field for each segment.
42
+ */
43
+ readonly segments: CoordinateSegment[];
44
+ /**
45
+ * When specified, points will be projected to this spatial reference before being passed to {@link pointToSegments}.
46
+ *
47
+ * If this is not specified, you will receive the point in the current spatial reference of the view, and
48
+ * you will have to perform any necessary projections yourself.
49
+ */
50
+ readonly spatialReference?: SpatialReference;
51
+ /**
52
+ * Renders a point to _segment_ values.
53
+ * The returned record is indexed by segment ids and contains a string for each segment.
54
+ *
55
+ * The output of this function should be compatible with {@link segmentsToPoint}.
56
+ *
57
+ * Example:
58
+ *
59
+ * ```js
60
+ * const point = ...;
61
+ * const segments = format.pointToSegments(point);
62
+ * // segments == { x: "...", y: "..." }
63
+ * ```
64
+ */
65
+ pointToSegments(point: Point): Promise<Record<string, string>>;
66
+ /**
67
+ * Formats a set of _segment_ values to a human readable string.
68
+ * This combines the segment values to a final display string, including separating characters (like ',' or ' ')
69
+ * and units (like '°' and '"').
70
+ *
71
+ * The `segments` parameter can be assumed to contain valid strings: either
72
+ * - user input validated by {@link CoordinateSegment.validate} or
73
+ * - segment values generated by {@link pointToSegments}.
74
+ *
75
+ * The value returned here should be compatible with {@link stringToSegments}.
76
+ *
77
+ * Example:
78
+ *
79
+ * ```js
80
+ * const segments = { x: "1", y: "2" }
81
+ * const output = format.segmentsToString(segments);
82
+ * // output == "1°, 2°"
83
+ * ``
84
+ */
85
+ segmentsToString(segments: Record<string, string>): string;
86
+ /**
87
+ * Splits a human readable coordinates string (like returned by {@link segmentsToString}) into its input segment.
88
+ *
89
+ * For example:
90
+ *
91
+ * ```js
92
+ * const input = "123.4 567.8";
93
+ * const segments = format.stringToSegments(input).value; // assumes success
94
+ * // segments == { x: "123.4", y: "567.8" };
95
+ * ```
96
+ */
97
+ stringToSegments(input: string): ParseResult<Record<string, string>>;
98
+ /**
99
+ * Parses a set of (validated) segment values into a `Point`.
100
+ * This can be used, for example, to place a marker on the map.
101
+ *
102
+ * Example:
103
+ *
104
+ * ```js
105
+ * const segments = { x: "1", y: "2" }
106
+ * const point = await format.segmentsToPoint(segments).value; // assumes success
107
+ * // point == { x: 1234, y: 5678, spatialReference: { ... }}
108
+ * ```
109
+ */
110
+ segmentsToPoint(segments: Record<string, string>): Promise<ParseResult<Point>>;
111
+ }
112
+ /**
113
+ * A coordinate segment within a {@link SegmentedFormat}.
114
+ */
115
+ interface CoordinateSegment {
116
+ /**
117
+ * Id of this segment.
118
+ *
119
+ * This should be unique within the context of its format.
120
+ */
121
+ id: string;
122
+ /**
123
+ * Human readable label for this coordinate segment (e.g. "Latitude").
124
+ */
125
+ label: string;
126
+ /**
127
+ * Example for this segment, like '51° 57' 40"N'
128
+ */
129
+ example?: string;
130
+ /**
131
+ * A prefix value that will be shown as part of the input field for this coordinate segment.
132
+ *
133
+ * This is a display-only field for strings that do not need to be typed by the user (such as "°").
134
+ */
135
+ prefix?: string;
136
+ /**
137
+ * A suffix value that will be shown as part of the input field for this coordinate segment.
138
+ *
139
+ * This is a display-only field for strings that do not need to be typed by the user (such as "°").
140
+ */
141
+ suffix?: string;
142
+ /**
143
+ * Validates an input string for this coordinate segment.
144
+ * `input` is the (trimmed) text typed by the user.
145
+ *
146
+ * This function should return `true` if the input is valid,
147
+ * or an error message otherwise.
148
+ *
149
+ * `validate()` usually only performs text based validation (e.g. regular expressions).
150
+ * Parsing the actual input string (using {@link SegmentedFormat.segmentsToPoint}) can return additional errors.
151
+ *
152
+ * Only valid inputs will be passed to {@link SegmentedFormat.segmentsToPoint}.
153
+ */
154
+ validate(input: string): true | false | ParseError;
155
+ }
156
+ /**
157
+ * A model that provides access to the current state of the coordinate conversion widget.
158
+ * Properties and methods are designed to be used together with the Reactivity API.
159
+ *
160
+ * It is available as service `coordinateconversion.Model`.
161
+ */
162
+ interface CoordinateConversionModel {
163
+ /**
164
+ * True if the widget is currently active.
165
+ */
166
+ readonly active: boolean;
167
+ /**
168
+ * The current marker location, if any.
169
+ * This value represents explicit location inputs and also locations from mouse movements.
170
+ */
171
+ readonly currentLocation: Point | undefined;
172
+ /**
173
+ * The current marker location, if any.
174
+ *
175
+ * This value represents explicit location inputs only, i.e. if the user clicked on the map (not just moving the mouse)
176
+ * or confirmed the input form.
177
+ */
178
+ readonly confirmedLocation: Point | undefined;
179
+ }
180
+
181
+ export type { CoordinateConversionModel, CoordinateSegment, ParseError, ParseResult, ParseSuccess, SegmentedFormat };
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "omnisearch",
2
+ "name": "coordinateconversion",
3
3
  "version": "4.19.3-SNAPSHOT",
4
4
  "types": ""
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conterra/ct-mapapps-typings",
3
- "version": "4.19.3-next.20250530040706",
3
+ "version": "4.19.3-next.20250627112807",
4
4
  "description": "TypeDefinitions for ct-mapapps",
5
5
  "author": "conterra",
6
6
  "license": "Apache-2.0"
@@ -50,6 +50,15 @@ interface SearchOptions {
50
50
  * The default value is `15`.
51
51
  */
52
52
  count?: number;
53
+ /**
54
+ * Whether to request the number of total results from the queries stores.
55
+ *
56
+ * This is true by default for backwards compatibility reasons.
57
+ * Set this to `false` to skip requesting the total result count.
58
+ *
59
+ * See also {@link ResultSet.total}.
60
+ */
61
+ queryTotal?: boolean;
53
62
  /**
54
63
  * An optional array of map action IDs.
55
64
  * The associated map actions are triggered when an item is selected (see {@link ResultItem.select}).
@@ -113,8 +122,13 @@ interface ResultGroup {
113
122
  interface ResultSet {
114
123
  /** Result items, up to the requested amount. */
115
124
  readonly items: ResultItem[];
116
- /** Total number of available results */
117
- readonly total: number;
125
+ /**
126
+ * Total number of available results.
127
+ *
128
+ * This is present if the `queryTotal` option is set to `true` (the default).
129
+ * This is always undefined if `queryTotal` is set to `false`.
130
+ */
131
+ readonly total: number | undefined;
118
132
  /**
119
133
  * Selects multiple items at once.
120
134
  * The items must belong to this result set (from `this.items`).
@@ -1,55 +0,0 @@
1
- declare global {
2
- const Observable: any;
3
- }
4
- /**
5
- * Exports the Observable class.
6
- *
7
- * @deprecated the observable proposal is 'dead'
8
- * @example
9
- * ```ts
10
- * // create observable, which ticks all 100 msec
11
- * const observable = new Observable((observer: any) => {
12
- * let counter = 0;
13
- * const t = setInterval(() => {
14
- * observer.next(++counter);
15
- * }, 100);
16
- * // return a cleanup function, is called if subscriber unsubscribes
17
- * return () => {
18
- * clearInterval(t);
19
- * };
20
- * });
21
- * // now somebody can subscribe
22
- * const subscription = observable.subscribe({
23
- * next(value: number) {
24
- * console.debug(value);
25
- * }
26
- * });
27
- * // to unlink do:
28
- * subscription.unsubscribe();
29
- * ```
30
- *
31
- * @example
32
- * ```
33
- * // use object observable definition
34
- * observable.subscribe({
35
- * next(value) { },
36
- * error(e) { },
37
- * complete() { }
38
- * });
39
- * ```
40
- *
41
- * @example
42
- * ```
43
- * // use method definition, first argument is next, second error and third complete
44
- * observable.subscribe(
45
- * (value)=> {},
46
- * (e)=> {},
47
- * ()=> {}
48
- * );
49
- * ```
50
- * @see [TC39 Proposal](https://github.com/tc39/proposal-observable)
51
- * @see [TC39 Proposal Github](https://tc39.github.io/proposal-observable)
52
- */
53
- declare const ExtendedObservable: any;
54
-
55
- export { ExtendedObservable, ExtendedObservable as default };
@@ -1,3 +0,0 @@
1
- declare const _default: any;
2
-
3
- export { _default as default };
@@ -1,3 +0,0 @@
1
- declare const _default: any;
2
-
3
- export { _default as default };
@@ -1,3 +0,0 @@
1
- declare const _default: any;
2
-
3
- export { _default as default };
@@ -1,9 +0,0 @@
1
- declare class ActionsHandler {
2
- id: string;
3
- type: string[];
4
- set actionService(service: any);
5
- handle(item: any, opts: any): Promise<PromiseSettledResult<any>[]>;
6
- #private;
7
- }
8
-
9
- export { ActionsHandler as default };
@@ -1,9 +0,0 @@
1
- declare class DrawHandler {
2
- id: string;
3
- type: string[];
4
- activate(): void;
5
- symbolTableLookup: any;
6
- handle(item: any, opts: any): Promise<void>;
7
- }
8
-
9
- export { DrawHandler as default };
@@ -1,3 +0,0 @@
1
- declare const _default: any;
2
-
3
- export { _default as default };
@@ -1,3 +0,0 @@
1
- declare const _default: any;
2
-
3
- export { _default as default };
@@ -1,3 +0,0 @@
1
- declare const _default: any;
2
-
3
- export { _default as default };
@@ -1,3 +0,0 @@
1
- declare const _default: any;
2
-
3
- export { _default as default };
@@ -1,9 +0,0 @@
1
- declare class ResultCommands {
2
- processResult(event: any): void;
3
- clearResult(event: any): void;
4
- addResultHandler(resultHandler: any): void;
5
- removeResultHandler(resultHandler: any): void;
6
- #private;
7
- }
8
-
9
- export { ResultCommands as default };
@@ -1,3 +0,0 @@
1
- declare const _default: any;
2
-
3
- export { _default as default };
@@ -1,3 +0,0 @@
1
- declare const _default: any;
2
-
3
- export { _default as default };
@@ -1,8 +0,0 @@
1
- declare class ZoomHandler {
2
- id: string;
3
- type: string;
4
- activate(): void;
5
- handle(item: any, opts: any): void;
6
- }
7
-
8
- export { ZoomHandler as default };
@@ -1,3 +0,0 @@
1
- declare const _default: any;
2
-
3
- export { _default as default };
@@ -1,3 +0,0 @@
1
- declare const _default: any;
2
-
3
- export { _default as default };
@@ -1,3 +0,0 @@
1
- declare const _default: any;
2
-
3
- export { _default as default };
@@ -1,3 +0,0 @@
1
- declare const _default: any;
2
-
3
- export { _default as default };
@@ -1,25 +0,0 @@
1
- declare function DataModelMapController(): {
2
- dataModel: null;
3
- mapWidgetModel: null;
4
- constructor(): void;
5
- zoomToAll(): void;
6
- zoomToSelection(): void;
7
- _getGeometryOpts(): {
8
- fields: {
9
- geometry: boolean;
10
- };
11
- geometry: {
12
- sr: any;
13
- maxAllowableOffset: number;
14
- };
15
- };
16
- zoomToItems(idsOrQuery: any): void;
17
- zoomToItem(id: any): void;
18
- centerSelection(): void;
19
- centerItems(idsOrQuery: any): void;
20
- centerItem(id: any): void;
21
- openPopup(itemId: any): void;
22
- _withItems(idsOrQuery: any, cb: any, scope: any, options: any): void;
23
- };
24
-
25
- export { DataModelMapController as default };
@@ -1,3 +0,0 @@
1
- declare const _default: any;
2
-
3
- export { _default as default };
@@ -1,3 +0,0 @@
1
- declare function _default(model: any, store: any, listenForChanges: any): any;
2
-
3
- export { _default as default };
@@ -1,12 +0,0 @@
1
- /**
2
- * @fileOverview contains code for common (shared) command functions.
3
- */
4
- declare class ExportResultsCommand {
5
- exportSelected(): Promise<void>;
6
- _formatValue(value: any, type: any): string;
7
- _escape(value: any, separator: any): any;
8
- _prepareEntries(entries: any, separator: any, undefinedValue: any, ignoreFields: any, metadata: any, domains: any, exportDomainValues: any, detectExtraFields: any): string;
9
- _resolveFields(entries: any, fields: any, ignoreFields: any, detectExtraFields?: boolean): any;
10
- }
11
-
12
- export { ExportResultsCommand as default };
@@ -1,35 +0,0 @@
1
- declare class FeatureMapVisualizer {
2
- _mapWidgetModel: any;
3
- _highlighterFactory: any;
4
- _dataModel: any;
5
- _dataViewController: any;
6
- _graphicResolver: any;
7
- _coordinateTransformer: any;
8
- _popupTemplateResolver: any;
9
- deactivate(): void;
10
- viewChanged(): Promise<void>;
11
- handleOnDataUpdate(): Promise<void>;
12
- findGraphicsById(itemId: any): any;
13
- _updateFeatures(): void;
14
- _renderStoreItems(store: any): Promise<void>;
15
- _triggerPartialUpdateOnDataChange(store: any, evt: any): void;
16
- _updateTask: any;
17
- _applyDataUpdates(store: any, sr: any, renderId: any): Promise<void>;
18
- _addHighlights(features: any, store: any, domains: any, spatialReference: any): Promise<void>;
19
- _updateHighlight(itemId: any, geometry: any, attributes: any, context: any, popupTemplate: any): void;
20
- _removeHighlight(itemId: any): void;
21
- _removeHighlights(): void;
22
- _getContext(store: any): any;
23
- _lookupHighlighter(name: any): any;
24
- _createHighlighter(existing: any, resolver: any): any;
25
- _resolveDomains(store: any): Promise<{
26
- mergeDomainsIntoFields: (attributes: any) => any;
27
- toDomainValues(attributes: any): Record<string, any>;
28
- isDomainField(name: string): boolean;
29
- } | undefined>;
30
- _transformFeatures(features: any, targetSpatialReference: any): Promise<any>;
31
- _destroyHighlighter(): void;
32
- #private;
33
- }
34
-
35
- export { FeatureMapVisualizer as default };
@@ -1,15 +0,0 @@
1
- declare class GraphicResolverFactory {
2
- activate(): void;
3
- symbolLookup: any;
4
- _defaultSymbolLookup: any;
5
- deactivate(): void;
6
- /** Used by FeatureMapVisualizer to lookup symbols */
7
- resolveSymbol(geometry: any, attributes: any, context: any): any;
8
- buildDefaultResolver(): {
9
- resolve(geometry: any, attributes: any, context: any): any;
10
- };
11
- _generateSymbolsLookUp(symbolLookup: any): any;
12
- #private;
13
- }
14
-
15
- export { GraphicResolverFactory as default };
@@ -1,5 +0,0 @@
1
- declare function OpenPopupService(opts: any): {
2
- openPopup(itemId: any, options: any): Promise<void>;
3
- };
4
-
5
- export { OpenPopupService as default };
@@ -1,3 +0,0 @@
1
- declare const _default: any;
2
-
3
- export { _default as default };
@@ -1,6 +0,0 @@
1
- declare class RemoveResultsCommand {
2
- removeAll(): void;
3
- removeSelected(): Promise<void>;
4
- }
5
-
6
- export { RemoveResultsCommand as default };
@@ -1,3 +0,0 @@
1
- declare function RestrictQueriesToView(dataViewModel: any, masterStore: any): any;
2
-
3
- export { RestrictQueriesToView as default };
@@ -1,3 +0,0 @@
1
- declare const _default: any;
2
-
3
- export { _default as default };
@@ -1,8 +0,0 @@
1
- declare function _default(): {
2
- showData(event: any): void;
3
- clearData(event: any): void;
4
- handleDataSourceUpdate(event: any): void;
5
- deactivate(): void;
6
- };
7
-
8
- export { _default as default };
@@ -1,11 +0,0 @@
1
- /**
2
- * Base class for select all command of result center.
3
- */
4
- declare class SelectAllResultsCommand {
5
- deactivate(): void;
6
- _selected: boolean | null | undefined;
7
- selectAll(): void;
8
- handleDataSourceChanged(): void;
9
- }
10
-
11
- export { SelectAllResultsCommand as default };
@@ -1,3 +0,0 @@
1
- declare const _default: any;
2
-
3
- export { _default as default };
@@ -1,3 +0,0 @@
1
- declare const _default: any;
2
-
3
- export { _default as default };
@@ -1,3 +0,0 @@
1
- declare const _default: any;
2
-
3
- export { _default as default };
@@ -1,13 +0,0 @@
1
- /**
2
- * Helper of FeatureMapVisualizer to ensure that graphics rendered to special layer.
3
- */
4
- declare class VisualizationLayerResolver {
5
- constructor(layerId: any, layerTitle: any);
6
- layerId: any;
7
- layerTitle: any;
8
- resolve(mapWidgetModel: any): any;
9
- remove(): void;
10
- #private;
11
- }
12
-
13
- export { VisualizationLayerResolver as default };
@@ -1,5 +0,0 @@
1
- {
2
- "name": "resultcenter",
3
- "version": "4.19.3-SNAPSHOT",
4
- "types": ""
5
- }
@@ -1,229 +0,0 @@
1
- import * as store_api_api from 'store-api/api';
2
-
3
- /**
4
- * The methods of this interface are available when a Promise
5
- * has been augmented using the `trackState` function.
6
- */
7
- interface StateQueryable {
8
- /** Returns true if the promise is settled, i.e. if it is no longer pending. */
9
- isSettled(): boolean;
10
- /** Returns true if the promise is fulfilled, i.e. if it has a success value. */
11
- isFulfilled(): boolean;
12
- /** Returns true if the promise is rejected, i.e. if it contains an error. */
13
- isRejected(): boolean;
14
- /** Returns true if the promise was cancelled before it was able to complete. */
15
- isCancelled(): boolean;
16
- }
17
- type State = "pending" | "fulfilled" | "rejected" | "cancelled";
18
- declare const PROMISE: unique symbol;
19
- declare const STATE: unique symbol;
20
- declare const PRIVATE_CONSTRUCTOR_TAG: unique symbol;
21
- /**
22
- * Wrapper of global.Promise class.
23
- * Read more about [Promises](./PROMISES.md).
24
- *
25
- * @see https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Promise
26
- */
27
- declare class ExtendedPromise<T> implements Promise<T> {
28
- private [PROMISE];
29
- private [STATE]?;
30
- /**
31
- * Creates Promise instances.
32
- * @param executor defined as (resolve,reject)=> \{\}
33
- * @example
34
- * ```ts
35
- * new Promise((resolve, reject)=>{
36
- * ...
37
- * });
38
- * ```
39
- */
40
- constructor(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void);
41
- /**
42
- * Internal constructor. Do not call.
43
- */
44
- constructor(promise: PromiseLike<T> | LegacyDojoDeferred, state: State | undefined, tag: typeof PRIVATE_CONSTRUCTOR_TAG);
45
- /** Creates a new resolved promise */
46
- static resolve(): ExtendedPromise<void>;
47
- /**
48
- * Creates a new resolved promise with the given value
49
- * @param value result object.
50
- * @returns a promise in fulfilled state.
51
- */
52
- static resolve<T>(value: T): ExtendedPromise<T>;
53
- /**
54
- * @param reason The reason the promise was rejected.
55
- * @returns a promise in rejected state.
56
- */
57
- static reject<T = never>(reason?: any): ExtendedPromise<T>;
58
- /**
59
- * Creates promise which fulfills if all other promises are fulfilled.
60
- * Or rejects if one of the promises rejects.
61
- *
62
- * @param iterable Iterable of Promise instances
63
- */
64
- static all<T extends readonly unknown[] | []>(iterable: T): ExtendedPromise<{
65
- -readonly [P in keyof T]: Awaited<T[P]>;
66
- }>;
67
- /**
68
- * Creates promise which fulfills if one of the other promises fulfills.
69
- * Or rejects if one of the promises rejects.
70
- *
71
- * @param iterable Iterable of Promise instances
72
- */
73
- static race<T>(iterable: Iterable<T>): ExtendedPromise<T extends PromiseLike<infer U> ? U : T>;
74
- /**
75
- * Creates promise which fulfills if one of the other promises fulfills.
76
- * Or rejects if one of the promises rejects.
77
- *
78
- * @param iterable Iterable of Promise instances
79
- */
80
- static race<T>(iterable: Iterable<T | PromiseLike<T>>): ExtendedPromise<T>;
81
- /**
82
- * Creates a promise that resolves after all of the given promises have either fulfilled or rejected,
83
- * with an array of objects that each describes the outcome of each promise.
84
- *
85
- * @param iterable Iterable of Promise instances
86
- */
87
- static allSettled<T>(iterable: Iterable<T | PromiseLike<T>>): ExtendedPromise<PromiseSettledResult<Awaited<T>>[]>;
88
- /**
89
- * Promise.any() takes an iterable of Promise objects and, as soon as one of the promises in the iterable fulfills,
90
- * returns a single promise that resolves with the value from that promise.
91
- * If no promises in the iterable fulfill (if all of the given promises are rejected),
92
- * then the returned promise is rejected with an AggregateError,
93
- * Essentially, this method is the opposite of Promise.all().
94
- *
95
- * @param iterable Iterable of Promise instances
96
- */
97
- static any<T>(iterable: (T | PromiseLike<T>)[] | Iterable<T | PromiseLike<T>>): ExtendedPromise<T>;
98
- /**
99
- * Produces an object with a promise along with its resolution and rejection functions.
100
- * Allows to resolve/reject the promise manually after creating it.
101
- *
102
- * @example
103
- * ```ts
104
- * const { promise, resolve, reject } = Promise.withResolvers();
105
- * ```
106
- * @returns {{ promise, resolve, reject }}
107
- */
108
- static withResolvers<T>(): {
109
- resolve: (value: T | PromiseLike<T>) => void;
110
- reject: (reason?: unknown) => void;
111
- promise: ExtendedPromise<T>;
112
- };
113
- /**
114
- * This method tests if a given object is a promise.
115
- * The algorithm will return true for:
116
- * * apprt-core/Promise
117
- * * global Promise
118
- * * dojo/Deferred
119
- * * dojo/Deferred.promise
120
- *
121
- * Note: Because of support for dojo/Deferred any object with a
122
- * 'then', 'isResolved' and 'isRejected' method is detected as a promise.
123
- *
124
- * @param candidate a potential promise.
125
- * @returns true if candidate is a promise.
126
- */
127
- static isPromise(candidate: any): candidate is PromiseLike<unknown>;
128
- /**
129
- * Wraps e.g. dojo/Deferred or native Promise to this Promise class.
130
- * @returns a promise
131
- */
132
- static wrap<T>(promise: PromiseLike<T> | LegacyDojoDeferred): ExtendedPromise<T>;
133
- /**
134
- * Augments the given Promise with new state lookup functions.
135
- */
136
- static trackState<T>(promise: PromiseLike<T> | LegacyDojoDeferred): ExtendedPromise<T> & StateQueryable;
137
- /**
138
- * Registers success and/or error handlers.
139
- * @param success called when the promise resolves
140
- * @param failure called when the promise rejects
141
- */
142
- then<TResult1 = T, TResult2 = never>(success?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, failure?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): ExtendedPromise<TResult1 | TResult2>;
143
- /**
144
- * Registers an error handler.
145
- * @param failure called when the promise rejects
146
- */
147
- catch<TResult = never>(failure?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): ExtendedPromise<T | TResult>;
148
- /**
149
- * Registers an error handler. Which is not called if the error is a Cancel instance.
150
- * @param failure called when the promise rejects
151
- */
152
- else<TResult = never>(failure?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): ExtendedPromise<T | TResult>;
153
- /**
154
- * Registers a handler, which is called in success or error state.
155
- * But the handler is not able to change the result state!
156
- * @param handler function invoked regardless of success or error
157
- */
158
- finally(handler?: (() => void) | undefined | null): ExtendedPromise<T>;
159
- /**
160
- * @returns this instance, augmented with augmented with:
161
- *
162
- * * isFulfilled()
163
- * * isRejected()
164
- * * isCancelled()
165
- * * isSettled()
166
- */
167
- trackState(): ExtendedPromise<T> & StateQueryable;
168
- get [Symbol.toStringTag](): string;
169
- }
170
-
171
- interface LegacyDojoDeferred {
172
- promise: any;
173
- isResolved(): boolean;
174
- isRejected(): boolean;
175
- isFulfilled(): boolean;
176
- isCanceled(): boolean;
177
- progress(update: any, strict?: boolean): any;
178
- resolve(value?: any, strict?: boolean): any;
179
- reject(error?: any, strict?: boolean): any;
180
- then(callback?: any, errback?: any, progback?: any): any;
181
- cancel(reason?: any, strict?: boolean): any;
182
- toString(): string;
183
- }
184
-
185
- /**
186
- * This class provides a caching store. All used field values will be cached in a memory store.
187
- */
188
- declare class CachingStore {
189
- /**
190
- * Defines if geometry will be cached
191
- */
192
- constructor(args: any);
193
- maxFeaturesLimit: number;
194
- initialQuery: any;
195
- querySequenz: any;
196
- idProperty: any;
197
- _cache: any[];
198
- _geometryCache: any;
199
- idList: any[];
200
- deactivate(): void;
201
- getInitialQuery(): any;
202
- _addItemToCache(item: any, offset: any): void;
203
- _updateGeometryCache(item: any, offset: any): void;
204
- getMetadata(object: any): any;
205
- getIdentity(object: any): any;
206
- _getAllMasterStoreFields(): ExtendedPromise<{}>;
207
- _getItems(itemIds: any, opts: any): Promise<any[]>;
208
- _buildQuery(itemIds: any): {};
209
- _isGeometryRequired(options: any, defaultRequired: any): Any;
210
- _getGeometryFromCache(id: any, offset: any): any;
211
- _isSpatialQuery(query: any): boolean;
212
- _getItemsFromCache(query: any, options?: {}): store_api_api.ResultItems<Readonly<Record<string, any>>>;
213
- _getGeometryForItems(items: any, options: any): ExtendedPromise<any>;
214
- _getItemsForQuery(query: any, options: any): ExtendedPromise<any[]>;
215
- query(query: any, options: any): store_api_api.ResultItems<{}>;
216
- _synchronizedQueryOnCache(query: any, opts: any): any;
217
- querySequence: any;
218
- _queryOnCache(query: any, opts: any): ExtendedPromise<any>;
219
- _geometryMissingInCachedItems(offset: any, query: any, opts: any): boolean;
220
- _getOffset(options: any): Any;
221
- _checkIfCacheIsPopulated(): boolean;
222
- _populateCache(): any;
223
- _fetchCache: any;
224
- get(id: any, options: any): any;
225
- remove(id: any): boolean;
226
- invalidate(id: any): void;
227
- }
228
-
229
- export { CachingStore as default };
@@ -1,10 +0,0 @@
1
- import { AsyncWritableInMemoryStore } from 'store-api/InMemoryStore';
2
-
3
- declare class MemoryStore extends AsyncWritableInMemoryStore<any, any> {
4
- constructor(opts: any);
5
- masterStore: any;
6
- idList: any;
7
- getMetadata(): Promise<any>;
8
- }
9
-
10
- export { MemoryStore };
@@ -1,5 +0,0 @@
1
- {
2
- "name": "selection-resultcenter",
3
- "version": "4.19.3-SNAPSHOT",
4
- "types": ""
5
- }