@esri/solutions-components 0.10.11 → 0.10.13
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/calcite-alert_4.cjs.entry.js +1 -1
- package/dist/cjs/calcite-combobox_3.cjs.entry.js +5 -3
- package/dist/cjs/calcite-flow_6.cjs.entry.js +103 -7
- package/dist/cjs/crowdsource-reporter.cjs.entry.js +173 -43
- package/dist/cjs/feature-list.cjs.entry.js +110 -17
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-select-tools_3.cjs.entry.js +2 -1
- package/dist/cjs/{popupUtils-92e52dbf.js → popupUtils-47bd97e7.js} +1 -1
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources.json +3 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources_en.json +3 -1
- package/dist/collection/assets/t9n/feature-list/resources.json +3 -1
- package/dist/collection/assets/t9n/feature-list/resources_en.json +3 -1
- package/dist/collection/components/create-feature/create-feature.js +145 -2
- package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +227 -43
- package/dist/collection/components/feature-list/feature-list.css +16 -1
- package/dist/collection/components/feature-list/feature-list.js +165 -15
- package/dist/collection/components/layer-list/layer-list.js +35 -6
- package/dist/collection/components/map-layer-picker/map-layer-picker.js +6 -4
- package/dist/collection/components/map-select-tools/map-select-tools.js +2 -1
- package/dist/collection/demos/crowdsource-reporter.html +2 -0
- package/dist/collection/utils/popupUtils.js +1 -1
- package/dist/collection/utils/popupUtils.ts +1 -1
- package/dist/components/create-feature2.js +91 -3
- package/dist/components/crowdsource-reporter.js +178 -45
- package/dist/components/feature-list2.js +152 -50
- package/dist/components/layer-list2.js +18 -6
- package/dist/components/map-layer-picker2.js +6 -4
- package/dist/components/map-select-tools2.js +2 -1
- package/dist/components/popupUtils.js +1 -1
- package/dist/esm/calcite-alert_4.entry.js +1 -1
- package/dist/esm/calcite-combobox_3.entry.js +6 -4
- package/dist/esm/calcite-flow_6.entry.js +104 -8
- package/dist/esm/crowdsource-reporter.entry.js +173 -43
- package/dist/esm/feature-list.entry.js +110 -17
- package/dist/esm/loader.js +1 -1
- package/dist/esm/map-select-tools_3.entry.js +2 -1
- package/dist/esm/{popupUtils-00c655fb.js → popupUtils-349a26e6.js} +1 -1
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources.json +3 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_en.json +3 -1
- package/dist/solutions-components/assets/t9n/feature-list/resources.json +3 -1
- package/dist/solutions-components/assets/t9n/feature-list/resources_en.json +3 -1
- package/dist/solutions-components/demos/crowdsource-reporter.html +2 -0
- package/dist/solutions-components/{p-1f40908b.entry.js → p-15622ace.entry.js} +2 -2
- package/dist/solutions-components/p-40e305b4.entry.js +17 -0
- package/dist/solutions-components/p-4d44410b.entry.js +6 -0
- package/dist/solutions-components/{p-900fee65.js → p-5a473f0d.js} +1 -1
- package/dist/solutions-components/p-9b83e593.entry.js +6 -0
- package/dist/solutions-components/p-abd3e579.entry.js +6 -0
- package/dist/solutions-components/{p-cde8d6e5.entry.js → p-f6bc95b3.entry.js} +1 -1
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/popupUtils.ts +1 -1
- package/dist/types/components/create-feature/create-feature.d.ts +34 -0
- package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +80 -21
- package/dist/types/components/feature-list/feature-list.d.ts +49 -7
- package/dist/types/components/layer-list/layer-list.d.ts +4 -0
- package/dist/types/components.d.ts +77 -0
- package/package.json +1 -1
- package/dist/solutions-components/p-058b77d7.entry.js +0 -6
- package/dist/solutions-components/p-064e43e0.entry.js +0 -6
- package/dist/solutions-components/p-2d1afda0.entry.js +0 -17
- 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
|
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
|
-
*
|
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
|
-
|
148
|
-
|
149
|
-
|
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 +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 i,c as t,g as e,h as s,H as a}from"./p-6eb37ed2.js";import{a as h,l,g as n}from"./p-2058b5d9.js";import{e as o,h as r,k as c,l as d,c as p,m as b,n as f,o as g}from"./p-eb483242.js";import{a as y,e as m,f as u}from"./p-80cb7c73.js";import{s as w}from"./p-5dcec135.js";import{d as v,a as _}from"./p-022c49af.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";import"./p-720a12c0.js";import"./p-659678f1.js";import"./p-7c583516.js";const S=class{constructor(e){i(this,e),this.selectionSetChange=t(this,"selectionSetChange",7),this.bufferColor=[227,139,79,.8],this.bufferOutlineColor=[255,255,255],this.customLabelEnabled=void 0,this.enabledLayerIds=[],this.enableLayerFeatures=!0,this.enableSearchDistance=!0,this.enableSketchTools=!0,this.defaultBufferDistance=void 0,this.defaultBufferUnit=void 0,this.geometries=[],this.isUpdate=!1,this.layerViews=[],this.locale=void 0,this.mapView=void 0,this.noResultText=void 0,this.searchConfiguration=void 0,this.selectionSet=void 0,this.selectionLayerIds=[],this.selectLayerView=void 0,this.sketchLineSymbol=void 0,this.sketchPointSymbol=void 0,this.sketchPolygonSymbol=void 0,this._numSelected=0,this._searchDistanceEnabled=!1,this._searchTerm=void 0,this._selectionLoading=!1,this._translations=void 0,this._useLayerFeaturesEnabled=!1}get el(){return e(this)}FeatureLayer;Graphic;GraphicsLayer;Search;_geometryEngine;_bufferGeometry;_bufferGraphicsLayer;_bufferTools;_distance;_drawTools;_labelName;_selectLayers;_searchElement;_searchResult;_searchWidget;_selectedIds=[];_selectionLabel="";_skipGeomOIDs;_sketchGraphic;_graphics=[];_unit;_workflowType;_featuresCollection={};async watchGeometriesHandler(i,t){if(i!==t){const t=0===i.length;if(await this._clearResults(t,t),i.length>0)return this._highlightWithOIDsOrGeoms()}}async mapViewWatchHandler(i,t){i&&i!==t&&await this._init()}async watchSearchConfigurationHandler(i,t){JSON.stringify(i)!==JSON.stringify(t)&&await this._initSearchWidget()}async clearSelection(){return this._clearResults(!0,!0)}async getSelection(){return/\S+/gm.test(this._selectionLabel)||await this._updateLabel(),{id:this.isUpdate?this.selectionSet.id:Date.now(),searchResult:this._searchResult,buffer:this._bufferGeometry,distance:this._bufferTools?.distance,download:!0,unit:this._bufferTools?.unit,label:this._selectionLabel,selectedIds:this._selectedIds,layerView:this.selectLayerView,geometries:this.geometries,graphics:this._graphics,selectLayers:this.layerViews,skipGeomOIDs:this._skipGeomOIDs,searchDistanceEnabled:this._searchDistanceEnabled,workflowType:this._workflowType,useLayerFeaturesEnabled:this._useLayerFeaturesEnabled,sketchGraphic:this._sketchGraphic}}selectionSetChange;searchConfigurationChangeChanged(i){this.searchConfiguration=i.detail}async distanceChanged(i){await this._distanceChanged(i.detail)}async unitChanged(i){i.detail.newValue!==i.detail.oldValue&&(this._unit=i.detail.newValue,await this._updateLabel())}async componentWillLoad(){await this._getTranslations(),await this._initModules()}async componentDidLoad(){await this._init()}render(){const i=this.enableSketchTools?"":"display-none",t=this.enableSketchTools?"padding-top-1":"";return s(a,{key:"2643969b71b41cad30ade0900eb391abe054a2ff"},this._getMapLayerPicker(),s("div",{key:"ed4f34f2f6e1b99c5b133ec6097becd13539ebe6",class:"border-bottom"}),s("div",{key:"5aca91cf4f34d343716d68c4f68f88ce98ba0e07",class:"padding-top-sides-1"},s("div",{key:"999f1090ea43e2c71ef8f957ed3dab9c11e9233a",class:"search-widget",ref:i=>{this._searchElement=i}}),s("div",{key:"e92f91fdaba7ec3975fd099c835d013a61af240c",class:t},s("map-draw-tools",{key:"a330983f29bb8c866af82ea50970b779a0a04519",active:!0,class:i,editGraphicsEnabled:!this._useLayerFeaturesEnabled,graphics:this._graphics,mapView:this.mapView,onSketchGraphicsChange:i=>{this._sketchGraphicsChanged(i)},pointSymbol:this.sketchPointSymbol,polygonSymbol:this.sketchPolygonSymbol,polylineSymbol:this.sketchLineSymbol,ref:i=>{this._drawTools=i}})),this.enableSearchDistance?this._getBufferOptions():void 0,this.enableLayerFeatures?this._getUseLayerFeaturesOptions():void 0,this._getNumSelected()),s("div",{key:"022214b69e6c57324c1bc8ffa528adf618f8fe60",class:"border-bottom"}),this._getNameInput())}_getBufferOptions(){const i=this._searchDistanceEnabled?"search-distance":"div-not-visible",t="number"==typeof this.selectionSet?.distance?this.selectionSet.distance:this.defaultBufferDistance;return s("div",null,s("div",{class:"padding-top-1 display-flex"},s("calcite-label",{class:"label-margin-0 w-100",layout:"inline-space-between"},s("div",{class:"tooltip-container"},this._translations.searchDistance,s("calcite-icon",{class:"padding-start-1-2 icon",flipRtl:!("he"===this.locale?.toLowerCase()),icon:"question",id:"search-distance-icon",scale:"s"}))),s("calcite-popover",{closable:!0,label:"",referenceElement:"search-distance-icon"},s("span",{class:"tooltip-message"},this._translations.useSearchDistanceTootip)),s("calcite-switch",{checked:this._searchDistanceEnabled,onCalciteSwitchChange:()=>this._searchDistanceEnabled=!this._searchDistanceEnabled})),s("div",{class:i},s("buffer-tools",{disabled:!this._searchDistanceEnabled,distance:t,geometries:this.geometries,onBufferComplete:i=>{this._bufferComplete(i)},ref:i=>this._bufferTools=i,unit:this.selectionSet?.unit||this.defaultBufferUnit})))}_getUseLayerFeaturesOptions(){const i=this._useLayerFeaturesEnabled?"div-visible":"div-not-visible";return s("div",null,s("div",{class:"padding-top-1 display-flex"},s("calcite-label",{class:"label-margin-0 w-100",layout:"inline-space-between"},s("div",{class:"tooltip-container"},this._translations.useLayerFeatures,s("calcite-icon",{class:"padding-start-1-2 icon",flipRtl:!("he"===this.locale?.toLowerCase()),icon:"question",id:"use-layer-features-icon",scale:"s"}))),s("calcite-popover",{closable:!0,label:"",referenceElement:"use-layer-features-icon"},s("span",{class:"tooltip-message"},this._translations.useLayerFeaturesTooltip)),s("calcite-switch",{checked:this._useLayerFeaturesEnabled,onCalciteSwitchChange:()=>{this._useLayerFeaturesEnabledChanged()}})),s("div",{class:i+" padding-top-1"},s("map-layer-picker",{enabledLayerIds:this.selectionLayerIds,mapView:this.mapView,onLayerSelectionChange:i=>{this._layerSelectionChange(i)},selectedIds:this.layerViews.map((i=>i.layer.id)),showTables:!1})))}_getNumSelected(){const i=h(this.el),t=i&&"en"===i?`${this._translations.selectionLoading}...`:this._translations.selectionLoading;return s("div",{class:"padding-top-1 padding-bottom-1",style:{"align-items":"end",display:"flex"}},this._selectionLoading?s("div",null,s("calcite-loader",{class:"info-blue",inline:!0,label:t,scale:"m",type:"indeterminate"})):s("calcite-icon",{class:"info-blue padding-end-1-2",icon:"feature-layer",scale:"s"}),s("calcite-input-message",{class:"info-blue",scale:"m"},this._selectionLoading?t:this.noResultText&&0===this._numSelected?this.noResultText:this._translations.selectedFeatures.replace("{{n}}",this._numSelected.toString())))}_getNameInput(){return s("div",{class:"padding-sides-1 padding-top-1 "+(this.customLabelEnabled?"":"display-none")},s("calcite-label",{class:"font-bold"},this._translations.listName,s("calcite-input",{onInput:()=>{this._selectionLabel=this._labelName.value},placeholder:this._translations.listNamePlaceholder,ref:i=>{this._labelName=i},value:this._selectionLabel||""})))}_getMapLayerPicker(){return s("div",{class:"display-flex padding-sides-1 padding-bottom-1"},s("calcite-label",{class:"font-bold width-full label-margin-0"},this._translations.inputLayer,s("map-layer-picker",{enabledLayerIds:this.enabledLayerIds,mapView:this.mapView,onLayerSelectionChange:i=>{this._inputLayerSelectionChange(i)},selectedIds:this.selectLayerView?[this.selectLayerView.layer.id]:this.selectionSet?[this.selectionSet.layerView.layer.id]:[],showTables:!1})))}async _initModules(){const[i,t,e,s,a]=await l(["esri/layers/GraphicsLayer","esri/Graphic","esri/widgets/Search","esri/geometry/geometryEngine","esri/layers/FeatureLayer"]);this.GraphicsLayer=i,this.Graphic=t,this.Search=e,this._geometryEngine=s,this.FeatureLayer=a}async _init(){this._initGraphicsLayer(),await this._initSelectionSet(),await this._initSearchWidget()}async _initSelectionSet(){this.selectionSet&&(this._searchTerm=this.selectionSet.searchResult?.name,this._searchResult=this.selectionSet.searchResult,this._selectLayers=this.selectionSet.selectLayers,this._selectedIds=this.selectionSet.selectedIds,this._skipGeomOIDs=this.selectionSet.skipGeomOIDs,this._searchDistanceEnabled=this.selectionSet.searchDistanceEnabled,this._useLayerFeaturesEnabled=this.selectionSet.useLayerFeaturesEnabled,this._distance=this.selectionSet.searchDistanceEnabled?this.selectionSet.distance:0,this._unit=this.selectionSet.unit,this._workflowType=this.selectionSet.workflowType,this.selectLayerView=this.selectionSet.layerView,this._sketchGraphic=this.selectionSet.sketchGraphic,this.geometries=[...this.selectionSet?.geometries||[]],this._graphics=this.geometries.map((i=>new this.Graphic({geometry:i,symbol:"point"===i.type?this.sketchPointSymbol:"polyline"===i.type?this.sketchLineSymbol:this.sketchPolygonSymbol}))),this._selectionLabel=this.selectionSet?.label,this._useLayerFeaturesEnabled||await(this._drawTools?.updateGraphics()),await o(this.selectionSet.selectedIds,this.selectionSet.layerView,this.mapView,!1))}async _initSearchWidget(){if(this.mapView&&this._searchElement){const i=this._getSearchConfig(this.searchConfiguration,this.mapView),t={view:this.mapView,container:this._searchElement,searchTerm:this._searchTerm,...i};this._searchWidget=new this.Search(t),this._searchWidget.popupEnabled=!1,this._searchWidget.resultGraphicEnabled=!1,this._searchWidget.on("search-clear",(()=>{const i=this._searchClearLabel();this._clearResults(!1,i)})),this._searchWidget.on("select-result",(i=>{if(i.result){this._searchResult=i.result;const t=i.result.feature,e=t?.layer,s=this.selectLayerView.layer,a=t?.getObjectId(),h=e?.url&&s?.url&&e.url===s.url&&!isNaN(a),l=h?[a]:void 0;this._workflowType=y.SEARCH,this._updateLabel();const n=[i.result.feature];this._updateSelection(n,h,l),this._drawTools.graphics=n,this._searchWidget.resultGraphic.visible=!1}else{const i=this._searchClearLabel();this._clearResults(!1,i)}})),await this._searchWidget.when((()=>{this._searchWidget.allPlaceholder=this.searchConfiguration?.allPlaceholder&&"find address or place"!==this.searchConfiguration.allPlaceholder.toLowerCase()?this.searchConfiguration.allPlaceholder:this._translations.placeholder}))}}_searchClearLabel(){return this._searchResult?.name&&this._labelName.value.indexOf(this._searchResult.name)>-1}_getSearchConfig(i,t){const e=i?.sources;return e?.length>0?(i={...i,includeDefaultSources:!1},e.forEach((i=>{if(i.hasOwnProperty("layer")){const e=i,s=e.layer?.id,a=s?t.map.findLayerById(s):null,h=e?.layer?.url;a?e.layer=a:h&&(e.layer=new this.FeatureLayer(h))}})),e?.forEach((i=>{if(i.hasOwnProperty("locator")){const t=i;"ArcGIS World Geocoding Service"===t?.name&&(t.outFields=t.outFields||["Addr_type","Match_addr","StAddr","City"],t.singleLineFieldName="SingleLine"),t.url=t.url,delete t.url}}))):i={...i,includeDefaultSources:!0},i}_initGraphicsLayer(){const i=this._translations.bufferLayer;if(this.mapView){const t=this.mapView.map.layers.findIndex((t=>t.title===i));if(t>-1)this._bufferGraphicsLayer=this.mapView.map.layers.getItemAt(t);else{this._bufferGraphicsLayer=new this.GraphicsLayer({title:i,listMode:"hide"}),w.managedLayers[i]="buffer";const t=this.mapView.map.layers.findIndex((i=>i.title===this._translations.sketchLayer));t>-1?this.mapView.map.layers.add(this._bufferGraphicsLayer,t):this.mapView.map.layers.add(this._bufferGraphicsLayer)}}}async _sketchGraphicsChanged(i,t=!1){const e=i.detail.graphics;if(e.length>0&&e[0])if(t||(this._sketchGraphic=e[0]),this._workflowType=this._useLayerFeaturesEnabled?y.SELECT:y.SKETCH,this._workflowType===y.SKETCH&&await this._drawTools.updateGraphics(),await this._updateLabel(),this._clearSearchWidget(),this._useLayerFeaturesEnabled&&!t){const i=Array.isArray(e)?e.map((i=>i.geometry)):this.geometries;await this._selectLayerFeatures(i[0])}else{const t=e.reduce(((i,t)=>(t?.layer?.objectIdField?i.push(t.attributes[t.layer.objectIdField]):t.getObjectId&&i.push(t.getObjectId()),i)),[]),s=i.detail.useOIDs&&t.length>0;this._updateSelection(e,s,t),s&&await this._highlightFeatures(t)}else await this._clearResults(!0,!0)}async _highlightWithOIDsOrGeoms(){return this._skipGeomOIDs?.length>0?(this._selectedIds=this._skipGeomOIDs,this._highlightFeatures(this._selectedIds)):this._geomQuery(this.geometries)}async _highlightFeatures(i){w.removeHandles(),i.length>0&&w.highlightHandles.push(await r(i,this.selectLayerView,this.mapView)),this._numSelected=i.length,this.selectionSetChange.emit(i.length)}async _selectFeatures(i){this._selectionLoading=!0,this._selectedIds=await c(i,this.selectLayerView.layer),this._selectionLoading=!1,this._drawTools.graphics=this._graphics,await this._highlightFeatures(this._selectedIds)}async _bufferComplete(i){this._bufferGeometry=Array.isArray(i.detail)?i.detail[0]:i.detail;let t=this._bufferTools.distance,e=0;if(this._bufferGeometry){const i=new this.Graphic({geometry:this._bufferGeometry,symbol:{type:"simple-fill",color:this.bufferColor,outline:{color:this.bufferOutlineColor,width:1}}});this._bufferGraphicsLayer.removeAll(),this._bufferGraphicsLayer.add(i),await this._selectFeatures([this._bufferGeometry]),await this.mapView.goTo(i.geometry.extent),e=t,t=0}else this._bufferGraphicsLayer&&this._bufferGraphicsLayer.removeAll(),await this._highlightWithOIDsOrGeoms();await this._distanceChanged({oldValue:t,newValue:e})}_geomQuery(i){const t=d(i,this._geometryEngine);return this._selectFeatures(t)}async _clearResults(i=!0,t=!1){this._selectedIds=[],this._distance=void 0,this._unit=void 0,t&&(this._selectionLabel="",this._labelName&&(this._labelName.value="")),this._bufferGraphicsLayer&&this._bufferGraphicsLayer.removeAll(),i&&this._searchWidget&&this._clearSearchWidget(),w.removeHandles(),this._drawTools?.clear&&(this._graphics=[],await this._drawTools.clear()),this.selectionSetChange.emit(this._selectedIds.length)}_clearSearchWidget(){this._searchWidget.clear(),this._searchResult=void 0}_updateSelection(i,t,e){this._selectedIds=t&&e?e:this._selectedIds,this._skipGeomOIDs=t?e:void 0,this.geometries=Array.isArray(i)?i.map((i=>i.geometry)):this.geometries,this._graphics=i}async _updateLabel(){if(this.enableSearchDistance){const i=this._selectionLabel.indexOf(this._translations.sketch)>-1,t=this._selectionLabel.indexOf(this._translations.select)>-1,e=this._selectionLabel.indexOf(this._searchResult?.name)>-1,s=this._workflowType===y.SEARCH?this._searchResult?.name:this._workflowType===y.SELECT?this._translations.select:this._translations.sketch,a=this._unit?this._unit:this._bufferTools.unit,h=await this._bufferTools.getTranslatedUnit(a),l=isNaN(this._distance)?this._bufferTools.distance:this._distance;this._selectionLabel=i||t||e||!this._selectionLabel?`${s} ${l} ${h}`:this._selectionLabel,this._labelName.value=this._selectionLabel}}async _layerSelectionChange(i){if(Array.isArray(i.detail)&&i.detail.length>0){const t=i.detail.map((i=>p(this.mapView,i)));return Promise.all(t).then((i=>{this.layerViews=i,this._featuresCollection={},this._sketchGraphic&&this._sketchGraphicsChanged({detail:{graphics:[this._sketchGraphic],useOIDs:!1}})}))}}async _inputLayerSelectionChange(i){const t=i?.detail?.length>0?i.detail[0]:"";this.selectLayerView&&t===this.selectLayerView.layer.id||(this.selectLayerView=await p(this.mapView,t),await this._updateLabel(),this._bufferGeometry?await this._selectFeatures([this._bufferGeometry]):await this._highlightWithOIDsOrGeoms())}async _distanceChanged(i){i.newValue!==i.oldValue&&(this._distance=i.newValue,await this._updateLabel())}async _selectLayerFeatures(i){this._selectionLoading=!0;const t=this.layerViews.map((t=>(this._featuresCollection[t.layer.id]=[],b(0,t.layer,i,this._featuresCollection))));return Promise.all(t).then((async i=>{this._selectionLoading=!1;let t=[];i.forEach((i=>{Object.keys(i).forEach((e=>{t=t.concat(i[e])}))}));let e=!1;t.forEach((i=>{const t=i.geometry;i.symbol="point"===t.type?this.sketchPointSymbol:"polyline"===t.type?this.sketchLineSymbol:"polygon"===t.type?this.sketchPolygonSymbol:void 0,e=i?.layer?.hasOwnProperty("objectIdField")||i.hasOwnProperty("getObjectId")}));const s=this.layerViews[0].layer.url===this.selectLayerView.layer.url&&e;await this._sketchGraphicsChanged({detail:{graphics:t,useOIDs:s}},!0)}))}_useLayerFeaturesEnabledChanged(){this._useLayerFeaturesEnabled=!this._useLayerFeaturesEnabled,this._sketchGraphic&&this._sketchGraphicsChanged({detail:{graphics:[this._sketchGraphic],useOIDs:!1}})}async _getTranslations(){const i=await n(this.el);this._translations=i[0]}static get watchers(){return{geometries:["watchGeometriesHandler"],mapView:["mapViewWatchHandler"],searchConfiguration:["watchSearchConfigurationHandler"]}}};S.style=':host{display:block}.div-visible{display:inherit}.div-visible-search{display:flex;height:44px;align-items:center;padding-bottom:0}.div-not-visible{display:none}.padding-bottom-1{padding-bottom:1rem}.padding-top-1{padding-top:1rem}.search-widget{width:100% !important;border:1px solid var(--calcite-color-border-input)}.w-100{width:100%}.w-50{width:50%}.search-distance-container{padding-top:"1rem" !important}.end-border{border-inline-end:1px solid var(--calcite-color-border-2)}.search-distance{display:flex;padding-top:1rem}.font-bold{font:bold}.border-bottom{border-bottom:1px solid var(--calcite-color-border-2)}.tooltip-container{display:flex}.padding-start-1-2{padding-inline-start:0.5rem}.icon{--calcite-color-icon-color:var(--calcite-color-brand)}.tooltip-message{padding:5px 8px;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-2)}';const L=Object.freeze({__proto__:null,default:[{descriptionPDF:{labelWidthDisplay:"2-5/8",labelHeightDisplay:"1",labelsPerPageDisplay:"30",averyPartNumber:"*60"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.1875,rightMargin:.1875,topMargin:.5,bottomMargin:.5},numLabelsAcross:3,numLabelsDown:10,labelWidth:2.625,labelHeight:1,horizGapIn:.125,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:4}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"1",labelsPerPageDisplay:"20",averyPartNumber:"*61"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.47637821,bottomMargin:.5},numLabelsAcross:2,numLabelsDown:10,labelWidth:4,labelHeight:1.0025,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:4}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"1-1/3",labelsPerPageDisplay:"14",averyPartNumber:"*62"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.81889808,bottomMargin:.83464612},numLabelsAcross:2,numLabelsDown:7,labelWidth:4,labelHeight:1.3352,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:6}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"2",labelsPerPageDisplay:"10",averyPartNumber:"*63"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.5,bottomMargin:.5},numLabelsAcross:2,numLabelsDown:5,labelWidth:4,labelHeight:2,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:12,maxNumLabelLines:10}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"3-1/3",labelsPerPageDisplay:"6",averyPartNumber:"*64"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.4724412,bottomMargin:.50000027},numLabelsAcross:2,numLabelsDown:3,labelWidth:4,labelHeight:3.342,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:14,maxNumLabelLines:12}},{descriptionPDF:{labelWidthDisplay:"1-3/4",labelHeightDisplay:"1/2",labelsPerPageDisplay:"80",averyPartNumber:"*67"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.307086375,rightMargin:.307086375,topMargin:.4724412,bottomMargin:.49606326},numLabelsAcross:4,numLabelsDown:20,labelWidth:1.75,labelHeight:.50155,horizGapIn:.29527575,vertGapIn:0,labelPadding:.1,fontSizePx:8,maxNumLabelLines:3}},{descriptionPDF:{labelWidthDisplay:"1-3/4",labelHeightDisplay:"2/3",labelsPerPageDisplay:"60",averyPartNumber:"*95"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.28936983,rightMargin:.28936983,topMargin:.53937037,bottomMargin:.5511814},numLabelsAcross:4,numLabelsDown:15,labelWidth:1.75,labelHeight:.6605,horizGapIn:.30708678,vertGapIn:0,labelPadding:.1,fontSizePx:8,maxNumLabelLines:4}}]}),k=class{constructor(t){i(this,t),this.defaultNumLabelsPerPage=void 0,this.disabled=!1,this._translations=void 0}get el(){return e(this)}_labelInfoElement;_intl;async downloadCSV(i,t,e,s=!0){return v(i,t,!0,e,s)}async downloadPDF(i,t,e=!1,s="",a=""){return _(i,t,this._labelInfoElement.selectedOption?.value,e,s,a)}async componentWillLoad(){await this._getTranslations(),await this._initModules()}render(){return s(a,{key:"a2a528f3bb24b8ea11bac5e4e7bfcc87ba81a794"},s("calcite-select",{key:"65188bbe9f8c18e5fde98a2f2dd96961a2354d61",disabled:this.disabled,label:"",ref:i=>{this._labelInfoElement=i}}))}componentDidLoad(){this._renderOptions()}async _initModules(){const[i]=await l(["esri/intl"]);this._intl=i}_getLabelSizeText(i){const t="‎"+i.descriptionPDF.labelWidthDisplay+" x "+i.descriptionPDF.labelHeightDisplay+"‏";return this._translations.pdfLabel.replace("{{n}}",i.descriptionPDF.labelsPerPageDisplay).replace("{{labelSize}}",t)}async _getTranslations(){const i=await n(this.el);this._translations=i[0]}_renderOptions(){(L.default||L).sort(((i,t)=>{const e=parseInt(i.descriptionPDF.labelsPerPageDisplay,10),s=parseInt(t.descriptionPDF.labelsPerPageDisplay,10);return e<s?-1:e>s?1:0})).forEach(((i,t)=>{const e=document.createElement("calcite-option");e.value=i,e.innerHTML=this._getLabelSizeText(i),this._labelInfoElement.appendChild(e),(this.defaultNumLabelsPerPage?parseInt(i.descriptionPDF.labelsPerPageDisplay,10)===this.defaultNumLabelsPerPage:0===t)&&(e.selected=!0,this._labelInfoElement.selectedOption=e)}))}};k.style=":host{display:block}";const P=class{constructor(e){i(this,e),this.selectionLoadingChange=t(this,"selectionLoadingChange",7),this.selectionSetsChanged=t(this,"selectionSetsChanged",7),this.addresseeLayer=void 0,this.enabledLayerIds=[],this.locale=void 0,this.mapView=void 0,this.selectionSets=[],this.sketchLineSymbol=void 0,this.sketchPointSymbol=void 0,this.sketchPolygonSymbol=void 0,this._translations=void 0,this._selectionMode=m.ADD,this._refineLayer=void 0}get el(){return e(this)}_addEnabled=!0;_drawTools;_refineSets=[];_enabledLayerIds=[];_layerPicker;_featuresCollection={};_refineSelectionSet;selectionLoadingChange;selectionSetsChanged;async componentWillLoad(){await this._getTranslations(),this._enabledLayerIds=this._getEnabledLayerIds(),await this._setRefineSet(this._enabledLayerIds[0])}render(){return s(a,{key:"6ca10ddfe06214aa74a308661290a08147587e5b"},s("div",{key:"ecad97854aadc69766dd182c385ba2f5a7447121",class:(this._enabledLayerIds.length>1?"display-block":"display-none")+" padding-top-sides-1"},s("div",{key:"b68331dcf8ae4a36fbd57494e2b9f8daf92906ed",class:"display-flex"},s("calcite-label",{key:"31c0fea32fd5fb0c380ab1e561a7f4d9057e06f6",class:"font-bold width-full label-margin-0"},s("div",{key:"f3e92e9d216e5ff4c14490e2b0278b88807b9762",class:"display-flex"},this._translations.inputLayer,s("calcite-icon",{key:"b1a75c06d01eeb7840be6eeb303f403ebd924454",class:"padding-start-1-2 icon",flipRtl:!("he"===this.locale?.toLowerCase()),icon:"question",id:"refine-input-layer",scale:"s"})),s("map-layer-picker",{key:"27f7e489caf763d87cf4ccf6200f471cb3ae8363",enabledLayerIds:this._enabledLayerIds,mapView:this.mapView,onLayerSelectionChange:i=>{this._layerSelectionChange(i)},ref:i=>{this._layerPicker=i},selectedIds:[this._refineLayer.layer.id],showTables:!1})),s("calcite-popover",{key:"c469bcb0fbbfbc08797541043b0c9130e453737f",closable:!0,label:"",referenceElement:"refine-input-layer"},s("span",{key:"2b3ea14d98fd5f699581fc2d3b1bad6b7c114f0e",class:"tooltip-message"},this._translations.inputLayerTip)))),s("div",{key:"3a73cbd44600beca829f63939777be13ccd22fb3",class:"padding-1"},s("div",{key:"6be9c1a327b1d8ca01f44884faf4ae6f509387da",class:"padding-bottom-1"},s("calcite-segmented-control",{key:"e2115941df58eac148aaf0f21022844ee1ec92a1",class:"w-100",width:"full"},s("calcite-segmented-control-item",{key:"f554b5def04c12fd529eadcdf34df2e702b72f14",checked:this._addEnabled,class:"w-50 word-wrap-anywhere",onClick:()=>this._setSelectionMode(m.ADD),value:m.ADD},s("span",{key:"4436d09c76c7e1baba359ebb04def82ea873b541",class:"font-weight-500"},this._translations.add)),s("calcite-segmented-control-item",{key:"62e865762305dae22aa39fa9811e40649c4f6538",checked:!this._addEnabled,class:"w-50 word-wrap-anywhere",onClick:()=>this._setSelectionMode(m.REMOVE),value:m.REMOVE},s("span",{key:"7dc24184ac22a73d96f9894941dc1ef2628903f3",class:"font-weight-500"},this._translations.remove)))),s("div",{key:"d0830d20118aa73b3ddee7f92365fa8fb13c238f"},s("map-draw-tools",{key:"e956f1711607967919c3ede794f0e51e8e3f69d0",active:!0,drawMode:u.REFINE,mapView:this.mapView,onDrawRedo:()=>this._redo(),onDrawUndo:()=>this._undo(),onSketchGraphicsChange:i=>this._sketchGraphicsChanged(i),pointSymbol:this.sketchPointSymbol,polygonSymbol:this.sketchPolygonSymbol,polylineSymbol:this.sketchLineSymbol,redoEnabled:this._refineSelectionSet?.redoStack.length>0,ref:i=>{this._drawTools=i},undoEnabled:this._refineSelectionSet?.undoStack.length>0})),s("br",{key:"6290a4690597648838ca68d347a827b42c6b75ff"}),s("calcite-list",{key:"90a1b32598473fe55861bbce63d77f5481b88194",class:"list-border"},this._getRefineSelectionSetList())))}_layerSelectionChange(i){this._setRefineSet(i.detail[0])}_setSelectionMode(i){this._selectionMode=i}_sketchGraphicsChanged(i){const t=i.detail?.graphics[0].geometry;this._selectFeatures(t)}_getEnabledLayerIds(){return this.selectionSets.reduce(((i,t)=>{const e=t?.layerView?.layer.id;return e&&i.indexOf(e)<0?i.push(e):t.workflowType===y.REFINE&&Object.keys(t.refineInfos).forEach((t=>{i.indexOf(t)<0&&i.push(t)})),i}),[])}async _setRefineSet(i){this.selectionSets.some((t=>{if(t.workflowType===y.REFINE)return this._refineSelectionSet=t,Object.keys(t.refineInfos).indexOf(i)>-1}))||await this._initRefineSet(i,this._refineSelectionSet),this._refineLayer=this._refineSelectionSet.refineInfos[i].layerView}async _initRefineSet(i,t){const e={};e[i]={addIds:[],removeIds:[],layerView:await p(this.mapView,i)},t?t.refineInfos={...t.refineInfos,...e}:(this._refineSelectionSet={id:Date.now(),searchResult:void 0,buffer:void 0,distance:0,download:!0,unit:"feet",label:"Refine",selectedIds:[],layerView:void 0,geometries:[],graphics:[],selectLayers:[],workflowType:y.REFINE,searchDistanceEnabled:!1,useLayerFeaturesEnabled:!1,refineInfos:e,redoStack:[],undoStack:[],sketchGraphic:void 0},this.selectionSets.push(this._refineSelectionSet))}_undo(){const i=this._refineSelectionSet.undoStack.pop();this._updateIds(i.ids,i.mode===m.ADD?m.REMOVE:m.ADD,this._refineSelectionSet.redoStack,i.layerView)}_redo(){const i=this._refineSelectionSet.redoStack.pop();this._updateIds(i.ids,i.mode===m.ADD?m.REMOVE:m.ADD,this._refineSelectionSet.undoStack,i.layerView)}_getRefineSelectionSetList(){const i=this._getTotal(this.selectionSets);let t;this.selectionSets.some((i=>{if(i.workflowType===y.REFINE)return t=i,!0}));let e=0,a=0;return Object.keys(t.refineInfos).forEach((i=>{e+=t.refineInfos[i].addIds.length,a+=t.refineInfos[i].removeIds.length})),[s("calcite-list-item",{label:this._translations.featuresAdded.replace("{{n}}",e.toString()),"non-interactive":!0}),s("calcite-list-item",{label:this._translations.featuresRemoved.replace("{{n}}",a.toString()),"non-interactive":!0}),s("calcite-list-item",{label:this._translations.totalSelected.replace("{{n}}",i.toString()),"non-interactive":!0})]}_getTotal(i){const t=f(i);return Object.keys(t).reduce(((i,e)=>i+t[e].ids.length),0)}async _getTranslations(){const i=await n(this.el);this._translations=i[0]}async _selectFeatures(i){this.selectionLoadingChange.emit(!0),this._featuresCollection[this._refineLayer?.layer.id]=[];const t=await b(0,this._refineLayer?.layer,i,this._featuresCollection);this.selectionLoadingChange.emit(!1);let e=[];Object.keys(t).forEach((i=>{i===this._refineLayer?.layer.id&&(e=e.concat(t[i]))}));const s=Array.isArray(e)?e.map((i=>i.attributes[i?.layer?.objectIdField])):[];await this._updateIds(s,this._selectionMode,this._refineSelectionSet.undoStack,this._refineLayer),this._drawTools.clear()}async _highlightFeatures(){this._clearHighlight(),w.highlightHandles=await g(this.selectionSets)}_clearHighlight(){w.removeHandles()}async _updateIds(i,t,e,s){let a=!1;const h=this._refineSelectionSet.refineInfos,l=s.layer.id,n={};n[l]={addIds:[],removeIds:[],layerView:s};const o=Object.keys(h).indexOf(l)>-1?h[l]:n[l];if(t===m.ADD)o.addIds=[...new Set([...i,...o.addIds])],o.addIds.length>0&&e.push({ids:i,mode:t,layerView:s}),o.removeIds.length>0&&(o.removeIds=o.removeIds.filter((t=>i.indexOf(t)<0)));else{const h=this.selectionSets.reduce(((t,e)=>(i.forEach((i=>{e.workflowType!==y.REFINE?e.selectedIds.indexOf(i)>-1&&t.push(i):Object.keys(e.refineInfos).some((a=>{const h=e.refineInfos[a];if(h.layerView.layer.id===s.layer.id&&h.addIds.indexOf(i)>-1)return t.push(i),!0}))})),t)),[]);o.removeIds=[...new Set([...h,...o.removeIds])],o.addIds=o.addIds.filter((i=>h.indexOf(i)<0)),o.removeIds.length>0&&e.push({ids:h,mode:t,layerView:s}),this.selectionSets=this.selectionSets.reduce(((i,t)=>(t.workflowType!==y.REFINE&&t.layerView.layer.id===s.layer.id?(t.selectedIds=t.selectedIds.filter((i=>o.removeIds.indexOf(i)<0)),t.selectedIds.length>0?i.push(t):a=!0):i.push(t),i)),[])}this._refineSelectionSet.refineInfos[l]=o,this.selectionSets=[...this.selectionSets],a&&this.selectionSetsChanged.emit(this.selectionSets),await this._highlightFeatures()}};P.style=':host{display:block}.div-visible{display:inherit}.div-not-visible{display:none !important}.padding-top-1-2{padding-top:.5rem}.main-label{display:flex;float:left}html[dir="rtl"] .main-label{display:flex;float:right}.border{outline:1px solid var(--calcite-color-border-input)}.margin-top-1{margin-top:1rem}.esri-sketch{display:flex;flex-flow:column wrap}.esri-widget{box-sizing:border-box;color:#323232;font-size:14px;font-family:"Avenir Next","Helvetica Neue",Helvetica,Arial,sans-serif;line-height:1.3em;background-color:var(--calcite-color-foreground-1)}.esri-sketch__panel{align-items:center;display:flex;flex-flow:row nowrap;padding:0}*/ .esri-sketch__tool-section{border-right:1px solid rgba(110,110,110,.3)}.esri-sketch__section{align-items:center;display:flex;flex-flow:row nowrap;padding:0 7px;margin:6px 0;border-right:1px solid rgba(110,110,110,.3)}.display-flex{display:flex}.font-bold{font-weight:bold}.width-full{width:100%}.label-margin-0{--calcite-label-margin-bottom:0}.padding-start-1-2{padding-inline-start:0.5rem}.font-weight-500{font-weight:500}.word-wrap-anywhere{word-wrap:anywhere}';export{S as map_select_tools,k as pdf_download,P as refine_selection}
|