@vertigis/arcgis-extensions 48.3.3 → 48.3.5

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 (60) hide show
  1. package/data/FeatureSettings.d.ts +2 -2
  2. package/data/FieldExtension.d.ts +1 -1
  3. package/data/PopupContentExtension.d.ts +1 -1
  4. package/docs/html/assets/navigation.js +1 -1
  5. package/docs/html/assets/search.js +1 -1
  6. package/docs/html/classes/data_FeatureList.FeatureList.html +1 -1
  7. package/docs/html/classes/data_FeatureSourceBase.RelationshipCollection.html +1 -1
  8. package/docs/html/classes/mapping_ArcGISSublayerExtension.ArcGISSublayerRelationshipCollection.html +1 -1
  9. package/docs/html/classes/mapping_GroupLayerExtension.GroupLayerExtensionCollection.html +1 -1
  10. package/docs/html/classes/mapping_SubtypeGroupLayerExtension.SubtypeGroupLayerRelationshipCollection.html +1 -1
  11. package/docs/html/classes/mapping_SubtypeSublayerExtension.SubtypeSublayerRelationshipCollection.html +1 -1
  12. package/docs/html/classes/mapping__LayerExtensionCollectionImpl.LayerExtensionCollectionImpl.html +1 -1
  13. package/docs/html/classes/mapping__SublayerExtension.SubSublayerExtensionCollection.html +1 -1
  14. package/docs/html/classes/mapping_support_ArrayWrappedCollection.ArrayWrappedCollection.html +1 -1
  15. package/docs/html/classes/mapping_support__LayerExtensionCollection.LayerExtensionCollectionBase.html +1 -1
  16. package/docs/html/classes/mapping_support__SublayerExtensionCollection.SublayerExtensionCollectionBase.html +1 -1
  17. package/docs/html/classes/support_InitializableCollectionProxy.InitializableCollectionProxy.html +1 -1
  18. package/docs/html/classes/support_ReadOnlyInitializableCollection.ReadOnlyInitializableCollection.html +1 -1
  19. package/docs/html/classes/support__ArcGISRelationshipCollection.ArcGISRelationshipCollection.html +1 -1
  20. package/docs/html/classes/utilities_CollectionProxy.CollectionProxy.html +1 -1
  21. package/docs/html/classes/utilities_CopyOnWriteCollection.CopyOnWriteCollection.html +1 -1
  22. package/docs/html/classes/utilities_MapTransformCollection.MapTransformCollection.html +1 -1
  23. package/docs/html/classes/utilities_ReadOnlyCollection.ReadOnlyCollection.html +1 -1
  24. package/docs/html/functions/mapping_support_ogc.wfsFeatureCollectionToFeatures.html +2 -2
  25. package/docs/html/functions/utilities_array.groupBy.html +2 -2
  26. package/docs/html/functions/utilities_asyncIterable.find.html +2 -2
  27. package/docs/html/functions/utilities_iterable.map.html +2 -2
  28. package/docs/html/functions/utilities_object.filter.html +2 -2
  29. package/docs/html/functions/utilities_promise.each.html +3 -33
  30. package/docs/html/functions/utilities_promise.map.html +3 -51
  31. package/docs/html/functions/utilities_promise.parallelEach.html +3 -14
  32. package/docs/html/functions/utilities_promise.reduce.html +4 -60
  33. package/docs/html/functions/utilities_uri.isRelativeUri.html +3 -1
  34. package/docs/html/modules/support_esri.html +1 -0
  35. package/docs/html/types/support_esri.FeatureEditResultError.html +1 -0
  36. package/docs/html/variables/utilities_scaleRanges.wellKnownScaleRanges.html +1 -1
  37. package/docs/html/variables/version.version.html +1 -1
  38. package/json/WMSLayerJson.d.ts +1 -1
  39. package/mapping/WMTSLayerExtension.d.ts +1 -0
  40. package/mapping/WMTSLayerExtension.js +1 -1
  41. package/mapping/support/ogc.d.ts +1 -1
  42. package/mapping/support/ogc.js +1 -1
  43. package/package.json +1 -1
  44. package/support/Settings.d.ts +2 -2
  45. package/support/esri.d.ts +1 -0
  46. package/tasks/geocoding/Geocoder.d.ts +1 -1
  47. package/utilities/CollectionProxy.d.ts +7 -1
  48. package/utilities/CollectionProxy.js +1 -1
  49. package/utilities/_ogc.d.ts +1 -1
  50. package/utilities/array.d.ts +1 -1
  51. package/utilities/asyncIterable.d.ts +1 -1
  52. package/utilities/iterable.d.ts +1 -1
  53. package/utilities/object.d.ts +1 -1
  54. package/utilities/promise.d.ts +5 -194
  55. package/utilities/promise.js +1 -1
  56. package/utilities/scaleRanges.d.ts +2 -2
  57. package/utilities/scaleRanges.js +1 -1
  58. package/utilities/uri.d.ts +3 -1
  59. package/version.d.ts +1 -1
  60. package/version.js +1 -1
@@ -35,70 +35,7 @@ export declare function timeout<T>(ms: number, promise: Promise<T>, message?: st
35
35
  * @param values The array of values to map over.
36
36
  * @param mapper The mapper function to apply to each element.
37
37
  */
38
- export declare function map<T, U>(values: PromiseLike<Iterable<PromiseLike<T>>>, mapper: (item: T, index: number) => U | PromiseLike<U>): Promise<U[]>;
39
- /**
40
- * Map an array, or a promise of an array, which contains promises (or a mix of
41
- * promises and values) with the given mapper function with the signature
42
- * `(item, index)` where `item` is the resolved value of a respective promise in
43
- * the input array. If any promise in the input array is rejected the returned
44
- * promise is rejected as well.
45
- *
46
- * If the mapper function returns promises or then-ables, the returned promise
47
- * will wait for all the mapped results to be resolved as well.
48
- *
49
- * The mapper function for a given item is called as soon as possible, that is,
50
- * when the promise for that item's index in the input array is fulfilled. This
51
- * means that multiple promises may be pending concurrently, and that the mapper
52
- * function may not be applied to elements in the order that they appear in the
53
- * original array. However, items in the resulting array will always appear in
54
- * the same order as the input items.
55
- *
56
- * @param values The array of values to map over.
57
- * @param mapper The mapper function to apply to each element.
58
- */
59
- export declare function map<T, U>(values: PromiseLike<Iterable<T>>, mapper: (item: T, index: number) => U | PromiseLike<U>): Promise<U[]>;
60
- /**
61
- * Map an array, or a promise of an array, which contains promises (or a mix of
62
- * promises and values) with the given mapper function with the signature
63
- * `(item, index)` where `item` is the resolved value of a respective promise in
64
- * the input array. If any promise in the input array is rejected the returned
65
- * promise is rejected as well.
66
- *
67
- * If the mapper function returns promises or then-ables, the returned promise
68
- * will wait for all the mapped results to be resolved as well.
69
- *
70
- * The mapper function for a given item is called as soon as possible, that is,
71
- * when the promise for that item's index in the input array is fulfilled. This
72
- * means that multiple promises may be pending concurrently, and that the mapper
73
- * function may not be applied to elements in the order that they appear in the
74
- * original array. However, items in the resulting array will always appear in
75
- * the same order as the input items.
76
- *
77
- * @param values The array of values to map over.
78
- * @param mapper The mapper function to apply to each element.
79
- */
80
- export declare function map<T, U>(values: Iterable<PromiseLike<T>>, mapper: (item: T, index: number) => U | PromiseLike<U>): Promise<U[]>;
81
- /**
82
- * Map an array, or a promise of an array, which contains promises (or a mix of
83
- * promises and values) with the given mapper function with the signature
84
- * `(item, index)` where `item` is the resolved value of a respective promise in
85
- * the input array. If any promise in the input array is rejected the returned
86
- * promise is rejected as well.
87
- *
88
- * If the mapper function returns promises or then-ables, the returned promise
89
- * will wait for all the mapped results to be resolved as well.
90
- *
91
- * The mapper function for a given item is called as soon as possible, that is,
92
- * when the promise for that item's index in the input array is fulfilled. This
93
- * means that multiple promises may be pending concurrently, and that the mapper
94
- * function may not be applied to elements in the order that they appear in the
95
- * original array. However, items in the resulting array will always appear in
96
- * the same order as the input items.
97
- *
98
- * @param values The array of values to map over.
99
- * @param mapper The mapper function to apply to each element.
100
- */
101
- export declare function map<T, U>(values: Iterable<T>, mapper: (item: T, index: number) => U | PromiseLike<U>): Promise<U[]>;
38
+ export declare function map<T, U>(values: PromiseLike<Iterable<T | PromiseLike<T>>> | Iterable<T | PromiseLike<T>>, mapper: (item: T, index: number) => U | PromiseLike<U>): Promise<U[]>;
102
39
  /**
103
40
  * Iterate over an array, or a promise of an array, which contains promises (or
104
41
  * a mix of promises and values) with the given iterator function with the
@@ -112,65 +49,7 @@ export declare function map<T, U>(values: Iterable<T>, mapper: (item: T, index:
112
49
  * @param values The array of values to iterate over.
113
50
  * @param iterator The iterator function to apply to each element.
114
51
  */
115
- export declare function each<T>(values: PromiseLike<Iterable<PromiseLike<T>>>, iterator: (item: T, index: number) => void | PromiseLike<void>): Promise<void>;
116
- /**
117
- * Iterate over an array, or a promise of an array, which contains promises (or
118
- * a mix of promises and values) with the given iterator function with the
119
- * signature `(item, index)` where `item` is the resolved value of a respective
120
- * promise in the input array. Iteration happens serially. If any promise in the
121
- * input array is rejected the returned promise is rejected as well.
122
- *
123
- * If the iterator function returns a promise or a thenable, the result for the
124
- * promise is awaited for before continuing with next iteration.
125
- *
126
- * @param values The array of values to iterate over.
127
- * @param iterator The iterator function to apply to each element.
128
- */
129
- export declare function each<T>(values: Iterable<PromiseLike<T>>, iterator: (item: T, index: number) => void | PromiseLike<void>): Promise<void>;
130
- /**
131
- * Iterate over an array, or a promise of an array, which contains promises (or
132
- * a mix of promises and values) with the given iterator function with the
133
- * signature `(item, index)` where `item` is the resolved value of a respective
134
- * promise in the input array. Iteration happens serially. If any promise in the
135
- * input array is rejected the returned promise is rejected as well.
136
- *
137
- * If the iterator function returns a promise or a thenable, the result for the
138
- * promise is awaited for before continuing with next iteration.
139
- *
140
- * @param values The array of values to iterate over.
141
- * @param iterator The iterator function to apply to each element.
142
- */
143
- export declare function each<T>(values: PromiseLike<Iterable<T>>, iterator: (item: T, index: number) => void | PromiseLike<void>): Promise<void>;
144
- /**
145
- * Iterate over an array, or a promise of an array, which contains promises (or
146
- * a mix of promises and values) with the given iterator function with the
147
- * signature `(item, index)` where `item` is the resolved value of a respective
148
- * promise in the input array. Iteration happens serially. If any promise in the
149
- * input array is rejected the returned promise is rejected as well.
150
- *
151
- * If the iterator function returns a promise or a thenable, the result for the
152
- * promise is awaited for before continuing with next iteration.
153
- *
154
- * @param values The array of values to iterate over.
155
- * @param iterator The iterator function to apply to each element.
156
- */
157
- export declare function each<T>(values: Iterable<T>, iterator: (item: T, index: number) => void | PromiseLike<void>): Promise<void>;
158
- /**
159
- * Same as {@link each}, except that the elements are processed in parallel
160
- * rather than sequentially.
161
- *
162
- * @param values The array of values to iterate over.
163
- * @param iterator The iterator function to apply to each element.
164
- */
165
- export declare function parallelEach<T, U>(values: PromiseLike<Iterable<PromiseLike<T>>>, iterator: (item: T, index: number) => U | PromiseLike<U>): Promise<void>;
166
- /**
167
- * Same as {@link each}, except that the elements are processed in parallel
168
- * rather than sequentially.
169
- *
170
- * @param values The array of values to iterate over.
171
- * @param iterator The iterator function to apply to each element.
172
- */
173
- export declare function parallelEach<T, U>(values: Iterable<PromiseLike<T>>, iterator: (item: T, index: number) => U | PromiseLike<U>): Promise<void>;
52
+ export declare function each<T>(values: Iterable<T | PromiseLike<T>> | PromiseLike<Iterable<T | PromiseLike<T>>>, iterator: (item: T, index: number) => void | PromiseLike<void>): Promise<void>;
174
53
  /**
175
54
  * Same as {@link each}, except that the elements are processed in parallel
176
55
  * rather than sequentially.
@@ -178,76 +57,7 @@ export declare function parallelEach<T, U>(values: Iterable<PromiseLike<T>>, ite
178
57
  * @param values The array of values to iterate over.
179
58
  * @param iterator The iterator function to apply to each element.
180
59
  */
181
- export declare function parallelEach<T, U>(values: Iterable<T> | PromiseLike<Iterable<T>>, iterator: (item: T, index: number) => U | PromiseLike<U>): Promise<void>;
182
- /**
183
- * Reduce an array, or a promise of an array, which contains a promises (or a
184
- * mix of promises and values) with the given reducer function with the
185
- * signature `(total, current, index)` where `current` is the resolved value of
186
- * a respective promise in the input array. If any promise in the input array is
187
- * rejected the returned promise is rejected as well.
188
- *
189
- * If the reducer function returns a promise or a thenable, the result for the
190
- * promise is awaited for before continuing with next iteration.
191
- *
192
- * The original array is not modified. If no `initialValue` is given and the
193
- * array doesn't contain at least 2 items, the callback will not be called and
194
- * `undefined` is returned. If no `initialValue` is given and the array contains
195
- * at least two items, the first element is used as the initial value. If
196
- * `initialValue` is given and the array doesn't have at least 1 item,
197
- * `initialValue` is returned.
198
- *
199
- * @param values The array of values to iterate over.
200
- * @param reducer The reducer function.
201
- * @param initialValue Optional. The initial seed value for the reducer
202
- * function.
203
- */
204
- export declare function reduce<T, U>(values: PromiseLike<Iterable<PromiseLike<T>>>, reducer: (total: U, current: T, index: number) => U | PromiseLike<U>, initialValue?: U): Promise<U>;
205
- /**
206
- * Reduce an array, or a promise of an array, which contains a promises (or a
207
- * mix of promises and values) with the given reducer function with the
208
- * signature `(total, current, index)` where `current` is the resolved value of
209
- * a respective promise in the input array. If any promise in the input array is
210
- * rejected the returned promise is rejected as well.
211
- *
212
- * If the reducer function returns a promise or a thenable, the result for the
213
- * promise is awaited for before continuing with next iteration.
214
- *
215
- * The original array is not modified. If no `initialValue` is given and the
216
- * array doesn't contain at least 2 items, the callback will not be called and
217
- * `undefined` is returned. If no `initialValue` is given and the array contains
218
- * at least two items, the first element is used as the initial value. If
219
- * `initialValue` is given and the array doesn't have at least 1 item,
220
- * `initialValue` is returned.
221
- *
222
- * @param values The array of values to iterate over.
223
- * @param reducer The reducer function.
224
- * @param initialValue Optional. The initial seed value for the reducer
225
- * function.
226
- */
227
- export declare function reduce<T, U>(values: PromiseLike<Iterable<T>>, reducer: (total: U, current: T, index: number) => U | PromiseLike<U>, initialValue?: U): Promise<U>;
228
- /**
229
- * Reduce an array, or a promise of an array, which contains a promises (or a
230
- * mix of promises and values) with the given reducer function with the
231
- * signature `(total, current, index)` where `current` is the resolved value of
232
- * a respective promise in the input array. If any promise in the input array is
233
- * rejected the returned promise is rejected as well.
234
- *
235
- * If the reducer function returns a promise or a thenable, the result for the
236
- * promise is awaited for before continuing with next iteration.
237
- *
238
- * The original array is not modified. If no `initialValue` is given and the
239
- * array doesn't contain at least 2 items, the callback will not be called and
240
- * `undefined` is returned. If no `initialValue` is given and the array contains
241
- * at least two items, the first element is used as the initial value. If
242
- * `initialValue` is given and the array doesn't have at least 1 item,
243
- * `initialValue` is returned.
244
- *
245
- * @param values The array of values to iterate over.
246
- * @param reducer The reducer function.
247
- * @param initialValue Optional. The initial seed value for the reducer
248
- * function.
249
- */
250
- export declare function reduce<T, U>(values: Iterable<PromiseLike<T>>, reducer: (total: U, current: T, index: number) => U | PromiseLike<U>, initialValue?: U): Promise<U>;
60
+ export declare function parallelEach<T, U>(values: Iterable<T | PromiseLike<T>> | PromiseLike<Iterable<T | PromiseLike<T>>>, iterator: (item: T, index: number) => U | PromiseLike<U>): Promise<void>;
251
61
  /**
252
62
  * Reduce an array, or a promise of an array, which contains a promises (or a
253
63
  * mix of promises and values) with the given reducer function with the
@@ -270,7 +80,8 @@ export declare function reduce<T, U>(values: Iterable<PromiseLike<T>>, reducer:
270
80
  * @param initialValue Optional. The initial seed value for the reducer
271
81
  * function.
272
82
  */
273
- export declare function reduce<T, U>(values: Iterable<T>, reducer: (total: U, current: T, index: number) => U | PromiseLike<U>, initialValue?: U): Promise<U>;
83
+ export declare function reduce<T, U>(values: Iterable<T | PromiseLike<T>> | PromiseLike<Iterable<T | PromiseLike<T>>>, reducer: (total: U, current: T, index: number) => U | PromiseLike<U>, initialValue: U): Promise<U>;
84
+ export declare function reduce<T, U>(values: Iterable<T | PromiseLike<T>> | PromiseLike<Iterable<T | PromiseLike<T>>>, reducer: (total: U, current: T, index: number) => U | PromiseLike<U>): Promise<U | undefined>;
274
85
  type Awaited<T> = T extends PromiseLike<infer PT> ? PT : T;
275
86
  /**
276
87
  * Like `Promise.all` but for object properties instead of array items. Returns
@@ -1 +1 @@
1
- import{checkArg as t}from"./checkArg.js";import{map as a}from"./iterable.js";export function delay(t=0){return new Promise((a=>{setTimeout(a,t)}))}export async function timeout(t,a,i){let e=!1;return new Promise((async(r,s)=>{setTimeout((()=>{e||s("string"==typeof i?new Error(i):i||new Error("Timed out while waiting for promise to resolve."))}),t);try{r(await a)}catch(t){s(t)}finally{e=!0}}))}export async function map(i,e){t("values",i).isNotMissing(),t("mapper",e).isNotMissing();const r=Array.from(a(await i,(async(t,a)=>e(await t,a))));return Promise.all(r)}export async function each(a,i){t("values",a).isNotMissing(),t("iterator",i).isNotMissing();const e=await a;let r=0;for(const t of e)await i(await t,r++)}export async function parallelEach(t,a){await map(t,a)}export function reduce(a,i,e){const r=arguments.length;return(async()=>{t("values",a).isNotMissing(),t("reducer",i).isNotMissing();let s=[...await a],n=e;if(r<3){if(s.length<2)return;n=await s[0],s=s.slice(1)}for(let t=0;t<s.length;t++)n=await i(n,await s[t],t);return n})()}export async function props(a){t("object",a).isNotMissing().satisfies((t=>"object"==typeof t));const i={},e=await a;return await parallelEach(Object.keys(e),(async t=>{const a=await e[t];e.hasOwnProperty(t)&&(i[t]=a)})),i}export async function asyncFlatMap(t,a){return(await Promise.all(t.map(a))).flat()}
1
+ import{checkArg as t}from"./checkArg.js";import{map as a}from"./iterable.js";export function delay(t=0){return new Promise((a=>{setTimeout(a,t)}))}export async function timeout(t,a,i){let e=!1;return new Promise((async(r,s)=>{setTimeout((()=>{e||s("string"==typeof i?new Error(i):i||new Error("Timed out while waiting for promise to resolve."))}),t);try{r(await a)}catch(t){s(t)}finally{e=!0}}))}export async function map(i,e){t("values",i).isNotMissing(),t("mapper",e).isNotMissing();const r=Array.from(a(await i,(async(t,a)=>e(await t,a))));return Promise.all(r)}export async function each(a,i){t("values",a).isNotMissing(),t("iterator",i).isNotMissing();const e=await a;let r=0;for(const t of e)await i(await t,r++)}export async function parallelEach(t,a){await map(t,a)}export function reduce(a,i,e){const r=arguments.length;return(async()=>{t("values",a).isNotMissing(),t("reducer",i).isNotMissing();const s=[...await a];let n=e;if(r<3){if(s.length<2)return;n=await s.shift()}for(let t=0;t<s.length;t++)n=await i(n,await s[t],t);return n})()}export async function props(a){t("object",a).isNotMissing().satisfies((t=>"object"==typeof t));const i={},e=await a;return await parallelEach(Object.keys(e),(async t=>{const a=await e[t];e.hasOwnProperty(t)&&(i[t]=a)})),i}export async function asyncFlatMap(t,a){return(await Promise.all(t.map(a))).flat()}
@@ -38,9 +38,9 @@ export declare const getNextScale: (currentScale: number, scaleLevels?: number)
38
38
  *
39
39
  * @param id The Scale ID.
40
40
  */
41
- export declare const getScaleRange: (id: ScaleId) => number | undefined;
41
+ export declare const getScaleRange: (id: ScaleId) => number;
42
42
  /**
43
- * A list of esri well known scale ranges. Copied from
43
+ * A list of esri well known scale ranges. See
44
44
  * arcgis-js-api\widgets\ScaleRangeSlider\ScaleRanges.js.
45
45
  */
46
46
  export declare const wellKnownScaleRanges: ScaleRange[];
@@ -1 +1 @@
1
- export const expandExtentToScale=(e,l,s)=>{const c=e.width/l*s/e.width;return e.clone().expand(c)};export const getNextScale=(e,l=1)=>{let s=l;for(const l of wellKnownScaleRanges)if(l.scale>e&&0==--s)return l.scale};export const getScaleRange=e=>wellKnownScaleRanges.find((l=>l.id===e))?.scale;export const wellKnownScaleRanges=[{id:"room",scale:100},{id:"rooms",scale:400},{id:"smallBuilding",scale:800},{id:"building",scale:1999},{id:"buildings",scale:3999},{id:"street",scale:7499},{id:"streets",scale:14999},{id:"neighborhood",scale:29999},{id:"town",scale:59999},{id:"city",scale:119999},{id:"cities",scale:249999},{id:"metropolitanArea",scale:499999},{id:"county",scale:999999},{id:"counties",scale:1999999},{id:"stateProvince",scale:3999999},{id:"statesProvinces",scale:6999999},{id:"countriesSmall",scale:14999999},{id:"countriesBig",scale:34999999},{id:"continent",scale:99999999},{id:"world",scale:147914382}];
1
+ export const expandExtentToScale=(e,t,n)=>{const o=e.width/t*n/e.width;return e.clone().expand(o)};export const getNextScale=(e,t=1)=>{let n=t;for(const t of wellKnownScaleRanges)if(t.scale>e&&0==--n)return t.scale};export const getScaleRange=t=>e[t];const e={room:100,rooms:400,smallBuilding:800,building:1999,buildings:3999,street:7499,streets:14999,neighborhood:29999,town:59999,city:119999,cities:249999,metropolitanArea:499999,county:999999,counties:1999999,stateProvince:3999999,statesProvinces:6999999,countriesSmall:14999999,countriesBig:34999999,continent:99999999,world:147914382};export const wellKnownScaleRanges=Object.entries(e).map((e=>({id:e[0],scale:e[1]})));
@@ -87,8 +87,10 @@ export declare class Uri {
87
87
  * Determines whether a URI is relative.
88
88
  *
89
89
  * @param uri The URI to check.
90
+ * @returns `true` if the URI is relative, empty, or undefined; otherwise,
91
+ * `false`.
90
92
  */
91
- export declare function isRelativeUri(uri: string): boolean;
93
+ export declare function isRelativeUri(uri: string | undefined): boolean;
92
94
  /**
93
95
  * Determines whether a URI is absolute.
94
96
  *
package/version.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * The current version of the Geocortex ArcGIS Extensions API.
3
3
  */
4
- export declare const version = "48.3.3";
4
+ export declare const version = "48.3.5";
package/version.js CHANGED
@@ -1 +1 @@
1
- export const version="48.3.3";
1
+ export const version="48.3.5";