@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.
Files changed (87) hide show
  1. package/agssearch/api.d.ts +5 -4
  2. package/apprt/event/EventConstants.d.ts +1 -1
  3. package/apprt-core/AsyncTask.d.ts +4 -5
  4. package/apprt-core/BlockingTaskExecutor.d.ts +4 -6
  5. package/apprt-core/CancelablePromise.d.ts +6 -5
  6. package/apprt-core/Events.d.ts +23 -21
  7. package/apprt-core/Exception.d.ts +9 -9
  8. package/apprt-core/Logger.d.ts +7 -7
  9. package/apprt-core/Mutable.d.ts +35 -39
  10. package/apprt-core/Observable.d.ts +8 -6
  11. package/apprt-core/Observers.d.ts +40 -34
  12. package/apprt-core/Promise.d.ts +3 -3
  13. package/apprt-core/TaskExecutor.d.ts +3 -3
  14. package/apprt-core/assignWithPrototype.d.ts +23 -20
  15. package/apprt-core/async.d.ts +6 -6
  16. package/apprt-core/base64.d.ts +2 -2
  17. package/apprt-core/bindAsync.d.ts +9 -12
  18. package/apprt-core/clone.d.ts +13 -15
  19. package/apprt-core/comparators.d.ts +7 -7
  20. package/apprt-core/config.d.ts +5 -1
  21. package/apprt-core/delegate.d.ts +9 -9
  22. package/apprt-core/deprecate.d.ts +1 -1
  23. package/apprt-core/equals.d.ts +2 -2
  24. package/apprt-core/freeze.d.ts +1 -1
  25. package/apprt-core/global.d.ts +1 -1
  26. package/apprt-core/join.d.ts +14 -11
  27. package/apprt-core/load-css.d.ts +4 -4
  28. package/apprt-core/load-js.d.ts +5 -5
  29. package/apprt-core/promise-utils.d.ts +23 -23
  30. package/apprt-core/propertyToSymbol.d.ts +1 -1
  31. package/apprt-core/string-escape.d.ts +1 -1
  32. package/apprt-core/string-pattern.d.ts +1 -1
  33. package/apprt-core/string-replace.d.ts +10 -10
  34. package/apprt-core/url-utils.d.ts +2 -2
  35. package/apprt-core/when.d.ts +3 -3
  36. package/apprt-dom/index.d.ts +7 -7
  37. package/apprt-fetch/index.d.ts +17 -17
  38. package/apprt-streams/Stream.d.ts +34 -34
  39. package/coordinatetransformer/api/CoordinateTransformer.d.ts +15 -10
  40. package/coordinatetransformer/api/ProjectionStore.d.ts +7 -6
  41. package/coordinatetransformer/api/TransformationProvider.d.ts +11 -4
  42. package/coordinatetransformer/api/TransformerStrategy.d.ts +8 -5
  43. package/ct/util/css.d.ts +9 -8
  44. package/domains-system/api.d.ts +26 -30
  45. package/highlights/api.d.ts +6 -11
  46. package/integration-map/api.d.ts +38 -35
  47. package/map-actions/api.d.ts +9 -5
  48. package/map-config-api/api.d.ts +31 -3
  49. package/map-init/api.d.ts +5 -5
  50. package/map-widget/Constraints.d.ts +1 -1
  51. package/map-widget/LayerObserver.d.ts +6 -2
  52. package/map-widget/LayerTraverser.d.ts +4 -1
  53. package/map-widget/MapWidgetFactory.d.ts +1 -1
  54. package/map-widget/MapWidgetModel.d.ts +1 -1
  55. package/map-widget/ViewReadyWatcher.d.ts +1 -1
  56. package/map-widget/__internal__/{I0BOBZBz.d.ts → DFiGfJS1.d.ts} +3 -3
  57. package/map-widget/api/Constraints.d.ts +1 -1
  58. package/map-widget/api/MapWidget.d.ts +1 -1
  59. package/map-widget/api/MapWidgetFactory.d.ts +1 -1
  60. package/map-widget/api/MapWidgetModel.d.ts +1 -1
  61. package/map-widget/api/MapWidgetRegistration.d.ts +23 -12
  62. package/map-widget/api/SrsChangeService.d.ts +1 -1
  63. package/map-widget/api/index.d.ts +1 -1
  64. package/package.json +1 -1
  65. package/popups/ContentUpdateProxy.d.ts +61 -33
  66. package/popups/api.d.ts +35 -38
  67. package/portal-security/api.d.ts +48 -0
  68. package/portal-security/package.json +5 -0
  69. package/result-api/__internal__/{Cf0JLId0.d.ts → LZ4ypyEL.d.ts} +12 -12
  70. package/result-api/api/actions.d.ts +1 -1
  71. package/result-api/api/formatting.d.ts +1 -1
  72. package/result-api/api/index.d.ts +1 -1
  73. package/result-api/api/model.d.ts +1 -1
  74. package/result-api/api/service.d.ts +3 -3
  75. package/result-api/api/ui.d.ts +2 -2
  76. package/search-api/api.d.ts +8 -1
  77. package/search-ui/api.d.ts +2 -2
  78. package/selection-resultcenter/CachingStore.d.ts +3 -3
  79. package/store-api/ComplexQuery.d.ts +1 -1
  80. package/store-api/QueryExecution.d.ts +12 -11
  81. package/store-api/QueryExecutions.d.ts +3 -2
  82. package/store-api/SpatialQuery.d.ts +9 -9
  83. package/store-api/utils.d.ts +9 -9
  84. package/toc/api/Action.d.ts +3 -0
  85. package/toc/api/Item.d.ts +4 -1
  86. package/toc/api/StateChecker.d.ts +3 -0
  87. package/toc/api/index.d.ts +3 -0
@@ -38,10 +38,10 @@ interface IntegrationExtension {
38
38
  * @param callback function to be informed when map is ready for change
39
39
  *
40
40
  * @example <caption>wait until map is ready</caption>
41
- * ```js
42
- * api.whenMapReady(function(){
43
- * api.zoomTo(...)
44
- * });
41
+ * ```ts
42
+ * api.whenMapReady(function () {
43
+ * api.zoomTo(geom);
44
+ * });
45
45
  * ```
46
46
  */
47
47
  whenMapReady(callback: () => any): Promise<void>;
@@ -52,13 +52,16 @@ interface IntegrationExtension {
52
52
  * @param options Options used to zoom
53
53
  *
54
54
  * @example <caption>zoom to point</caption>
55
- * ```js
56
- * api.zoomTo({
57
- * x: 7,
58
- * y: 52
59
- * },{
60
- * scale: 5000
61
- * });
55
+ * ```ts
56
+ * api.zoomTo(
57
+ * {
58
+ * x: 7,
59
+ * y: 52
60
+ * },
61
+ * {
62
+ * scale: 5000
63
+ * }
64
+ * );
62
65
  * ```
63
66
  */
64
67
  zoomTo(geom: any, options?: ZoomOptions): Promise<void>;
@@ -75,7 +78,7 @@ interface IntegrationExtension {
75
78
  *
76
79
  * @example <caption>Highlight geometry</caption>
77
80
  *
78
- * ```js
81
+ * ```ts
79
82
  * api.highlight({
80
83
  * x: 7,
81
84
  * y: 52
@@ -84,36 +87,36 @@ interface IntegrationExtension {
84
87
  *
85
88
  * @example <caption>Highlight geometry with custom symbol</caption>
86
89
  *
87
- * ```js
88
- * api.highlight({
89
- * geometry: {
90
- * x: 7,
91
- * y: 52
92
- * },
93
- * symbol: {
94
- * type: "simple-marker",
95
- * color: [0, 255, 255, 0.25],
96
- * size: 16,
97
- * outline: {
90
+ * ```ts
91
+ * api.highlight({
92
+ * geometry: {
93
+ * x: 7,
94
+ * y: 52
95
+ * },
96
+ * symbol: {
97
+ * type: "simple-marker",
98
+ * color: [0, 255, 255, 0.25],
99
+ * size: 16,
100
+ * outline: {
98
101
  * color: [0, 255, 255, 1],
99
102
  * width: 2
100
- * }
101
- * }
102
- * });
103
+ * }
104
+ * }
105
+ * });
103
106
  * ```
104
107
  *
105
108
  * @example <caption>Highlight geometry with custom popupTemplate</caption>
106
109
  *
107
- * ```js
108
- * api.highlight({
109
- * geometry: {
110
- * x: 7,
111
- * y: 52
112
- * },
113
- * popupTemplate: {
110
+ * ```ts
111
+ * api.highlight({
112
+ * geometry: {
113
+ * x: 7,
114
+ * y: 52
115
+ * },
116
+ * popupTemplate: {
114
117
  * title: "My City"
115
- * }
116
- * });
118
+ * }
119
+ * });
117
120
  * ```
118
121
  */
119
122
  highlight(geomOrGraphic: any): Promise<void>;
@@ -57,12 +57,16 @@ interface OpenPopupActionOptions extends ActionOptions {
57
57
  *
58
58
  * @example
59
59
  *
60
- * ```js
60
+ * ```ts
61
61
  * actionService.trigger(["zoomto"], {
62
- * items: [{geometry: new Point({
63
- * x: 7.5,
64
- * y: 52
65
- * })}],
62
+ * items: [
63
+ * {
64
+ * geometry: new Point({
65
+ * x: 7.5,
66
+ * y: 52
67
+ * })
68
+ * }
69
+ * ],
66
70
  * "zoomto-point-scale": 5000
67
71
  * });
68
72
  * ```
@@ -18,6 +18,8 @@ import MapImageLayer from 'esri/layers/MapImageLayer';
18
18
  import OGCFeatureLayer from 'esri/layers/OGCFeatureLayer';
19
19
  import OpenStreetMapLayer from 'esri/layers/OpenStreetMapLayer';
20
20
  import SceneLayer from 'esri/layers/SceneLayer';
21
+ import BuildingSceneLayer from 'esri/layers/BuildingSceneLayer';
22
+ import PointCloudLayer from 'esri/layers/PointCloudLayer';
21
23
  import StreamLayer from 'esri/layers/StreamLayer';
22
24
  import TileLayer from 'esri/layers/TileLayer';
23
25
  import VectorTileLayer from 'esri/layers/VectorTileLayer';
@@ -44,6 +46,8 @@ interface LayerTypesLookup {
44
46
  AGS_VECTORTILE: [VectorTileLayer, __esri.VectorTileLayerProperties];
45
47
  AGS_ELEVATION: [ElevationLayer, __esri.ElevationLayerProperties];
46
48
  AGS_SCENE: [SceneLayer, __esri.SceneLayerProperties];
49
+ AGS_BUILDING: [BuildingSceneLayer, __esri.BuildingSceneLayerProperties];
50
+ AGS_POINTCLOUD: [PointCloudLayer, __esri.PointCloudLayerProperties];
47
51
  AGS_STREAM: [StreamLayer, __esri.StreamLayerProperties];
48
52
  WFS: [WFSLayer, __esri.WFSLayerProperties];
49
53
  WMS: [WMSLayer, __esri.WMSLayerProperties];
@@ -89,6 +93,24 @@ type LayerType = ExtensibleUnion<WellKnownLayerType, string>;
89
93
  * Properties supported by a group layer.
90
94
  */
91
95
  type GroupLayerProperties = LayerPropertiesForType<"GROUP">;
96
+ /**
97
+ * Factory for layer types.
98
+ */
99
+ interface LayerTypeFactory {
100
+ /**
101
+ * Esri type of the layer produced e.g. "web-tiled".
102
+ * Transports the value of the layerInstance.type property
103
+ */
104
+ esriType?: string;
105
+ /**
106
+ * Creates instances of layers of a certain type.
107
+ */
108
+ create(opts: Record<string, any>): Promise<{
109
+ instance: any;
110
+ }> | {
111
+ instance: any;
112
+ };
113
+ }
92
114
  /**
93
115
  * Creates instances of layers of different types.
94
116
  *
@@ -149,7 +171,7 @@ interface BasemapConfigObject {
149
171
  /**
150
172
  * A well known Basemap id, such as `"streets-vector"`.
151
173
  *
152
- * Cannot be combined with {@link baseLayers}.
174
+ * Cannot be combined with {@link baseLayers} or {@link style}.
153
175
  */
154
176
  id?: string;
155
177
  /** @deprecated Use {@link baseLayers} instead. */
@@ -157,9 +179,15 @@ interface BasemapConfigObject {
157
179
  /**
158
180
  * Layers to use when constructed the new base map.
159
181
  *
160
- * Cannot be combined with {@link id}.
182
+ * Cannot be combined with {@link id} or {@link style}.
161
183
  */
162
184
  baseLayers?: LayerProperties[];
185
+ /**
186
+ * Basemap style to use when constructing the new basemap.
187
+ *
188
+ * Cannot be combined with {@link id} or {@link baseLayers}.
189
+ */
190
+ style?: __esri.BasemapStyleProperties;
163
191
  /**
164
192
  * Optional title for the new Basemap.
165
193
  */
@@ -307,4 +335,4 @@ interface GroundConfigParser {
307
335
  }>;
308
336
  }
309
337
 
310
- export type { BasemapConfigObject, BasemapConfigParser, BasemapParserOptions, ElevationLayerProperties, ExtendedLayerProperties, GroundConfigParser, GroundProperties, GroupLayerProperties, LayerClassForType, LayerConfigParser, LayerFactory, LayerProperties, LayerPropertiesForType, LayerType, WellKnownLayerType };
338
+ export type { BasemapConfigObject, BasemapConfigParser, BasemapParserOptions, ElevationLayerProperties, ExtendedLayerProperties, GroundConfigParser, GroundProperties, GroupLayerProperties, LayerClassForType, LayerConfigParser, LayerFactory, LayerProperties, LayerPropertiesForType, LayerType, LayerTypeFactory, WellKnownLayerType };
package/map-init/api.d.ts CHANGED
@@ -15,13 +15,13 @@ interface ConfigInterpreter {
15
15
  * @param config the json config input.
16
16
  * @example
17
17
  *
18
- * ```js
19
- * let interpreter = ...;
20
- * let result = interpreter.interpret({map: {basemap: "streets"}});
18
+ * ```ts
19
+ * const interpreter = ...;
20
+ * const result = interpreter.interpret({map: {basemap: "streets"}});
21
21
  * // create widget and model classes
22
- * let {mapWidget, mapWidgetModel, map, basemapsModel} = await result.toMapWidget();
22
+ * const {mapWidget, mapWidgetModel, map, basemapsModel} = await result.toMapWidget();
23
23
  * // alternative is to only create the model classes
24
- * let {mapWidgetModel, map, basemapsModel} = await result.toMapWidgetModel();
24
+ * const {mapWidgetModel, map, basemapsModel} = await result.toMapWidgetModel();
25
25
  * ```
26
26
  */
27
27
  interpret(config: Record<string, any>): InterpreterResult;
@@ -1,5 +1,5 @@
1
1
  import * as apprt_core_Mutable from 'apprt-core/Mutable';
2
- import { ViewMode, Constraints as Constraints$1 } from './__internal__/I0BOBZBz.js';
2
+ import { ViewMode, Constraints as Constraints$1 } from './__internal__/DFiGfJS1.js';
3
3
  import 'esri/geometry';
4
4
  import 'esri/layers/support/LOD';
5
5
  import 'esri/Camera';
@@ -6,6 +6,9 @@ import Map from 'esri/Map';
6
6
  import Collection from 'esri/core/Collection';
7
7
  import Sublayer from 'esri/layers/support/Sublayer';
8
8
  import WMSSublayer from 'esri/layers/support/WMSSublayer';
9
+ import BuildingGroupSublayer from 'esri/layers/buildingSublayers/BuildingGroupSublayer';
10
+ import BuildingComponentSublayer from 'esri/layers/buildingSublayers/BuildingComponentSublayer';
11
+ import BuildingSceneLayer from 'esri/layers/BuildingSceneLayer';
9
12
 
10
13
  type NotifyReason = "added" | "removed" | "moved";
11
14
  type Context = Context$1<LayerNode> & {
@@ -25,16 +28,17 @@ type Context = Context$1<LayerNode> & {
25
28
  moved: true;
26
29
  });
27
30
  };
31
+ type LayerType = Layer | Sublayer | WMSSublayer | BuildingGroupSublayer | BuildingSceneLayer | BuildingComponentSublayer;
28
32
  interface LayerObserverOptions {
29
33
  map: Map;
30
- layers: Collection<Layer | Sublayer | WMSSublayer>;
34
+ layers: Collection<LayerType>;
31
35
  onlyWatching: boolean;
32
36
  notify(layer: LayerNode, context: Context): void;
33
37
  filter(layer: LayerNode, context: Context): undefined | boolean | VisitCodes;
34
38
  }
35
39
  interface LayerObserver {
36
40
  map: Map | undefined;
37
- layers: Collection<Layer | Sublayer | WMSSublayer> | undefined;
41
+ layers: Collection<LayerType> | undefined;
38
42
  start(skipInitial?: boolean): void;
39
43
  stop(skipCleanup?: boolean): void;
40
44
  }
@@ -4,12 +4,15 @@ import Collection from 'esri/core/Collection';
4
4
  import Layer from 'esri/layers/Layer';
5
5
  import Sublayer from 'esri/layers/support/Sublayer';
6
6
  import WMSSublayer from 'esri/layers/support/WMSSublayer';
7
+ import BuildingGroupSublayer from 'esri/layers/buildingSublayers/BuildingGroupSublayer';
8
+ import BuildingComponentSublayer from 'esri/layers/buildingSublayers/BuildingComponentSublayer';
9
+ import BuildingSceneLayer from 'esri/layers/BuildingSceneLayer';
7
10
  import Map from 'esri/Map';
8
11
 
9
12
  interface LayerTraverser {
10
13
  traverse(localOptions?: Partial<LayerTraverserOptions>): void;
11
14
  }
12
- type LayerLike = Layer | Sublayer | WMSSublayer | Map | {
15
+ type LayerLike = Layer | Sublayer | WMSSublayer | BuildingGroupSublayer | BuildingSceneLayer | BuildingComponentSublayer | Map | {
13
16
  layers: LayerNode[] | Collection<LayerNode>;
14
17
  };
15
18
  type LayerNode = LayerLike & {
@@ -1,6 +1,6 @@
1
1
  /// <reference types="arcgis-js-api" />
2
2
  import Map from 'esri/Map';
3
- import { MapWidgetModel } from './__internal__/I0BOBZBz.js';
3
+ import { MapWidgetModel } from './__internal__/DFiGfJS1.js';
4
4
  import { MapWidget } from './api/MapWidget.js';
5
5
  import { MapWidgetFactory as MapWidgetFactory$1 } from './api/MapWidgetFactory.js';
6
6
  import 'apprt-core/Mutable';
@@ -1,4 +1,4 @@
1
- import { MapWidgetModelMembers, MapWidgetModel as MapWidgetModel$1 } from './__internal__/I0BOBZBz.js';
1
+ import { MapWidgetModelMembers, MapWidgetModel as MapWidgetModel$1 } from './__internal__/DFiGfJS1.js';
2
2
  import 'apprt-core/Mutable';
3
3
  import 'esri/geometry';
4
4
  import 'esri/layers/support/LOD';
@@ -1,4 +1,4 @@
1
- import { MapWidgetModel } from './__internal__/I0BOBZBz.js';
1
+ import { MapWidgetModel } from './__internal__/DFiGfJS1.js';
2
2
  import 'apprt-core/Mutable';
3
3
  import 'esri/geometry';
4
4
  import 'esri/layers/support/LOD';
@@ -244,7 +244,7 @@ interface ConstraintsMembers {
244
244
  * Specifies a constraint on the minimum and maximum allowed camera altitude. Only valid for 3D.
245
245
  *
246
246
  * @example
247
- * ```js
247
+ * ```ts
248
248
  * constraints.altitude = {
249
249
  * // The minimum allowed camera altitude (in meters).
250
250
  * min: 1000,
@@ -258,7 +258,7 @@ interface ConstraintsMembers {
258
258
  * Specifies the near and far webgl clip distances. Only valid for 3D.
259
259
  *
260
260
  * @example
261
- * ```js
261
+ * ```ts
262
262
  * constraints.clipDistance = {
263
263
  * // The near clip distance.
264
264
  * near: 100,
@@ -278,7 +278,7 @@ interface ConstraintsMembers {
278
278
  * Specifies a constraint on the amount of allowed tilting of the view. Only valid for 3D.
279
279
  *
280
280
  * @example
281
- * ```js
281
+ * ```ts
282
282
  * constraints.tilt = {
283
283
  * // Specifies the maximum amount of tilt (in degrees) allowed in the view and may range from 0.5 to 179.5
284
284
  * // degrees.
@@ -1,7 +1,7 @@
1
1
  import 'apprt-core/Mutable';
2
2
  import 'esri/geometry';
3
3
  import 'esri/layers/support/LOD';
4
- export { Constraints, ConstraintsMembers } from '../__internal__/I0BOBZBz.js';
4
+ export { Constraints, ConstraintsMembers } from '../__internal__/DFiGfJS1.js';
5
5
  import 'esri/Camera';
6
6
  import 'esri/Map';
7
7
  import 'esri/TimeExtent';
@@ -1,4 +1,4 @@
1
- import { MapWidgetModel } from '../__internal__/I0BOBZBz.js';
1
+ import { MapWidgetModel } from '../__internal__/DFiGfJS1.js';
2
2
  import 'apprt-core/Mutable';
3
3
  import 'esri/geometry';
4
4
  import 'esri/layers/support/LOD';
@@ -1,7 +1,7 @@
1
1
  /// <reference types="arcgis-js-api" />
2
2
  import Map from 'esri/Map';
3
3
  import { MapWidget } from './MapWidget.js';
4
- import { MapWidgetModelMembers, MapWidgetModel } from '../__internal__/I0BOBZBz.js';
4
+ import { MapWidgetModelMembers, MapWidgetModel } from '../__internal__/DFiGfJS1.js';
5
5
  import 'apprt-core/Mutable';
6
6
  import 'esri/geometry';
7
7
  import 'esri/layers/support/LOD';
@@ -6,6 +6,6 @@ import 'esri/TimeExtent';
6
6
  import 'esri/Viewpoint';
7
7
  import 'esri/views/MapView';
8
8
  import 'esri/views/SceneView';
9
- export { MapWidgetModel, MapWidgetModelMembers, View, ViewMode, ViewPadding } from '../__internal__/I0BOBZBz.js';
9
+ export { MapWidgetModel, MapWidgetModelMembers, View, ViewMode, ViewPadding } from '../__internal__/DFiGfJS1.js';
10
10
  import './Navigation.js';
11
11
  import 'esri/layers/support/LOD';
@@ -1,7 +1,7 @@
1
1
  /// <reference types="arcgis-js-api" />
2
2
  import Map from 'esri/Map';
3
3
  import { MapWidget } from './MapWidget.js';
4
- import { MapWidgetModel } from '../__internal__/I0BOBZBz.js';
4
+ import { MapWidgetModel } from '../__internal__/DFiGfJS1.js';
5
5
  import 'apprt-core/Mutable';
6
6
  import 'esri/geometry';
7
7
  import 'esri/layers/support/LOD';
@@ -34,17 +34,28 @@ interface MapWidgetRegistration {
34
34
  * @param params components to register `{ map, mapWidgetModel, mapWidget }`
35
35
  *
36
36
  * @example
37
- * ```js
38
- * let mapregistration = this._mapregistration;
39
- * let mapfactory = this._mapfactory;
40
- * let map = mapfactory.createMap({...});
41
- * let model = mapfactory.createWidgetModel({map, ...});
42
- * let widget = mapfactory.createWidget({model});
43
- * mapregistration.register({
44
- * map : map,
45
- * mapWidgetModel : model,
46
- * mapWidget: widget
47
- * });
37
+ * ```ts
38
+ * import { InjectedReference } from "apprt-core/InjectedReference";
39
+ * import { MapWidgetRegistration } from "map-widget/MapWidgetRegistration";
40
+ * import MapWidgetFactory from "map-widget/MapWidgetFactory";
41
+ *
42
+ * class MyComponent {
43
+ * private _mapregistration: InjectedReference<MapWidgetRegistration>;
44
+ * private _mapfactory: InjectedReference<MapWidgetFactory>;
45
+ *
46
+ * activate() {
47
+ * const mapregistration = this._mapregistration!;
48
+ * const mapfactory = this._mapfactory!;
49
+ * const map = mapfactory.createMap({...});
50
+ * const model = mapfactory.createWidgetModel({map, ...});
51
+ * const widget = mapfactory.createWidget({model});
52
+ * mapregistration.register({
53
+ * map: map,
54
+ * mapWidgetModel: model,
55
+ * mapWidget: widget
56
+ * });
57
+ * }
58
+ * }
48
59
  * ```
49
60
  */
50
61
  register(params: {
@@ -1,7 +1,7 @@
1
1
  /// <reference types="arcgis-js-api" />
2
2
  import { SpatialReference } from 'esri/geometry';
3
3
  import { MapWidget } from './MapWidget.js';
4
- import '../__internal__/I0BOBZBz.js';
4
+ import '../__internal__/DFiGfJS1.js';
5
5
  import 'apprt-core/Mutable';
6
6
  import 'esri/layers/support/LOD';
7
7
  import 'esri/Camera';
@@ -1,4 +1,4 @@
1
- export { Constraints, ConstraintsMembers, MapWidgetModel, MapWidgetModelMembers, View, ViewMode, ViewPadding } from '../__internal__/I0BOBZBz.js';
1
+ export { Constraints, ConstraintsMembers, MapWidgetModel, MapWidgetModelMembers, View, ViewMode, ViewPadding } from '../__internal__/DFiGfJS1.js';
2
2
  export { Navigation, NavigationMembers } from './Navigation.js';
3
3
  export { MapWidget } from './MapWidget.js';
4
4
  export { MapWidgetFactory } from './MapWidgetFactory.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conterra/ct-mapapps-typings",
3
- "version": "4.18.4-next.20241007040658",
3
+ "version": "4.18.4-next.20241009040310",
4
4
  "description": "TypeDefinitions for ct-mapapps",
5
5
  "author": "conterra",
6
6
  "license": "Apache-2.0"
@@ -23,43 +23,71 @@ interface WidgetProxy {
23
23
  * if the popup handles multiple feature hits.
24
24
  *
25
25
  * @example
26
- * ```js
27
- * import ContentUpdateProxy from "./ContentUpdateProxy";
26
+ * ```ts
27
+ * import VueDijit from "apprt-vue/VueDijit";
28
+ * import Graphic from "esri/Graphic";
29
+ * import Layer from "esri/layers/Layer";
30
+ * import { PopupDefinition, PopupTemplateDefinition } from "popups/api";
31
+ * import ContentUpdateProxy, { WidgetProxy } from "popups/ContentUpdateProxy";
32
+ * import { Store } from "store-api/api";
33
+ * import Vue from "vue/types/umd.js";
34
+ * import { CustomPopupWidget } from "./CustomPopupWidget.vue";
28
35
  *
29
- * export default function CustomWidgetPopupDefinition() {
30
- * return {
31
- * resolvePopupTemplate(layer) {
32
- * return {
33
- * outFields: ["objectid", "Name", "Description"],
34
- * title: "This is {Name}",
36
+ * /**
37
+ * * Type allowing to access the popup widget of a layer or store.
38
+ * *\/
39
+ * type PopupWidgetAware<T> = T & {
40
+ * _$popup_widget?: any;
41
+ * }
42
+ *
43
+ * function createWidget() {
44
+ * return VueDijit(new Vue(CustomPopupWidget));
45
+ * }
35
46
  *
36
- * // Define a content function
37
- * content({graphic}) {
38
- * let widget = layer._$popup_widget;
39
- * if (!widget) {
40
- * widget = layer._$popup_widget = createWidget();
41
- * // widget is a dijit Widget
42
- * widget.startup();
43
- * }
47
+ * export class CustomWidgetPopupDefinition implements PopupDefinition {
48
+ * resolvePopupTemplate(layerArg: Layer): PopupTemplateDefinition | undefined {
49
+ * const layer = layerArg as PopupWidgetAware<Layer>;
50
+ * return {
51
+ * // Declare which fields should be fetched
52
+ * // These are provided as attributes inside the graphic
53
+ * outFields: ["objectid", "Name", "Description"],
44
54
  *
45
- * // Use the proxy to handle content updates
46
- * // This ensures, that the correct content for every feature is shown,
47
- * // if the popup handles multiple feature hits
48
- * return ContentUpdateProxy(graphic, widget, (graphic) => {
49
- * updateWidgetContent(widget, graphic);
50
- * });
55
+ * // title may contain attributes from the fields array
56
+ * title: "This is {Name}",
57
+ *
58
+ * // Define a content function
59
+ * // NOTE:
60
+ * // * Can return a Promise(dojo/Deferred required in 4.7)
61
+ * // * This is global window, be careful about that!
62
+ * content({graphic}: {graphic: Graphic}): WidgetProxy {
63
+ * let widget = layer._$popup_widget;
64
+ * if (!widget) {
65
+ * widget = layer._$popup_widget = createWidget();
66
+ * // widget is a dijit Widget
67
+ * widget.startup();
51
68
  * }
52
- * };
53
- * }
54
- * resolvePopupTemplateForStore(store) {
55
- * // analogue to resolvePopupTemplate(layer)
56
- * }
57
- * cleanupPopupTemplate(layerOrStore) {
58
- * let widget = layerOrStore._$popup_widget;
59
- * delete layerOrStore._$popup_widget;
60
- * widget && widget.destroyRecursive();
61
- * }
62
- * };
69
+ *
70
+ * // Use the proxy to handle content updates
71
+ * // This ensures, that the correct content for every feature is shown,
72
+ * // if the popup handles multiple feature hits
73
+ * return ContentUpdateProxy(graphic, widget, (graphic) => {
74
+ * // update the widget content
75
+ * });
76
+ * }
77
+ * };
78
+ * }
79
+ * resolvePopupTemplateForStore(
80
+ * store: Store,
81
+ * storeProperties: Record<string, any>
82
+ * ): PopupTemplateDefinition | undefined | Promise<PopupTemplateDefinition | undefined> {
83
+ * // analogue to resolvePopupTemplate(layer)
84
+ * }
85
+ * cleanupPopupTemplate?(layerOrStoreArg: Layer | Store): void {
86
+ * const layerOrStore = layerOrStoreArg as PopupWidgetAware<Layer | Store>;
87
+ * const widget = layerOrStore._$popup_widget;
88
+ * delete layerOrStore._$popup_widget;
89
+ * widget && widget.destroyRecursive();
90
+ * }
63
91
  * }
64
92
  * ```
65
93
  */