@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,24 +1,24 @@
|
|
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
|
-
'use strict';
|
7
|
-
|
8
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
9
|
-
|
10
|
-
const index = require('./index-c6979cbb.js');
|
11
|
-
const interfaces = require('./interfaces-
|
12
|
-
const loadModules = require('./loadModules-0806a34f.js');
|
13
|
-
const mapViewUtils = require('./mapViewUtils-
|
14
|
-
const publicNotificationStore = require('./publicNotificationStore-20e924f5.js');
|
15
|
-
const locale = require('./locale-04da9a8c.js');
|
16
|
-
const publicNotificationUtils = require('./publicNotificationUtils-9d585d8d.js');
|
17
|
-
require('./index-763f87ac.js');
|
18
|
-
require('./_commonjsHelpers-384729db.js');
|
19
|
-
|
20
|
-
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}";
|
21
|
-
|
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
|
+
'use strict';
|
7
|
+
|
8
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
9
|
+
|
10
|
+
const index = require('./index-c6979cbb.js');
|
11
|
+
const interfaces = require('./interfaces-cac36920.js');
|
12
|
+
const loadModules = require('./loadModules-0806a34f.js');
|
13
|
+
const mapViewUtils = require('./mapViewUtils-090f4d4d.js');
|
14
|
+
const publicNotificationStore = require('./publicNotificationStore-20e924f5.js');
|
15
|
+
const locale = require('./locale-04da9a8c.js');
|
16
|
+
const publicNotificationUtils = require('./publicNotificationUtils-9d585d8d.js');
|
17
|
+
require('./index-763f87ac.js');
|
18
|
+
require('./_commonjsHelpers-384729db.js');
|
19
|
+
|
20
|
+
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}";
|
21
|
+
|
22
22
|
const PublicNotification = class {
|
23
23
|
constructor(hostRef) {
|
24
24
|
index.registerInstance(this, hostRef);
|
@@ -38,6 +38,9 @@ const PublicNotification = class {
|
|
38
38
|
this.selectionLayerIds = [];
|
39
39
|
this.showRefineSelection = false;
|
40
40
|
this.showSearchSettings = true;
|
41
|
+
this.sketchLineSymbol = undefined;
|
42
|
+
this.sketchPointSymbol = undefined;
|
43
|
+
this.sketchPolygonSymbol = undefined;
|
41
44
|
this.addresseeLayer = undefined;
|
42
45
|
this._downloadActive = true;
|
43
46
|
this._numSelected = 0;
|
@@ -79,14 +82,27 @@ const PublicNotification = class {
|
|
79
82
|
}
|
80
83
|
}
|
81
84
|
/**
|
82
|
-
* Called each time the
|
85
|
+
* Called each time the sketchLineSymbol prop is changed.
|
83
86
|
*/
|
84
|
-
async
|
85
|
-
if (v && v !== oldV
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
87
|
+
async sketchLineSymbolWatchHandler(v, oldV) {
|
88
|
+
if (v && JSON.stringify(v) !== JSON.stringify(oldV)) {
|
89
|
+
this._setLineSymbol(v);
|
90
|
+
}
|
91
|
+
}
|
92
|
+
/**
|
93
|
+
* Called each time the sketchPointSymbol prop is changed.
|
94
|
+
*/
|
95
|
+
async sketchPointSymbolWatchHandler(v, oldV) {
|
96
|
+
if (v && JSON.stringify(v) !== JSON.stringify(oldV)) {
|
97
|
+
this._setPointSymbol(v);
|
98
|
+
}
|
99
|
+
}
|
100
|
+
/**
|
101
|
+
* Called each time the sketchPolygonSymbol prop is changed.
|
102
|
+
*/
|
103
|
+
async sketchPolygonSymbolWatchHandler(v, oldV) {
|
104
|
+
if (v && JSON.stringify(v) !== JSON.stringify(oldV)) {
|
105
|
+
this._setPolygonSymbol(v);
|
90
106
|
}
|
91
107
|
}
|
92
108
|
/**
|
@@ -146,6 +162,7 @@ const PublicNotification = class {
|
|
146
162
|
async componentWillLoad() {
|
147
163
|
await this._getTranslations();
|
148
164
|
await this._initModules();
|
165
|
+
this._initSymbols();
|
149
166
|
}
|
150
167
|
/**
|
151
168
|
* Renders the component.
|
@@ -166,10 +183,84 @@ const PublicNotification = class {
|
|
166
183
|
* @protected
|
167
184
|
*/
|
168
185
|
async _initModules() {
|
169
|
-
const [geometryEngine] = await loadModules.loadModules([
|
170
|
-
"esri/geometry/geometryEngine"
|
186
|
+
const [geometryEngine, jsonUtils] = await loadModules.loadModules([
|
187
|
+
"esri/geometry/geometryEngine",
|
188
|
+
"esri/symbols/support/jsonUtils"
|
171
189
|
]);
|
172
190
|
this._geometryEngine = geometryEngine;
|
191
|
+
this._jsonUtils = jsonUtils;
|
192
|
+
}
|
193
|
+
/**
|
194
|
+
* Initialize the default symbols that will be used when creating new graphics
|
195
|
+
*
|
196
|
+
* @protected
|
197
|
+
*/
|
198
|
+
_initSymbols() {
|
199
|
+
this._setLineSymbol(this.sketchLineSymbol);
|
200
|
+
this._setPointSymbol(this.sketchPointSymbol);
|
201
|
+
this._setPolygonSymbol(this.sketchPolygonSymbol);
|
202
|
+
}
|
203
|
+
/**
|
204
|
+
* Convert a JSON representation of a line symbol and/or set the line symbol
|
205
|
+
*
|
206
|
+
* @param v SimpleLineSymbol or a JSON representation of a line symbol
|
207
|
+
*
|
208
|
+
* @protected
|
209
|
+
*/
|
210
|
+
_setLineSymbol(v) {
|
211
|
+
const isSymbol = (v === null || v === void 0 ? void 0 : v.type) === 'simple-line';
|
212
|
+
this.sketchLineSymbol = isSymbol ? v : this._jsonUtils.fromJSON(v ? v : {
|
213
|
+
"type": "esriSLS",
|
214
|
+
"color": [130, 130, 130, 255],
|
215
|
+
"width": 2,
|
216
|
+
"style": "esriSLSSolid"
|
217
|
+
});
|
218
|
+
}
|
219
|
+
/**
|
220
|
+
* Convert a JSON representation of a point symbol and/or set the point symbol
|
221
|
+
*
|
222
|
+
* @param v SimpleMarkerSymbol or a JSON representation of a point symbol
|
223
|
+
*
|
224
|
+
* @protected
|
225
|
+
*/
|
226
|
+
_setPointSymbol(v) {
|
227
|
+
const isSymbol = (v === null || v === void 0 ? void 0 : v.type) === 'simple-marker';
|
228
|
+
this.sketchPointSymbol = isSymbol ? v : this._jsonUtils.fromJSON(v ? v : {
|
229
|
+
"type": "esriSMS",
|
230
|
+
"color": [255, 255, 255, 255],
|
231
|
+
"angle": 0,
|
232
|
+
"xoffset": 0,
|
233
|
+
"yoffset": 0,
|
234
|
+
"size": 6,
|
235
|
+
"style": "esriSMSCircle",
|
236
|
+
"outline": {
|
237
|
+
"type": "esriSLS",
|
238
|
+
"color": [50, 50, 50, 255],
|
239
|
+
"width": 1,
|
240
|
+
"style": "esriSLSSolid"
|
241
|
+
}
|
242
|
+
});
|
243
|
+
}
|
244
|
+
/**
|
245
|
+
* Convert a JSON representation of a polygon symbol and/or set the polygon symbol
|
246
|
+
*
|
247
|
+
* @param v SimpleFillSymbol or a JSON representation of a polygon symbol
|
248
|
+
*
|
249
|
+
* @protected
|
250
|
+
*/
|
251
|
+
_setPolygonSymbol(v) {
|
252
|
+
const isSymbol = (v === null || v === void 0 ? void 0 : v.type) === 'simple-fill';
|
253
|
+
this.sketchPolygonSymbol = isSymbol ? v : this._jsonUtils.fromJSON(v ? v : {
|
254
|
+
"type": "esriSFS",
|
255
|
+
"color": [150, 150, 150, 51],
|
256
|
+
"outline": {
|
257
|
+
"type": "esriSLS",
|
258
|
+
"color": [50, 50, 50, 255],
|
259
|
+
"width": 2,
|
260
|
+
"style": "esriSLSSolid"
|
261
|
+
},
|
262
|
+
"style": "esriSFSSolid"
|
263
|
+
});
|
173
264
|
}
|
174
265
|
/**
|
175
266
|
* Get a calcite action group for the current action
|
@@ -232,7 +323,7 @@ const PublicNotification = class {
|
|
232
323
|
* @protected
|
233
324
|
*/
|
234
325
|
_getListPage() {
|
235
|
-
const hasSets = this.
|
326
|
+
const hasSets = this._hasSelections();
|
236
327
|
const total = publicNotificationUtils.getTotal(this._selectionSets);
|
237
328
|
return hasSets ? (index.h("calcite-panel", null, index.h("div", { class: "padding-top-sides-1" }, index.h("calcite-label", { class: "font-bold" }, this._translations.myLists)), this._getNotice(this._translations.listHasSetsTip, "padding-sides-1 padding-bottom-1"), this._getMapLayerPicker(), index.h("div", { class: "display-block padding-sides-1 height-1-1-2" }, index.h("div", { class: "display-block float-left" }, index.h("calcite-label", { alignment: "start", class: "font-bold" }, this._translations.notifications)), index.h("div", { class: "display-block float-right" }, index.h("calcite-input-message", { active: true, class: "info-blue margin-top-0", scale: "m" }, this._translations.uniqueCout.replace("{{n}}", total.toString())))), hasSets ? this._getSelectionSetList() : (index.h("div", { class: "info-message" }, index.h("calcite-input-message", { active: true, class: "info-blue", scale: "m" }, this._translations.noNotifications))), index.h("div", { class: "display-flex padding-1" }, index.h("calcite-button", { onClick: () => { this._setPageType(interfaces.EPageType.SELECT); }, width: "full" }, this._translations.add)), this._showModal(this._showLayerSelectionChangeModal))) : (index.h("calcite-panel", null, index.h("div", { class: "padding-top-sides-1" }, index.h("calcite-label", { class: "font-bold" }, this._translations.myLists)), index.h("div", { class: "padding-sides-1" }, index.h("calcite-label", null, this._translations.notifications)), index.h("div", { class: "info-message padding-bottom-1" }, index.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(), index.h("div", { class: "display-flex padding-1" }, index.h("calcite-button", { onClick: () => { this._setPageType(interfaces.EPageType.SELECT); }, width: "full" }, this._translations.add))));
|
238
329
|
}
|
@@ -257,7 +348,8 @@ const PublicNotification = class {
|
|
257
348
|
// REFINE is handled seperately from the core selection sets
|
258
349
|
// You can only access after clicking the refine action
|
259
350
|
this._selectionSets.reduce((prev, cur, i) => {
|
260
|
-
|
351
|
+
const validSet = this._isValidSet(cur);
|
352
|
+
if (validSet) {
|
261
353
|
prev.push((index.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"))));
|
262
354
|
}
|
263
355
|
return prev;
|
@@ -298,14 +390,38 @@ const PublicNotification = class {
|
|
298
390
|
await this._updateAddresseeLayer(id);
|
299
391
|
}
|
300
392
|
/**
|
301
|
-
* Check if any selection sets exist.
|
393
|
+
* Check if any valid selection sets exist.
|
302
394
|
*
|
303
|
-
* @returns true if selection sets exist
|
395
|
+
* @returns true if valid selection sets exist
|
304
396
|
*
|
305
397
|
* @protected
|
306
398
|
*/
|
307
399
|
_hasSelections() {
|
308
|
-
return this._selectionSets.length > 0;
|
400
|
+
return this._selectionSets.filter(ss => this._isValidSet(ss)).length > 0;
|
401
|
+
}
|
402
|
+
/**
|
403
|
+
* Check if any duplicates exist
|
404
|
+
*
|
405
|
+
* @returns true if duplicates are found
|
406
|
+
*
|
407
|
+
* @protected
|
408
|
+
*/
|
409
|
+
_hasDuplicates() {
|
410
|
+
const selectedIds = this._selectionSets.reduce((prev, cur) => {
|
411
|
+
return prev.concat(cur.download ? cur.selectedIds : []);
|
412
|
+
}, []);
|
413
|
+
return selectedIds.length > new Set(selectedIds).size;
|
414
|
+
}
|
415
|
+
/**
|
416
|
+
* Check if a selection set is valid (exists or has at least one added if its a refine set)
|
417
|
+
*
|
418
|
+
* @returns true if selection set is valid
|
419
|
+
*
|
420
|
+
* @protected
|
421
|
+
*/
|
422
|
+
_isValidSet(ss) {
|
423
|
+
var _a, _b;
|
424
|
+
return ss.workflowType === interfaces.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;
|
309
425
|
}
|
310
426
|
/**
|
311
427
|
* Create the Select page that shows the selection workflows
|
@@ -327,7 +443,7 @@ const PublicNotification = class {
|
|
327
443
|
const locale$1 = locale.getComponentClosestLanguage(this.el);
|
328
444
|
const selectionLoading = locale$1 && locale$1 === "en" ?
|
329
445
|
`${this._translations.selectionLoading}...` : this._translations.selectionLoading;
|
330
|
-
return (index.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), index.h("div", { class: "padding-top-sides-1" }, index.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 })), index.h("div", { class: "padding-sides-1 padding-bottom-1", style: { "align-items": "end", "display": "flex" } }, this._selectionLoading ? (index.h("div", null, index.h("calcite-loader", { active: true, class: "info-blue", inline: true, label: selectionLoading, scale: "m", type: "indeterminate" }))) : (index.h("calcite-icon", { class: "info-blue padding-end-1-2", icon: "feature-layer", scale: "s" })), index.h("calcite-input-message", { active: true, class: "info-blue", scale: "m" }, this._selectionLoading ? selectionLoading :
|
446
|
+
return (index.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), index.h("div", { class: "padding-top-sides-1" }, index.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 })), index.h("div", { class: "padding-sides-1 padding-bottom-1", style: { "align-items": "end", "display": "flex" } }, this._selectionLoading ? (index.h("div", null, index.h("calcite-loader", { active: true, class: "info-blue", inline: true, label: selectionLoading, scale: "m", type: "indeterminate" }))) : (index.h("calcite-icon", { class: "info-blue padding-end-1-2", icon: "feature-layer", scale: "s" })), index.h("calcite-input-message", { active: true, class: "info-blue", scale: "m" }, this._selectionLoading ? selectionLoading :
|
331
447
|
this.noResultText && this._numSelected === 0 ? this.noResultText :
|
332
448
|
this._translations.selectedAddresses.replace("{{n}}", this._numSelected.toString()).replace("{{layer}}", ((_b = this.addresseeLayer) === null || _b === void 0 ? void 0 : _b.layer.title) || ""))), index.h("div", { class: "padding-sides-1 " + nameLabelClass }, index.h("calcite-label", { class: "font-bold" }, "List name", index.h("calcite-input", { onInput: () => {
|
333
449
|
this.labelChange.emit(this._labelName.value);
|
@@ -374,7 +490,8 @@ const PublicNotification = class {
|
|
374
490
|
_getDownloadPage(type) {
|
375
491
|
const isPdf = type === interfaces.EExportType.PDF;
|
376
492
|
const hasSelections = this._hasSelections();
|
377
|
-
|
493
|
+
const hasDuplicates = this._hasDuplicates();
|
494
|
+
return (index.h("calcite-panel", null, index.h("div", null, index.h("div", { class: "padding-top-sides-1" }, index.h("calcite-label", { class: "font-bold" }, isPdf ? this._translations.downloadPDF : this._translations.downloadCSV)), hasSelections ? (index.h("div", null, index.h("div", { class: "padding-top-sides-1" }, index.h("calcite-label", null, this._translations.notifications)), this._getSelectionLists(), index.h("div", { class: "margin-side-1 padding-top-1 border-bottom" }), index.h("div", { class: "padding-top-sides-1" }, index.h("calcite-label", { class: isPdf ? "display-none" : "", disabled: !hasDuplicates, layout: "inline" }, index.h("calcite-checkbox", { disabled: !hasDuplicates, ref: (el) => { this._removeDuplicatesCSV = el; } }), this._translations.removeDuplicate), index.h("calcite-label", { class: isPdf ? "" : "display-none", disabled: !hasDuplicates, layout: "inline" }, index.h("calcite-checkbox", { disabled: !hasDuplicates, ref: (el) => { this._removeDuplicatesPDF = el; } }), this._translations.removeDuplicate)), index.h("div", { class: isPdf ? "" : "display-none" }, this._getLabel(this._translations.selectPDFLabelOption, false), index.h("div", { class: "padding-sides-1" }, index.h("pdf-download", { disabled: !this._downloadActive, layerView: this.addresseeLayer, ref: (el) => { this._downloadTools = el; } }))), index.h("div", { class: "padding-1 display-flex" }, index.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")))));
|
378
495
|
}
|
379
496
|
/**
|
380
497
|
* Create the stacked navigation buttons for a page
|
@@ -424,7 +541,8 @@ const PublicNotification = class {
|
|
424
541
|
*/
|
425
542
|
_getSelectionLists() {
|
426
543
|
return this._selectionSets.reduce((prev, cur) => {
|
427
|
-
|
544
|
+
const validSet = this._isValidSet(cur);
|
545
|
+
if (validSet) {
|
428
546
|
if (!this._downloadActive && cur.download) {
|
429
547
|
this._downloadActive = true;
|
430
548
|
}
|
@@ -587,7 +705,7 @@ const PublicNotification = class {
|
|
587
705
|
* @protected
|
588
706
|
*/
|
589
707
|
async _updateSelectionSets(layerView) {
|
590
|
-
const _selectionSets = this._selectionSets
|
708
|
+
const _selectionSets = this._selectionSets;
|
591
709
|
const oidDefs = [];
|
592
710
|
_selectionSets.forEach(selectionSet => {
|
593
711
|
selectionSet.layerView = layerView;
|
@@ -671,11 +789,16 @@ const PublicNotification = class {
|
|
671
789
|
*/
|
672
790
|
_openSelection(selectionSet, evt) {
|
673
791
|
evt.stopPropagation();
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
792
|
+
if (selectionSet.workflowType === interfaces.EWorkflowType.REFINE) {
|
793
|
+
this._pageType = interfaces.EPageType.REFINE;
|
794
|
+
}
|
795
|
+
else {
|
796
|
+
this._activeSelection = selectionSet;
|
797
|
+
this._distance = this._activeSelection.distance;
|
798
|
+
this._unit = this._activeSelection.unit;
|
799
|
+
this._customLabel = this._activeSelection.label;
|
800
|
+
this._pageType = interfaces.EPageType.SELECT;
|
801
|
+
}
|
679
802
|
}
|
680
803
|
/**
|
681
804
|
* Highlight any selected features in the map
|
@@ -724,10 +847,12 @@ const PublicNotification = class {
|
|
724
847
|
static get watchers() { return {
|
725
848
|
"mapView": ["mapViewWatchHandler"],
|
726
849
|
"searchConfiguration": ["watchSearchConfigurationHandler"],
|
727
|
-
"
|
850
|
+
"sketchLineSymbol": ["sketchLineSymbolWatchHandler"],
|
851
|
+
"sketchPointSymbol": ["sketchPointSymbolWatchHandler"],
|
852
|
+
"sketchPolygonSymbol": ["sketchPolygonSymbolWatchHandler"],
|
728
853
|
"_pageType": ["pageTypeWatchHandler"]
|
729
854
|
}; }
|
730
855
|
};
|
731
|
-
PublicNotification.style = publicNotificationCss;
|
732
|
-
|
733
|
-
exports.public_notification = PublicNotification;
|
856
|
+
PublicNotification.style = publicNotificationCss;
|
857
|
+
|
858
|
+
exports.public_notification = PublicNotification;
|
@@ -8,10 +8,10 @@
|
|
8
8
|
Object.defineProperty(exports, '__esModule', { value: true });
|
9
9
|
|
10
10
|
const index = require('./index-c6979cbb.js');
|
11
|
-
const solutionStore = require('./solution-store-
|
11
|
+
const solutionStore = require('./solution-store-d28c332e.js');
|
12
12
|
const locale = require('./locale-04da9a8c.js');
|
13
13
|
require('./index-763f87ac.js');
|
14
|
-
require('./interfaces-
|
14
|
+
require('./interfaces-cac36920.js');
|
15
15
|
require('./_commonjsHelpers-384729db.js');
|
16
16
|
|
17
17
|
/** @license
|
@@ -8,9 +8,9 @@
|
|
8
8
|
Object.defineProperty(exports, '__esModule', { value: true });
|
9
9
|
|
10
10
|
const index = require('./index-c6979cbb.js');
|
11
|
-
const solutionStore = require('./solution-store-
|
11
|
+
const solutionStore = require('./solution-store-d28c332e.js');
|
12
12
|
const locale = require('./locale-04da9a8c.js');
|
13
|
-
require('./interfaces-
|
13
|
+
require('./interfaces-cac36920.js');
|
14
14
|
require('./index-763f87ac.js');
|
15
15
|
require('./_commonjsHelpers-384729db.js');
|
16
16
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
'use strict';
|
7
7
|
|
8
8
|
const index = require('./index-763f87ac.js');
|
9
|
-
const interfaces = require('./interfaces-
|
9
|
+
const interfaces = require('./interfaces-cac36920.js');
|
10
10
|
const _commonjsHelpers = require('./_commonjsHelpers-384729db.js');
|
11
11
|
|
12
12
|
/*! *****************************************************************************
|