@esri/solutions-components 0.10.12 → 0.10.13

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 (52) 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/crowdsource-reporter.cjs.entry.js +173 -43
  4. package/dist/cjs/feature-list.cjs.entry.js +110 -17
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/{popupUtils-92e52dbf.js → popupUtils-47bd97e7.js} +1 -1
  7. package/dist/cjs/solutions-components.cjs.js +1 -1
  8. package/dist/collection/assets/t9n/crowdsource-reporter/resources.json +3 -1
  9. package/dist/collection/assets/t9n/crowdsource-reporter/resources_en.json +3 -1
  10. package/dist/collection/assets/t9n/feature-list/resources.json +3 -1
  11. package/dist/collection/assets/t9n/feature-list/resources_en.json +3 -1
  12. package/dist/collection/components/create-feature/create-feature.js +145 -2
  13. package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +227 -43
  14. package/dist/collection/components/feature-list/feature-list.css +16 -1
  15. package/dist/collection/components/feature-list/feature-list.js +165 -15
  16. package/dist/collection/components/layer-list/layer-list.js +35 -6
  17. package/dist/collection/demos/crowdsource-reporter.html +2 -0
  18. package/dist/collection/utils/popupUtils.js +1 -1
  19. package/dist/collection/utils/popupUtils.ts +1 -1
  20. package/dist/components/create-feature2.js +91 -3
  21. package/dist/components/crowdsource-reporter.js +178 -45
  22. package/dist/components/feature-list2.js +152 -50
  23. package/dist/components/layer-list2.js +18 -6
  24. package/dist/components/popupUtils.js +1 -1
  25. package/dist/esm/calcite-alert_4.entry.js +1 -1
  26. package/dist/esm/calcite-flow_6.entry.js +104 -8
  27. package/dist/esm/crowdsource-reporter.entry.js +173 -43
  28. package/dist/esm/feature-list.entry.js +110 -17
  29. package/dist/esm/loader.js +1 -1
  30. package/dist/esm/{popupUtils-00c655fb.js → popupUtils-349a26e6.js} +1 -1
  31. package/dist/esm/solutions-components.js +1 -1
  32. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources.json +3 -1
  33. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_en.json +3 -1
  34. package/dist/solutions-components/assets/t9n/feature-list/resources.json +3 -1
  35. package/dist/solutions-components/assets/t9n/feature-list/resources_en.json +3 -1
  36. package/dist/solutions-components/demos/crowdsource-reporter.html +2 -0
  37. package/dist/solutions-components/p-40e305b4.entry.js +17 -0
  38. package/dist/solutions-components/p-4d44410b.entry.js +6 -0
  39. package/dist/solutions-components/{p-900fee65.js → p-5a473f0d.js} +1 -1
  40. package/dist/solutions-components/p-9b83e593.entry.js +6 -0
  41. package/dist/solutions-components/{p-cde8d6e5.entry.js → p-f6bc95b3.entry.js} +1 -1
  42. package/dist/solutions-components/solutions-components.esm.js +1 -1
  43. package/dist/solutions-components/utils/popupUtils.ts +1 -1
  44. package/dist/types/components/create-feature/create-feature.d.ts +34 -0
  45. package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +80 -21
  46. package/dist/types/components/feature-list/feature-list.d.ts +49 -7
  47. package/dist/types/components/layer-list/layer-list.d.ts +4 -0
  48. package/dist/types/components.d.ts +77 -0
  49. package/package.json +1 -1
  50. package/dist/solutions-components/p-064e43e0.entry.js +0 -6
  51. package/dist/solutions-components/p-2d1afda0.entry.js +0 -17
  52. package/dist/solutions-components/p-c9260b4c.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
@@ -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
@@ -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
  */
@@ -124,6 +124,14 @@ export namespace Components {
124
124
  * 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
125
  */
126
126
  "customizeSubmit"?: boolean;
127
+ /**
128
+ * string: selected floor level
129
+ */
130
+ "floorLevel": string;
131
+ /**
132
+ * string: selected floor level
133
+ */
134
+ "formElements": any;
127
135
  /**
128
136
  * boolean: When true the application will be in mobile mode, controls the mobile or desktop view
129
137
  */
@@ -132,6 +140,11 @@ export namespace Components {
132
140
  * esri/views/MapView: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html
133
141
  */
134
142
  "mapView": __esri.MapView;
143
+ /**
144
+ * refresh the feature form
145
+ * @returns Promise that resolves when the operation is complete
146
+ */
147
+ "refresh": (floorLevel: string) => Promise<void>;
135
148
  /**
136
149
  * ISearchConfiguration: Configuration details for the Search widget
137
150
  */
@@ -363,6 +376,10 @@ export namespace Components {
363
376
  * boolean: when true the zoom widget will be available
364
377
  */
365
378
  "enableZoom": boolean;
379
+ /**
380
+ * string: selected floor level
381
+ */
382
+ "floorLevel": string;
366
383
  /**
367
384
  * boolean: When true the application will be in mobile mode, controls the mobile or desktop view
368
385
  */
@@ -419,6 +436,14 @@ export namespace Components {
419
436
  * boolean: When true the comments from all users will be visible
420
437
  */
421
438
  "showComments": boolean;
439
+ /**
440
+ * boolean: When true the feature symbology of the feature will shown in the features list
441
+ */
442
+ "showFeatureSymbol": boolean;
443
+ /**
444
+ * boolean: To show only those features which are created by the logged in user
445
+ */
446
+ "showMyReportsOnly"?: boolean;
422
447
  /**
423
448
  * boolean: When true the profile image of the comment creator will be shown in the comments list
424
449
  */
@@ -522,6 +547,10 @@ export namespace Components {
522
547
  interface FeatureFormFlowItem {
523
548
  }
524
549
  interface FeatureList {
550
+ /**
551
+ * boolean: If true will consider the FeatureFilter applied on the layerview
552
+ */
553
+ "applyLayerViewFilter"?: boolean;
525
554
  /**
526
555
  * boolean: Highlight feature on map optional (default false) boolean to indicate if we should highlight when hover on Feature in list
527
556
  */
@@ -547,6 +576,10 @@ export namespace Components {
547
576
  * @returns Promise that resolves when the operation is complete
548
577
  */
549
578
  "refresh": () => Promise<void>;
579
+ /**
580
+ * IReportingOptions: Key options for reporting
581
+ */
582
+ "reportingOptions": IReportingOptions;
550
583
  /**
551
584
  * string: Layer id of the feature layer to show the list
552
585
  */
@@ -555,6 +588,10 @@ export namespace Components {
555
588
  * boolean: If true will show error msg when features are not present
556
589
  */
557
590
  "showErrorWhenNoFeatures"?: boolean;
591
+ /**
592
+ * boolean: If true display's feature symbol on each feature item
593
+ */
594
+ "showFeatureSymbol"?: boolean;
558
595
  /**
559
596
  * boolean: Show initial loading indicator when creating list
560
597
  */
@@ -695,6 +732,10 @@ export namespace Components {
695
732
  "value": any;
696
733
  }
697
734
  interface LayerList {
735
+ /**
736
+ * boolean: If true will consider the FeatureFilter applied on the layerview
737
+ */
738
+ "applyLayerViewFilter"?: boolean;
698
739
  /**
699
740
  * string[]: If passed will show only these layers in the list if they are present in map and are editable
700
741
  */
@@ -2614,6 +2655,14 @@ declare namespace LocalJSX {
2614
2655
  * 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
2656
  */
2616
2657
  "customizeSubmit"?: boolean;
2658
+ /**
2659
+ * string: selected floor level
2660
+ */
2661
+ "floorLevel"?: string;
2662
+ /**
2663
+ * string: selected floor level
2664
+ */
2665
+ "formElements"?: any;
2617
2666
  /**
2618
2667
  * boolean: When true the application will be in mobile mode, controls the mobile or desktop view
2619
2668
  */
@@ -2888,6 +2937,10 @@ declare namespace LocalJSX {
2888
2937
  * boolean: when true the zoom widget will be available
2889
2938
  */
2890
2939
  "enableZoom"?: boolean;
2940
+ /**
2941
+ * string: selected floor level
2942
+ */
2943
+ "floorLevel"?: string;
2891
2944
  /**
2892
2945
  * boolean: When true the application will be in mobile mode, controls the mobile or desktop view
2893
2946
  */
@@ -2948,6 +3001,14 @@ declare namespace LocalJSX {
2948
3001
  * boolean: When true the comments from all users will be visible
2949
3002
  */
2950
3003
  "showComments"?: boolean;
3004
+ /**
3005
+ * boolean: When true the feature symbology of the feature will shown in the features list
3006
+ */
3007
+ "showFeatureSymbol"?: boolean;
3008
+ /**
3009
+ * boolean: To show only those features which are created by the logged in user
3010
+ */
3011
+ "showMyReportsOnly"?: boolean;
2951
3012
  /**
2952
3013
  * boolean: When true the profile image of the comment creator will be shown in the comments list
2953
3014
  */
@@ -3066,6 +3127,10 @@ declare namespace LocalJSX {
3066
3127
  interface FeatureFormFlowItem {
3067
3128
  }
3068
3129
  interface FeatureList {
3130
+ /**
3131
+ * boolean: If true will consider the FeatureFilter applied on the layerview
3132
+ */
3133
+ "applyLayerViewFilter"?: boolean;
3069
3134
  /**
3070
3135
  * boolean: Highlight feature on map optional (default false) boolean to indicate if we should highlight when hover on Feature in list
3071
3136
  */
@@ -3090,6 +3155,10 @@ declare namespace LocalJSX {
3090
3155
  * number: Number features to be fetched per page, by default 100 features will be fetched
3091
3156
  */
3092
3157
  "pageSize"?: number;
3158
+ /**
3159
+ * IReportingOptions: Key options for reporting
3160
+ */
3161
+ "reportingOptions"?: IReportingOptions;
3093
3162
  /**
3094
3163
  * string: Layer id of the feature layer to show the list
3095
3164
  */
@@ -3098,6 +3167,10 @@ declare namespace LocalJSX {
3098
3167
  * boolean: If true will show error msg when features are not present
3099
3168
  */
3100
3169
  "showErrorWhenNoFeatures"?: boolean;
3170
+ /**
3171
+ * boolean: If true display's feature symbol on each feature item
3172
+ */
3173
+ "showFeatureSymbol"?: boolean;
3101
3174
  /**
3102
3175
  * boolean: Show initial loading indicator when creating list
3103
3176
  */
@@ -3212,6 +3285,10 @@ declare namespace LocalJSX {
3212
3285
  "value"?: any;
3213
3286
  }
3214
3287
  interface LayerList {
3288
+ /**
3289
+ * boolean: If true will consider the FeatureFilter applied on the layerview
3290
+ */
3291
+ "applyLayerViewFilter"?: boolean;
3215
3292
  /**
3216
3293
  * string[]: If passed will show only these layers in the list if they are present in map and are editable
3217
3294
  */
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.13",
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}