@esri/solutions-components 0.10.12 → 0.10.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. package/dist/cjs/calcite-alert_4.cjs.entry.js +1 -1
  2. package/dist/cjs/calcite-flow_6.cjs.entry.js +103 -7
  3. package/dist/cjs/card-manager_3.cjs.entry.js +2 -1
  4. package/dist/cjs/crowdsource-manager.cjs.entry.js +3 -2
  5. package/dist/cjs/crowdsource-reporter.cjs.entry.js +173 -43
  6. package/dist/cjs/feature-list.cjs.entry.js +110 -17
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/cjs/{popupUtils-92e52dbf.js → popupUtils-47bd97e7.js} +1 -1
  9. package/dist/cjs/solutions-components.cjs.js +1 -1
  10. package/dist/collection/assets/t9n/crowdsource-reporter/resources.json +3 -1
  11. package/dist/collection/assets/t9n/crowdsource-reporter/resources_en.json +3 -1
  12. package/dist/collection/assets/t9n/feature-list/resources.json +3 -1
  13. package/dist/collection/assets/t9n/feature-list/resources_en.json +3 -1
  14. package/dist/collection/components/card-manager/card-manager.js +19 -1
  15. package/dist/collection/components/create-feature/create-feature.js +145 -2
  16. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +20 -2
  17. package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +227 -43
  18. package/dist/collection/components/feature-list/feature-list.css +16 -1
  19. package/dist/collection/components/feature-list/feature-list.js +165 -15
  20. package/dist/collection/components/layer-list/layer-list.js +35 -6
  21. package/dist/collection/demos/crowdsource-reporter.html +2 -0
  22. package/dist/collection/utils/popupUtils.js +1 -1
  23. package/dist/collection/utils/popupUtils.ts +1 -1
  24. package/dist/components/card-manager2.js +3 -1
  25. package/dist/components/create-feature2.js +91 -3
  26. package/dist/components/crowdsource-manager.js +4 -2
  27. package/dist/components/crowdsource-reporter.js +178 -45
  28. package/dist/components/feature-list2.js +152 -50
  29. package/dist/components/layer-list2.js +18 -6
  30. package/dist/components/popupUtils.js +1 -1
  31. package/dist/esm/calcite-alert_4.entry.js +1 -1
  32. package/dist/esm/calcite-flow_6.entry.js +104 -8
  33. package/dist/esm/card-manager_3.entry.js +2 -1
  34. package/dist/esm/crowdsource-manager.entry.js +3 -2
  35. package/dist/esm/crowdsource-reporter.entry.js +173 -43
  36. package/dist/esm/feature-list.entry.js +110 -17
  37. package/dist/esm/loader.js +1 -1
  38. package/dist/esm/{popupUtils-00c655fb.js → popupUtils-349a26e6.js} +1 -1
  39. package/dist/esm/solutions-components.js +1 -1
  40. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources.json +3 -1
  41. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_en.json +3 -1
  42. package/dist/solutions-components/assets/t9n/feature-list/resources.json +3 -1
  43. package/dist/solutions-components/assets/t9n/feature-list/resources_en.json +3 -1
  44. package/dist/solutions-components/demos/crowdsource-reporter.html +2 -0
  45. package/dist/solutions-components/p-40e305b4.entry.js +17 -0
  46. package/dist/solutions-components/p-4d44410b.entry.js +6 -0
  47. package/dist/solutions-components/{p-900fee65.js → p-5a473f0d.js} +1 -1
  48. package/dist/solutions-components/p-8efa9edf.entry.js +6 -0
  49. package/dist/solutions-components/p-977f2314.entry.js +6 -0
  50. package/dist/solutions-components/p-9b83e593.entry.js +6 -0
  51. package/dist/solutions-components/{p-cde8d6e5.entry.js → p-f6bc95b3.entry.js} +1 -1
  52. package/dist/solutions-components/solutions-components.esm.js +1 -1
  53. package/dist/solutions-components/utils/popupUtils.ts +1 -1
  54. package/dist/types/components/card-manager/card-manager.d.ts +4 -0
  55. package/dist/types/components/create-feature/create-feature.d.ts +34 -0
  56. package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +4 -0
  57. package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +80 -21
  58. package/dist/types/components/feature-list/feature-list.d.ts +49 -7
  59. package/dist/types/components/layer-list/layer-list.d.ts +4 -0
  60. package/dist/types/components.d.ts +93 -0
  61. package/package.json +1 -1
  62. package/dist/solutions-components/p-064e43e0.entry.js +0 -6
  63. package/dist/solutions-components/p-2d1afda0.entry.js +0 -17
  64. package/dist/solutions-components/p-4a0d9efe.entry.js +0 -6
  65. package/dist/solutions-components/p-c9260b4c.entry.js +0 -6
  66. package/dist/solutions-components/p-f7d3ef3e.entry.js +0 -6
@@ -73,7 +73,7 @@ export class PopupUtils {
73
73
  }
74
74
  }
75
75
  //Format field values
76
- if (layer.popupTemplate.fieldInfos) {
76
+ if (layer.popupTemplate?.fieldInfos) {
77
77
  layer.fields.forEach((field) => {
78
78
  const attributeValue = graphic.attributes[field.name];
79
79
  //get the field info from popupTemplate
@@ -16,6 +16,10 @@
16
16
  import CardManager_T9n from "../../assets/t9n/card-manager/resources.json";
17
17
  export declare class CardManager {
18
18
  el: HTMLCardManagerElement;
19
+ /**
20
+ * string: custom notice text to display
21
+ */
22
+ customInfoText: string;
19
23
  /**
20
24
  * When true the geometry of the current feature will be editable
21
25
  */
@@ -38,6 +38,14 @@ export declare class CreateFeature {
38
38
  * boolean: When true the application will be in mobile mode, controls the mobile or desktop view
39
39
  */
40
40
  isMobile: boolean;
41
+ /**
42
+ * string: selected floor level
43
+ */
44
+ floorLevel: string;
45
+ /**
46
+ * string: selected floor level
47
+ */
48
+ formElements: any;
41
49
  /**
42
50
  * boolean: When true a loading indicator will be shown while the editor loads
43
51
  */
@@ -51,6 +59,20 @@ export declare class CreateFeature {
51
59
  * The Editor constructor
52
60
  */
53
61
  protected Editor: typeof import("esri/widgets/Editor");
62
+ /**
63
+ * esri/form/ExpressionInfo: https://developers.arcgis.com/javascript/latest/api-reference/esri-form-ExpressionInfo.html
64
+ * The ExpressionInfo constructor
65
+ */
66
+ protected ExpressionInfo: typeof import("esri/form/ExpressionInfo");
67
+ /**
68
+ * esri/form/elements/FieldElement: https://developers.arcgis.com/javascript/latest/api-reference/esri-form-elements-FieldElement.html
69
+ * The FieldElement constructor
70
+ */
71
+ protected FieldElement: typeof import("esri/form/elements/FieldElement");
72
+ /**
73
+ * esri/form/FormTemplate: https://developers.arcgis.com/javascript/latest/api-reference/esri-form-FormTemplate.html
74
+ */
75
+ protected FormTemplate: typeof import("esri/form/FormTemplate");
54
76
  /**
55
77
  * esri/widgets/Editor: https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html
56
78
  * The Editor instance
@@ -123,6 +145,11 @@ export declare class CreateFeature {
123
145
  * @returns Promise that resolves when the operation is complete
124
146
  */
125
147
  submit(): Promise<void>;
148
+ /**
149
+ * refresh the feature form
150
+ * @returns Promise that resolves when the operation is complete
151
+ */
152
+ refresh(floorLevel: string): Promise<void>;
126
153
  /**
127
154
  * Emitted on demand when the feature is created successfully
128
155
  */
@@ -204,6 +231,13 @@ export declare class CreateFeature {
204
231
  * @protected
205
232
  */
206
233
  protected _getSearchConfig(searchConfiguration: ISearchConfiguration, view: __esri.MapView): ISearchConfiguration;
234
+ /**
235
+ * Add the floor level value to form
236
+ * @param level selected floor level
237
+ *
238
+ * @protected
239
+ */
240
+ protected _setFloorLevel(level: string): Promise<void>;
207
241
  /**
208
242
  * Hides the elements of editor widget
209
243
  * @protected
@@ -38,6 +38,10 @@ export declare class CrowdsourceManager {
38
38
  * will emit an event when clicked that the consuming application can respond to that will open the cover page.
39
39
  */
40
40
  coverPageEnabled: boolean;
41
+ /**
42
+ * string: custom notification text to display in the card manager
43
+ */
44
+ customInfoText: string;
41
45
  /**
42
46
  * string: default center point values for the map
43
47
  * ; delimited x;y pair
@@ -17,6 +17,7 @@ import { VNode, EventEmitter } from "../../stencil-public-runtime";
17
17
  import { ILayerExpression, IMapChange, IMapClick, IMapInfo, IReportingOption, IReportingOptions, ISearchConfiguration, ISortingInfo, theme } from "../../utils/interfaces";
18
18
  import CrowdsourceReporter_T9n from "../../assets/t9n/crowdsource-reporter/resources.json";
19
19
  import { ILayerItemsHash } from "../layer-list/layer-list";
20
+ import { FilterInitState } from "@esri/instant-apps-components";
20
21
  export declare class CrowdsourceReporter {
21
22
  el: HTMLCrowdsourceReporterElement;
22
23
  /**
@@ -123,6 +124,14 @@ export declare class CrowdsourceReporter {
123
124
  * boolean: When true the profile image of the comment creator will be shown in the comments list
124
125
  */
125
126
  showUserImageInCommentsList: boolean;
127
+ /**
128
+ * boolean: When true the feature symbology of the feature will shown in the features list
129
+ */
130
+ showFeatureSymbol: boolean;
131
+ /**
132
+ * boolean: To show only those features which are created by the logged in user
133
+ */
134
+ showMyReportsOnly?: boolean;
126
135
  /**
127
136
  * theme: "light" | "dark" theme to be used
128
137
  */
@@ -131,6 +140,10 @@ export declare class CrowdsourceReporter {
131
140
  * number: default scale to zoom to when zooming to a single point feature
132
141
  */
133
142
  zoomToScale: number;
143
+ /**
144
+ * string: selected floor level
145
+ */
146
+ floorLevel: string;
134
147
  /**
135
148
  * string: Error message when feature creation fails
136
149
  */
@@ -139,10 +152,6 @@ export declare class CrowdsourceReporter {
139
152
  * boolean: When true an indicator will be shown on the action
140
153
  */
141
154
  _filterActive: boolean;
142
- /**
143
- * boolean: When true the filter component will be displayed
144
- */
145
- _filterOpen: boolean;
146
155
  /**
147
156
  * string[]: Reporter flow items list
148
157
  */
@@ -276,6 +285,11 @@ export declare class CrowdsourceReporter {
276
285
  * esri/core/reactiveUtils: https://developers.arcgis.com/javascript/latest/api-reference/esri-core-reactiveUtils.html
277
286
  */
278
287
  protected reactiveUtils: typeof import("esri/core/reactiveUtils");
288
+ /**
289
+ * "esri/layers/support/FeatureFilter": https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-FeatureFilter.html
290
+ * Esri FeatureFilter
291
+ */
292
+ protected FeatureFilter: typeof import("esri/layers/support/FeatureFilter");
279
293
  /**
280
294
  * __esri.Graphic: The selected feature
281
295
  */
@@ -312,6 +326,22 @@ export declare class CrowdsourceReporter {
312
326
  * boolean: when true allow panel to show in full height
313
327
  */
314
328
  protected _showFullPanel: boolean;
329
+ /**
330
+ * string: The current floor expression
331
+ */
332
+ protected _floorExpression: string;
333
+ /**
334
+ * _esri.Element: form elements of the selected layer
335
+ */
336
+ protected _formElements: any[];
337
+ /**
338
+ * string[]: URL params set by using filters.
339
+ */
340
+ protected _filterUrlParams: string[];
341
+ /**
342
+ * FilterInitState: filter's init state
343
+ */
344
+ protected _filterInitState: FilterInitState;
315
345
  /**
316
346
  * Called each time the mapView prop is changed.
317
347
  */
@@ -320,6 +350,10 @@ export declare class CrowdsourceReporter {
320
350
  * Called each time the mapView prop is changed.
321
351
  */
322
352
  mapViewWatchHandler(): Promise<void>;
353
+ /**
354
+ * Called each time the floorLevel prop is changed.
355
+ */
356
+ floorLevelWatchHandler(): Promise<void>;
323
357
  /**
324
358
  * Emitted when toggle panel button is clicked in reporter
325
359
  */
@@ -362,21 +396,6 @@ export declare class CrowdsourceReporter {
362
396
  * @protected
363
397
  */
364
398
  protected _getReporter(): VNode;
365
- /**
366
- * Show filter component in modal
367
- * @returns node to interact with any configured filters for the current layer
368
- */
369
- protected filterModal(): VNode;
370
- /**
371
- * Close the filter modal
372
- * @protected
373
- */
374
- protected _closeFilter(): void;
375
- /**
376
- * When true the filter modal will be displayed
377
- * @protected
378
- */
379
- protected _toggleFilter(): void;
380
399
  /**
381
400
  * On sort option click update the sort field and sort order
382
401
  * @param sortField sort field
@@ -390,10 +409,15 @@ export declare class CrowdsourceReporter {
390
409
  */
391
410
  protected _toggleSort(): Node;
392
411
  /**
393
- * Reset the filter active prop
412
+ * Restores the applied filters
413
+ * @protected
414
+ */
415
+ protected _restoreFilters(): void;
416
+ /**
417
+ * Reset the filter
394
418
  * @protected
395
419
  */
396
- protected _handleFilterListReset(): void;
420
+ protected _handleFilterListReset(): Promise<void>;
397
421
  /**
398
422
  * Check if the layers definitionExpression has been modified and update the feature list depending on the applied filters
399
423
  * @protected
@@ -502,6 +526,11 @@ export declare class CrowdsourceReporter {
502
526
  * @protected
503
527
  */
504
528
  protected displayFeaturesList(evt: CustomEvent): void;
529
+ /**
530
+ * On back from filter panel get the filter's init state
531
+ * @protected
532
+ */
533
+ protected backFromFilterPanel(): Promise<void>;
505
534
  /**
506
535
  * On back from selected panel navigate to the previous panel
507
536
  * @protected
@@ -554,6 +583,14 @@ export declare class CrowdsourceReporter {
554
583
  * @protected
555
584
  */
556
585
  protected getFeatureListFlowItem(layerId: string, layerName: string): Node;
586
+ /**
587
+ * Get Filter page for apllying filter
588
+ * @param layerId Layer id
589
+ * @param layerName Layer name
590
+ * @returns feature list node
591
+ * @protected
592
+ */
593
+ protected getFilterPanel(): Node;
557
594
  /**
558
595
  * Returns the calcite-flow item for feature details
559
596
  * @returns Node
@@ -632,6 +669,18 @@ export declare class CrowdsourceReporter {
632
669
  * @protected
633
670
  */
634
671
  protected _getTranslations(): Promise<void>;
672
+ /**
673
+ * Applies a definition expression when floor field and level are available
674
+ *
675
+ * @returns boolean
676
+ * @protected
677
+ */
678
+ protected _updateFloorDefinitionExpression(layer: __esri.FeatureLayer): void;
679
+ /**
680
+ * Gets the form template elements
681
+ * @protected
682
+ */
683
+ protected _getFormElements(): void;
635
684
  /**
636
685
  * Returns the ids of all OR configured layers that support edits with the update capability
637
686
  * @param hash each layer item details
@@ -639,6 +688,16 @@ export declare class CrowdsourceReporter {
639
688
  * @returns array of editable layer ids
640
689
  */
641
690
  protected reduceToConfiguredLayers(hash: ILayerItemsHash): string[];
691
+ /**
692
+ * updates the features for layer/feature list
693
+ * @protected
694
+ */
695
+ protected _updateFeatures(): Promise<void>;
696
+ /**
697
+ * Show only loggedIn user's features
698
+ * @protected
699
+ */
700
+ protected _showMyFeaturesOnly(featureLayerView: __esri.FeatureLayerView): Promise<void>;
642
701
  /**
643
702
  * Creates the list of layers to be listed in layer list
644
703
  * @protected
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import { VNode, EventEmitter } from "../../stencil-public-runtime";
17
- import { IPopupUtils, ISortingInfo } from "../../utils/interfaces";
17
+ import { IPopupUtils, IReportingOptions, ISortingInfo } from "../../utils/interfaces";
18
18
  import FeatureList_T9n from "../../assets/t9n/feature-list/resources.json";
19
19
  export declare class FeatureList {
20
20
  el: HTMLFeatureListElement;
@@ -66,6 +66,18 @@ export declare class FeatureList {
66
66
  * boolean: If true display's profile img on each feature item
67
67
  */
68
68
  showUserImageInList?: boolean;
69
+ /**
70
+ * boolean: If true display's feature symbol on each feature item
71
+ */
72
+ showFeatureSymbol?: boolean;
73
+ /**
74
+ * boolean: If true will consider the FeatureFilter applied on the layerview
75
+ */
76
+ applyLayerViewFilter?: boolean;
77
+ /**
78
+ * IReportingOptions: Key options for reporting
79
+ */
80
+ reportingOptions: IReportingOptions;
69
81
  /**
70
82
  * calcite-list-item list of features with popup titles
71
83
  */
@@ -93,6 +105,11 @@ export declare class FeatureList {
93
105
  * Esri config
94
106
  */
95
107
  protected esriConfig: typeof import("esri/config");
108
+ /**
109
+ * "esri/symbols/support/symbolUtils": https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-support-symbolUtils.html
110
+ * Symbol utils
111
+ */
112
+ protected symbolUtils: typeof import("esri/symbols/support/symbolUtils");
96
113
  /**
97
114
  * IPopupUtils: To fetch the list label using popup titles
98
115
  */
@@ -109,6 +126,18 @@ export declare class FeatureList {
109
126
  * HTMLCalcitePaginationElement: Calcite pagination element instance
110
127
  */
111
128
  protected _pagination: HTMLCalcitePaginationElement;
129
+ /**
130
+ * string[]: Valid field types for like
131
+ */
132
+ protected _validFieldTypes: string[];
133
+ /**
134
+ * string: Abbrivated like count of the feature
135
+ */
136
+ protected _abbreviatedLikeCount: string;
137
+ /**
138
+ * boolean: When true configured like field is available in selected layer
139
+ */
140
+ protected _likeFieldAvailable: boolean;
112
141
  /**
113
142
  * Watch for selectedLayerId change and update layer instance and features list for new layerId
114
143
  */
@@ -144,16 +173,16 @@ export declare class FeatureList {
144
173
  */
145
174
  render(): any;
146
175
  /**
147
- * Load esri javascript api modules
148
- * @returns Promise resolving when function is done
149
- * @protected
150
- */
176
+ * Load esri javascript api modules
177
+ * @returns Promise resolving when function is done
178
+ * @protected
179
+ */
151
180
  protected initModules(): Promise<void>;
152
181
  /**
153
182
  * Return the where condition string considering the defined where clause and layer's definition expression
154
183
  * @protected
155
184
  */
156
- protected getWhereCondition(): string;
185
+ protected getWhereCondition(): Promise<string>;
157
186
  /**
158
187
  * Initialize the features list using the selected layer
159
188
  * @protected
@@ -203,6 +232,12 @@ export declare class FeatureList {
203
232
  * @protected
204
233
  */
205
234
  protected createFeatureItem(featureSet: any): Promise<VNode[]>;
235
+ /**
236
+ * Displays the abbrivated like count on the feature list
237
+ * @param feature feature of the layer
238
+ * @protected
239
+ */
240
+ protected getAbbreviatedLikeCount(feature: __esri.Graphic): void;
206
241
  /**
207
242
  * Get each feature item
208
243
  * @param selectedFeature Each individual feature instance to be listed
@@ -210,7 +245,7 @@ export declare class FeatureList {
210
245
  * @returns individual feature item to be rendered
211
246
  * @protected
212
247
  */
213
- protected getFeatureItem(selectedFeature: __esri.Graphic, popupTitle: string, userInfo: any): VNode;
248
+ protected getFeatureItem(selectedFeature: __esri.Graphic, popupTitle: string, featureSymbol: HTMLDivElement, userInfo: any): VNode;
214
249
  /**
215
250
  *
216
251
  * @param feature Each individual feature instance to be listed
@@ -219,6 +254,13 @@ export declare class FeatureList {
219
254
  * @protected
220
255
  */
221
256
  protected getUserInformation(feature: __esri.Graphic, creatorField: string): Promise<any>;
257
+ /**
258
+ * Creates a feature symbology
259
+ * @param feature Each individual feature
260
+ * @returns Feature symbology
261
+ * @protected
262
+ */
263
+ protected getFeatureSymbol(feature: __esri.Graphic): Promise<HTMLDivElement>;
222
264
  /**
223
265
  * Fetches the component's translations
224
266
  * @returns Promise when complete
@@ -42,6 +42,10 @@ export declare class LayerList {
42
42
  * boolean: If true display's arrow icon on each layer item
43
43
  */
44
44
  showNextIcon?: boolean;
45
+ /**
46
+ * boolean: If true will consider the FeatureFilter applied on the layerview
47
+ */
48
+ applyLayerViewFilter?: boolean;
45
49
  /**
46
50
  * boolean: When true will display message no layers found
47
51
  */
@@ -71,6 +71,10 @@ export namespace Components {
71
71
  "unit": DistanceUnit;
72
72
  }
73
73
  interface CardManager {
74
+ /**
75
+ * string: custom notice text to display
76
+ */
77
+ "customInfoText": string;
74
78
  /**
75
79
  * When true the geometry of the current feature will be editable
76
80
  */
@@ -124,6 +128,14 @@ export namespace Components {
124
128
  * boolean: Set this to true when have a custom submit button in the app. This will hide the header and footer elements of the editor and user needs to execute the submit method manually.
125
129
  */
126
130
  "customizeSubmit"?: boolean;
131
+ /**
132
+ * string: selected floor level
133
+ */
134
+ "floorLevel": string;
135
+ /**
136
+ * string: selected floor level
137
+ */
138
+ "formElements": any;
127
139
  /**
128
140
  * boolean: When true the application will be in mobile mode, controls the mobile or desktop view
129
141
  */
@@ -132,6 +144,11 @@ export namespace Components {
132
144
  * esri/views/MapView: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html
133
145
  */
134
146
  "mapView": __esri.MapView;
147
+ /**
148
+ * refresh the feature form
149
+ * @returns Promise that resolves when the operation is complete
150
+ */
151
+ "refresh": (floorLevel: string) => Promise<void>;
135
152
  /**
136
153
  * ISearchConfiguration: Configuration details for the Search widget
137
154
  */
@@ -189,6 +206,10 @@ export namespace Components {
189
206
  * boolean: When true a cover page has been enabled in the consuming application. Also when true a floating button will be shown in the lower right of the window that will emit an event when clicked that the consuming application can respond to that will open the cover page.
190
207
  */
191
208
  "coverPageEnabled": boolean;
209
+ /**
210
+ * string: custom notification text to display in the card manager
211
+ */
212
+ "customInfoText": string;
192
213
  /**
193
214
  * string: default center point values for the map ; delimited x;y pair
194
215
  */
@@ -363,6 +384,10 @@ export namespace Components {
363
384
  * boolean: when true the zoom widget will be available
364
385
  */
365
386
  "enableZoom": boolean;
387
+ /**
388
+ * string: selected floor level
389
+ */
390
+ "floorLevel": string;
366
391
  /**
367
392
  * boolean: When true the application will be in mobile mode, controls the mobile or desktop view
368
393
  */
@@ -419,6 +444,14 @@ export namespace Components {
419
444
  * boolean: When true the comments from all users will be visible
420
445
  */
421
446
  "showComments": boolean;
447
+ /**
448
+ * boolean: When true the feature symbology of the feature will shown in the features list
449
+ */
450
+ "showFeatureSymbol": boolean;
451
+ /**
452
+ * boolean: To show only those features which are created by the logged in user
453
+ */
454
+ "showMyReportsOnly"?: boolean;
422
455
  /**
423
456
  * boolean: When true the profile image of the comment creator will be shown in the comments list
424
457
  */
@@ -522,6 +555,10 @@ export namespace Components {
522
555
  interface FeatureFormFlowItem {
523
556
  }
524
557
  interface FeatureList {
558
+ /**
559
+ * boolean: If true will consider the FeatureFilter applied on the layerview
560
+ */
561
+ "applyLayerViewFilter"?: boolean;
525
562
  /**
526
563
  * boolean: Highlight feature on map optional (default false) boolean to indicate if we should highlight when hover on Feature in list
527
564
  */
@@ -547,6 +584,10 @@ export namespace Components {
547
584
  * @returns Promise that resolves when the operation is complete
548
585
  */
549
586
  "refresh": () => Promise<void>;
587
+ /**
588
+ * IReportingOptions: Key options for reporting
589
+ */
590
+ "reportingOptions": IReportingOptions;
550
591
  /**
551
592
  * string: Layer id of the feature layer to show the list
552
593
  */
@@ -555,6 +596,10 @@ export namespace Components {
555
596
  * boolean: If true will show error msg when features are not present
556
597
  */
557
598
  "showErrorWhenNoFeatures"?: boolean;
599
+ /**
600
+ * boolean: If true display's feature symbol on each feature item
601
+ */
602
+ "showFeatureSymbol"?: boolean;
558
603
  /**
559
604
  * boolean: Show initial loading indicator when creating list
560
605
  */
@@ -695,6 +740,10 @@ export namespace Components {
695
740
  "value": any;
696
741
  }
697
742
  interface LayerList {
743
+ /**
744
+ * boolean: If true will consider the FeatureFilter applied on the layerview
745
+ */
746
+ "applyLayerViewFilter"?: boolean;
698
747
  /**
699
748
  * string[]: If passed will show only these layers in the list if they are present in map and are editable
700
749
  */
@@ -2566,6 +2615,10 @@ declare namespace LocalJSX {
2566
2615
  "unit"?: DistanceUnit;
2567
2616
  }
2568
2617
  interface CardManager {
2618
+ /**
2619
+ * string: custom notice text to display
2620
+ */
2621
+ "customInfoText"?: string;
2569
2622
  /**
2570
2623
  * When true the geometry of the current feature will be editable
2571
2624
  */
@@ -2614,6 +2667,14 @@ declare namespace LocalJSX {
2614
2667
  * boolean: Set this to true when have a custom submit button in the app. This will hide the header and footer elements of the editor and user needs to execute the submit method manually.
2615
2668
  */
2616
2669
  "customizeSubmit"?: boolean;
2670
+ /**
2671
+ * string: selected floor level
2672
+ */
2673
+ "floorLevel"?: string;
2674
+ /**
2675
+ * string: selected floor level
2676
+ */
2677
+ "formElements"?: any;
2617
2678
  /**
2618
2679
  * boolean: When true the application will be in mobile mode, controls the mobile or desktop view
2619
2680
  */
@@ -2706,6 +2767,10 @@ declare namespace LocalJSX {
2706
2767
  * boolean: When true a cover page has been enabled in the consuming application. Also when true a floating button will be shown in the lower right of the window that will emit an event when clicked that the consuming application can respond to that will open the cover page.
2707
2768
  */
2708
2769
  "coverPageEnabled"?: boolean;
2770
+ /**
2771
+ * string: custom notification text to display in the card manager
2772
+ */
2773
+ "customInfoText"?: string;
2709
2774
  /**
2710
2775
  * string: default center point values for the map ; delimited x;y pair
2711
2776
  */
@@ -2888,6 +2953,10 @@ declare namespace LocalJSX {
2888
2953
  * boolean: when true the zoom widget will be available
2889
2954
  */
2890
2955
  "enableZoom"?: boolean;
2956
+ /**
2957
+ * string: selected floor level
2958
+ */
2959
+ "floorLevel"?: string;
2891
2960
  /**
2892
2961
  * boolean: When true the application will be in mobile mode, controls the mobile or desktop view
2893
2962
  */
@@ -2948,6 +3017,14 @@ declare namespace LocalJSX {
2948
3017
  * boolean: When true the comments from all users will be visible
2949
3018
  */
2950
3019
  "showComments"?: boolean;
3020
+ /**
3021
+ * boolean: When true the feature symbology of the feature will shown in the features list
3022
+ */
3023
+ "showFeatureSymbol"?: boolean;
3024
+ /**
3025
+ * boolean: To show only those features which are created by the logged in user
3026
+ */
3027
+ "showMyReportsOnly"?: boolean;
2951
3028
  /**
2952
3029
  * boolean: When true the profile image of the comment creator will be shown in the comments list
2953
3030
  */
@@ -3066,6 +3143,10 @@ declare namespace LocalJSX {
3066
3143
  interface FeatureFormFlowItem {
3067
3144
  }
3068
3145
  interface FeatureList {
3146
+ /**
3147
+ * boolean: If true will consider the FeatureFilter applied on the layerview
3148
+ */
3149
+ "applyLayerViewFilter"?: boolean;
3069
3150
  /**
3070
3151
  * boolean: Highlight feature on map optional (default false) boolean to indicate if we should highlight when hover on Feature in list
3071
3152
  */
@@ -3090,6 +3171,10 @@ declare namespace LocalJSX {
3090
3171
  * number: Number features to be fetched per page, by default 100 features will be fetched
3091
3172
  */
3092
3173
  "pageSize"?: number;
3174
+ /**
3175
+ * IReportingOptions: Key options for reporting
3176
+ */
3177
+ "reportingOptions"?: IReportingOptions;
3093
3178
  /**
3094
3179
  * string: Layer id of the feature layer to show the list
3095
3180
  */
@@ -3098,6 +3183,10 @@ declare namespace LocalJSX {
3098
3183
  * boolean: If true will show error msg when features are not present
3099
3184
  */
3100
3185
  "showErrorWhenNoFeatures"?: boolean;
3186
+ /**
3187
+ * boolean: If true display's feature symbol on each feature item
3188
+ */
3189
+ "showFeatureSymbol"?: boolean;
3101
3190
  /**
3102
3191
  * boolean: Show initial loading indicator when creating list
3103
3192
  */
@@ -3212,6 +3301,10 @@ declare namespace LocalJSX {
3212
3301
  "value"?: any;
3213
3302
  }
3214
3303
  interface LayerList {
3304
+ /**
3305
+ * boolean: If true will consider the FeatureFilter applied on the layerview
3306
+ */
3307
+ "applyLayerViewFilter"?: boolean;
3215
3308
  /**
3216
3309
  * string[]: If passed will show only these layers in the list if they are present in map and are editable
3217
3310
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/solutions-components",
3
- "version": "0.10.12",
3
+ "version": "0.10.14",
4
4
  "description": "Web Components for Esri's Solutions Applications",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -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,g as s,h as e}from"./p-6eb37ed2.js";import{l as a,g as h}from"./p-2058b5d9.js";import{P as n}from"./p-900fee65.js";import{g as c,c as r,h as o}from"./p-eb483242.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";import"./p-022c49af.js";import"./p-659678f1.js";import"./p-7c583516.js";import"./p-80cb7c73.js";const l=class{constructor(s){t(this,s),this.featureSelect=i(this,"featureSelect",7),this.selectedLayerId=void 0,this.mapView=void 0,this.noFeaturesFoundMsg=void 0,this.pageSize=100,this.highlightOnMap=!1,this.highlightOnHover=!1,this.sortingInfo=void 0,this.whereClause=void 0,this.textSize="large",this.showInitialLoading=!0,this.showErrorWhenNoFeatures=!0,this.showUserImageInList=!1,this._featureItems=[],this._featuresCount=0,this._isLoading=!1,this._translations=void 0}get el(){return s(this)}Color;esriConfig;_popupUtils;_selectedLayer;_highlightHandle;_pagination;async selectedLayerWatchHandler(){this._selectedLayer=await c(this.mapView,this.selectedLayerId),await this.initializeFeatureItems()}async sortingInfoWatchHandler(){await this.initializeFeatureItems()}async whereClauseHandler(){await this.initializeFeatureItems()}async refresh(){await this.initializeFeatureItems()}featureSelect;async componentWillLoad(){await this.initModules(),await this._getTranslations(),this._isLoading=this.showInitialLoading,this._popupUtils=new n,this.mapView&&this.selectedLayerId&&(this._selectedLayer=await c(this.mapView,this.selectedLayerId))}async componentDidLoad(){await this.initializeFeatureItems()}render(){return e("calcite-panel",{key:"ace7bcabf497e9a61d261fd7ea29dc664ee0a526","full-height":!0,"full-width":!0},this._isLoading&&e("calcite-loader",{key:"675c7f5be7f8456954acdf353f357bac6145c390",label:"",scale:"m"}),this.showErrorWhenNoFeatures&&0===this._featureItems.length&&!this._isLoading&&e("calcite-notice",{key:"b2e6537acdec801ef066a74c78a2c4a13dbbc44b",class:"error-msg",icon:"feature-details",kind:"info",open:!0},e("div",{key:"7697470234b396a904906b80e4fc8df3a0cc732b",slot:"message"},this.noFeaturesFoundMsg?this.noFeaturesFoundMsg:this._translations.featureErrorMsg)),e("calcite-list",{key:"d2b40c9a5e1bf009cb78d640351a16b24711ff59","selection-appearance":"border","selection-mode":"none"},!this._isLoading&&this._featureItems.length>0&&this._featureItems),this._featuresCount>this.pageSize&&e("div",{key:"15b0dae0fb914faf053a4b0cbea6e35ef7abc038",class:"width-full",slot:"footer"},e("calcite-pagination",{key:"04f8eb02535f8cff8de0c111ac2d4bfa883ac128",class:"pagination","full-width":!0,onCalcitePaginationChange:this.pageChanged.bind(this),"page-size":this.pageSize,ref:t=>this._pagination=t,"start-item":"1","total-items":this._featuresCount})))}async initModules(){const[t,i]=await a(["esri/Color","esri/config"]);this.Color=t,this.esriConfig=i}getWhereCondition(){let t="1=1";return this.whereClause&&(t=this.whereClause),this._selectedLayer?.definitionExpression&&(t=t+" AND "+this._selectedLayer.definitionExpression),t}async initializeFeatureItems(){if(this._selectedLayer){this._pagination?.goTo("start"),this._isLoading=this.showInitialLoading,this._featureItems=await this.queryPage(0);const t={where:this.getWhereCondition()};this._featuresCount=await this._selectedLayer.queryFeatureCount(t),this._isLoading=!1}}async pageChanged(t){this._isLoading=!0,this._highlightHandle&&(this._highlightHandle.remove(),this._highlightHandle=null);const i=t.target.startItem-1;this._featureItems=await this.queryPage(i),this._isLoading=!1}async featureClicked(t,i){if(this.clearHighlights(),this.highlightOnMap){const i=Number(t.target.value),s=await r(this.mapView,this.selectedLayerId);this._highlightHandle=await o([i],s,this.mapView,!0)}await this.emitSelectedFeature(i)}async emitSelectedFeature(t){const i=t.layer,s=i.createQuery();s.returnGeometry=!0,s.objectIds=[t.getObjectId()];const e=await i.queryFeatures(s);this.featureSelect.emit(e.features[0])}async onFeatureHover(t){if(this.clearHighlights(),this.highlightOnHover){const i=t.getObjectId(),s=await r(this.mapView,this.selectedLayerId);s.highlightOptions={color:new this.Color("#FFFF00")},this._highlightHandle=s.highlight([i])}}clearHighlights(){this._highlightHandle&&this._highlightHandle.remove()}async queryPage(t){const i=this._selectedLayer,s=this.sortingInfo?.field?this.sortingInfo.field:i.objectIdField,e=this.sortingInfo?.order?this.sortingInfo.order:"desc",a={start:t,num:this.pageSize,outFields:["*"],returnGeometry:!0,where:this.getWhereCondition(),outSpatialReference:this.mapView.spatialReference.toJSON()};s&&e&&(a.orderByFields=[s.toString()+" "+e]);const h=await i.queryFeatures(a);return await this.createFeatureItem(h)}async createFeatureItem(t){const i=t?.features,s=i.map((async t=>{const i=await this._popupUtils.getPopupTitle(t,this.mapView.map);let s;if(this.showUserImageInList){const i=this._selectedLayer.editFieldsInfo?.creatorField.toLowerCase();i&&(s=await this.getUserInformation(t,i))}return this.getFeatureItem(t,i,s)}));return Promise.all(s)}getFeatureItem(t,i,s){const a=t.attributes[this._selectedLayer.objectIdField].toString();i=i??a;const h="small"===this.textSize?"feature-list-popup-title-small":"feature-list-popup-title",n=this.showUserImageInList?"feature-list-popup-title-padding-reduced":"feature-list-popup-title-padding";return e("calcite-list-item",{onCalciteListItemSelect:i=>{this.featureClicked(i,t)},onMouseLeave:()=>{this.clearHighlights()},onMouseOver:()=>{this.onFeatureHover(t)},value:a},this.showUserImageInList&&e("calcite-avatar",{class:"profile-img","full-name":s?.fullName,id:s?.id,scale:"m",slot:"content-start",thumbnail:s?.userProfileUrl,username:s?.username}),e("div",{class:`${h} ${n}`,slot:"content-start"},i),e("calcite-icon",{flipRtl:!0,icon:"chevron-right",scale:"s",slot:"content-end"}))}async getUserInformation(t,i){const s=this.mapView.map.portalItem.portal?.credential?.token;let e=`${this.esriConfig.portalUrl}/sharing/rest/community/users/${t.attributes[i]}?f=json&returnUserLicensedItems=true`;s&&(e+=`&token=${s}`);const a=await fetch(e),h=await a.json();let n=`${this.esriConfig.portalUrl}/sharing/rest/community/users/${h?.username??t.attributes[i]}/info/blob.png`;return h?.access&&s&&(n+=`?token=${s}`),h.userProfileUrl=n,h}async _getTranslations(){const t=await h(this.el);this._translations=t[0]}static get watchers(){return{selectedLayerId:["selectedLayerWatchHandler"],sortingInfo:["sortingInfoWatchHandler"],whereClause:["whereClauseHandler"]}}};l.style=":host{display:block}.width-full{width:100%}.pagination{display:flex;justify-content:center}.error-msg{padding:10px;width:calc(100% - 20px)}.feature-list-popup-title{font-weight:500;white-space:pre-line}.feature-list-popup-title-small{font-size:small;white-space:pre-line}.feature-list-popup-title-padding{padding:10px 12px}.feature-list-popup-title-padding-reduced{padding:10px 0}.profile-img{margin:0 0.75rem;min-width:32px}";export{l as feature_list}