@esri/solutions-components 0.3.8 → 0.4.0
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.
- package/dist/cjs/buffer-tools_6.cjs.entry.js +37 -33
- package/dist/cjs/calcite-combobox_3.cjs.entry.js +1 -1
- package/dist/cjs/{calcite-input-message.calcite-notice.map-select-tools.pdf-download.refine-selection-d5d5499f.js → calcite-input-message.calcite-notice.map-select-tools.pdf-download.refine-selection-da276a1c.js} +112 -32
- package/dist/cjs/calcite-input-message_5.cjs.entry.js +2 -2
- package/dist/cjs/{index.es-43f519b3.js → index.es-176629d8.js} +2 -2
- package/dist/cjs/layer-table.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{mapViewUtils-24d1d859.js → mapViewUtils-d250b1ed.js} +11 -6
- package/dist/cjs/public-notification.cjs.entry.js +24 -11
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/components/buffer-tools/buffer-tools.js +22 -20
- package/dist/collection/components/map-select-tools/map-select-tools.js +78 -13
- package/dist/collection/components/pdf-download/pdf-download.js +9 -19
- package/dist/collection/components/public-notification/public-notification.js +44 -30
- package/dist/collection/components/refine-selection/refine-selection.js +34 -14
- package/dist/collection/components/refine-selection-tools/refine-selection-tools.js +47 -21
- package/dist/collection/demos/buffer-tools.html +1 -1
- package/dist/collection/demos/new-public-notification.html +1 -11
- package/dist/collection/utils/interfaces.ts +8 -0
- package/dist/collection/utils/mapViewUtils.js +11 -6
- package/dist/collection/utils/mapViewUtils.ts +11 -6
- package/dist/components/buffer-tools2.js +19 -16
- package/dist/components/map-layer-picker2.js +11 -6
- package/dist/components/map-select-tools2.js +72 -15
- package/dist/components/pdf-download2.js +9 -4
- package/dist/components/public-notification.js +23 -11
- package/dist/components/refine-selection-tools2.js +20 -18
- package/dist/components/refine-selection2.js +32 -15
- package/dist/esm/buffer-tools_6.entry.js +37 -33
- package/dist/esm/calcite-combobox_3.entry.js +1 -1
- package/dist/esm/{calcite-input-message.calcite-notice.map-select-tools.pdf-download.refine-selection-b60306b8.js → calcite-input-message.calcite-notice.map-select-tools.pdf-download.refine-selection-c6f63458.js} +112 -32
- package/dist/esm/calcite-input-message_5.entry.js +2 -2
- package/dist/esm/{index.es-4a2bee8f.js → index.es-54a6f3a3.js} +2 -2
- package/dist/esm/layer-table.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{mapViewUtils-c2fb048d.js → mapViewUtils-63e118f8.js} +11 -6
- package/dist/esm/public-notification.entry.js +24 -11
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/demos/buffer-tools.html +1 -1
- package/dist/solutions-components/demos/new-public-notification.html +1 -11
- package/dist/solutions-components/{p-21ae3f97.entry.js → p-117174e8.entry.js} +1 -1
- package/dist/solutions-components/{p-1b7c13f8.js → p-1e459361.js} +1 -1
- package/dist/solutions-components/{p-b4be1c30.entry.js → p-6d28f991.entry.js} +1 -1
- package/dist/solutions-components/{p-547cbe8a.js → p-80f5e33c.js} +12 -12
- package/dist/solutions-components/{p-c5f670fb.entry.js → p-8927862a.entry.js} +1 -1
- package/dist/solutions-components/{p-709c3f22.entry.js → p-8a0c0935.entry.js} +2 -2
- package/dist/solutions-components/p-cc2e20c8.js +36 -0
- package/dist/solutions-components/p-e69c58e5.entry.js +6 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/interfaces.ts +8 -0
- package/dist/solutions-components/utils/mapViewUtils.ts +11 -6
- package/dist/types/components/buffer-tools/buffer-tools.d.ts +2 -2
- package/dist/types/components/map-select-tools/map-select-tools.d.ts +19 -1
- package/dist/types/components/pdf-download/pdf-download.d.ts +0 -5
- package/dist/types/components/public-notification/public-notification.d.ts +11 -6
- package/dist/types/components/refine-selection/refine-selection.d.ts +6 -4
- package/dist/types/components/refine-selection-tools/refine-selection-tools.d.ts +6 -10
- package/dist/types/components.d.ts +24 -28
- package/dist/types/preact.d.ts +2 -1
- package/dist/types/utils/interfaces.d.ts +7 -0
- package/package.json +1 -1
- package/dist/solutions-components/p-b47d1a9a.entry.js +0 -6
- package/dist/solutions-components/p-cd7606eb.js +0 -36
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* It contains typing information for all components that exist in this project.
|
|
6
6
|
*/
|
|
7
7
|
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
|
-
import { DistanceUnit, EExpandType, ERefineMode, ESelectionMode, ESketchType, EWorkflowType,
|
|
8
|
+
import { DistanceUnit, EExpandType, ERefineMode, ESelectionMode, ESketchType, EWorkflowType, IInfoCardValues, IInventoryItem, IMapInfo, IMediaCardValues, IRefineSelectionEvent, ISearchConfiguration, ISearchResult, ISelectionSet, ISolutionSpatialReferenceInfo, ISpatialRefRepresentation, IValueChange, SelectionMode } from "./utils/interfaces";
|
|
9
9
|
import { UserSession } from "@esri/solution-common";
|
|
10
10
|
export namespace Components {
|
|
11
11
|
interface AddRecordModal {
|
|
@@ -30,11 +30,11 @@ export namespace Components {
|
|
|
30
30
|
/**
|
|
31
31
|
* number: The component's maximum selectable value.
|
|
32
32
|
*/
|
|
33
|
-
"
|
|
33
|
+
"max": number;
|
|
34
34
|
/**
|
|
35
35
|
* number: The component's minimum selectable value.
|
|
36
36
|
*/
|
|
37
|
-
"
|
|
37
|
+
"min": number;
|
|
38
38
|
/**
|
|
39
39
|
* number: Displays tick marks on the number line at a specified interval.
|
|
40
40
|
*/
|
|
@@ -282,10 +282,6 @@ export namespace Components {
|
|
|
282
282
|
* @returns Promise resolving when function is done
|
|
283
283
|
*/
|
|
284
284
|
"downloadPDF": (ids: number[], removeDuplicates: boolean) => Promise<void>;
|
|
285
|
-
/**
|
|
286
|
-
* string[]: Optional list of enabled size values for PDF export If empty all sizes will be enabled
|
|
287
|
-
*/
|
|
288
|
-
"enabledSizeValues": number[];
|
|
289
285
|
/**
|
|
290
286
|
* esri/views/layers/FeatureLayerView: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html
|
|
291
287
|
*/
|
|
@@ -316,10 +312,6 @@ export namespace Components {
|
|
|
316
312
|
* number: The default value to show for the buffer unit ("feet"|"meters"|"miles"|"kilometers")
|
|
317
313
|
*/
|
|
318
314
|
"defaultBufferUnit": DistanceUnit;
|
|
319
|
-
/**
|
|
320
|
-
* IExportOptions: Set of options that control export capabilities If not provided all export capabilities will be enabled.
|
|
321
|
-
*/
|
|
322
|
-
"exportOptions": IExportOptions;
|
|
323
315
|
/**
|
|
324
316
|
* The effect that will be applied when featureHighlightEnabled is true esri/layers/support/FeatureEffect: https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-FeatureEffect.html
|
|
325
317
|
*/
|
|
@@ -419,6 +411,10 @@ export namespace Components {
|
|
|
419
411
|
* utils/interfaces/ERefineMode: ALL, SUBSET
|
|
420
412
|
*/
|
|
421
413
|
"refineMode": ERefineMode;
|
|
414
|
+
/**
|
|
415
|
+
* utils/interfaces/ISelectionSet: Refine selection set
|
|
416
|
+
*/
|
|
417
|
+
"refineSelectionSet": ISelectionSet;
|
|
422
418
|
/**
|
|
423
419
|
* Reset the ids collection
|
|
424
420
|
* @returns Promise when complete
|
|
@@ -921,6 +917,14 @@ declare namespace LocalJSX {
|
|
|
921
917
|
* esri/geometry/Geometry: https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html
|
|
922
918
|
*/
|
|
923
919
|
"geometries"?: __esri.Geometry[];
|
|
920
|
+
/**
|
|
921
|
+
* number: The component's maximum selectable value.
|
|
922
|
+
*/
|
|
923
|
+
"max"?: number;
|
|
924
|
+
/**
|
|
925
|
+
* number: The component's minimum selectable value.
|
|
926
|
+
*/
|
|
927
|
+
"min"?: number;
|
|
924
928
|
/**
|
|
925
929
|
* Emitted on demand when a buffer is generated.
|
|
926
930
|
*/
|
|
@@ -933,14 +937,6 @@ declare namespace LocalJSX {
|
|
|
933
937
|
* Emitted on demand when the unit changes
|
|
934
938
|
*/
|
|
935
939
|
"onUnitChanged"?: (event: BufferToolsCustomEvent<IValueChange>) => void;
|
|
936
|
-
/**
|
|
937
|
-
* number: The component's maximum selectable value.
|
|
938
|
-
*/
|
|
939
|
-
"sliderMax"?: number;
|
|
940
|
-
/**
|
|
941
|
-
* number: The component's minimum selectable value.
|
|
942
|
-
*/
|
|
943
|
-
"sliderMin"?: number;
|
|
944
940
|
/**
|
|
945
941
|
* number: Displays tick marks on the number line at a specified interval.
|
|
946
942
|
*/
|
|
@@ -1165,10 +1161,6 @@ declare namespace LocalJSX {
|
|
|
1165
1161
|
* boolean: Controls the enabled/disabled state of download
|
|
1166
1162
|
*/
|
|
1167
1163
|
"disabled"?: boolean;
|
|
1168
|
-
/**
|
|
1169
|
-
* string[]: Optional list of enabled size values for PDF export If empty all sizes will be enabled
|
|
1170
|
-
*/
|
|
1171
|
-
"enabledSizeValues"?: number[];
|
|
1172
1164
|
/**
|
|
1173
1165
|
* esri/views/layers/FeatureLayerView: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html
|
|
1174
1166
|
*/
|
|
@@ -1199,10 +1191,6 @@ declare namespace LocalJSX {
|
|
|
1199
1191
|
* number: The default value to show for the buffer unit ("feet"|"meters"|"miles"|"kilometers")
|
|
1200
1192
|
*/
|
|
1201
1193
|
"defaultBufferUnit"?: DistanceUnit;
|
|
1202
|
-
/**
|
|
1203
|
-
* IExportOptions: Set of options that control export capabilities If not provided all export capabilities will be enabled.
|
|
1204
|
-
*/
|
|
1205
|
-
"exportOptions"?: IExportOptions;
|
|
1206
1194
|
/**
|
|
1207
1195
|
* The effect that will be applied when featureHighlightEnabled is true esri/layers/support/FeatureEffect: https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-FeatureEffect.html
|
|
1208
1196
|
*/
|
|
@@ -1223,6 +1211,10 @@ declare namespace LocalJSX {
|
|
|
1223
1211
|
* Emitted on demand when a buffer is generated.
|
|
1224
1212
|
*/
|
|
1225
1213
|
"onLabelChange"?: (event: PublicNotificationCustomEvent<string>) => void;
|
|
1214
|
+
/**
|
|
1215
|
+
* Emitted on demand when searchConfiguration gets a new value
|
|
1216
|
+
*/
|
|
1217
|
+
"onSearchConfigurationChange"?: (event: PublicNotificationCustomEvent<ISearchConfiguration>) => void;
|
|
1226
1218
|
/**
|
|
1227
1219
|
* ISearchConfiguration: Configuration details for the Search widget
|
|
1228
1220
|
*/
|
|
@@ -1304,7 +1296,7 @@ declare namespace LocalJSX {
|
|
|
1304
1296
|
/**
|
|
1305
1297
|
* Emitted on demand when selection graphics change.
|
|
1306
1298
|
*/
|
|
1307
|
-
"onRefineSelectionGraphicsChange"?: (event: RefineSelectionToolsCustomEvent<
|
|
1299
|
+
"onRefineSelectionGraphicsChange"?: (event: RefineSelectionToolsCustomEvent<IRefineSelectionEvent>) => void;
|
|
1308
1300
|
/**
|
|
1309
1301
|
* Emitted on demand when selection ids change
|
|
1310
1302
|
*/
|
|
@@ -1313,6 +1305,10 @@ declare namespace LocalJSX {
|
|
|
1313
1305
|
* utils/interfaces/ERefineMode: ALL, SUBSET
|
|
1314
1306
|
*/
|
|
1315
1307
|
"refineMode"?: ERefineMode;
|
|
1308
|
+
/**
|
|
1309
|
+
* utils/interfaces/ISelectionSet: Refine selection set
|
|
1310
|
+
*/
|
|
1311
|
+
"refineSelectionSet"?: ISelectionSet;
|
|
1316
1312
|
/**
|
|
1317
1313
|
* boolean: Used to control the visibility of the layer picker
|
|
1318
1314
|
*/
|
package/dist/types/preact.d.ts
CHANGED
|
@@ -466,8 +466,9 @@ declare module "preact/src/jsx" {
|
|
|
466
466
|
|
|
467
467
|
"pdf-download": JSX.SolutionsPdfDownload & JSXInternal.HTMLAttributes<HTMLSolutionsPdfDownloadElement>
|
|
468
468
|
|
|
469
|
-
"public-notification": Omit<JSX.SolutionsPublicNotification, "onLabelChange"> & JSXInternal.HTMLAttributes<HTMLSolutionsPublicNotificationElement> & {
|
|
469
|
+
"public-notification": Omit<JSX.SolutionsPublicNotification, "onLabelChange" | "onSearchConfigurationChange"> & JSXInternal.HTMLAttributes<HTMLSolutionsPublicNotificationElement> & {
|
|
470
470
|
"onlabelChange"?: (event: CustomEvent<any>) => void;
|
|
471
|
+
"onsearchConfigurationChange"?: (event: CustomEvent<any>) => void;
|
|
471
472
|
}
|
|
472
473
|
|
|
473
474
|
"refine-selection": Omit<JSX.SolutionsRefineSelection, "onSelectionSetsChanged"> & JSXInternal.HTMLAttributes<HTMLSolutionsRefineSelectionElement> & {
|
|
@@ -333,6 +333,13 @@ export interface ISelectionSet {
|
|
|
333
333
|
geometries: __esri.Geometry[];
|
|
334
334
|
refineSelectLayers: __esri.FeatureLayerView[];
|
|
335
335
|
refineIds: IRefineIds;
|
|
336
|
+
redoStack?: IRefineOperation[];
|
|
337
|
+
undoStack?: IRefineOperation[];
|
|
338
|
+
skipGeomQuery?: boolean;
|
|
339
|
+
}
|
|
340
|
+
export interface IRefineSelectionEvent {
|
|
341
|
+
graphics: __esri.Graphic[];
|
|
342
|
+
useOIDs: boolean;
|
|
336
343
|
}
|
|
337
344
|
export interface IRefineIds {
|
|
338
345
|
addIds: number[];
|
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,h as s,H as e,g as a}from"./p-c2f00d41.js";import{b as l,c as n,E as d,d as o}from"./p-dbc9a5a8.js";import{l as h}from"./p-eea93a37.js";import{a as c,c as r,g as p,h as g}from"./p-cd7606eb.js";import{s as b}from"./p-4557d5a8.js";import{g as u}from"./p-9260d75a.js";import{g as m,a as v}from"./p-fc884dd6.js";import"./p-00444009.js";import"./p-e1a4994d.js";const f=class{constructor(s){i(this,s),this.labelChange=t(this,"labelChange",7),this.addresseeLayerIds=[],this.bufferColor=[227,139,79,.8],this.bufferOutlineColor=[255,255,255],this.customLabelEnabled=void 0,this.defaultBufferDistance=void 0,this.defaultBufferUnit=void 0,this.exportOptions=void 0,this.featureEffect=void 0,this.featureHighlightEnabled=void 0,this.mapView=void 0,this.noResultText=void 0,this.searchConfiguration=void 0,this.selectionLayerIds=[],this.showRefineSelection=!1,this.showSearchSettings=!0,this.addresseeLayer=void 0,this._downloadActive=!0,this._numSelected=0,this._pageType=l.LIST,this._saveEnabled=!1,this._selectionSets=[],this._sketchType=n.INTERACTIVE,this._selectionWorkflowType=d.SEARCH,this._showLayerSelectionChangeModal=!1,this._translations=void 0}async mapViewWatchHandler(i){(null==i?void 0:i.popup)&&(this._popupsEnabled=null==i?void 0:i.popup.autoOpenEnabled)}async selectionSetsWatchHandler(i,t){i&&i!==t&&i.length>0&&0===i.filter((i=>i.workflowType!==d.REFINE)).length&&(this._selectionSets=[])}async pageTypeWatchHandler(i,t){if(this._checkPopups(),this._clearHighlight(),t!==l.SELECT&&t!==l.REFINE||await this._clearSelection(),i!==l.SELECT)return this._highlightFeatures()}distanceChanged(i){this._updateLabel(i,"distance"),this._distance=i.detail.newValue}selectionSetsChanged(i){this._selectionSets=[...i.detail]}sketchTypeChange(i){this._sketchType=i.detail}unitChanged(i){this._updateLabel(i,"unit"),this._unit=i.detail.newValue}async componentWillLoad(){await this._getTranslations(),await this._initModules()}render(){var i,t,a,n,d,o;const h=this._selectionSets.length>0,c="boolean"!=typeof(null===(t=null===(i=this.exportOptions)||void 0===i?void 0:i.csvOptions)||void 0===t?void 0:t.enabled)||(null===(a=this.exportOptions)||void 0===a?void 0:a.csvOptions.enabled),r="boolean"!=typeof(null===(d=null===(n=this.exportOptions)||void 0===n?void 0:n.pdfOptions)||void 0===d?void 0:d.enabled)||(null===(o=this.exportOptions)||void 0===o?void 0:o.pdfOptions.enabled);return s(e,null,s("calcite-shell",null,s("calcite-action-bar",{class:"border-bottom-1 action-bar-size","expand-disabled":!0,layout:"horizontal",slot:"header"},this._getActionGroup("list-check",!1,l.LIST,this._translations.myLists),this.showRefineSelection?this._getActionGroup("test-data",!h,l.REFINE,this._translations.refineSelection):void 0,r?this._getActionGroup("file-pdf",!h,l.PDF,this._translations.downloadPDF):void 0,c?this._getActionGroup("file-csv",!h,l.CSV,this._translations.downloadCSV):void 0),this._getPage(this._pageType)))}async _initModules(){const[i]=await h(["esri/geometry/geometryEngine"]);this._geometryEngine=i}_getActionGroup(i,t,e,a){return s("calcite-action-group",{class:this.showRefineSelection?"action-center w-1-4":"action-center w-1-3",layout:"horizontal"},s("calcite-action",{active:this._pageType===e,alignment:"center",class:"width-full height-full",compact:!1,disabled:t,icon:i,id:i,onClick:()=>{this._setPageType(e)},text:""}),s("calcite-tooltip",{label:"",placement:"bottom","reference-element":i},s("span",null,a)))}_setPageType(i){this._pageType=i}_getPage(i){let t;switch(i){case l.LIST:t=this._getListPage();break;case l.SELECT:t=this._getSelectPage();break;case l.REFINE:t=this._getRefinePage();break;case l.PDF:t=this._getPDFPage();break;case l.CSV:t=this._getCSVPage()}return t}_getListPage(){const i=this._selectionSets.filter((i=>i.workflowType!==d.REFINE)).length>0,t=m(this._selectionSets);return i?s("calcite-panel",null,s("div",{class:"padding-top-sides-1"},s("calcite-label",{class:"font-bold"},this._translations.myLists)),this._getNotice(this._translations.listHasSetsTip,"padding-sides-1 padding-bottom-1"),this._getMapLayerPicker(),s("div",{class:"display-block padding-sides-1 height-1-1-2"},s("div",{class:"display-block float-left"},s("calcite-label",{alignment:"start",class:"font-bold"},this._translations.notifications)),s("div",{class:"display-block float-right"},s("calcite-input-message",{active:!0,class:"info-blue margin-top-0",scale:"m"},this._translations.uniqueCout.replace("{{n}}",t.toString())))),i?this._getSelectionSetList():s("div",{class:"info-message"},s("calcite-input-message",{active:!0,class:"info-blue",scale:"m"},this._translations.noNotifications)),s("div",{class:"display-flex padding-1"},s("calcite-button",{onClick:()=>{this._setPageType(l.SELECT)},width:"full"},this._translations.add)),this._showModal(this._showLayerSelectionChangeModal)):s("calcite-panel",null,s("div",{class:"padding-top-sides-1"},s("calcite-label",{class:"font-bold"},this._translations.myLists)),s("div",{class:"padding-sides-1"},s("calcite-label",null,this._translations.notifications)),s("div",{class:"info-message padding-bottom-1"},s("calcite-input-message",{active:!0,class:"info-blue",scale:"m"},this._translations.noNotifications)),this._getNotice(this._translations.selectLayerAndAdd,"padding-sides-1 padding-bottom-1"),this._getMapLayerPicker(),s("div",{class:"display-flex padding-1"},s("calcite-button",{onClick:()=>{this._setPageType(l.SELECT)},width:"full"},this._translations.add)))}_getMapLayerPicker(){var i;return s("div",{class:"display-flex padding-sides-1"},s("calcite-label",{class:"font-bold width-full"},this._translations.addresseeLayer,s("map-layer-picker",{enabledLayerIds:this.addresseeLayerIds,mapView:this.mapView,onLayerSelectionChange:i=>this._layerSelectionChange(i),selectedLayerIds:this.addresseeLayer?[null===(i=this.addresseeLayer)||void 0===i?void 0:i.layer.id]:[],selectionMode:"single"})))}_getSelectionSetList(){return s("calcite-list",{class:"list-border margin-sides-1"},this._selectionSets.reduce(((i,t,e)=>(t.workflowType!==d.REFINE&&i.push(s("calcite-list-item",{description:this._translations.selectedFeatures.replace("{{n}}",t.selectedIds.length.toString()),label:t.label,onClick:()=>this._gotoSelection(t,this.mapView)},this._getAction(!0,"pencil","",(i=>this._openSelection(t,i)),!1,"actions-end"),this._getAction(!0,"x","",(i=>this._deleteSelection(e,i)),!1,"actions-end"))),i)),[]))}_showModal(i){return s("calcite-modal",{"aria-labelledby":"modal-title","background-color":"grey",color:"red",open:i,scale:"s",width:"s"},s("div",{id:"modal-title",slot:"header"},this._translations.shouldProceed),s("div",{slot:"content"},this._translations.proceedInfo),s("calcite-button",{appearance:"outline",onClick:()=>this._cancelLayerChange(),slot:"secondary",width:"full"},this._translations.cancel),s("calcite-button",{onClick:()=>this._handleLayerChange(),slot:"primary",width:"full"},this._translations.proceed))}_cancelLayerChange(){this._layerSelectionChangeEvt.preventDefault(),this._layerSelectionChangeEvt.stopPropagation(),this._layerSelectionChangeEvt=void 0,this._showLayerSelectionChangeModal=!1}async _handleLayerChange(){var i,t;this._showLayerSelectionChangeModal=!1;const s=(null===(t=null===(i=this._layerSelectionChangeEvt)||void 0===i?void 0:i.detail)||void 0===t?void 0:t.length)>0?this._layerSelectionChangeEvt.detail[0]:"";await this._updateAddresseeLayer(s)}_getSelectPage(){var i,t;const e=this._selectionWorkflowType===d.SELECT?this._translations.selectLayerTip:this._selectionWorkflowType===d.SKETCH?this._sketchType===n.INTERACTIVE?this._translations.selectSketchTip:this._translations.selectLayerTip:this._translations.selectSearchTip,a=this.customLabelEnabled?"":"display-none";return s("calcite-panel",null,this._getLabel(this._translations.stepTwoFull.replace("{{layer}}",null===(i=this.addresseeLayer)||void 0===i?void 0:i.layer.title)),this._getNotice(e),s("div",{class:"padding-top-sides-1"},s("map-select-tools",{bufferColor:this.bufferColor,bufferOutlineColor:this.bufferOutlineColor,class:"font-bold",defaultBufferDistance:this.defaultBufferDistance,defaultBufferUnit:this.defaultBufferUnit,enabledLayerIds:this.selectionLayerIds,isUpdate:!!this._activeSelection,mapView:this.mapView,onSelectionSetChange:i=>this._updateForSelection(i),onWorkflowTypeChange:i=>this._updateForWorkflowType(i),ref:i=>{this._selectTools=i},searchConfiguration:this.searchConfiguration,selectLayerView:this.addresseeLayer,selectionSet:this._activeSelection,showBufferTools:this.showSearchSettings})),s("div",{class:"padding-sides-1 padding-bottom-1",style:{"align-items":"end",display:"flex"}},s("calcite-icon",{class:"info-blue padding-end-1-2",icon:"feature-layer",scale:"s"}),s("calcite-input-message",{active:!0,class:"info-blue",scale:"m"},this.noResultText&&0===this._numSelected?this.noResultText:this._translations.selectedAddresses.replace("{{n}}",this._numSelected.toString()).replace("{{layer}}",(null===(t=this.addresseeLayer)||void 0===t?void 0:t.layer.title)||""))),s("div",{class:"padding-sides-1 "+a},s("calcite-label",{class:"font-bold"},"Name label",s("calcite-input",{onInput:()=>{this.labelChange.emit(this._labelName.value)},placeholder:"Insert label here...",ref:i=>{this._labelName=i},value:this._customLabel||""}))),this._getPageNavButtons(this._translations.done,0===this._numSelected,(()=>{this._saveSelection()}),this._translations.cancel,!1,(()=>{this._home()})))}_getRefinePage(){return s("calcite-panel",null,this._getLabel(this._translations.refineSelection),this._getNotice(this._translations.refineTip,"padding-sides-1"),s("refine-selection",{addresseeLayer:this.addresseeLayer,enabledLayerIds:this.selectionLayerIds,mapView:this.mapView,selectionSets:this._selectionSets}))}_getPDFPage(){return this._getDownloadPage(o.PDF)}_getCSVPage(){return this._getDownloadPage(o.CSV)}_getDownloadPage(i){var t,e;const a=i===o.PDF,l=(null===(t=this.exportOptions)||void 0===t?void 0:t.pdfOptions.enabledSizeValues.length)>1;return s("calcite-panel",null,s("div",null,s("div",{class:"padding-top-sides-1"},s("calcite-label",{class:"font-bold"},a?this._translations.pdfDownloads:this._translations.csvDownloads),s("calcite-label",null,this._translations.notifications)),this._getSelectionLists(),s("div",{class:"margin-side-1 padding-top-1 border-bottom"}),s("div",{class:"padding-top-sides-1"},s("calcite-label",{layout:"inline"},s("calcite-checkbox",{disabled:!this._downloadActive,ref:i=>{this._removeDuplicates=i}}),this._translations.removeDuplicate)),s("div",{class:a&&l?"":"display-none"},this._getLabel(this._translations.selectPDFLabelOption,!1),s("div",{class:"padding-sides-1"},s("pdf-download",{disabled:!this._downloadActive,enabledSizeValues:null===(e=this.exportOptions)||void 0===e?void 0:e.pdfOptions.enabledSizeValues,layerView:this.addresseeLayer,ref:i=>{this._downloadTools=i}}))),s("div",{class:"padding-1 display-flex"},s("calcite-button",{disabled:!this._downloadActive,onClick:a?()=>this._downloadPDF():()=>this._downloadCSV(),width:"full"},a?this._translations.downloadPDF:this._translations.downloadCSV))))}_getPageNavButtons(i,t,e,a,l,n){return s("div",null,s("div",{class:"display-flex padding-top-sides-1"},s("calcite-button",{disabled:t,onClick:e,width:"full"},i)),s("div",{class:"display-flex padding-top-1-2 padding-sides-1"},s("calcite-button",{appearance:"outline",disabled:l,onClick:n,width:"full"},a)))}_getNotice(i,t="padding-1"){return s("calcite-notice",{class:t,color:"green",icon:"lightbulb",open:!0},s("div",{slot:"message"},i))}_getLabel(i,t=!1){return s("div",{class:"padding-top-sides-1"},s("calcite-label",{class:"font-bold","disable-spacing":t},i))}_getSelectionLists(){return this._selectionSets.reduce(((i,t)=>(t.workflowType!==d.REFINE&&(!this._downloadActive&&t.download&&(this._downloadActive=!0),i.push(s("div",{class:"display-flex padding-sides-1 padding-bottom-1"},s("calcite-checkbox",{checked:t.download,class:"align-center",onClick:()=>{this._toggleDownload(t.id)}}),s("calcite-list",{class:"list-border margin-start-1-2 w-100",id:"download-list"},s("calcite-list-item",{description:this._translations.selectedFeatures.replace("{{n}}",t.selectedIds.length.toString()),disabled:!t.download,label:t.label,onClick:()=>{this._toggleDownload(t.id)}}))))),i)),[])||s("div",null)}async _toggleDownload(i){let t=!1;this._selectionSets=this._selectionSets.map((s=>(s.download=s.id===i?!s.download:s.download,t=!!s.download||t,s))),this._downloadActive=t,await this._highlightFeatures()}_downloadPDF(){const i=v(this._getDownloadSelectionSets());this._downloadTools.downloadPDF(i,this._removeDuplicates.checked)}_downloadCSV(){const i=v(this._getDownloadSelectionSets());this._downloadTools.downloadCSV(i,this._removeDuplicates.checked)}_getDownloadSelectionSets(){return this._selectionSets.filter((i=>i.download||i.workflowType===d.REFINE))}_updateLabel(i,t){this._customLabel&&(this._customLabel=this._customLabel.replace("unit"===t?`${this._distance} ${i.detail.oldValue}`:`${i.detail.oldValue} ${this._unit}`,"unit"===t?`${this._distance} ${i.detail.newValue}`:`${i.detail.newValue} ${this._unit}`),this._labelName.value=this._customLabel,this.labelChange.emit(this._labelName.value))}_updateForWorkflowType(i){this._selectionWorkflowType=i.detail}_getAction(i,t,e,a,l=!1,n=""){return s("calcite-action",{disabled:!i,icon:t,indicator:l,onClick:a,slot:n,text:e})}_updateForSelection(i){this._numSelected=i.detail,this._saveEnabled=this._numSelected>0}async _home(){await this._clearSelection(),"boolean"==typeof this._popupsEnabled&&this.mapView.popup&&(this.mapView.popup.autoOpenEnabled=this._popupsEnabled),this._setPageType(l.LIST)}async _layerSelectionChange(i){var t,s,e;const a=(null===(t=null==i?void 0:i.detail)||void 0===t?void 0:t.length)>0?i.detail[0]:"";a!==(null===(s=this.addresseeLayer)||void 0===s?void 0:s.layer.id)&&(this._showLayerSelectionChangeModal=void 0!==(null===(e=this.addresseeLayer)||void 0===e?void 0:e.layer.id)&&this._selectionSets.length>0,this._showLayerSelectionChangeModal?this._layerSelectionChangeEvt=i:await this._updateAddresseeLayer(a))}async _updateAddresseeLayer(i){this.addresseeLayer=await c(this.mapView,i),await this._updateSelectionSets(this.addresseeLayer)}async _updateSelectionSets(i){const t=this._selectionSets.filter((i=>i.workflowType!==d.REFINE)),s=[];return t.forEach((t=>{t.layerView=i,t.selectedIds=[],s.push(r(t,this._geometryEngine))})),Promise.all(s).then((async i=>{i.forEach(((i,s)=>{t[s].selectedIds=i})),await this._highlightFeatures(),this._selectionSets=[...t]}))}async _saveSelection(){var i,t;const s=await(null===(i=this._selectTools)||void 0===i?void 0:i.getSelection()),e=null===(t=this._selectTools)||void 0===t?void 0:t.isUpdate;return this._selectionSets=e?this._selectionSets.map((i=>i.id===s.id?s:i)):[...this._selectionSets,s],this._home()}async _clearSelection(){var i;await(null===(i=this._selectTools)||void 0===i?void 0:i.clearSelection()),this._numSelected=0,this._activeSelection=void 0,this._customLabel=void 0,this._distance=void 0,this._unit=void 0}_deleteSelection(i,t){return t.stopPropagation(),this._selectionSets=this._selectionSets.filter(((t,s)=>{if(s!==i)return t})),this._highlightFeatures()}_gotoSelection(i,t){p(i.selectedIds,i.layerView,t,this.featureHighlightEnabled,this.featureEffect)}_openSelection(i,t){t.stopPropagation(),this._activeSelection=i,this._distance=this._activeSelection.distance,this._unit=this._activeSelection.unit,this._customLabel=this._activeSelection.label,this._pageType=l.SELECT}async _highlightFeatures(){this._clearHighlight();const i=v(this._selectionSets);i.length>0&&(b.highlightHandle=await g(i,this.addresseeLayer,this.mapView))}_checkPopups(){var i;"boolean"!=typeof this._popupsEnabled&&(this._popupsEnabled=null===(i=this.mapView)||void 0===i?void 0:i.popup.autoOpenEnabled)}_clearHighlight(){var i;b&&b.highlightHandle&&(null===(i=b.highlightHandle)||void 0===i||i.remove())}async _getTranslations(){const i=await u(this.el);this._translations=i[0]}get el(){return a(this)}static get watchers(){return{mapView:["mapViewWatchHandler"],_selectionSets:["selectionSetsWatchHandler"],_pageType:["pageTypeWatchHandler"]}}};f.style=':host{display:block;--calcite-input-message-spacing-value:0}.align-center{align-items:center}.border-bottom-1{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}.action-bar-size{height:3.5rem;width:100%}.w-1-3{width:33.3%}.w-1-4{width:25%}.action-center{-webkit-box-align:center;-webkit-align-items:center;-ms-grid-row-align:center;align-items:center;align-content:center;justify-content:center}.width-full{width:100%}.height-full{height:100%}.padding-1{padding:1rem}.padding-top-sides-1{-webkit-padding-before:1rem;padding-block-start:1rem;-webkit-padding-start:1rem;padding-inline-start:1rem;-webkit-padding-end:1rem;padding-inline-end:1rem}.padding-sides-1{-webkit-padding-start:1rem;padding-inline-start:1rem;-webkit-padding-end:1rem;padding-inline-end:1rem}.padding-end-1-2{-webkit-padding-end:.5rem;padding-inline-end:.5rem}.padding-top-1-2{-webkit-padding-before:.5rem;padding-block-start:.5rem}.padding-top-1{padding-top:1rem}.padding-bottom-1{padding-bottom:1rem}.info-blue{color:#00A0FF}.info-message{justify-content:center;display:grid}.font-bold{font-weight:bold}.display-flex{display:flex}.display-block{display:block}.display-none{display:none}.main-label{float:left}html[dir="rtl"] .main-label{float:right}.back-label:hover{cursor:pointer;color:var(--calcite-ui-brand-hover)}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-2)}.margin-side-1{-webkit-margin-start:1rem;margin-inline-start:1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}.border-top{border-top:1px solid var(--calcite-ui-border-2)}.w-100{width:100%}.w-50{width:50%}.padding-1-2{padding:0.5rem}.list-border{border:1px solid var(--calcite-ui-border-2)}.margin-sides-1{-webkit-margin-start:1rem;margin-inline-start:1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}.margin-start-1-2{-webkit-margin-start:0.5rem;margin-inline-start:0.5rem}.float-right{float:right}.float-right[dir="rtl"]{float:left}.float-left{float:left}.float-left[dir="rtl"]{float:right}.margin-top-0{-webkit-margin-before:0 !important;margin-block-start:0 !important}.height-1-1-2{height:1.5rem}.main-background{background-color:var(--calcite-ui-foreground-2)}.num-selected{align-items:center;display:flex}';export{f as public_notification}
|
|
@@ -1,36 +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{E as t}from"./p-dbc9a5a8.js";
|
|
7
|
-
/** @license
|
|
8
|
-
* Copyright 2022 Esri
|
|
9
|
-
*
|
|
10
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
11
|
-
* you may not use this file except in compliance with the License.
|
|
12
|
-
* You may obtain a copy of the License at
|
|
13
|
-
*
|
|
14
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
15
|
-
*
|
|
16
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
17
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
18
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
19
|
-
* See the License for the specific language governing permissions and
|
|
20
|
-
* limitations under the License.
|
|
21
|
-
*/async function n(t,a,s){const o=a.capabilities.query.maxRecordCount,r={start:t,num:o,outFields:["*"],returnGeometry:!0,where:"1=1"},e=await a.queryFeatures(r);return s=s.concat(e.features),e.exceededTransferLimit?n(t+=o,a,s):Promise.resolve(s)}async function a(t,n){let a=[];const s=t.map((t=>async function(t,n){const a=n.createQuery();return a.spatialRelationship="intersects",a.geometry=t,n.queryObjectIds(a)}
|
|
22
|
-
/** @license
|
|
23
|
-
* Copyright 2022 Esri
|
|
24
|
-
*
|
|
25
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
26
|
-
* you may not use this file except in compliance with the License.
|
|
27
|
-
* You may obtain a copy of the License at
|
|
28
|
-
*
|
|
29
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
30
|
-
*
|
|
31
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
32
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
33
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
34
|
-
* See the License for the specific language governing permissions and
|
|
35
|
-
* limitations under the License.
|
|
36
|
-
*/(t,n)));return(await Promise.all(s)).forEach((t=>{a=[...a,...t||[]]})),a}async function s(t,n){const a=n.createQuery();return a.outFields=["*"],a.objectIds=t,n.queryFeatures(a)}async function o(t,n,a,s){const r=n.capabilities.query.maxRecordCount,e={start:t,num:r,outFields:["*"],returnGeometry:!0,geometry:a},c=await n.queryFeatures(e);return s[n.id]=s[n.id].concat(c.features),c.exceededTransferLimit?o(t+=r,n,a,s):Promise.resolve(s)}function r(t,n){return[...c(t,"polygon",n),...c(t,"polyline",n),...c(t,"point",n)]}function e(n,s){let o=Promise.resolve([]);return n.workflowType!==t.REFINE&&(o=a(n.buffer?[n.buffer]:r(n.geometries,s),n.layerView.layer)),o}function c(t,n,a){const s=t.filter((t=>t.type===n));return s.length<=1?s:[a.union(s)]}async function i(t){let n={};return await t.when((()=>{n=t.map.layers.toArray().reduce(((t,n)=>(t[n.id]=n.title,t)),{})})),n}async function u(t){let n=[];return await t.when((()=>{n=t.map.layers.toArray().map((t=>t.id))})),n}async function f(t,n){const a=await async function(t,n){let a=[];return await t.when((()=>{a=t.map.layers.toArray().filter((t=>t.id===n))})),a.length>0?a[0]:void 0}(t,n);return a?await t.whenLayerView(a):void 0}async function y(t,n,a,s=!1){return s&&await w(t,n,a,!1),n.highlight(t)}async function w(t,n,a,s=!0,o){const r=await async function(t,n){const a=n.createQuery();return a.objectIds=t,n.queryExtent(a)}(t,n.layer);await a.goTo(r.extent),s&&await async function(t,n,a){const s={objectIds:t};n.featureEffect=Object.assign(Object.assign({},a),{filter:s}),setTimeout((()=>{n.featureEffect=void 0}),1300)}(t,n,o)}export{f as a,n as b,e as c,a as d,r as e,o as f,w as g,y as h,u as i,i as j,s as q}
|