@esri/solutions-components 0.8.4 → 0.8.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. package/dist/assets/t9n/crowdsource-reporter/resources.json +5 -6
  2. package/dist/assets/t9n/crowdsource-reporter/resources_en.json +5 -6
  3. package/dist/assets/t9n/feature-list/resources.json +1 -1
  4. package/dist/assets/t9n/feature-list/resources_en.json +1 -1
  5. package/dist/assets/t9n/public-notification/resources.json +3 -1
  6. package/dist/assets/t9n/public-notification/resources_en.json +3 -1
  7. package/dist/cjs/buffer-tools_3.cjs.entry.js +2 -2
  8. package/dist/cjs/calcite-alert_4.cjs.entry.js +2 -2
  9. package/dist/cjs/calcite-combobox_5.cjs.entry.js +2 -2
  10. package/dist/cjs/calcite-flow_5.cjs.entry.js +163 -16
  11. package/dist/cjs/card-manager_3.cjs.entry.js +41 -2
  12. package/dist/cjs/crowdsource-manager.cjs.entry.js +2 -1
  13. package/dist/cjs/crowdsource-reporter.cjs.entry.js +120 -38
  14. package/dist/cjs/loader.cjs.js +1 -1
  15. package/dist/cjs/map-select-tools_3.cjs.entry.js +2 -2
  16. package/dist/cjs/public-notification.cjs.entry.js +110 -4
  17. package/dist/cjs/{publicNotificationStore-ef379d11.js → publicNotificationStore-e790601d.js} +2 -2
  18. package/dist/cjs/solutions-components.cjs.js +1 -1
  19. package/dist/collection/collection-manifest.json +1 -1
  20. package/dist/collection/components/create-feature/create-feature.css +9 -0
  21. package/dist/collection/components/create-feature/create-feature.js +134 -6
  22. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +19 -1
  23. package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.css +5 -0
  24. package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +120 -38
  25. package/dist/collection/components/feature-list/feature-list.js +93 -5
  26. package/dist/collection/components/info-card/info-card.css +1 -1
  27. package/dist/collection/components/info-card/info-card.js +1 -1
  28. package/dist/collection/components/layer-list/layer-list.js +6 -6
  29. package/dist/collection/components/map-card/map-card.js +27 -2
  30. package/dist/collection/components/map-draw-tools/map-draw-tools.js +1 -1
  31. package/dist/collection/components/map-layer-picker/map-layer-picker.js +1 -1
  32. package/dist/collection/components/map-select-tools/map-select-tools.js +1 -1
  33. package/dist/collection/components/public-notification/public-notification.js +110 -3
  34. package/dist/collection/demos/crowdsource-reporter.html +1 -1
  35. package/dist/collection/utils/interfaces.ts +7 -0
  36. package/dist/collection/utils/publicNotificationStore.js +2 -2
  37. package/dist/collection/utils/publicNotificationStore.ts +3 -2
  38. package/dist/components/create-feature2.js +111 -7
  39. package/dist/components/crowdsource-manager.js +3 -1
  40. package/dist/components/crowdsource-reporter.js +121 -39
  41. package/dist/components/feature-list2.js +54 -6
  42. package/dist/components/info-card2.js +2 -2
  43. package/dist/components/layer-list2.js +6 -6
  44. package/dist/components/map-card2.js +42 -2
  45. package/dist/components/map-draw-tools2.js +1 -1
  46. package/dist/components/map-layer-picker2.js +1 -1
  47. package/dist/components/map-select-tools2.js +1 -1
  48. package/dist/components/public-notification.js +110 -3
  49. package/dist/components/publicNotificationStore.js +2 -2
  50. package/dist/esm/buffer-tools_3.entry.js +2 -2
  51. package/dist/esm/calcite-alert_4.entry.js +3 -3
  52. package/dist/esm/calcite-combobox_5.entry.js +3 -3
  53. package/dist/esm/calcite-flow_5.entry.js +164 -17
  54. package/dist/esm/card-manager_3.entry.js +43 -4
  55. package/dist/esm/crowdsource-manager.entry.js +3 -2
  56. package/dist/esm/crowdsource-reporter.entry.js +121 -39
  57. package/dist/esm/{downloadUtils-0c13073b.js → downloadUtils-0c1e4d7b.js} +2 -2
  58. package/dist/esm/{index.es-ad250bc6.js → index.es-286e3cfa.js} +2 -2
  59. package/dist/esm/loader.js +1 -1
  60. package/dist/esm/map-select-tools_3.entry.js +4 -4
  61. package/dist/esm/{mapViewUtils-20504620.js → mapViewUtils-253178f1.js} +1 -1
  62. package/dist/esm/public-notification.entry.js +112 -6
  63. package/dist/esm/{publicNotificationStore-3bf4de75.js → publicNotificationStore-223faed2.js} +2 -2
  64. package/dist/esm/solutions-components.js +1 -1
  65. package/dist/solutions-components/demos/crowdsource-reporter.html +1 -1
  66. package/dist/solutions-components/p-15f9624a.entry.js +6 -0
  67. package/dist/solutions-components/{p-955647ea.entry.js → p-1ea5e061.entry.js} +2 -2
  68. package/dist/solutions-components/{p-590a2a26.js → p-212b02e7.js} +1 -1
  69. package/dist/solutions-components/p-238d3b5f.entry.js +6 -0
  70. package/dist/solutions-components/p-273d833b.entry.js +6 -0
  71. package/dist/solutions-components/{p-cc280aa1.js → p-322868ec.js} +1 -1
  72. package/dist/solutions-components/{p-1d3a1794.js → p-331b5d1e.js} +2 -2
  73. package/dist/solutions-components/{p-c897e3eb.js → p-3af79063.js} +1 -1
  74. package/dist/solutions-components/p-45ed16d5.entry.js +6 -0
  75. package/dist/solutions-components/p-80b11ec1.entry.js +17 -0
  76. package/dist/solutions-components/{p-5c7e3941.entry.js → p-813fd8a4.entry.js} +2 -2
  77. package/dist/solutions-components/{p-ff302d95.entry.js → p-d136eab0.entry.js} +2 -2
  78. package/dist/solutions-components/p-e0446d5b.entry.js +6 -0
  79. package/dist/solutions-components/solutions-components.esm.js +1 -1
  80. package/dist/solutions-components/utils/interfaces.ts +7 -0
  81. package/dist/solutions-components/utils/publicNotificationStore.ts +3 -2
  82. package/dist/types/components/create-feature/create-feature.d.ts +43 -1
  83. package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +4 -0
  84. package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +31 -10
  85. package/dist/types/components/feature-list/feature-list.d.ts +31 -0
  86. package/dist/types/components/layer-list/layer-list.d.ts +3 -3
  87. package/dist/types/components/map-card/map-card.d.ts +8 -0
  88. package/dist/types/components/public-notification/public-notification.d.ts +48 -0
  89. package/dist/types/components.d.ts +37 -0
  90. package/dist/types/utils/interfaces.d.ts +6 -0
  91. package/dist/types/utils/publicNotificationStore.d.ts +2 -1
  92. package/package.json +2 -1
  93. package/dist/solutions-components/p-6512dc44.entry.js +0 -6
  94. package/dist/solutions-components/p-65ad1625.entry.js +0 -6
  95. package/dist/solutions-components/p-989bf0bf.entry.js +0 -6
  96. package/dist/solutions-components/p-a0611720.entry.js +0 -6
  97. package/dist/solutions-components/p-efe1694a.entry.js +0 -17
  98. package/dist/solutions-components/p-f3467807.entry.js +0 -6
@@ -565,3 +565,10 @@ export interface IPopupUtils {
565
565
  export interface IConsentResponse {
566
566
  granted: boolean;
567
567
  }
568
+
569
+ /**
570
+ * Key is the layer name and the value is the type of layer
571
+ */
572
+ export interface IManagedLayers {
573
+ [key: string]: "buffer" | "sketch";
574
+ }
@@ -15,10 +15,11 @@
15
15
  */
16
16
 
17
17
  import { createStore } from "@stencil/store";
18
+ import { IManagedLayers } from "./interfaces";
18
19
 
19
20
  const { state, onChange } = createStore({
20
- // List of layers added and managed by the component
21
- managedLayers: [],
21
+ // Key Value pair whose Key is the layer name and the Value is the type of layer ("buffer" | "sketch")
22
+ managedLayers: {} as IManagedLayers,
22
23
  // List of tables added and managed by the component
23
24
  managedTables: [],
24
25
  // Handle[]: https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Handles.html#Handle
@@ -15,6 +15,7 @@
15
15
  */
16
16
  /// <reference types="arcgis-js-api" />
17
17
  import { EventEmitter } from "../../stencil-public-runtime";
18
+ import { ISearchConfiguration } from "../../utils/interfaces";
18
19
  export declare class CreateFeature {
19
20
  el: HTMLCreateFeatureElement;
20
21
  /**
@@ -30,6 +31,14 @@ export declare class CreateFeature {
30
31
  * This will hide the header and footer elements of the editor and user needs to execute the submit method manually.
31
32
  */
32
33
  customizeSubmit?: boolean;
34
+ /**
35
+ * ISearchConfiguration: Configuration details for the Search widget
36
+ */
37
+ searchConfiguration: ISearchConfiguration;
38
+ /**
39
+ * boolean: When true the search widget will shown
40
+ */
41
+ showSearchWidget: boolean;
33
42
  /**
34
43
  * esri/widgets/Editor: https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html
35
44
  * The Editor constructor
@@ -40,6 +49,21 @@ export declare class CreateFeature {
40
49
  * The Editor instance
41
50
  */
42
51
  protected _editor: __esri.Editor;
52
+ /**
53
+ * https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html
54
+ * The Feature layer instance
55
+ */
56
+ protected FeatureLayer: typeof import("esri/layers/FeatureLayer");
57
+ /**
58
+ * "esri/widgets/Search": https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html
59
+ * The Search instance
60
+ */
61
+ protected Search: typeof import("esri/widgets/Search");
62
+ /**
63
+ * "esri/widgets/Search": https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html
64
+ * The Search instance
65
+ */
66
+ protected _search: __esri.widgetsSearch;
43
67
  /**
44
68
  * esri/core/reactiveUtils: https://developers.arcgis.com/javascript/latest/api-reference/esri-core-reactiveUtils.html
45
69
  */
@@ -48,6 +72,10 @@ export declare class CreateFeature {
48
72
  * boolean: Flag to maintain the add attachment
49
73
  */
50
74
  protected _addingAttachment: boolean;
75
+ /**
76
+ * ISearchConfiguration: config for search widget
77
+ */
78
+ protected searchConfiguration1: ISearchConfiguration;
51
79
  /**
52
80
  * Called each time the mapView prop is changed.
53
81
  */
@@ -92,7 +120,7 @@ export declare class CreateFeature {
92
120
  */
93
121
  render(): any;
94
122
  /**
95
- * Init Editor widget and starts the create workflow
123
+ * Init Editor widget and Search widget
96
124
  */
97
125
  protected init(): Promise<void>;
98
126
  /**
@@ -111,6 +139,20 @@ export declare class CreateFeature {
111
139
  * @protected
112
140
  */
113
141
  protected startCreate(): Promise<void>;
142
+ /**
143
+ * Display search widget to search location
144
+ * @protected
145
+ */
146
+ protected createSearchWidget(): Promise<void>;
147
+ /**
148
+ * Initialize the search widget based on user defined configuration
149
+ *
150
+ * @param searchConfiguration search configuration defined by the user
151
+ * @param view the current map view
152
+ *
153
+ * @protected
154
+ */
155
+ protected _getSearchConfig(searchConfiguration: ISearchConfiguration, view: __esri.MapView): ISearchConfiguration;
114
156
  /**
115
157
  * Hides the elements of editor widget
116
158
  * @protected
@@ -19,6 +19,10 @@ import CrowdsourceManager_T9n from "../../assets/t9n/crowdsource-manager/resourc
19
19
  import { ELayoutMode, IBasemapConfig, IMapChange, IMapInfo, ISearchConfiguration, theme } from "../../utils/interfaces";
20
20
  export declare class CrowdsourceManager {
21
21
  el: HTMLCrowdsourceManagerElement;
22
+ /**
23
+ * Array of objects containing proxy information for premium platform services.
24
+ */
25
+ appProxies: any;
22
26
  /**
23
27
  * string: default center point values for the map
24
28
  * ; delimited x;y pair
@@ -17,6 +17,7 @@
17
17
  import { VNode, EventEmitter } from "../../stencil-public-runtime";
18
18
  import { IMapChange, IMapClick, IMapInfo, ISearchConfiguration, theme } from "../../utils/interfaces";
19
19
  import CrowdsourceReporter_T9n from "../../assets/t9n/crowdsource-reporter/resources.json";
20
+ import { ILayerItemsHash } from "../layer-list/layer-list";
20
21
  export declare class CrowdsourceReporter {
21
22
  el: HTMLCrowdsourceReporterElement;
22
23
  /**
@@ -172,6 +173,10 @@ export declare class CrowdsourceReporter {
172
173
  * __esri.FeatureLayer[]: Valid layers from the current map
173
174
  */
174
175
  protected _validLayers: __esri.FeatureLayer[];
176
+ /**
177
+ * string[]: Configured/all layers id from current map which can be used for reporting
178
+ */
179
+ protected _editableLayerIds: string[];
175
180
  /**
176
181
  * string: The selected feature layer's id from the layer's list
177
182
  */
@@ -196,6 +201,10 @@ export declare class CrowdsourceReporter {
196
201
  * HTMLLayerListElement: Create Layer list component instance
197
202
  */
198
203
  protected _layerList: HTMLLayerListElement;
204
+ /**
205
+ * HTMLFeatureListElement: Create feature list component instance
206
+ */
207
+ protected _featureList: HTMLFeatureListElement;
199
208
  /**
200
209
  * HTMLInstantAppsSocialShareElement: Share element
201
210
  */
@@ -307,18 +316,13 @@ export declare class CrowdsourceReporter {
307
316
  * Navigates to layer-list
308
317
  * @protected
309
318
  */
310
- protected navigateToHomePage(): void;
319
+ protected navigateToHomePage(): Promise<void>;
311
320
  /**
312
- * Update the selected layer id and name
321
+ * On layer select open the feature create flow item
313
322
  * @param evt Event which has details of selected layerId and layerName
314
323
  * @protected
315
324
  */
316
- protected highlightSelectedLayer(evt: CustomEvent): void;
317
- /**
318
- * On next button click open the feature create flow item
319
- * @protected
320
- */
321
- protected navigateToCreateFeature(): Promise<void>;
325
+ protected navigateToCreateFeature(evt: CustomEvent): Promise<void>;
322
326
  /**
323
327
  * On report an incident button click open the create a report panel with the layer list
324
328
  * @protected
@@ -406,7 +410,7 @@ export declare class CrowdsourceReporter {
406
410
  */
407
411
  protected handleMapClick(): void;
408
412
  /**
409
- * On map click do hitTest and get the clicked graphics of valid layers and show feature details
413
+ * On map click do hitTest and get the clicked graphics from both reporting and non-reporting layers, and show feature details
410
414
  * @param event IMapClick map click event details
411
415
  *
412
416
  * @protected
@@ -418,10 +422,27 @@ export declare class CrowdsourceReporter {
418
422
  * @protected
419
423
  */
420
424
  protected _getTranslations(): Promise<void>;
425
+ /**
426
+ * Returns the ids of all OR configured layers that support edits with the update capability
427
+ * @param hash each layer item details
428
+ * @param layers list of layers id
429
+ * @returns array of editable layer ids
430
+ */
431
+ protected reduceToConfiguredLayers(hash: ILayerItemsHash): string[];
432
+ /**
433
+ * Creates the list of layers to be listed in layer list
434
+ * @protected
435
+ */
436
+ protected getLayersToShowInList(): Promise<void>;
437
+ /**
438
+ * renders feature list
439
+ * @protected
440
+ */
441
+ protected renderFeaturesList(): Promise<void>;
421
442
  /**
422
443
  * Updates the share url for current selected feature
423
444
  * @protected
424
- */
445
+ */
425
446
  protected _updateShareURL(): void;
426
447
  /**
427
448
  * Navigates to selected features detail based on the URL params
@@ -39,6 +39,10 @@ export declare class FeatureList {
39
39
  * boolean: Highlight feature on map optional (default false) boolean to indicate if we should highlight and zoom to the extent of the feature geometry
40
40
  */
41
41
  highlightOnMap?: boolean;
42
+ /**
43
+ * boolean: Highlight feature on map optional (default false) boolean to indicate if we should highlight when hover on Feature in list
44
+ */
45
+ highlightOnHover?: boolean;
42
46
  /**
43
47
  * calcite-list-item list of features with popup titles
44
48
  */
@@ -56,6 +60,11 @@ export declare class FeatureList {
56
60
  * All UI strings should be defined here.
57
61
  */
58
62
  _translations: typeof FeatureList_T9n;
63
+ /**
64
+ * "esri/Color": https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html
65
+ * The Color instance
66
+ */
67
+ protected Color: typeof import("esri/Color");
59
68
  /**
60
69
  * IPopupUtils: To fetch the list label using popup titles
61
70
  */
@@ -72,6 +81,11 @@ export declare class FeatureList {
72
81
  * Watch for selectedLayerId change and update layer instance and features list for new layerId
73
82
  */
74
83
  selectedLayerWatchHandler(): Promise<void>;
84
+ /**
85
+ * Refresh the feature list which will fetch the latest features and update the features list
86
+ * @returns Promise that resolves when the operation is complete
87
+ */
88
+ refresh(): Promise<void>;
75
89
  /**
76
90
  * Emitted on demand when feature is selected using the list
77
91
  */
@@ -89,6 +103,12 @@ export declare class FeatureList {
89
103
  * Renders the component.
90
104
  */
91
105
  render(): any;
106
+ /**
107
+ * Load esri javascript api modules
108
+ * @returns Promise resolving when function is done
109
+ * @protected
110
+ */
111
+ protected initModules(): Promise<void>;
92
112
  /**
93
113
  * Initialize the features list using the selected layer
94
114
  * @protected
@@ -107,6 +127,17 @@ export declare class FeatureList {
107
127
  * @protected
108
128
  */
109
129
  protected featureClicked(event: any, selectedFeature: __esri.Graphic): Promise<void>;
130
+ /**
131
+ * On feature hover in feature list highlight the feature on the map
132
+ * @param selectedFeature mouseovered feature graphic
133
+ * @protected
134
+ */
135
+ protected onFeatureHover(selectedFeature: __esri.Graphic): Promise<void>;
136
+ /**
137
+ * Clears the highlight
138
+ * @protected
139
+ */
140
+ protected clearHighlights(): void;
110
141
  /**
111
142
  * Query the selected feature layer, in descending order of object id's
112
143
  * @param page 0th page number in the pagination item
@@ -16,7 +16,7 @@
16
16
  /// <reference types="arcgis-js-api" />
17
17
  import { VNode, EventEmitter } from "../../stencil-public-runtime";
18
18
  import LayerList_T9n from "../../assets/t9n/layer-list/resources.json";
19
- interface ILayerItemsHash {
19
+ export interface ILayerItemsHash {
20
20
  [key: string]: ILayerDetailsHash;
21
21
  }
22
22
  interface ILayerDetailsHash {
@@ -115,11 +115,11 @@ export declare class LayerList {
115
115
  */
116
116
  protected handleNoLayersToDisplay(): void;
117
117
  /**
118
- * Returns the ids of all OR configured layers that support edits with the update capability
118
+ * Returns the ids of all OR configured layers that needs to be shown in the list
119
119
  * @param hash each layer item details
120
120
  * @returns array of layer ids
121
121
  */
122
- protected getEditableIds(hash: ILayerItemsHash): string[];
122
+ protected getLayersToBeShownInList(hash: ILayerItemsHash): string[];
123
123
  /**
124
124
  * Render feature layer list
125
125
  * @returns layer list
@@ -18,6 +18,10 @@ import { EventEmitter } from "../../stencil-public-runtime";
18
18
  import { IBasemapConfig, IMapChange, IMapInfo, ISearchConfiguration, theme } from "../../utils/interfaces";
19
19
  export declare class MapCard {
20
20
  el: HTMLMapCardElement;
21
+ /**
22
+ * Array of objects containing proxy information for premium platform services.
23
+ */
24
+ appProxies: any;
21
25
  /**
22
26
  * string: Item ID of the web map that should be selected by default when the app loads
23
27
  */
@@ -117,6 +121,10 @@ export declare class MapCard {
117
121
  * IMapInfo: id and name of the map to display
118
122
  */
119
123
  _webMapInfo: IMapInfo;
124
+ /**
125
+ * esri/config: https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html
126
+ */
127
+ protected esriConfig: typeof import("esri/config");
120
128
  /**
121
129
  * esri/widgets/Home: https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Home.html
122
130
  */
@@ -112,6 +112,10 @@ export declare class PublicNotification {
112
112
  * https://developers.arcgis.com/documentation/common-data-types/symbol-objects.htm
113
113
  */
114
114
  sketchPolygonSymbol: __esri.SimpleFillSymbol | any;
115
+ /**
116
+ * boolean: When true a graphics will be added to the map on export
117
+ */
118
+ _exportGraphics: boolean;
115
119
  /**
116
120
  * boolean: When true a map will be added on export
117
121
  */
@@ -174,6 +178,10 @@ export declare class PublicNotification {
174
178
  * esri/geometry/geometryEngine: https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html
175
179
  */
176
180
  protected _geometryEngine: __esri.geometryEngine;
181
+ /**
182
+ * esri/Graphic: https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html
183
+ */
184
+ protected Graphic: typeof import("esri/Graphic");
177
185
  /**
178
186
  * esri/symbols/support/jsonUtils: https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-support-jsonUtils.html
179
187
  */
@@ -446,6 +454,46 @@ export declare class PublicNotification {
446
454
  * @protected
447
455
  */
448
456
  protected _getExportOptions(): VNode;
457
+ /**
458
+ * Toggle the _addMap state variable and update the graphics on the map
459
+ *
460
+ * @protected
461
+ */
462
+ protected _handleAddMapChange(): void;
463
+ /**
464
+ * Toggle the _exportGraphics state variable and update the graphics on the map
465
+ *
466
+ * @protected
467
+ */
468
+ protected _handleExportGraphicsChange(): void;
469
+ /**
470
+ * Get the "sketch" or "buffer" graphics layer
471
+ *
472
+ * @param type The type of managed layer to fetch "sketch" | "buffer"
473
+ *
474
+ * @protected
475
+ */
476
+ protected _getManagedLayer(type: "sketch" | "buffer"): __esri.GraphicsLayer;
477
+ /**
478
+ * Update the export graphics by adding or removeing them
479
+ *
480
+ * @param clear When true the graphics layers will be cleared prior to adding any new graphics, defaults to false
481
+ *
482
+ * @protected
483
+ */
484
+ protected _updateExportGraphics(clear?: boolean): void;
485
+ /**
486
+ * Remove all buffer and sketch graphics
487
+ *
488
+ * @protected
489
+ */
490
+ _removeExportGraphics(): void;
491
+ /**
492
+ * Add all buffer and sketch graphics that are flagged for download
493
+ *
494
+ * @protected
495
+ */
496
+ protected _addExportGraphics(): void;
449
497
  /**
450
498
  * Render the refine page
451
499
  *
@@ -116,6 +116,10 @@ export namespace Components {
116
116
  * esri/views/MapView: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html
117
117
  */
118
118
  "mapView": __esri.MapView;
119
+ /**
120
+ * ISearchConfiguration: Configuration details for the Search widget
121
+ */
122
+ "searchConfiguration": ISearchConfiguration;
119
123
  /**
120
124
  * string: Layer id of the feature layer in which the new feature is to be created
121
125
  */
@@ -127,6 +131,10 @@ export namespace Components {
127
131
  "submit": () => Promise<void>;
128
132
  }
129
133
  interface CrowdsourceManager {
134
+ /**
135
+ * Array of objects containing proxy information for premium platform services.
136
+ */
137
+ "appProxies": any;
130
138
  /**
131
139
  * IBasemapConfig: List of any basemaps to filter out from the basemap widget
132
140
  */
@@ -385,6 +393,10 @@ export namespace Components {
385
393
  interface FeatureFormFlowItem {
386
394
  }
387
395
  interface FeatureList {
396
+ /**
397
+ * boolean: Highlight feature on map optional (default false) boolean to indicate if we should highlight when hover on Feature in list
398
+ */
399
+ "highlightOnHover"?: boolean;
388
400
  /**
389
401
  * boolean: Highlight feature on map optional (default false) boolean to indicate if we should highlight and zoom to the extent of the feature geometry
390
402
  */
@@ -401,6 +413,11 @@ export namespace Components {
401
413
  * number: Number features to be fetched per page, by default 100 features will be fetched
402
414
  */
403
415
  "pageSize"?: number;
416
+ /**
417
+ * Refresh the feature list which will fetch the latest features and update the features list
418
+ * @returns Promise that resolves when the operation is complete
419
+ */
420
+ "refresh": () => Promise<void>;
404
421
  /**
405
422
  * string: Layer id of the feature layer to show the list
406
423
  */
@@ -599,6 +616,10 @@ export namespace Components {
599
616
  interface LocationFlowItem {
600
617
  }
601
618
  interface MapCard {
619
+ /**
620
+ * Array of objects containing proxy information for premium platform services.
621
+ */
622
+ "appProxies": any;
602
623
  /**
603
624
  * IBasemapConfig: List of any basemaps to filter out from the basemap widget
604
625
  */
@@ -2231,12 +2252,20 @@ declare namespace LocalJSX {
2231
2252
  * Emitted on demand when the feature is created successfully
2232
2253
  */
2233
2254
  "onSuccess"?: (event: CreateFeatureCustomEvent<void>) => void;
2255
+ /**
2256
+ * ISearchConfiguration: Configuration details for the Search widget
2257
+ */
2258
+ "searchConfiguration"?: ISearchConfiguration;
2234
2259
  /**
2235
2260
  * string: Layer id of the feature layer in which the new feature is to be created
2236
2261
  */
2237
2262
  "selectedLayerId"?: string;
2238
2263
  }
2239
2264
  interface CrowdsourceManager {
2265
+ /**
2266
+ * Array of objects containing proxy information for premium platform services.
2267
+ */
2268
+ "appProxies"?: any;
2240
2269
  /**
2241
2270
  * IBasemapConfig: List of any basemaps to filter out from the basemap widget
2242
2271
  */
@@ -2519,6 +2548,10 @@ declare namespace LocalJSX {
2519
2548
  interface FeatureFormFlowItem {
2520
2549
  }
2521
2550
  interface FeatureList {
2551
+ /**
2552
+ * boolean: Highlight feature on map optional (default false) boolean to indicate if we should highlight when hover on Feature in list
2553
+ */
2554
+ "highlightOnHover"?: boolean;
2522
2555
  /**
2523
2556
  * boolean: Highlight feature on map optional (default false) boolean to indicate if we should highlight and zoom to the extent of the feature geometry
2524
2557
  */
@@ -2743,6 +2776,10 @@ declare namespace LocalJSX {
2743
2776
  interface LocationFlowItem {
2744
2777
  }
2745
2778
  interface MapCard {
2779
+ /**
2780
+ * Array of objects containing proxy information for premium platform services.
2781
+ */
2782
+ "appProxies"?: any;
2746
2783
  /**
2747
2784
  * IBasemapConfig: List of any basemaps to filter out from the basemap widget
2748
2785
  */
@@ -487,3 +487,9 @@ export interface IPopupUtils {
487
487
  export interface IConsentResponse {
488
488
  granted: boolean;
489
489
  }
490
+ /**
491
+ * Key is the layer name and the value is the type of layer
492
+ */
493
+ export interface IManagedLayers {
494
+ [key: string]: "buffer" | "sketch";
495
+ }
@@ -13,8 +13,9 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+ import { IManagedLayers } from "./interfaces";
16
17
  declare const state: {
17
- managedLayers: any[];
18
+ managedLayers: IManagedLayers;
18
19
  managedTables: any[];
19
20
  highlightHandles: any[];
20
21
  removeHandles: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/solutions-components",
3
- "version": "0.8.4",
3
+ "version": "0.8.6",
4
4
  "description": "Web Components for Esri's Solutions Applications",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -90,6 +90,7 @@
90
90
  "@esri/hub-teams": "^12.4.1",
91
91
  "@esri/instant-apps-components": "1.0.0-beta.206",
92
92
  "@esri/solution-common": "^5.0.9",
93
+ "templates-common-library-esm": "npm:templates-common-library@0.0.454-esm",
93
94
  "@pdf-lib/fontkit": "^1.1.1",
94
95
  "focus-trap": "7.2.0",
95
96
  "jspdf": "^2.5.1",
@@ -1,6 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- import{r as t,c as i,h as s,H as e,g as h}from"./p-7d280d8a.js";import{l as a,g as o}from"./p-be8ef276.js";import{a as l,b as c,h as n,g as r,q as d}from"./p-c897e3eb.js";import"./p-8ddc7786.js";import"./p-e2d0ad1b.js";import"./p-c1cf3ebc.js";const u=class{constructor(s){t(this,s),this.togglePanel=i(this,"togglePanel",7),this._noLayerToDisplayErrorMsg="Web map does not contain any editable layers.",this.description=void 0,this.isMobile=void 0,this.enableAnonymousAccess=void 0,this.enableAnonymousComments=void 0,this.enableComments=void 0,this.enableLogin=void 0,this.enableNewReports=void 0,this.layers=void 0,this.loginTitle=void 0,this.mapView=void 0,this.layerId=void 0,this.objectId=void 0,this.center=void 0,this.level=void 0,this.reportButtonText=void 0,this.reportsHeader=void 0,this.reportSubmittedMessage=void 0,this.searchConfiguration=void 0,this.showComments=void 0,this.defaultWebmap="",this.enableSearch=!0,this.enableHome=!0,this.mapInfos=[],this.theme="light",this.enableZoom=!0,this._mapInfo=void 0,this._flowItems=["layer-list"],this._sidePanelCollapsed=!1,this._translations=void 0,this._hasValidLayers=!1,this._selectedLayerName=void 0,this._reportSubmitted=!1,this._showSubmitCancelButton=!1,this._featureCreationFailedErrorMsg=void 0}async isMobileWatchHandler(){this._sidePanelCollapsed=!1}async mapViewWatchHandler(){await this.mapView.when((async()=>{await this.setMapView()}))}async componentWillLoad(){this._urlParamsLoaded=!1,await this._initModules(),await this._getTranslations()}render(){const t="dark"===this.theme?"calcite-mode-dark":"calcite-mode-light";return s(e,null,this._reportSubmitted&&s("calcite-alert",{"auto-close":!0,class:t,icon:"check-circle",kind:"success",label:"",onCalciteAlertClose:()=>{this._reportSubmitted=!1},open:!0,placement:"top"},s("div",{slot:"title"},this._translations.reportSubmit),s("div",{slot:"message"},this.reportSubmittedMessage?this.reportSubmittedMessage:this._translations.submitMsg)),this._featureCreationFailedErrorMsg&&s("calcite-alert",{"auto-close":!0,class:t,icon:"x-octagon",kind:"danger",label:"",onCalciteAlertClose:()=>{this._featureCreationFailedErrorMsg=""},open:!0,placement:"top"},s("div",{slot:"title"},this._translations.error),s("div",{slot:"message"},this._featureCreationFailedErrorMsg)),s("div",null,s("calcite-shell",{"content-behind":!0},this._getReporter())))}async _initModules(){const[t]=await a(["esri/core/reactiveUtils"]);this.reactiveUtils=t}setSelectedLayer(t,i){this._selectedLayerId=t,this._selectedLayerName=i,this._validLayers.forEach((i=>{i.set("visible",!t||i.id===t)}))}_getReporter(){const t=[];return this._flowItems.forEach((i=>{switch(i){case"layer-list":t.push(this.getLayerListFlowItem());break;case"feature-list":t.push(this.getFeatureListFlowItem(this._selectedLayerId,this._selectedLayerName));break;case"feature-details":t.push(this.getFeatureDetailsFlowItem());break;case"reporting-layer-list":t.push(this.getChooseCategoryFlowItem());break;case"feature-create":t.push(this.getFeatureCreateFlowItem())}})),s("calcite-panel",{class:"width-full "+("dark"===this.theme?"calcite-mode-dark":"calcite-mode-light")},this.mapView?s("calcite-flow",null,(null==t?void 0:t.length)>0&&t):s("calcite-loader",{label:"",scale:"m"}))}getLayerListFlowItem(){return s("calcite-flow-item",{collapsed:this.isMobile&&this._sidePanelCollapsed,heading:this.reportsHeader},this.isMobile&&this.getActionToExpandCollapsePanel(),this._hasValidLayers&&this.enableNewReports&&s("calcite-button",{appearance:"solid",onClick:this.navigateToChooseCategory.bind(this),slot:"footer",width:"full"},this.reportButtonText),s("calcite-panel",{"full-height":!0,"full-width":!0},s("layer-list",{class:"height-full",layers:this.layers,mapView:this.mapView,noLayerErrorMsg:this._noLayerToDisplayErrorMsg,onLayerSelect:this.displayFeaturesList.bind(this),onLayersListLoaded:this.layerListLoaded.bind(this),ref:t=>this._layerList=t,showFeatureCount:!0,showNextIcon:!0})))}getChooseCategoryFlowItem(){return s("calcite-flow-item",{collapsed:this.isMobile&&this._sidePanelCollapsed,heading:this._translations.createReportHeader,onCalciteFlowItemBack:this.backFromSelectedPanel.bind(this)},this.isMobile&&this.getActionToExpandCollapsePanel(),s("div",{class:"width-full",slot:"footer"},s("calcite-button",{appearance:"solid",class:"footer-top-button footer-button",disabled:!this._selectedLayerId,onClick:this.navigateToCreateFeature.bind(this),width:"full"},this._translations.next),s("calcite-button",{appearance:"outline",class:"footer-button",onClick:this.backFromSelectedPanel.bind(this),width:"full"},this._translations.cancel)),s("calcite-panel",{"full-height":!0,"full-width":!0},s("calcite-notice",{class:"notice-msg",icon:"lightbulb",kind:"success",open:!0},s("div",{slot:"message"},this._translations.chooseCategoryMsg)),s("layer-list",{class:"height-full",layers:this.layers,mapView:this.mapView,noLayerErrorMsg:this._noLayerToDisplayErrorMsg,onLayerSelect:this.highlightSelectedLayer.bind(this),showFeatureCount:!1,showNextIcon:!1})))}getFeatureCreateFlowItem(){return s("calcite-flow-item",{collapsed:this.isMobile&&this._sidePanelCollapsed,heading:this._selectedLayerName,onCalciteFlowItemBack:this.backFromCreateFeaturePanel.bind(this)},this.isMobile&&this.getActionToExpandCollapsePanel(),this._showSubmitCancelButton&&s("div",{class:"width-full",slot:"footer"},s("calcite-button",{appearance:"solid",class:"footer-top-button footer-button",onClick:this.onSubmitButtonClick.bind(this),width:"full"},this._translations.submit),s("calcite-button",{appearance:"outline",class:"footer-button",onClick:this.backFromCreateFeaturePanel.bind(this),width:"full"},this._translations.cancel)),s("calcite-panel",{"full-height":!0,"full-width":!0},s("calcite-notice",{class:"notice-msg",icon:"lightbulb",kind:"success",open:!0},s("div",{slot:"message"},this._translations.featureEditFormInfoMsg)),s("create-feature",{customizeSubmit:!0,mapView:this.mapView,onDrawComplete:this.onDrawComplete.bind(this),onEditingAttachment:this.showSubmitCancelButton.bind(this),onFail:this.createFeatureFailed.bind(this),onSuccess:this.onReportSubmitted.bind(this),ref:t=>this._createFeature=t,selectedLayerId:this._selectedLayerId})))}onDrawComplete(){this._showSubmitCancelButton=!0}showSubmitCancelButton(t){this._showSubmitCancelButton=!t.detail}onSubmitButtonClick(){this._createFeature&&this._createFeature.submit()}backFromCreateFeaturePanel(){this._createFeature&&this._createFeature.close(),this.backFromSelectedPanel()}createFeatureFailed(t){console.error(t.detail),this._featureCreationFailedErrorMsg=t.detail.message}onReportSubmitted(){this._reportSubmitted=!0,this.navigateToHomePage()}navigateToHomePage(){this._createFeature&&this._createFeature.close(),this._layerList&&this._layerList.refresh(),this.setSelectedFeatures([]),this._flowItems=["layer-list"]}highlightSelectedLayer(t){this.setSelectedLayer(t.detail.layerId,t.detail.layerName)}async navigateToCreateFeature(){this._showSubmitCancelButton=!1,this._flowItems=[...this._flowItems,"feature-create"]}navigateToChooseCategory(){this._flowItems=[...this._flowItems,"reporting-layer-list"]}async layerListLoaded(t){const i=t.detail,s=await l(this.mapView);this._validLayers=[],s.forEach((t=>{i.includes(t.id)&&this._validLayers.push(t)})),this.handleMapClick(),this._hasValidLayers=i.length>0,this._urlParamsLoaded||(this._urlParamsLoaded=!0,await this.loadFeatureFromURLParams())}displayFeaturesList(t){this.setSelectedLayer(t.detail.layerId,t.detail.layerName),this._flowItems=[...this._flowItems,"feature-list"]}backFromSelectedPanel(){const t=[...this._flowItems];t.pop(),this.clearHighlights(),1!==t.length?this._flowItems=[...t]:this.navigateToHomePage()}toggleSidePanel(){this._sidePanelCollapsed=!this._sidePanelCollapsed,this.togglePanel.emit(this._sidePanelCollapsed)}async onFeatureSelectFromList(t){this.setSelectedFeatures([t.detail]),this._flowItems=[...this._flowItems,"feature-details"]}getFeatureListFlowItem(t,i){return s("calcite-flow-item",{collapsed:this.isMobile&&this._sidePanelCollapsed,heading:i,onCalciteFlowItemBack:this.backFromSelectedPanel.bind(this)},this.isMobile&&this.getActionToExpandCollapsePanel(),this.enableNewReports&&s("calcite-button",{appearance:"solid",onClick:this.navigateToCreateFeature.bind(this),slot:"footer",width:"full"},this.reportButtonText),s("calcite-panel",{"full-height":!0},s("feature-list",{class:"height-full",mapView:this.mapView,noFeaturesFoundMsg:this._translations.featureErrorMsg,onFeatureSelect:this.onFeatureSelectFromList.bind(this),pageSize:30,selectedLayerId:t})))}getFeatureDetailsFlowItem(){return s("calcite-flow-item",{collapsed:this.isMobile&&this._sidePanelCollapsed,heading:this._selectedLayerName,onCalciteFlowItemBack:this.backFromSelectedPanel.bind(this)},this.isMobile&&this.getActionToExpandCollapsePanel(),s("instant-apps-social-share",{autoUpdateShareUrl:!1,embed:!1,popoverButtonIconScale:"s",ref:t=>this._shareNode=t,scale:"m",shareButtonColor:"neutral",shareButtonType:"action",slot:"header-actions-end",socialMedia:!0,view:this.mapView}),s("calcite-panel",{"full-height":!0},s("info-card",{allowEditing:!1,graphics:this._selectedFeature,highlightEnabled:!1,isLoading:!1,isMobile:!1,mapView:this.mapView,onSelectionChanged:this.featureDetailsChanged.bind(this),zoomAndScrollToSelected:!0})))}setSelectedFeatures(t){this._selectedFeature=t,this.setCurrentFeature(this._selectedFeature.length?this._selectedFeature[0]:null)}setCurrentFeature(t){if(t&&t.layer){const i=t.layer;this.setSelectedLayer(i.id,i.title),this._currentFeatureId=t.attributes[i.objectIdField]}else this.setSelectedLayer("",""),this._currentFeatureId="";this._updateShareURL()}featureDetailsChanged(t){this.setCurrentFeature(t.detail[0]),this.highlightOnMap(t.detail[0])}async highlightOnMap(t){if(this.clearHighlights(),t&&t.geometry&&t.layer){const i=await c(this.mapView,t.layer.id);this._highlightHandle=await n([t.getObjectId()],i,this.mapView,!0)}}clearHighlights(){this._highlightHandle&&this._highlightHandle.remove()}getActionToExpandCollapsePanel(){return s("calcite-action",{icon:this._sidePanelCollapsed?"chevrons-up":"chevrons-down",onClick:this.toggleSidePanel.bind(this),slot:"header-actions-end",text:this._sidePanelCollapsed?this._translations.expand:this._translations.collapse})}async setMapView(){this.mapView.popupEnabled=!1,this._defaultCenter&&this._defaultLevel&&(await this.mapView.goTo({center:this._defaultCenter,zoom:this._defaultLevel}),this._defaultCenter=void 0,this._defaultLevel=void 0)}handleMapClick(){this._mapClickHandle&&this._mapClickHandle.remove(),this._mapClickHandle=this.reactiveUtils.on((()=>this.mapView),"click",this.onMapClick.bind(this))}async onMapClick(t){this.mapView.popupEnabled=!1;const i={include:this._validLayers},s=await this.mapView.hitTest(t,i);if(s.results.length>0){const t=[];s.results.forEach((function(i){"graphic"===i.type&&t.push(i.graphic)})),this.setSelectedFeatures(t),this._flowItems.length&&"feature-details"!==this._flowItems[this._flowItems.length-1]?this._flowItems=[...this._flowItems,"feature-details"]:(this._flowItems=[...this._flowItems],this.highlightOnMap(t[0]))}}async _getTranslations(){const t=await o(this.el);this._translations=t[0]}_updateShareURL(){var t,i;const s=null===(t=this._shareNode)||void 0===t?void 0:t.shareUrl;if(!s)return;const e=new URL(s);this._selectedLayerId?e.searchParams.set("layerid",this._selectedLayerId):e.searchParams.delete("layerid"),(null===(i=this._selectedFeature)||void 0===i?void 0:i.length)?e.searchParams.set("oid",this._currentFeatureId):e.searchParams.delete("oid"),this._shareNode.shareUrl=e.href}async loadFeatureFromURLParams(){if(this.center&&this.level&&await this.mapView.goTo({center:this.center.split(";").map(Number),zoom:this.level}),this.layerId&&this.objectId){const t=await r(this.mapView,this.layerId);if(t){const i=await d([Number(this.objectId)],t,[],!0,this.mapView.spatialReference);i.length&&(this._selectedFeature=i,this._flowItems=this._flowItems.length&&"feature-details"!==this._flowItems[this._flowItems.length-1]?[...this._flowItems,"feature-details"]:[...this._flowItems],await this.highlightOnMap(i[0]))}}}get el(){return h(this)}static get watchers(){return{isMobile:["isMobileWatchHandler"],mapView:["mapViewWatchHandler"]}}};u.style=":host{display:block;--calcite-label-margin-bottom:0px;--solutions-theme-foreground-color:var(--calcite-color-foreground-1)}.width-full{width:100% !important}.width-0{width:0}.height-full{height:100% !important}.height-0{height:0}.overflow-hidden{overflow:hidden}.border{border:1px solid var(--calcite-color-border-3)}.notice-msg{padding:10px;width:calc(100% - 20px)}.footer-top-button{padding-bottom:7px}.footer-button{height:35px}";export{u as crowdsource_reporter}