@conterra/ct-mapapps-typings 4.18.4-next.20241007040658 → 4.18.4-next.20241009040310
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/agssearch/api.d.ts +5 -4
- package/apprt/event/EventConstants.d.ts +1 -1
- package/apprt-core/AsyncTask.d.ts +4 -5
- package/apprt-core/BlockingTaskExecutor.d.ts +4 -6
- package/apprt-core/CancelablePromise.d.ts +6 -5
- package/apprt-core/Events.d.ts +23 -21
- package/apprt-core/Exception.d.ts +9 -9
- package/apprt-core/Logger.d.ts +7 -7
- package/apprt-core/Mutable.d.ts +35 -39
- package/apprt-core/Observable.d.ts +8 -6
- package/apprt-core/Observers.d.ts +40 -34
- package/apprt-core/Promise.d.ts +3 -3
- package/apprt-core/TaskExecutor.d.ts +3 -3
- package/apprt-core/assignWithPrototype.d.ts +23 -20
- package/apprt-core/async.d.ts +6 -6
- package/apprt-core/base64.d.ts +2 -2
- package/apprt-core/bindAsync.d.ts +9 -12
- package/apprt-core/clone.d.ts +13 -15
- package/apprt-core/comparators.d.ts +7 -7
- package/apprt-core/config.d.ts +5 -1
- package/apprt-core/delegate.d.ts +9 -9
- package/apprt-core/deprecate.d.ts +1 -1
- package/apprt-core/equals.d.ts +2 -2
- package/apprt-core/freeze.d.ts +1 -1
- package/apprt-core/global.d.ts +1 -1
- package/apprt-core/join.d.ts +14 -11
- package/apprt-core/load-css.d.ts +4 -4
- package/apprt-core/load-js.d.ts +5 -5
- package/apprt-core/promise-utils.d.ts +23 -23
- package/apprt-core/propertyToSymbol.d.ts +1 -1
- package/apprt-core/string-escape.d.ts +1 -1
- package/apprt-core/string-pattern.d.ts +1 -1
- package/apprt-core/string-replace.d.ts +10 -10
- package/apprt-core/url-utils.d.ts +2 -2
- package/apprt-core/when.d.ts +3 -3
- package/apprt-dom/index.d.ts +7 -7
- package/apprt-fetch/index.d.ts +17 -17
- package/apprt-streams/Stream.d.ts +34 -34
- package/coordinatetransformer/api/CoordinateTransformer.d.ts +15 -10
- package/coordinatetransformer/api/ProjectionStore.d.ts +7 -6
- package/coordinatetransformer/api/TransformationProvider.d.ts +11 -4
- package/coordinatetransformer/api/TransformerStrategy.d.ts +8 -5
- package/ct/util/css.d.ts +9 -8
- package/domains-system/api.d.ts +26 -30
- package/highlights/api.d.ts +6 -11
- package/integration-map/api.d.ts +38 -35
- package/map-actions/api.d.ts +9 -5
- package/map-config-api/api.d.ts +31 -3
- package/map-init/api.d.ts +5 -5
- package/map-widget/Constraints.d.ts +1 -1
- package/map-widget/LayerObserver.d.ts +6 -2
- package/map-widget/LayerTraverser.d.ts +4 -1
- package/map-widget/MapWidgetFactory.d.ts +1 -1
- package/map-widget/MapWidgetModel.d.ts +1 -1
- package/map-widget/ViewReadyWatcher.d.ts +1 -1
- package/map-widget/__internal__/{I0BOBZBz.d.ts → DFiGfJS1.d.ts} +3 -3
- package/map-widget/api/Constraints.d.ts +1 -1
- package/map-widget/api/MapWidget.d.ts +1 -1
- package/map-widget/api/MapWidgetFactory.d.ts +1 -1
- package/map-widget/api/MapWidgetModel.d.ts +1 -1
- package/map-widget/api/MapWidgetRegistration.d.ts +23 -12
- package/map-widget/api/SrsChangeService.d.ts +1 -1
- package/map-widget/api/index.d.ts +1 -1
- package/package.json +1 -1
- package/popups/ContentUpdateProxy.d.ts +61 -33
- package/popups/api.d.ts +35 -38
- package/portal-security/api.d.ts +48 -0
- package/portal-security/package.json +5 -0
- package/result-api/__internal__/{Cf0JLId0.d.ts → LZ4ypyEL.d.ts} +12 -12
- package/result-api/api/actions.d.ts +1 -1
- package/result-api/api/formatting.d.ts +1 -1
- package/result-api/api/index.d.ts +1 -1
- package/result-api/api/model.d.ts +1 -1
- package/result-api/api/service.d.ts +3 -3
- package/result-api/api/ui.d.ts +2 -2
- package/search-api/api.d.ts +8 -1
- package/search-ui/api.d.ts +2 -2
- package/selection-resultcenter/CachingStore.d.ts +3 -3
- package/store-api/ComplexQuery.d.ts +1 -1
- package/store-api/QueryExecution.d.ts +12 -11
- package/store-api/QueryExecutions.d.ts +3 -2
- package/store-api/SpatialQuery.d.ts +9 -9
- package/store-api/utils.d.ts +9 -9
- package/toc/api/Action.d.ts +3 -0
- package/toc/api/Item.d.ts +4 -1
- package/toc/api/StateChecker.d.ts +3 -0
- package/toc/api/index.d.ts +3 -0
package/apprt-dom/index.d.ts
CHANGED
|
@@ -83,7 +83,7 @@ type HTMLElementForTag<Tag extends ElementTag> = HTMLElementTagNameMap[Tag];
|
|
|
83
83
|
* Creates a new HTML node with the given tag.
|
|
84
84
|
*
|
|
85
85
|
* For example, to create new div and insert it as the last element of `parent`:
|
|
86
|
-
* ```
|
|
86
|
+
* ```ts
|
|
87
87
|
* import { createElement } from "apprt-dom";
|
|
88
88
|
* const parent = document.body;
|
|
89
89
|
* const node = createElement("div", {
|
|
@@ -101,14 +101,14 @@ declare function createElement(tagName: string, options?: CreateOptions): HTMLEl
|
|
|
101
101
|
* Inserts a node at the specified position relative to a another node.
|
|
102
102
|
*
|
|
103
103
|
* For example, to insert a node as the last element of `parent`:
|
|
104
|
-
* ```
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
104
|
+
* ```ts
|
|
105
|
+
* import { insertElement } from "apprt-dom";
|
|
106
|
+
* const node = ...;
|
|
107
|
+
* const parent = document.body;
|
|
108
|
+
* insertElement(node, {
|
|
109
109
|
* referenceNode: parent,
|
|
110
110
|
* position: "last"
|
|
111
|
-
*
|
|
111
|
+
* });
|
|
112
112
|
* ```
|
|
113
113
|
* @param node a html node
|
|
114
114
|
* @param options the position options
|
package/apprt-fetch/index.d.ts
CHANGED
|
@@ -4,16 +4,16 @@ import { DeepReadonly } from 'apprt-core/Types';
|
|
|
4
4
|
* Exports some default content types as optional utilities.
|
|
5
5
|
*
|
|
6
6
|
* @example use JSON content type in request headers
|
|
7
|
-
* ```
|
|
8
|
-
*
|
|
7
|
+
* ```ts
|
|
8
|
+
* import { apprtFetch, ContentType } from "apprt-fetch";
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
10
|
+
* apprtFetch(url, {
|
|
11
|
+
* method: "POST",
|
|
12
|
+
* headers: {
|
|
13
|
+
* "Content-Type": ContentType.JSON_UTF8,
|
|
14
|
+
* "Accept": ContentType.JSON
|
|
15
|
+
* }
|
|
16
|
+
* });
|
|
17
17
|
* ```
|
|
18
18
|
*/
|
|
19
19
|
declare enum ContentType {
|
|
@@ -63,7 +63,7 @@ declare enum ContentType {
|
|
|
63
63
|
* Provides a wrapper around the browsers `fetch` API.
|
|
64
64
|
*
|
|
65
65
|
* @example Fetch a json file
|
|
66
|
-
* ```
|
|
66
|
+
* ```ts
|
|
67
67
|
* import { apprtFetch, ContentType} from "apprt-fetch";
|
|
68
68
|
*
|
|
69
69
|
* // execute a get request
|
|
@@ -82,7 +82,7 @@ declare enum ContentType {
|
|
|
82
82
|
* const data = await response.json();
|
|
83
83
|
* ```
|
|
84
84
|
* @example Fetch a json file with apprtFetchJson
|
|
85
|
-
* ```
|
|
85
|
+
* ```ts
|
|
86
86
|
* import { apprtFetchJson } from "apprt-fetch";
|
|
87
87
|
*
|
|
88
88
|
* // execute a get request
|
|
@@ -93,7 +93,7 @@ declare enum ContentType {
|
|
|
93
93
|
* ```
|
|
94
94
|
*
|
|
95
95
|
* @example POST x-www-form-urlencoded content
|
|
96
|
-
* ```
|
|
96
|
+
* ```ts
|
|
97
97
|
* import { apprtFetch, ContentType } from "apprt-fetch";
|
|
98
98
|
*
|
|
99
99
|
* // execute a POST request
|
|
@@ -117,7 +117,7 @@ declare enum ContentType {
|
|
|
117
117
|
* ```
|
|
118
118
|
*
|
|
119
119
|
* @example POST x-www-form-urlencoded content with flag queryTransport:'form'
|
|
120
|
-
* ```
|
|
120
|
+
* ```ts
|
|
121
121
|
* import { apprtFetch, ContentType } from "apprt-fetch";
|
|
122
122
|
*
|
|
123
123
|
* // execute a POST request
|
|
@@ -133,7 +133,7 @@ declare enum ContentType {
|
|
|
133
133
|
* },
|
|
134
134
|
*
|
|
135
135
|
* // normally this would stay url parameters ?f=json
|
|
136
|
-
* query: { f: "json" }
|
|
136
|
+
* query: { f: "json" },
|
|
137
137
|
*
|
|
138
138
|
* // but this flags converts the query to the body
|
|
139
139
|
* queryTransport: "form"
|
|
@@ -143,7 +143,7 @@ declare enum ContentType {
|
|
|
143
143
|
* const data = await response.json();
|
|
144
144
|
* ```
|
|
145
145
|
* @example POST application/json content
|
|
146
|
-
* ```
|
|
146
|
+
* ```ts
|
|
147
147
|
* import { apprtFetch, ContentType } from "apprt-fetch";
|
|
148
148
|
*
|
|
149
149
|
* // execute a POST request
|
|
@@ -443,7 +443,7 @@ declare function getConfig(): Config;
|
|
|
443
443
|
*
|
|
444
444
|
* Basic usage:
|
|
445
445
|
*
|
|
446
|
-
* ```
|
|
446
|
+
* ```ts
|
|
447
447
|
* import { apprtFetch } from "apprt-fetch";
|
|
448
448
|
* const response = await apprtFetch("https://httpbin.org/get");
|
|
449
449
|
* if (!response.ok) {
|
|
@@ -464,7 +464,7 @@ declare function apprtFetch(target: ApprtRequestTarget, init?: ApprtRequestInit)
|
|
|
464
464
|
*
|
|
465
465
|
* Basic usage:
|
|
466
466
|
*
|
|
467
|
-
* ```
|
|
467
|
+
* ```ts
|
|
468
468
|
* import { apprtFetchJson } from "apprt-fetch";
|
|
469
469
|
* const jsonData = await apprtFetchJson("https://httpbin.org/get");
|
|
470
470
|
* // do something with the json data
|
|
@@ -23,7 +23,7 @@ declare abstract class Stream<T> implements Iterable<T> {
|
|
|
23
23
|
* be iterated multiple times (some iterables, like generators, do not support repeated iteration).
|
|
24
24
|
*
|
|
25
25
|
* @example
|
|
26
|
-
* ```
|
|
26
|
+
* ```ts
|
|
27
27
|
* import { Stream } from "apprt-streams/Stream";
|
|
28
28
|
* Stream.from([]); // Wraps any iterable
|
|
29
29
|
* Stream.from(Stream.empty()); // Returns original stream for stream arguments
|
|
@@ -35,7 +35,7 @@ declare abstract class Stream<T> implements Iterable<T> {
|
|
|
35
35
|
* Creates a new, empty stream.
|
|
36
36
|
*
|
|
37
37
|
* @example
|
|
38
|
-
* ```
|
|
38
|
+
* ```ts
|
|
39
39
|
* import { Stream } from "apprt-streams/Stream";
|
|
40
40
|
* Stream.empty().count(); // 0
|
|
41
41
|
* ```
|
|
@@ -50,7 +50,7 @@ declare abstract class Stream<T> implements Iterable<T> {
|
|
|
50
50
|
* and index is the index of the current value.
|
|
51
51
|
*
|
|
52
52
|
* @example
|
|
53
|
-
* ```
|
|
53
|
+
* ```ts
|
|
54
54
|
* import { Stream } from "apprt-streams/Stream";
|
|
55
55
|
*
|
|
56
56
|
* const result = Stream.enumerate(["a", "b"]).toArray(); // [[0, "a"], [1, "b"]]
|
|
@@ -63,7 +63,7 @@ declare abstract class Stream<T> implements Iterable<T> {
|
|
|
63
63
|
* for example `take()`, or break in a `for...of` loop.
|
|
64
64
|
*
|
|
65
65
|
* @example
|
|
66
|
-
* ```
|
|
66
|
+
* ```ts
|
|
67
67
|
* import { Stream } from "apprt-streams/Stream";
|
|
68
68
|
*
|
|
69
69
|
* let nextValue = 1;
|
|
@@ -79,7 +79,7 @@ declare abstract class Stream<T> implements Iterable<T> {
|
|
|
79
79
|
* Creates a stream that iterates over the keys of the given object.
|
|
80
80
|
*
|
|
81
81
|
* @example
|
|
82
|
-
* ```
|
|
82
|
+
* ```ts
|
|
83
83
|
* import { Stream } from "apprt-streams/Stream";
|
|
84
84
|
* const input = { a: 1, b: 2};
|
|
85
85
|
* const output = Stream.keys(input).map((k) => k + k).toArray(); // ["aa", "bb"] (order might differ)
|
|
@@ -90,7 +90,7 @@ declare abstract class Stream<T> implements Iterable<T> {
|
|
|
90
90
|
* Creates a stream that iterates over the values of the given object.
|
|
91
91
|
*
|
|
92
92
|
* @example
|
|
93
|
-
* ```
|
|
93
|
+
* ```ts
|
|
94
94
|
* import { Stream } from "apprt-streams/Stream";
|
|
95
95
|
* const input = { a: 1, b: 2};
|
|
96
96
|
* const output = Stream.values(input).map((v) => v * 2).toArray(); // [2, 4] (order might differ)
|
|
@@ -101,7 +101,7 @@ declare abstract class Stream<T> implements Iterable<T> {
|
|
|
101
101
|
* Creates a stream that iterates over the [key, value] pairs of the given object.
|
|
102
102
|
*
|
|
103
103
|
* @example
|
|
104
|
-
* ```
|
|
104
|
+
* ```ts
|
|
105
105
|
* import { Stream } from "apprt-streams/Stream";
|
|
106
106
|
* const input = { a: 1, b: 2};
|
|
107
107
|
* const output = Stream.entries(input).map((e) => `${e[0]}${e[1]}`).toArray(); // ["a1", "b2"] (order might differ)
|
|
@@ -113,7 +113,7 @@ declare abstract class Stream<T> implements Iterable<T> {
|
|
|
113
113
|
* In other words, this produces the interval `[0, 1, ..., count)`.
|
|
114
114
|
*
|
|
115
115
|
* @example
|
|
116
|
-
* ```
|
|
116
|
+
* ```ts
|
|
117
117
|
* import { Stream } from "apprt-streams/Stream";
|
|
118
118
|
* const numbers = Stream.integers(3).toArray(); // [0, 1, 2]
|
|
119
119
|
* ```
|
|
@@ -126,7 +126,7 @@ declare abstract class Stream<T> implements Iterable<T> {
|
|
|
126
126
|
* In other words, this produces the interval `[start +0, start +1, ..., start +count)`.
|
|
127
127
|
*
|
|
128
128
|
* @example
|
|
129
|
-
* ```
|
|
129
|
+
* ```ts
|
|
130
130
|
* import { Stream } from "apprt-streams/Stream";
|
|
131
131
|
* const numbers = Stream.integers(3, 4).toArray(); // [3, 4, 5, 6]
|
|
132
132
|
* ```
|
|
@@ -142,7 +142,7 @@ declare abstract class Stream<T> implements Iterable<T> {
|
|
|
142
142
|
* or break in a `for...of` loop.
|
|
143
143
|
*
|
|
144
144
|
* @example
|
|
145
|
-
* ```
|
|
145
|
+
* ```ts
|
|
146
146
|
* import { Stream } from "apprt-streams/Stream";
|
|
147
147
|
* const numbers = Stream.allIntegers().take(3).toArray(); // [0, 1, 2]
|
|
148
148
|
* ```
|
|
@@ -154,7 +154,7 @@ declare abstract class Stream<T> implements Iterable<T> {
|
|
|
154
154
|
* Creates a new stream by chaining the given iterables after each other.
|
|
155
155
|
*
|
|
156
156
|
* @example
|
|
157
|
-
* ```
|
|
157
|
+
* ```ts
|
|
158
158
|
* import { Stream } from "apprt-streams/Stream";
|
|
159
159
|
* const result = Stream.concat([1], [2]).toArray(); // [1, 2]
|
|
160
160
|
* ```
|
|
@@ -169,7 +169,7 @@ declare abstract class Stream<T> implements Iterable<T> {
|
|
|
169
169
|
* The stream stops when the shortest of the given iterables has ended.
|
|
170
170
|
*
|
|
171
171
|
* @example
|
|
172
|
-
* ```
|
|
172
|
+
* ```ts
|
|
173
173
|
* import { Stream } from "apprt-streams/Stream";
|
|
174
174
|
* const left = [1, 2];
|
|
175
175
|
* const right = ["a", "b", "c"];
|
|
@@ -187,7 +187,7 @@ declare abstract class Stream<T> implements Iterable<T> {
|
|
|
187
187
|
* are exhausted, their tuple items are set to undefined.
|
|
188
188
|
*
|
|
189
189
|
* @example
|
|
190
|
-
* ```
|
|
190
|
+
* ```ts
|
|
191
191
|
* import { Stream } from "apprt-streams/Stream";
|
|
192
192
|
* const left = [1, 2];
|
|
193
193
|
* const right = ["a", "b", "c"];
|
|
@@ -209,7 +209,7 @@ declare abstract class Stream<T> implements Iterable<T> {
|
|
|
209
209
|
* returns true will be produced by the stream.
|
|
210
210
|
*
|
|
211
211
|
* @example
|
|
212
|
-
* ```
|
|
212
|
+
* ```ts
|
|
213
213
|
* import { Stream } from "apprt-streams/Stream";
|
|
214
214
|
* const items = [1, -2, 3];
|
|
215
215
|
* const result = Stream.from(items).filter(n => n > 0).toArray(); // [1, 3]
|
|
@@ -224,7 +224,7 @@ declare abstract class Stream<T> implements Iterable<T> {
|
|
|
224
224
|
* Returns a stream that maps all elements of the input by using the provided `transform` function.
|
|
225
225
|
*
|
|
226
226
|
* @example
|
|
227
|
-
* ```
|
|
227
|
+
* ```ts
|
|
228
228
|
* import { Stream } from "apprt-streams/Stream";
|
|
229
229
|
* const items = [1, 2];
|
|
230
230
|
* const result = Stream.from(items).map(n => n + 1).toArray(); // [2, 3]
|
|
@@ -239,7 +239,7 @@ declare abstract class Stream<T> implements Iterable<T> {
|
|
|
239
239
|
* then discards all items that are `null` or `undefined`.
|
|
240
240
|
*
|
|
241
241
|
* @example
|
|
242
|
-
* ```
|
|
242
|
+
* ```ts
|
|
243
243
|
* import { Stream } from "apprt-streams/Stream";
|
|
244
244
|
* const persons = [{ age: 7 }, { age: 18 }, { age: 21 }];
|
|
245
245
|
* const adultAges = Stream.from(persons).filterMap(
|
|
@@ -257,7 +257,7 @@ declare abstract class Stream<T> implements Iterable<T> {
|
|
|
257
257
|
* multiple elements of the new stream).
|
|
258
258
|
*
|
|
259
259
|
* @example
|
|
260
|
-
* ```
|
|
260
|
+
* ```ts
|
|
261
261
|
* import { Stream } from "apprt-streams/Stream";
|
|
262
262
|
* const items = [[1], [2, 3]];
|
|
263
263
|
* const result = Stream.from(items).flat().toArray(); // [1, 2, 3]
|
|
@@ -268,7 +268,7 @@ declare abstract class Stream<T> implements Iterable<T> {
|
|
|
268
268
|
* Returns a stream that skips the first `count` elements of its input.
|
|
269
269
|
*
|
|
270
270
|
* @example
|
|
271
|
-
* ```
|
|
271
|
+
* ```ts
|
|
272
272
|
* import { Stream } from "apprt-streams/Stream";
|
|
273
273
|
* const items = [1, 2, 3];
|
|
274
274
|
* const result = Stream.from(items).skip(1).toArray(); // [2, 3]
|
|
@@ -283,7 +283,7 @@ declare abstract class Stream<T> implements Iterable<T> {
|
|
|
283
283
|
* in the returned stream.
|
|
284
284
|
*
|
|
285
285
|
* @example
|
|
286
|
-
* ```
|
|
286
|
+
* ```ts
|
|
287
287
|
* import { Stream } from "apprt-streams/Stream";
|
|
288
288
|
* const items = [1, 2, 3, 4, -1, -2, -3];
|
|
289
289
|
* const result = Stream.from(items).skipWhile((n) => n < 4).toArray(); // [4, -1, -2, -3]
|
|
@@ -298,7 +298,7 @@ declare abstract class Stream<T> implements Iterable<T> {
|
|
|
298
298
|
* Returns a stream that limits the input to at most `count` elements.
|
|
299
299
|
*
|
|
300
300
|
* @example
|
|
301
|
-
* ```
|
|
301
|
+
* ```ts
|
|
302
302
|
* import { Stream } from "apprt-streams/Stream";
|
|
303
303
|
* const items = [1, 2, 3];
|
|
304
304
|
* const result = Stream.from(items).take(1).toArray(); // [1]
|
|
@@ -313,7 +313,7 @@ declare abstract class Stream<T> implements Iterable<T> {
|
|
|
313
313
|
* for the first time.
|
|
314
314
|
*
|
|
315
315
|
* @example
|
|
316
|
-
* ```
|
|
316
|
+
* ```ts
|
|
317
317
|
* import { Stream } from "apprt-streams/Stream";
|
|
318
318
|
* const items = [1, 2, 3, 4, -1, -2, -3];
|
|
319
319
|
* const result = Stream.from(items).takeWhile((n) => n < 4).toArray(); // [1, 2, 3]
|
|
@@ -327,7 +327,7 @@ declare abstract class Stream<T> implements Iterable<T> {
|
|
|
327
327
|
* Returns a stream that repeats its contents `count` times.
|
|
328
328
|
*
|
|
329
329
|
* @example
|
|
330
|
-
* ```
|
|
330
|
+
* ```ts
|
|
331
331
|
* import { Stream } from "apprt-streams/Stream";
|
|
332
332
|
* const items = ["a", "b"];
|
|
333
333
|
* const repeated = Stream.from(items).repeat(2).toArray(); // ["a", "b", "a", "b"];
|
|
@@ -342,7 +342,7 @@ declare abstract class Stream<T> implements Iterable<T> {
|
|
|
342
342
|
* in a `for...of` loop.
|
|
343
343
|
*
|
|
344
344
|
* @example
|
|
345
|
-
* ```
|
|
345
|
+
* ```ts
|
|
346
346
|
* import { Stream } from "apprt-streams/Stream";
|
|
347
347
|
* const items = [1, 2];
|
|
348
348
|
* const cycled = Stream.from(items).cycle().take(5).toArray(); // [1, 2, 1, 2, 1]
|
|
@@ -357,7 +357,7 @@ declare abstract class Stream<T> implements Iterable<T> {
|
|
|
357
357
|
* All arrays, except for the last one, will be of length `chunkSize`.
|
|
358
358
|
*
|
|
359
359
|
* @example
|
|
360
|
-
* ```
|
|
360
|
+
* ```ts
|
|
361
361
|
* import { Stream } from "apprt-streams/Stream";
|
|
362
362
|
* const items = [1, 2, 3, 4, 5];
|
|
363
363
|
* const chunked = Stream.from(items).chunk(3).toArray(); // [[1, 2, 3], [4, 5]]
|
|
@@ -397,7 +397,7 @@ declare abstract class Stream<T> implements Iterable<T> {
|
|
|
397
397
|
* items in an internal map, which may be inefficient for very large datasets.
|
|
398
398
|
*
|
|
399
399
|
* @example
|
|
400
|
-
* ```
|
|
400
|
+
* ```ts
|
|
401
401
|
* import { Stream } from "apprt-streams/Stream";
|
|
402
402
|
* const persons = [
|
|
403
403
|
* { name: "A", age: 18 },
|
|
@@ -422,7 +422,7 @@ declare abstract class Stream<T> implements Iterable<T> {
|
|
|
422
422
|
* A new group is started whenever an element is encountered that does not belong to the current group.
|
|
423
423
|
*
|
|
424
424
|
* @example
|
|
425
|
-
* ```
|
|
425
|
+
* ```ts
|
|
426
426
|
* const numbers = [1, 2, 4, 3, 0];
|
|
427
427
|
* const grouped = Stream.from(numbers)
|
|
428
428
|
* .groupAdjacent((l, r) => Math.abs(l - r) <= 1) // close items belong to the same group
|
|
@@ -457,7 +457,7 @@ declare abstract class Stream<T> implements Iterable<T> {
|
|
|
457
457
|
* to be able to sort it. This may be inefficient for very large datasets.
|
|
458
458
|
*
|
|
459
459
|
* @example
|
|
460
|
-
* ```
|
|
460
|
+
* ```ts
|
|
461
461
|
* const items = [
|
|
462
462
|
* { name: "A", age: 18 },
|
|
463
463
|
* { name: "B", age: 28 },
|
|
@@ -487,7 +487,7 @@ declare abstract class Stream<T> implements Iterable<T> {
|
|
|
487
487
|
* for de-duplication. This may be inefficient for very large datasets.
|
|
488
488
|
*
|
|
489
489
|
* @example
|
|
490
|
-
* ```
|
|
490
|
+
* ```ts
|
|
491
491
|
* const items = [
|
|
492
492
|
* {age: 1},
|
|
493
493
|
* {age: 2},
|
|
@@ -511,7 +511,7 @@ declare abstract class Stream<T> implements Iterable<T> {
|
|
|
511
511
|
* This may be inefficient for very large datasets.
|
|
512
512
|
*
|
|
513
513
|
* @example
|
|
514
|
-
* ```
|
|
514
|
+
* ```ts
|
|
515
515
|
* const items = Stream.integers(4).reverse().toArray(); // [3, 2, 1, 0]
|
|
516
516
|
* ```
|
|
517
517
|
*/
|
|
@@ -626,7 +626,7 @@ declare abstract class Stream<T> implements Iterable<T> {
|
|
|
626
626
|
* Gathers all elements of this stream into an array.
|
|
627
627
|
*
|
|
628
628
|
* @example
|
|
629
|
-
* ```
|
|
629
|
+
* ```ts
|
|
630
630
|
* import { Stream } from "apprt-streams/Stream";
|
|
631
631
|
* const array = Stream.integers(3).toArray(); // [0, 1, 2]
|
|
632
632
|
* ```
|
|
@@ -638,7 +638,7 @@ declare abstract class Stream<T> implements Iterable<T> {
|
|
|
638
638
|
* strings, symbols or numbers.
|
|
639
639
|
*
|
|
640
640
|
* @example
|
|
641
|
-
* ```
|
|
641
|
+
* ```ts
|
|
642
642
|
* import { Stream } from "apprt-streams/Stream";
|
|
643
643
|
* const object = Stream.from(["a", "b", "c"])
|
|
644
644
|
* .map((v) => [v, v + "!"])
|
|
@@ -653,7 +653,7 @@ declare abstract class Stream<T> implements Iterable<T> {
|
|
|
653
653
|
* Iterating over the set will yield the same order because sets maintain their insertion order.
|
|
654
654
|
*
|
|
655
655
|
* @example
|
|
656
|
-
* ```
|
|
656
|
+
* ```ts
|
|
657
657
|
* import { Stream } from "apprt-streams/Stream";
|
|
658
658
|
* const set = Stream.integers(3).toSet(); // set of 0, 1, 2
|
|
659
659
|
* ```
|
|
@@ -667,7 +667,7 @@ declare abstract class Stream<T> implements Iterable<T> {
|
|
|
667
667
|
* Iterating over the map will yield the same order because maps maintain their insertion order.
|
|
668
668
|
*
|
|
669
669
|
* @example
|
|
670
|
-
* ```
|
|
670
|
+
* ```ts
|
|
671
671
|
* import { Stream } from "apprt-streams/Stream";
|
|
672
672
|
* const map = Stream.from(["a", "b", "c"])
|
|
673
673
|
* .map((v) => [v, v + "!"])
|
|
@@ -680,7 +680,7 @@ declare abstract class Stream<T> implements Iterable<T> {
|
|
|
680
680
|
*
|
|
681
681
|
* @example
|
|
682
682
|
*
|
|
683
|
-
* ```
|
|
683
|
+
* ```ts
|
|
684
684
|
* for (const value of Stream.integers(5)) {
|
|
685
685
|
* console.info(value);
|
|
686
686
|
* }
|
|
@@ -15,7 +15,7 @@ interface Coordinates {
|
|
|
15
15
|
*
|
|
16
16
|
* @example Sample for different input variants
|
|
17
17
|
*
|
|
18
|
-
* ```
|
|
18
|
+
* ```ts
|
|
19
19
|
* const wgs84String = "EPSG:4326";
|
|
20
20
|
* const wgs84Wkid = 4326;
|
|
21
21
|
*
|
|
@@ -71,22 +71,27 @@ type CoordinateModificationCallback = (input: Readonly<Coordinates>) => Coordina
|
|
|
71
71
|
* "components": [{
|
|
72
72
|
* "name": "MyComponent",
|
|
73
73
|
* "references": [{
|
|
74
|
-
* "name": "
|
|
74
|
+
* "name": "coordinateTransformer",
|
|
75
75
|
* "providing": "coordinatetransformer.CoordinateTransformer"
|
|
76
76
|
* }]
|
|
77
77
|
* }]
|
|
78
78
|
* ```
|
|
79
79
|
*
|
|
80
|
-
* In your code (MyComponent.
|
|
80
|
+
* In your code (MyComponent.ts):
|
|
81
|
+
*
|
|
82
|
+
* ```ts
|
|
83
|
+
* import { InjectedReference } from "apprt-core/InjectedReference";
|
|
84
|
+
* import { CoordinateTransformer } from "coordinatetransformer/CoordinateTransformer";
|
|
85
|
+
* import { Geometry } from "esri/geometry";
|
|
81
86
|
*
|
|
82
|
-
* ```js
|
|
83
87
|
* export default class MyComponent {
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
88
|
+
* private coordinateTransformer: InjectedReference<CoordinateTransformer>;
|
|
89
|
+
* async transformToWGS84(geometry: Geometry): Promise<Geometry> {
|
|
90
|
+
* const wgs84Code = 4326;
|
|
91
|
+
* const transformedGeometry =
|
|
92
|
+
* await this.coordinateTransformer!.transform(geometry, wgs84Code);
|
|
93
|
+
* return transformedGeometry;
|
|
94
|
+
* }
|
|
90
95
|
* }
|
|
91
96
|
* ```
|
|
92
97
|
*/
|
|
@@ -37,12 +37,13 @@ import 'esri/geometry';
|
|
|
37
37
|
*
|
|
38
38
|
* In your code (MyComponent.js):
|
|
39
39
|
*
|
|
40
|
-
* ```
|
|
41
|
-
* export
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
40
|
+
* ```ts
|
|
41
|
+
* export class MyComponent {
|
|
42
|
+
* private projectionStore: InjectedReference<ProjectionStore>;
|
|
43
|
+
* async findAvailableProjections(): Promise<ResultItems<Projection>> {
|
|
44
|
+
* const projections = await this.projectionStore!.query({});
|
|
45
|
+
* return projections;
|
|
46
|
+
* }
|
|
46
47
|
* }
|
|
47
48
|
* ```
|
|
48
49
|
*/
|
|
@@ -21,11 +21,18 @@ import { Items } from './CoordinateTransformer.js';
|
|
|
21
21
|
* }]
|
|
22
22
|
* ```
|
|
23
23
|
*
|
|
24
|
-
* In your code (MyCustomTransformationProvider.
|
|
24
|
+
* In your code (MyCustomTransformationProvider.ts):
|
|
25
25
|
*
|
|
26
|
-
* ```
|
|
27
|
-
* export default class MyCustomTransformationProvider
|
|
28
|
-
*
|
|
26
|
+
* ```ts
|
|
27
|
+
* export default class MyCustomTransformationProvider implements TransformationProvider
|
|
28
|
+
* {
|
|
29
|
+
* transformationFor(
|
|
30
|
+
* sourceSRS: SpatialReference,
|
|
31
|
+
* targetSRS: SpatialReference
|
|
32
|
+
* ):
|
|
33
|
+
* | GeographicTransformation
|
|
34
|
+
* | Items<Partial<GeographicTransformationStep>>
|
|
35
|
+
* | undefined {
|
|
29
36
|
* // Pseudo code
|
|
30
37
|
* if (sourceSRS.wkid === 1234 && targetSRS.wkid === 4567) {
|
|
31
38
|
* return {
|
|
@@ -17,12 +17,15 @@ import { Items } from './CoordinateTransformer.js';
|
|
|
17
17
|
* }]
|
|
18
18
|
* ```
|
|
19
19
|
*
|
|
20
|
-
* In your code (MyCustomTransformerStrategy.
|
|
20
|
+
* In your code (MyCustomTransformerStrategy.ts):
|
|
21
21
|
*
|
|
22
|
-
* ```
|
|
23
|
-
* export default class MyCustomTransformerStrategy {
|
|
24
|
-
*
|
|
25
|
-
*
|
|
22
|
+
* ```ts
|
|
23
|
+
* export default class MyCustomTransformerStrategy implements TransformerStrategy {
|
|
24
|
+
* transform(
|
|
25
|
+
* geometry: Items<Geometry>,
|
|
26
|
+
* sourceSRS: SpatialReference,
|
|
27
|
+
* targetSRS: SpatialReference
|
|
28
|
+
* ): Items<Geometry> | Promise<Items<Geometry>> {
|
|
26
29
|
* // pseudo code
|
|
27
30
|
* return transformation(sourceSRS, targetSRS).transform(geometry);
|
|
28
31
|
* }
|
package/ct/util/css.d.ts
CHANGED
|
@@ -31,8 +31,8 @@ declare class ExtendedPromise<T> implements Promise<T> {
|
|
|
31
31
|
* Creates Promise instances.
|
|
32
32
|
* @param executor defined as (resolve,reject)=> \{\}
|
|
33
33
|
* @example
|
|
34
|
-
* ```
|
|
35
|
-
* new Promise((resolve,reject)=>{
|
|
34
|
+
* ```ts
|
|
35
|
+
* new Promise((resolve, reject)=>{
|
|
36
36
|
* ...
|
|
37
37
|
* });
|
|
38
38
|
* ```
|
|
@@ -100,7 +100,7 @@ declare class ExtendedPromise<T> implements Promise<T> {
|
|
|
100
100
|
* Allows to resolve/reject the promise manually after creating it.
|
|
101
101
|
*
|
|
102
102
|
* @example
|
|
103
|
-
* ```
|
|
103
|
+
* ```ts
|
|
104
104
|
* const { promise, resolve, reject } = Promise.withResolvers();
|
|
105
105
|
* ```
|
|
106
106
|
* @returns {{ promise, resolve, reject }}
|
|
@@ -203,14 +203,15 @@ declare class CancelablePromise<T> extends ExtendedPromise<T> {
|
|
|
203
203
|
* Creates Promise instances with "cancel" function.
|
|
204
204
|
* @param executor function defined as (resolve,reject,onCancelled)=> \{\}
|
|
205
205
|
* @example
|
|
206
|
-
* ```
|
|
207
|
-
*
|
|
208
|
-
*
|
|
209
|
-
*
|
|
206
|
+
* ```ts
|
|
207
|
+
* const p = new CancelablePromise((resolve, reject, onCancelled) => {
|
|
208
|
+
* onCancelled(() => {
|
|
209
|
+
* doSomething();
|
|
210
|
+
* });
|
|
210
211
|
* });
|
|
211
212
|
*
|
|
212
213
|
* // grab cancel function for later cancellation
|
|
213
|
-
*
|
|
214
|
+
* const cancel = p.cancel;
|
|
214
215
|
*
|
|
215
216
|
* // now cancel
|
|
216
217
|
* cancel();
|
package/domains-system/api.d.ts
CHANGED
|
@@ -18,38 +18,34 @@ import { Bundle } from 'apprt/api';
|
|
|
18
18
|
*
|
|
19
19
|
* @example
|
|
20
20
|
*
|
|
21
|
-
* ```
|
|
22
|
-
* export class MyInterpreter
|
|
21
|
+
* ```ts
|
|
22
|
+
* export class MyInterpreter implements ConfigFragmentInterpreter {
|
|
23
|
+
* allInitialOrderedBundlesInterpreted(): void {}
|
|
23
24
|
*
|
|
24
|
-
*
|
|
25
|
-
* }
|
|
25
|
+
* allInitialBundlesInterpreted(): void {}
|
|
26
26
|
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
* }
|
|
50
|
-
* });
|
|
51
|
-
*
|
|
52
|
-
* }
|
|
27
|
+
* async interpret(
|
|
28
|
+
* configFragment: ConfigFragment,
|
|
29
|
+
* options: InterpretationOptions
|
|
30
|
+
* ): Promise<Disposable | void> {
|
|
31
|
+
* const myConfig = configFragment.getConfig("my-custom-key");
|
|
32
|
+
* if (!myConfig) {
|
|
33
|
+
* // nothing to do
|
|
34
|
+
* return Promise.resolve();
|
|
35
|
+
* }
|
|
36
|
+
* // interpret the config
|
|
37
|
+
* ...
|
|
38
|
+
* // e.g. create a resource
|
|
39
|
+
* const resource = ...;
|
|
40
|
+
* // interpretation is finished
|
|
41
|
+
* return Promise.resolve({
|
|
42
|
+
* // this is called if the interpreted domain bundle is stopped
|
|
43
|
+
* dispose() {
|
|
44
|
+
* // ensure created resources are cleaned
|
|
45
|
+
* resource.cleanup();
|
|
46
|
+
* }
|
|
47
|
+
* });
|
|
48
|
+
* }
|
|
53
49
|
* }
|
|
54
50
|
* ```
|
|
55
51
|
*/
|
package/highlights/api.d.ts
CHANGED
|
@@ -171,24 +171,19 @@ interface HighlighterFactory {
|
|
|
171
171
|
* @param options additional options
|
|
172
172
|
*
|
|
173
173
|
* @example <caption>highlighter for mapwidget model</caption>
|
|
174
|
-
* ```
|
|
174
|
+
* ```ts
|
|
175
175
|
* // inject factory as `highlights.HighlighterFactory`
|
|
176
176
|
* // inject model as `map-widget.MapWidgetModel`
|
|
177
|
-
* const highlighter = factory.forMapWidgetModel(model)
|
|
178
|
-
* highlighter.highlight(
|
|
179
|
-
* geometry,
|
|
180
|
-
* attributes,
|
|
181
|
-
* symbol,
|
|
182
|
-
* context
|
|
183
|
-
* });
|
|
177
|
+
* const highlighter = factory.forMapWidgetModel(model);
|
|
178
|
+
* highlighter.highlight(graphic);
|
|
184
179
|
* // later clean up
|
|
185
180
|
* highlighter.destroy();
|
|
186
181
|
* ```
|
|
187
182
|
*
|
|
188
183
|
* @example <caption>highlighter using custom collection</caption>
|
|
189
|
-
* ```
|
|
190
|
-
* const
|
|
191
|
-
* const graphics =
|
|
184
|
+
* ```ts
|
|
185
|
+
* const graphicsLayer = new GraphicsLayer();
|
|
186
|
+
* const graphics = graphicsLayer.graphics;
|
|
192
187
|
* const highlighter = factory.forMapWidgetModel(model, { graphicsCollectionResolver: (model) => graphics });
|
|
193
188
|
* // now highlights are added to the custom GraphicsLayer.
|
|
194
189
|
* ```
|