@esri/solutions-components 0.5.0 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/assets/arcgis-pdf-creator/PDFCreator.js +6 -3
- package/dist/assets/arcgis-pdf-creator/PDFCreator_jsPDF.js +1 -1
- package/dist/assets/arcgis-pdf-creator/PDFCreator_pdf_lib.js +1 -1
- package/dist/assets/arcgis-pdf-creator/PDFLabels.js +54 -3
- package/dist/assets/arcgis-pdf-creator/grid.js +1 -1
- package/dist/assets/data/images/grid.png +0 -0
- package/dist/assets/data/images/horizontal.png +0 -0
- package/dist/assets/data/images/vertical.png +0 -0
- package/dist/assets/t9n/crowdsource-manager/resources.json +7 -1
- package/dist/assets/t9n/crowdsource-manager/resources_en.json +7 -1
- package/dist/cjs/buffer-tools_6.cjs.entry.js +88 -92
- package/dist/cjs/{calcite-block_2.cjs.entry.js → calcite-action-bar_4.cjs.entry.js} +307 -18
- package/dist/cjs/{calcite-action.cjs.entry.js → calcite-action_2.cjs.entry.js} +84 -1
- package/dist/cjs/{calcite-combobox_3.cjs.entry.js → calcite-chip_4.cjs.entry.js} +131 -5
- package/dist/cjs/{calcite-dropdown-group_4.cjs.entry.js → calcite-dropdown_5.cjs.entry.js} +467 -1
- package/dist/cjs/calcite-input-message_5.cjs.entry.js +19 -17
- package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +2 -2
- package/dist/cjs/{calcite-action-bar_2.cjs.entry.js → calcite-tooltip.cjs.entry.js} +2 -208
- package/dist/cjs/crowdsource-manager.cjs.entry.js +88 -14
- package/dist/cjs/{downloadUtils-415ab342.js → downloadUtils-9359e9ff.js} +135 -44
- package/dist/cjs/{index.es-98008aa0.js → index.es-9c0d0ed6.js} +3 -3
- package/dist/cjs/{interfaces-17c631bf.js → interfaces-cac36920.js} +6 -0
- package/dist/cjs/layer-table_2.cjs.entry.js +512 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{mapViewUtils-f617ae9a.js → mapViewUtils-090f4d4d.js} +3 -3
- package/dist/cjs/public-notification.cjs.entry.js +173 -48
- package/dist/cjs/solution-configuration.cjs.entry.js +2 -2
- package/dist/cjs/solution-contents_3.cjs.entry.js +2 -2
- package/dist/cjs/{solution-store-b86759b2.js → solution-store-d28c332e.js} +1 -1
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/assets/arcgis-pdf-creator/PDFCreator.js +6 -3
- package/dist/collection/assets/arcgis-pdf-creator/PDFCreator_jsPDF.js +1 -1
- package/dist/collection/assets/arcgis-pdf-creator/PDFCreator_pdf_lib.js +1 -1
- package/dist/collection/assets/arcgis-pdf-creator/PDFLabels.js +54 -3
- package/dist/collection/assets/arcgis-pdf-creator/grid.js +1 -1
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.css +122 -0
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +130 -14
- package/dist/collection/components/layer-table/layer-table.css +2 -70
- package/dist/collection/components/layer-table/layer-table.js +66 -106
- package/dist/collection/components/map-card/map-card.css +4 -7
- package/dist/collection/components/map-card/map-card.js +44 -10
- package/dist/collection/components/map-draw-tools/map-draw-tools.js +4 -8
- package/dist/collection/components/map-select-tools/map-select-tools.js +75 -15
- package/dist/collection/components/public-notification/public-notification.js +217 -25
- package/dist/collection/components/refine-selection-tools/refine-selection-tools.js +1 -1
- package/dist/collection/demos/crowdsource-manager.html +14 -41
- package/dist/collection/utils/csvDownload.js +41 -0
- package/dist/collection/utils/csvDownload.ts +42 -0
- package/dist/collection/utils/csvUtils.js +6 -23
- package/dist/collection/utils/csvUtils.ts +8 -27
- package/dist/collection/utils/downloadUtils.js +30 -14
- package/dist/collection/utils/downloadUtils.ts +36 -14
- package/dist/collection/utils/interfaces.js +6 -0
- package/dist/collection/utils/interfaces.ts +6 -0
- package/dist/collection/utils/pdfUtils.js +9 -6
- package/dist/collection/utils/pdfUtils.ts +13 -8
- package/dist/collection/utils/queryUtils.js +2 -2
- package/dist/collection/utils/queryUtils.ts +2 -2
- package/dist/collection/utils/test/csvUtils.spec.tsx +56 -0
- package/dist/collection/utils/test/downloadUtils.spec.tsx +133 -0
- package/dist/components/crowdsource-manager.js +293 -17
- package/dist/components/downloadUtils.js +133 -42
- package/dist/components/interfaces3.js +7 -1
- package/dist/components/layer-table.js +1 -443
- package/dist/components/layer-table2.js +429 -0
- package/dist/components/map-card.js +1 -339
- package/dist/{esm/map-card.entry.js → components/map-card2.js} +118 -22
- package/dist/components/map-draw-tools2.js +19 -23
- package/dist/components/map-layer-picker2.js +1 -1
- package/dist/components/map-select-tools2.js +21 -16
- package/dist/components/public-notification.js +209 -81
- package/dist/components/queryUtils.js +2 -2
- package/dist/components/refine-selection-tools2.js +3 -3
- package/dist/components/refine-selection2.js +1 -1
- package/dist/components/solution-resource-item2.js +1 -1
- package/dist/components/solution-store.js +1 -1
- package/dist/esm/buffer-tools_6.entry.js +79 -83
- package/dist/esm/{calcite-block_2.entry.js → calcite-action-bar_4.entry.js} +307 -20
- package/dist/esm/{calcite-action.entry.js → calcite-action_2.entry.js} +84 -2
- package/dist/esm/{calcite-combobox_3.entry.js → calcite-chip_4.entry.js} +134 -9
- package/dist/esm/{calcite-dropdown-group_4.entry.js → calcite-dropdown_5.entry.js} +468 -3
- package/dist/esm/calcite-input-message_5.entry.js +19 -17
- package/dist/esm/calcite-shell-panel_14.entry.js +2 -2
- package/dist/esm/{calcite-action-bar_2.entry.js → calcite-tooltip.entry.js} +4 -209
- package/dist/esm/crowdsource-manager.entry.js +88 -14
- package/dist/esm/{downloadUtils-606b0f0e.js → downloadUtils-a8f139c5.js} +135 -44
- package/dist/esm/{index.es-c736c805.js → index.es-a75412ff.js} +3 -3
- package/dist/esm/{interfaces-d0d83efa.js → interfaces-cd4054e5.js} +7 -1
- package/dist/esm/layer-table_2.entry.js +507 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{mapViewUtils-4e945e07.js → mapViewUtils-8ffcd36d.js} +4 -4
- package/dist/esm/public-notification.entry.js +169 -44
- package/dist/esm/solution-configuration.entry.js +2 -2
- package/dist/esm/solution-contents_3.entry.js +2 -2
- package/dist/esm/{solution-store-477288ac.js → solution-store-1b67f2c8.js} +1 -1
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/demos/crowdsource-manager.html +14 -41
- package/dist/solutions-components/{p-dd11eeb2.js → p-1395b0ef.js} +1 -1
- package/dist/solutions-components/{p-4f5641b4.entry.js → p-1affd711.entry.js} +18 -18
- package/dist/solutions-components/p-30de8da1.entry.js +17 -0
- package/dist/solutions-components/{p-91cad71e.entry.js → p-439c878d.entry.js} +3 -9
- package/dist/solutions-components/{p-72117a18.js → p-765a27f3.js} +1 -1
- package/dist/solutions-components/p-813a04c3.entry.js +6 -0
- package/dist/solutions-components/{p-9e8a371f.entry.js → p-874b39a7.entry.js} +3 -3
- package/dist/solutions-components/p-8cece97f.js +21 -0
- package/dist/solutions-components/{p-dd0241fb.entry.js → p-97aa7211.entry.js} +1 -1
- package/dist/solutions-components/{p-0e459cc7.entry.js → p-a955a3e6.entry.js} +10 -4
- package/dist/solutions-components/{p-6a657ff6.js → p-bb64bd47.js} +25 -9
- package/dist/solutions-components/p-c392dd95.entry.js +17 -0
- package/dist/solutions-components/p-ca386a72.entry.js +6 -0
- package/dist/solutions-components/p-d47d74a6.entry.js +23 -0
- package/dist/solutions-components/p-db846ee2.entry.js +11 -0
- package/dist/solutions-components/p-dc53c9c1.js +36 -0
- package/dist/solutions-components/p-e1c93241.entry.js +6 -0
- package/dist/solutions-components/{p-4cbaf0f1.entry.js → p-e6d235d6.entry.js} +1 -1
- package/dist/solutions-components/solutions-components.esm.js +6 -6
- package/dist/solutions-components/utils/csvDownload.ts +42 -0
- package/dist/solutions-components/utils/csvUtils.ts +8 -27
- package/dist/solutions-components/utils/downloadUtils.ts +36 -14
- package/dist/solutions-components/utils/interfaces.ts +6 -0
- package/dist/solutions-components/utils/pdfUtils.ts +13 -8
- package/dist/solutions-components/utils/queryUtils.ts +2 -2
- package/dist/solutions-components/utils/test/csvUtils.spec.tsx +56 -0
- package/dist/solutions-components/utils/test/downloadUtils.spec.tsx +133 -0
- package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +39 -0
- package/dist/types/components/layer-table/layer-table.d.ts +35 -48
- package/dist/types/components/map-card/map-card.d.ts +10 -6
- package/dist/types/components/map-select-tools/map-select-tools.d.ts +16 -1
- package/dist/types/components/public-notification/public-notification.d.ts +86 -4
- package/dist/types/components.d.ts +68 -0
- package/dist/types/preact.d.ts +2 -1
- package/dist/types/utils/csvDownload.d.ts +24 -0
- package/dist/types/utils/csvUtils.d.ts +2 -1
- package/dist/types/utils/downloadUtils.d.ts +25 -0
- package/dist/types/utils/interfaces.d.ts +5 -0
- package/dist/types/utils/pdfUtils.d.ts +2 -1
- package/package.json +4 -4
- package/dist/cjs/calcite-chip.cjs.entry.js +0 -142
- package/dist/cjs/calcite-dropdown.cjs.entry.js +0 -481
- package/dist/cjs/calcite-handle.cjs.entry.js +0 -99
- package/dist/cjs/calcite-loader.cjs.entry.js +0 -95
- package/dist/cjs/layer-table.cjs.entry.js +0 -317
- package/dist/cjs/map-card.cjs.entry.js +0 -252
- package/dist/esm/calcite-chip.entry.js +0 -138
- package/dist/esm/calcite-dropdown.entry.js +0 -477
- package/dist/esm/calcite-handle.entry.js +0 -95
- package/dist/esm/calcite-loader.entry.js +0 -91
- package/dist/esm/layer-table.entry.js +0 -313
- package/dist/solutions-components/p-11132485.entry.js +0 -11
- package/dist/solutions-components/p-15b43c29.entry.js +0 -11
- package/dist/solutions-components/p-5034aabc.entry.js +0 -11
- package/dist/solutions-components/p-5ee7b022.entry.js +0 -12
- package/dist/solutions-components/p-6f012424.entry.js +0 -6
- package/dist/solutions-components/p-7fd10eb3.entry.js +0 -11
- package/dist/solutions-components/p-84bbaebf.entry.js +0 -6
- package/dist/solutions-components/p-88e28de2.js +0 -36
- package/dist/solutions-components/p-a57ef371.entry.js +0 -6
- package/dist/solutions-components/p-ac76d270.entry.js +0 -17
- package/dist/solutions-components/p-dbc9a5a8.js +0 -21
- package/dist/solutions-components/p-e162304e.entry.js +0 -6
- package/dist/solutions-components/p-f5c70be2.entry.js +0 -6
- package/dist/solutions-components/p-f6b17cc6.entry.js +0 -11
@@ -1,20 +1,20 @@
|
|
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 registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-c246d90e.js';
|
7
|
-
import {
|
8
|
-
import { l as loadModules } from './loadModules-b299cd43.js';
|
9
|
-
import {
|
10
|
-
import { s as state } from './publicNotificationStore-b9daaee4.js';
|
11
|
-
import { a as getComponentClosestLanguage, g as getLocaleComponentStrings } from './locale-7bf10e0a.js';
|
12
|
-
import { g as getTotal, a as getSelectionIds } from './publicNotificationUtils-5cb5a607.js';
|
13
|
-
import './index-ac7f66eb.js';
|
14
|
-
import './_commonjsHelpers-d5f9d613.js';
|
15
|
-
|
16
|
-
const publicNotificationCss = ":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}";
|
17
|
-
|
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 registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-c246d90e.js';
|
7
|
+
import { a as EPageType, b as ESketchType, c as EWorkflowType, d as EExportType } from './interfaces-cd4054e5.js';
|
8
|
+
import { l as loadModules } from './loadModules-b299cd43.js';
|
9
|
+
import { g as getMapLayerView, a as getSelectionSetQuery, b as goToSelection, h as highlightFeatures } from './mapViewUtils-8ffcd36d.js';
|
10
|
+
import { s as state } from './publicNotificationStore-b9daaee4.js';
|
11
|
+
import { a as getComponentClosestLanguage, g as getLocaleComponentStrings } from './locale-7bf10e0a.js';
|
12
|
+
import { g as getTotal, a as getSelectionIds } from './publicNotificationUtils-5cb5a607.js';
|
13
|
+
import './index-ac7f66eb.js';
|
14
|
+
import './_commonjsHelpers-d5f9d613.js';
|
15
|
+
|
16
|
+
const publicNotificationCss = ":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}";
|
17
|
+
|
18
18
|
const PublicNotification = class {
|
19
19
|
constructor(hostRef) {
|
20
20
|
registerInstance(this, hostRef);
|
@@ -34,6 +34,9 @@ const PublicNotification = class {
|
|
34
34
|
this.selectionLayerIds = [];
|
35
35
|
this.showRefineSelection = false;
|
36
36
|
this.showSearchSettings = true;
|
37
|
+
this.sketchLineSymbol = undefined;
|
38
|
+
this.sketchPointSymbol = undefined;
|
39
|
+
this.sketchPolygonSymbol = undefined;
|
37
40
|
this.addresseeLayer = undefined;
|
38
41
|
this._downloadActive = true;
|
39
42
|
this._numSelected = 0;
|
@@ -75,14 +78,27 @@ const PublicNotification = class {
|
|
75
78
|
}
|
76
79
|
}
|
77
80
|
/**
|
78
|
-
* Called each time the
|
81
|
+
* Called each time the sketchLineSymbol prop is changed.
|
79
82
|
*/
|
80
|
-
async
|
81
|
-
if (v && v !== oldV
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
83
|
+
async sketchLineSymbolWatchHandler(v, oldV) {
|
84
|
+
if (v && JSON.stringify(v) !== JSON.stringify(oldV)) {
|
85
|
+
this._setLineSymbol(v);
|
86
|
+
}
|
87
|
+
}
|
88
|
+
/**
|
89
|
+
* Called each time the sketchPointSymbol prop is changed.
|
90
|
+
*/
|
91
|
+
async sketchPointSymbolWatchHandler(v, oldV) {
|
92
|
+
if (v && JSON.stringify(v) !== JSON.stringify(oldV)) {
|
93
|
+
this._setPointSymbol(v);
|
94
|
+
}
|
95
|
+
}
|
96
|
+
/**
|
97
|
+
* Called each time the sketchPolygonSymbol prop is changed.
|
98
|
+
*/
|
99
|
+
async sketchPolygonSymbolWatchHandler(v, oldV) {
|
100
|
+
if (v && JSON.stringify(v) !== JSON.stringify(oldV)) {
|
101
|
+
this._setPolygonSymbol(v);
|
86
102
|
}
|
87
103
|
}
|
88
104
|
/**
|
@@ -142,6 +158,7 @@ const PublicNotification = class {
|
|
142
158
|
async componentWillLoad() {
|
143
159
|
await this._getTranslations();
|
144
160
|
await this._initModules();
|
161
|
+
this._initSymbols();
|
145
162
|
}
|
146
163
|
/**
|
147
164
|
* Renders the component.
|
@@ -162,10 +179,84 @@ const PublicNotification = class {
|
|
162
179
|
* @protected
|
163
180
|
*/
|
164
181
|
async _initModules() {
|
165
|
-
const [geometryEngine] = await loadModules([
|
166
|
-
"esri/geometry/geometryEngine"
|
182
|
+
const [geometryEngine, jsonUtils] = await loadModules([
|
183
|
+
"esri/geometry/geometryEngine",
|
184
|
+
"esri/symbols/support/jsonUtils"
|
167
185
|
]);
|
168
186
|
this._geometryEngine = geometryEngine;
|
187
|
+
this._jsonUtils = jsonUtils;
|
188
|
+
}
|
189
|
+
/**
|
190
|
+
* Initialize the default symbols that will be used when creating new graphics
|
191
|
+
*
|
192
|
+
* @protected
|
193
|
+
*/
|
194
|
+
_initSymbols() {
|
195
|
+
this._setLineSymbol(this.sketchLineSymbol);
|
196
|
+
this._setPointSymbol(this.sketchPointSymbol);
|
197
|
+
this._setPolygonSymbol(this.sketchPolygonSymbol);
|
198
|
+
}
|
199
|
+
/**
|
200
|
+
* Convert a JSON representation of a line symbol and/or set the line symbol
|
201
|
+
*
|
202
|
+
* @param v SimpleLineSymbol or a JSON representation of a line symbol
|
203
|
+
*
|
204
|
+
* @protected
|
205
|
+
*/
|
206
|
+
_setLineSymbol(v) {
|
207
|
+
const isSymbol = (v === null || v === void 0 ? void 0 : v.type) === 'simple-line';
|
208
|
+
this.sketchLineSymbol = isSymbol ? v : this._jsonUtils.fromJSON(v ? v : {
|
209
|
+
"type": "esriSLS",
|
210
|
+
"color": [130, 130, 130, 255],
|
211
|
+
"width": 2,
|
212
|
+
"style": "esriSLSSolid"
|
213
|
+
});
|
214
|
+
}
|
215
|
+
/**
|
216
|
+
* Convert a JSON representation of a point symbol and/or set the point symbol
|
217
|
+
*
|
218
|
+
* @param v SimpleMarkerSymbol or a JSON representation of a point symbol
|
219
|
+
*
|
220
|
+
* @protected
|
221
|
+
*/
|
222
|
+
_setPointSymbol(v) {
|
223
|
+
const isSymbol = (v === null || v === void 0 ? void 0 : v.type) === 'simple-marker';
|
224
|
+
this.sketchPointSymbol = isSymbol ? v : this._jsonUtils.fromJSON(v ? v : {
|
225
|
+
"type": "esriSMS",
|
226
|
+
"color": [255, 255, 255, 255],
|
227
|
+
"angle": 0,
|
228
|
+
"xoffset": 0,
|
229
|
+
"yoffset": 0,
|
230
|
+
"size": 6,
|
231
|
+
"style": "esriSMSCircle",
|
232
|
+
"outline": {
|
233
|
+
"type": "esriSLS",
|
234
|
+
"color": [50, 50, 50, 255],
|
235
|
+
"width": 1,
|
236
|
+
"style": "esriSLSSolid"
|
237
|
+
}
|
238
|
+
});
|
239
|
+
}
|
240
|
+
/**
|
241
|
+
* Convert a JSON representation of a polygon symbol and/or set the polygon symbol
|
242
|
+
*
|
243
|
+
* @param v SimpleFillSymbol or a JSON representation of a polygon symbol
|
244
|
+
*
|
245
|
+
* @protected
|
246
|
+
*/
|
247
|
+
_setPolygonSymbol(v) {
|
248
|
+
const isSymbol = (v === null || v === void 0 ? void 0 : v.type) === 'simple-fill';
|
249
|
+
this.sketchPolygonSymbol = isSymbol ? v : this._jsonUtils.fromJSON(v ? v : {
|
250
|
+
"type": "esriSFS",
|
251
|
+
"color": [150, 150, 150, 51],
|
252
|
+
"outline": {
|
253
|
+
"type": "esriSLS",
|
254
|
+
"color": [50, 50, 50, 255],
|
255
|
+
"width": 2,
|
256
|
+
"style": "esriSLSSolid"
|
257
|
+
},
|
258
|
+
"style": "esriSFSSolid"
|
259
|
+
});
|
169
260
|
}
|
170
261
|
/**
|
171
262
|
* Get a calcite action group for the current action
|
@@ -228,7 +319,7 @@ const PublicNotification = class {
|
|
228
319
|
* @protected
|
229
320
|
*/
|
230
321
|
_getListPage() {
|
231
|
-
const hasSets = this.
|
322
|
+
const hasSets = this._hasSelections();
|
232
323
|
const total = getTotal(this._selectionSets);
|
233
324
|
return hasSets ? (h("calcite-panel", null, h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "font-bold" }, this._translations.myLists)), this._getNotice(this._translations.listHasSetsTip, "padding-sides-1 padding-bottom-1"), this._getMapLayerPicker(), h("div", { class: "display-block padding-sides-1 height-1-1-2" }, h("div", { class: "display-block float-left" }, h("calcite-label", { alignment: "start", class: "font-bold" }, this._translations.notifications)), h("div", { class: "display-block float-right" }, h("calcite-input-message", { active: true, class: "info-blue margin-top-0", scale: "m" }, this._translations.uniqueCout.replace("{{n}}", total.toString())))), hasSets ? this._getSelectionSetList() : (h("div", { class: "info-message" }, h("calcite-input-message", { active: true, class: "info-blue", scale: "m" }, this._translations.noNotifications))), h("div", { class: "display-flex padding-1" }, h("calcite-button", { onClick: () => { this._setPageType(EPageType.SELECT); }, width: "full" }, this._translations.add)), this._showModal(this._showLayerSelectionChangeModal))) : (h("calcite-panel", null, h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "font-bold" }, this._translations.myLists)), h("div", { class: "padding-sides-1" }, h("calcite-label", null, this._translations.notifications)), h("div", { class: "info-message padding-bottom-1" }, h("calcite-input-message", { active: true, class: "info-blue", scale: "m" }, this._translations.noNotifications)), this._getNotice(this._translations.selectLayerAndAdd, "padding-sides-1 padding-bottom-1"), this._getMapLayerPicker(), h("div", { class: "display-flex padding-1" }, h("calcite-button", { onClick: () => { this._setPageType(EPageType.SELECT); }, width: "full" }, this._translations.add))));
|
234
325
|
}
|
@@ -253,7 +344,8 @@ const PublicNotification = class {
|
|
253
344
|
// REFINE is handled seperately from the core selection sets
|
254
345
|
// You can only access after clicking the refine action
|
255
346
|
this._selectionSets.reduce((prev, cur, i) => {
|
256
|
-
|
347
|
+
const validSet = this._isValidSet(cur);
|
348
|
+
if (validSet) {
|
257
349
|
prev.push((h("calcite-list-item", { description: this._translations.selectedFeatures.replace("{{n}}", cur.selectedIds.length.toString()), label: cur.label, onClick: () => this._gotoSelection(cur, this.mapView) }, this._getAction(true, "pencil", "", (evt) => this._openSelection(cur, evt), false, "actions-end"), this._getAction(true, "x", "", (evt) => this._deleteSelection(i, evt), false, "actions-end"))));
|
258
350
|
}
|
259
351
|
return prev;
|
@@ -294,14 +386,38 @@ const PublicNotification = class {
|
|
294
386
|
await this._updateAddresseeLayer(id);
|
295
387
|
}
|
296
388
|
/**
|
297
|
-
* Check if any selection sets exist.
|
389
|
+
* Check if any valid selection sets exist.
|
298
390
|
*
|
299
|
-
* @returns true if selection sets exist
|
391
|
+
* @returns true if valid selection sets exist
|
300
392
|
*
|
301
393
|
* @protected
|
302
394
|
*/
|
303
395
|
_hasSelections() {
|
304
|
-
return this._selectionSets.length > 0;
|
396
|
+
return this._selectionSets.filter(ss => this._isValidSet(ss)).length > 0;
|
397
|
+
}
|
398
|
+
/**
|
399
|
+
* Check if any duplicates exist
|
400
|
+
*
|
401
|
+
* @returns true if duplicates are found
|
402
|
+
*
|
403
|
+
* @protected
|
404
|
+
*/
|
405
|
+
_hasDuplicates() {
|
406
|
+
const selectedIds = this._selectionSets.reduce((prev, cur) => {
|
407
|
+
return prev.concat(cur.download ? cur.selectedIds : []);
|
408
|
+
}, []);
|
409
|
+
return selectedIds.length > new Set(selectedIds).size;
|
410
|
+
}
|
411
|
+
/**
|
412
|
+
* Check if a selection set is valid (exists or has at least one added if its a refine set)
|
413
|
+
*
|
414
|
+
* @returns true if selection set is valid
|
415
|
+
*
|
416
|
+
* @protected
|
417
|
+
*/
|
418
|
+
_isValidSet(ss) {
|
419
|
+
var _a, _b;
|
420
|
+
return ss.workflowType === EWorkflowType.REFINE ? ((_b = (_a = ss === null || ss === void 0 ? void 0 : ss.refineIds) === null || _a === void 0 ? void 0 : _a.addIds) === null || _b === void 0 ? void 0 : _b.length) > 0 : true;
|
305
421
|
}
|
306
422
|
/**
|
307
423
|
* Create the Select page that shows the selection workflows
|
@@ -323,7 +439,7 @@ const PublicNotification = class {
|
|
323
439
|
const locale = getComponentClosestLanguage(this.el);
|
324
440
|
const selectionLoading = locale && locale === "en" ?
|
325
441
|
`${this._translations.selectionLoading}...` : this._translations.selectionLoading;
|
326
|
-
return (h("calcite-panel", null, this._getLabel(this._translations.stepTwoFull.replace("{{layer}}", (_a = this.addresseeLayer) === null || _a === void 0 ? void 0 : _a.layer.title)), this._getNotice(noticeText), h("div", { class: "padding-top-sides-1" }, h("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: (evt) => this._updateForSelection(evt), onWorkflowTypeChange: (evt) => this._updateForWorkflowType(evt), ref: (el) => { this._selectTools = el; }, searchConfiguration: this._searchConfiguration, selectLayerView: this.addresseeLayer, selectionSet: this._activeSelection, showBufferTools: this.showSearchSettings })), h("div", { class: "padding-sides-1 padding-bottom-1", style: { "align-items": "end", "display": "flex" } }, this._selectionLoading ? (h("div", null, h("calcite-loader", { active: true, class: "info-blue", inline: true, label: selectionLoading, scale: "m", type: "indeterminate" }))) : (h("calcite-icon", { class: "info-blue padding-end-1-2", icon: "feature-layer", scale: "s" })), h("calcite-input-message", { active: true, class: "info-blue", scale: "m" }, this._selectionLoading ? selectionLoading :
|
442
|
+
return (h("calcite-panel", null, this._getLabel(this._translations.stepTwoFull.replace("{{layer}}", (_a = this.addresseeLayer) === null || _a === void 0 ? void 0 : _a.layer.title)), this._getNotice(noticeText), h("div", { class: "padding-top-sides-1" }, h("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: (evt) => this._updateForSelection(evt), onWorkflowTypeChange: (evt) => this._updateForWorkflowType(evt), ref: (el) => { this._selectTools = el; }, searchConfiguration: this._searchConfiguration, selectLayerView: this.addresseeLayer, selectionSet: this._activeSelection, showBufferTools: this.showSearchSettings, sketchLineSymbol: this.sketchLineSymbol, sketchPointSymbol: this.sketchPointSymbol, sketchPolygonSymbol: this.sketchPolygonSymbol })), h("div", { class: "padding-sides-1 padding-bottom-1", style: { "align-items": "end", "display": "flex" } }, this._selectionLoading ? (h("div", null, h("calcite-loader", { active: true, class: "info-blue", inline: true, label: selectionLoading, scale: "m", type: "indeterminate" }))) : (h("calcite-icon", { class: "info-blue padding-end-1-2", icon: "feature-layer", scale: "s" })), h("calcite-input-message", { active: true, class: "info-blue", scale: "m" }, this._selectionLoading ? selectionLoading :
|
327
443
|
this.noResultText && this._numSelected === 0 ? this.noResultText :
|
328
444
|
this._translations.selectedAddresses.replace("{{n}}", this._numSelected.toString()).replace("{{layer}}", ((_b = this.addresseeLayer) === null || _b === void 0 ? void 0 : _b.layer.title) || ""))), h("div", { class: "padding-sides-1 " + nameLabelClass }, h("calcite-label", { class: "font-bold" }, "List name", h("calcite-input", { onInput: () => {
|
329
445
|
this.labelChange.emit(this._labelName.value);
|
@@ -370,7 +486,8 @@ const PublicNotification = class {
|
|
370
486
|
_getDownloadPage(type) {
|
371
487
|
const isPdf = type === EExportType.PDF;
|
372
488
|
const hasSelections = this._hasSelections();
|
373
|
-
|
489
|
+
const hasDuplicates = this._hasDuplicates();
|
490
|
+
return (h("calcite-panel", null, h("div", null, h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "font-bold" }, isPdf ? this._translations.downloadPDF : this._translations.downloadCSV)), hasSelections ? (h("div", null, h("div", { class: "padding-top-sides-1" }, h("calcite-label", null, this._translations.notifications)), this._getSelectionLists(), h("div", { class: "margin-side-1 padding-top-1 border-bottom" }), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: isPdf ? "display-none" : "", disabled: !hasDuplicates, layout: "inline" }, h("calcite-checkbox", { disabled: !hasDuplicates, ref: (el) => { this._removeDuplicatesCSV = el; } }), this._translations.removeDuplicate), h("calcite-label", { class: isPdf ? "" : "display-none", disabled: !hasDuplicates, layout: "inline" }, h("calcite-checkbox", { disabled: !hasDuplicates, ref: (el) => { this._removeDuplicatesPDF = el; } }), this._translations.removeDuplicate)), h("div", { class: isPdf ? "" : "display-none" }, this._getLabel(this._translations.selectPDFLabelOption, false), h("div", { class: "padding-sides-1" }, h("pdf-download", { disabled: !this._downloadActive, layerView: this.addresseeLayer, ref: (el) => { this._downloadTools = el; } }))), h("div", { class: "padding-1 display-flex" }, h("calcite-button", { disabled: !this._downloadActive, onClick: isPdf ? () => this._downloadPDF() : () => this._downloadCSV(), width: "full" }, isPdf ? this._translations.downloadPDF : this._translations.downloadCSV)))) : (this._getNotice(this._translations.downloadNoLists, "padding-sides-1 padding-bottom-1")))));
|
374
491
|
}
|
375
492
|
/**
|
376
493
|
* Create the stacked navigation buttons for a page
|
@@ -420,7 +537,8 @@ const PublicNotification = class {
|
|
420
537
|
*/
|
421
538
|
_getSelectionLists() {
|
422
539
|
return this._selectionSets.reduce((prev, cur) => {
|
423
|
-
|
540
|
+
const validSet = this._isValidSet(cur);
|
541
|
+
if (validSet) {
|
424
542
|
if (!this._downloadActive && cur.download) {
|
425
543
|
this._downloadActive = true;
|
426
544
|
}
|
@@ -583,7 +701,7 @@ const PublicNotification = class {
|
|
583
701
|
* @protected
|
584
702
|
*/
|
585
703
|
async _updateSelectionSets(layerView) {
|
586
|
-
const _selectionSets = this._selectionSets
|
704
|
+
const _selectionSets = this._selectionSets;
|
587
705
|
const oidDefs = [];
|
588
706
|
_selectionSets.forEach(selectionSet => {
|
589
707
|
selectionSet.layerView = layerView;
|
@@ -667,11 +785,16 @@ const PublicNotification = class {
|
|
667
785
|
*/
|
668
786
|
_openSelection(selectionSet, evt) {
|
669
787
|
evt.stopPropagation();
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
788
|
+
if (selectionSet.workflowType === EWorkflowType.REFINE) {
|
789
|
+
this._pageType = EPageType.REFINE;
|
790
|
+
}
|
791
|
+
else {
|
792
|
+
this._activeSelection = selectionSet;
|
793
|
+
this._distance = this._activeSelection.distance;
|
794
|
+
this._unit = this._activeSelection.unit;
|
795
|
+
this._customLabel = this._activeSelection.label;
|
796
|
+
this._pageType = EPageType.SELECT;
|
797
|
+
}
|
675
798
|
}
|
676
799
|
/**
|
677
800
|
* Highlight any selected features in the map
|
@@ -720,10 +843,12 @@ const PublicNotification = class {
|
|
720
843
|
static get watchers() { return {
|
721
844
|
"mapView": ["mapViewWatchHandler"],
|
722
845
|
"searchConfiguration": ["watchSearchConfigurationHandler"],
|
723
|
-
"
|
846
|
+
"sketchLineSymbol": ["sketchLineSymbolWatchHandler"],
|
847
|
+
"sketchPointSymbol": ["sketchPointSymbolWatchHandler"],
|
848
|
+
"sketchPolygonSymbol": ["sketchPolygonSymbolWatchHandler"],
|
724
849
|
"_pageType": ["pageTypeWatchHandler"]
|
725
850
|
}; }
|
726
851
|
};
|
727
|
-
PublicNotification.style = publicNotificationCss;
|
728
|
-
|
729
|
-
export { PublicNotification as public_notification };
|
852
|
+
PublicNotification.style = publicNotificationCss;
|
853
|
+
|
854
|
+
export { PublicNotification as public_notification };
|
@@ -4,10 +4,10 @@
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
6
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-c246d90e.js';
|
7
|
-
import { r as request, N as NODEJS_DEFAULT_REFERER_HEADER, c as cleanUrl, e as encodeQueryString, A as ArcGISAuthError, g as getProp, s as state } from './solution-store-
|
7
|
+
import { r as request, N as NODEJS_DEFAULT_REFERER_HEADER, c as cleanUrl, e as encodeQueryString, A as ArcGISAuthError, g as getProp, s as state } from './solution-store-1b67f2c8.js';
|
8
8
|
import { g as getLocaleComponentStrings } from './locale-7bf10e0a.js';
|
9
9
|
import './index-ac7f66eb.js';
|
10
|
-
import './interfaces-
|
10
|
+
import './interfaces-cd4054e5.js';
|
11
11
|
import './_commonjsHelpers-d5f9d613.js';
|
12
12
|
|
13
13
|
/** @license
|
@@ -4,9 +4,9 @@
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
6
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-c246d90e.js';
|
7
|
-
import { s as state } from './solution-store-
|
7
|
+
import { s as state } from './solution-store-1b67f2c8.js';
|
8
8
|
import { g as getLocaleComponentStrings } from './locale-7bf10e0a.js';
|
9
|
-
import './interfaces-
|
9
|
+
import './interfaces-cd4054e5.js';
|
10
10
|
import './index-ac7f66eb.js';
|
11
11
|
import './_commonjsHelpers-d5f9d613.js';
|
12
12
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
6
|
import { c as createStore } from './index-ac7f66eb.js';
|
7
|
-
import { e as EUpdateType } from './interfaces-
|
7
|
+
import { e as EUpdateType } from './interfaces-cd4054e5.js';
|
8
8
|
import { c as createCommonjsModule, a as commonjsGlobal, b as commonjsRequire } from './_commonjsHelpers-d5f9d613.js';
|
9
9
|
|
10
10
|
/*! *****************************************************************************
|