@esri/solutions-components 0.8.4 → 0.8.6
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/assets/t9n/crowdsource-reporter/resources.json +5 -6
- package/dist/assets/t9n/crowdsource-reporter/resources_en.json +5 -6
- package/dist/assets/t9n/feature-list/resources.json +1 -1
- package/dist/assets/t9n/feature-list/resources_en.json +1 -1
- package/dist/assets/t9n/public-notification/resources.json +3 -1
- package/dist/assets/t9n/public-notification/resources_en.json +3 -1
- package/dist/cjs/buffer-tools_3.cjs.entry.js +2 -2
- package/dist/cjs/calcite-alert_4.cjs.entry.js +2 -2
- package/dist/cjs/calcite-combobox_5.cjs.entry.js +2 -2
- package/dist/cjs/calcite-flow_5.cjs.entry.js +163 -16
- package/dist/cjs/card-manager_3.cjs.entry.js +41 -2
- package/dist/cjs/crowdsource-manager.cjs.entry.js +2 -1
- package/dist/cjs/crowdsource-reporter.cjs.entry.js +120 -38
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-select-tools_3.cjs.entry.js +2 -2
- package/dist/cjs/public-notification.cjs.entry.js +110 -4
- package/dist/cjs/{publicNotificationStore-ef379d11.js → publicNotificationStore-e790601d.js} +2 -2
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/create-feature/create-feature.css +9 -0
- package/dist/collection/components/create-feature/create-feature.js +134 -6
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +19 -1
- package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.css +5 -0
- package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +120 -38
- package/dist/collection/components/feature-list/feature-list.js +93 -5
- package/dist/collection/components/info-card/info-card.css +1 -1
- package/dist/collection/components/info-card/info-card.js +1 -1
- package/dist/collection/components/layer-list/layer-list.js +6 -6
- package/dist/collection/components/map-card/map-card.js +27 -2
- package/dist/collection/components/map-draw-tools/map-draw-tools.js +1 -1
- package/dist/collection/components/map-layer-picker/map-layer-picker.js +1 -1
- package/dist/collection/components/map-select-tools/map-select-tools.js +1 -1
- package/dist/collection/components/public-notification/public-notification.js +110 -3
- package/dist/collection/demos/crowdsource-reporter.html +1 -1
- package/dist/collection/utils/interfaces.ts +7 -0
- package/dist/collection/utils/publicNotificationStore.js +2 -2
- package/dist/collection/utils/publicNotificationStore.ts +3 -2
- package/dist/components/create-feature2.js +111 -7
- package/dist/components/crowdsource-manager.js +3 -1
- package/dist/components/crowdsource-reporter.js +121 -39
- package/dist/components/feature-list2.js +54 -6
- package/dist/components/info-card2.js +2 -2
- package/dist/components/layer-list2.js +6 -6
- package/dist/components/map-card2.js +42 -2
- package/dist/components/map-draw-tools2.js +1 -1
- package/dist/components/map-layer-picker2.js +1 -1
- package/dist/components/map-select-tools2.js +1 -1
- package/dist/components/public-notification.js +110 -3
- package/dist/components/publicNotificationStore.js +2 -2
- package/dist/esm/buffer-tools_3.entry.js +2 -2
- package/dist/esm/calcite-alert_4.entry.js +3 -3
- package/dist/esm/calcite-combobox_5.entry.js +3 -3
- package/dist/esm/calcite-flow_5.entry.js +164 -17
- package/dist/esm/card-manager_3.entry.js +43 -4
- package/dist/esm/crowdsource-manager.entry.js +3 -2
- package/dist/esm/crowdsource-reporter.entry.js +121 -39
- package/dist/esm/{downloadUtils-0c13073b.js → downloadUtils-0c1e4d7b.js} +2 -2
- package/dist/esm/{index.es-ad250bc6.js → index.es-286e3cfa.js} +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/map-select-tools_3.entry.js +4 -4
- package/dist/esm/{mapViewUtils-20504620.js → mapViewUtils-253178f1.js} +1 -1
- package/dist/esm/public-notification.entry.js +112 -6
- package/dist/esm/{publicNotificationStore-3bf4de75.js → publicNotificationStore-223faed2.js} +2 -2
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/demos/crowdsource-reporter.html +1 -1
- package/dist/solutions-components/p-15f9624a.entry.js +6 -0
- package/dist/solutions-components/{p-955647ea.entry.js → p-1ea5e061.entry.js} +2 -2
- package/dist/solutions-components/{p-590a2a26.js → p-212b02e7.js} +1 -1
- package/dist/solutions-components/p-238d3b5f.entry.js +6 -0
- package/dist/solutions-components/p-273d833b.entry.js +6 -0
- package/dist/solutions-components/{p-cc280aa1.js → p-322868ec.js} +1 -1
- package/dist/solutions-components/{p-1d3a1794.js → p-331b5d1e.js} +2 -2
- package/dist/solutions-components/{p-c897e3eb.js → p-3af79063.js} +1 -1
- package/dist/solutions-components/p-45ed16d5.entry.js +6 -0
- package/dist/solutions-components/p-80b11ec1.entry.js +17 -0
- package/dist/solutions-components/{p-5c7e3941.entry.js → p-813fd8a4.entry.js} +2 -2
- package/dist/solutions-components/{p-ff302d95.entry.js → p-d136eab0.entry.js} +2 -2
- package/dist/solutions-components/p-e0446d5b.entry.js +6 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/interfaces.ts +7 -0
- package/dist/solutions-components/utils/publicNotificationStore.ts +3 -2
- package/dist/types/components/create-feature/create-feature.d.ts +43 -1
- package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +4 -0
- package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +31 -10
- package/dist/types/components/feature-list/feature-list.d.ts +31 -0
- package/dist/types/components/layer-list/layer-list.d.ts +3 -3
- package/dist/types/components/map-card/map-card.d.ts +8 -0
- package/dist/types/components/public-notification/public-notification.d.ts +48 -0
- package/dist/types/components.d.ts +37 -0
- package/dist/types/utils/interfaces.d.ts +6 -0
- package/dist/types/utils/publicNotificationStore.d.ts +2 -1
- package/package.json +2 -1
- package/dist/solutions-components/p-6512dc44.entry.js +0 -6
- package/dist/solutions-components/p-65ad1625.entry.js +0 -6
- package/dist/solutions-components/p-989bf0bf.entry.js +0 -6
- package/dist/solutions-components/p-a0611720.entry.js +0 -6
- package/dist/solutions-components/p-efe1694a.entry.js +0 -17
- package/dist/solutions-components/p-f3467807.entry.js +0 -6
@@ -5,10 +5,10 @@
|
|
5
5
|
*/
|
6
6
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-164d485a.js';
|
7
7
|
import { a as getComponentClosestLanguage, l as loadModules, g as getLocaleComponentStrings } from './locale-bcbea4ef.js';
|
8
|
-
import {
|
8
|
+
import { d as goToSelection, h as highlightFeatures, j as queryObjectIds, k as getQueryGeoms, b as getFeatureLayerView, l as queryFeaturesByGeometry, m as getIdSets, n as highlightAllFeatures } from './mapViewUtils-253178f1.js';
|
9
9
|
import { a as EWorkflowType, e as ESelectionMode, f as EDrawMode } from './interfaces-586e863c.js';
|
10
|
-
import { s as state } from './publicNotificationStore-
|
11
|
-
import { d as downloadCSV, a as downloadPDF } from './downloadUtils-
|
10
|
+
import { s as state } from './publicNotificationStore-223faed2.js';
|
11
|
+
import { d as downloadCSV, a as downloadPDF } from './downloadUtils-0c1e4d7b.js';
|
12
12
|
import './esri-loader-1b324844.js';
|
13
13
|
import './_commonjsHelpers-0f74c230.js';
|
14
14
|
import './index-477ea182.js';
|
@@ -422,7 +422,7 @@ const MapSelectTools = class {
|
|
422
422
|
}
|
423
423
|
else {
|
424
424
|
this._bufferGraphicsLayer = new this.GraphicsLayer({ title, listMode: "hide" });
|
425
|
-
state.managedLayers
|
425
|
+
state.managedLayers[title] = "buffer";
|
426
426
|
const sketchIndex = this.mapView.map.layers.findIndex((l) => l.title === this._translations.sketchLayer);
|
427
427
|
if (sketchIndex > -1) {
|
428
428
|
this.mapView.map.layers.add(this._bufferGraphicsLayer, sketchIndex);
|
@@ -452,4 +452,4 @@ async function goToSelection(ids, layerView, mapView, flashFeatures = true, feat
|
|
452
452
|
}
|
453
453
|
}
|
454
454
|
|
455
|
-
export { getAllLayers as a, getFeatureLayerView as b,
|
455
|
+
export { getAllLayers as a, getFeatureLayerView as b, getMapLayerHash as c, goToSelection as d, queryAllIds as e, queryFeatureIds as f, getLayerOrTable as g, highlightFeatures as h, queryFeaturesByGlobalID as i, queryObjectIds as j, getQueryGeoms as k, queryFeaturesByGeometry as l, getIdSets as m, highlightAllFeatures as n, getMapTableHash as o, queryFeaturesByID as q };
|
@@ -6,9 +6,9 @@
|
|
6
6
|
import { r as registerInstance, c as createEvent, a as getAssetPath, h, H as Host, g as getElement } from './index-164d485a.js';
|
7
7
|
import { b as EExportType, c as EPageType, a as EWorkflowType } from './interfaces-586e863c.js';
|
8
8
|
import { l as loadModules, g as getLocaleComponentStrings } from './locale-bcbea4ef.js';
|
9
|
-
import {
|
10
|
-
import { s as state } from './publicNotificationStore-
|
11
|
-
import { c as consolidateLabels, r as removeDuplicateLabels } from './downloadUtils-
|
9
|
+
import { d as goToSelection, h as highlightFeatures } from './mapViewUtils-253178f1.js';
|
10
|
+
import { s as state } from './publicNotificationStore-223faed2.js';
|
11
|
+
import { c as consolidateLabels, r as removeDuplicateLabels } from './downloadUtils-0c1e4d7b.js';
|
12
12
|
import './esri-loader-1b324844.js';
|
13
13
|
import './_commonjsHelpers-0f74c230.js';
|
14
14
|
import './index-477ea182.js';
|
@@ -53,6 +53,7 @@ const PublicNotification = class {
|
|
53
53
|
this.sketchLineSymbol = undefined;
|
54
54
|
this.sketchPointSymbol = undefined;
|
55
55
|
this.sketchPolygonSymbol = undefined;
|
56
|
+
this._exportGraphics = false;
|
56
57
|
this._addMap = false;
|
57
58
|
this._addResults = true;
|
58
59
|
this._addTitle = false;
|
@@ -131,6 +132,7 @@ const PublicNotification = class {
|
|
131
132
|
if (pageType === EPageType.EXPORT) {
|
132
133
|
this._fetchingData = true;
|
133
134
|
this._numDuplicates = await this._getNumDuplicates();
|
135
|
+
this._updateExportGraphics();
|
134
136
|
this._fetchingData = false;
|
135
137
|
}
|
136
138
|
this._clearHighlight();
|
@@ -138,6 +140,9 @@ const PublicNotification = class {
|
|
138
140
|
// clear any draw shapes or buffers
|
139
141
|
await this._clearSelection();
|
140
142
|
}
|
143
|
+
if (oldPageType === EPageType.EXPORT) {
|
144
|
+
this._removeExportGraphics();
|
145
|
+
}
|
141
146
|
if (pageType !== EPageType.SELECT) {
|
142
147
|
return this._highlightFeatures();
|
143
148
|
}
|
@@ -201,12 +206,14 @@ const PublicNotification = class {
|
|
201
206
|
* @protected
|
202
207
|
*/
|
203
208
|
async _initModules() {
|
204
|
-
const [geometryEngine, jsonUtils] = await loadModules([
|
209
|
+
const [geometryEngine, jsonUtils, graphic] = await loadModules([
|
205
210
|
"esri/geometry/geometryEngine",
|
206
|
-
"esri/symbols/support/jsonUtils"
|
211
|
+
"esri/symbols/support/jsonUtils",
|
212
|
+
"esri/Graphic"
|
207
213
|
]);
|
208
214
|
this._geometryEngine = geometryEngine;
|
209
215
|
this._jsonUtils = jsonUtils;
|
216
|
+
this.Graphic = graphic;
|
210
217
|
}
|
211
218
|
/**
|
212
219
|
* Load the search configuration
|
@@ -534,9 +541,107 @@ const PublicNotification = class {
|
|
534
541
|
_getExportOptions() {
|
535
542
|
const displayClass = this._exportType === EExportType.PDF ? "display-block" : "display-none";
|
536
543
|
const titleOptionsClass = this._addTitle ? "display-block" : "display-none";
|
544
|
+
const graphicsOptionsClass = this._addMap ? "display-flex" : "display-none";
|
537
545
|
const title = this._titleValue ? this._titleValue : this.defaultExportTitle ? this.defaultExportTitle : "";
|
538
546
|
const formatOptionsClass = this._addResults ? "" : "display-none";
|
539
|
-
return (h("div", { class: displayClass }, this._getLabel(this._translations.pdfOptions, true), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0", layout: "inline" }, h("calcite-checkbox", { checked: this._addResults, onCalciteCheckboxChange: () => this._addResults = !this._addResults }), this._translations.addResults)), h("div", { class: `padding-top-sides-1 ${formatOptionsClass}` }, h("calcite-label", { class: "label-margin-0" }, this._translations.selectPDFLabelOption)), h("div", { class: `padding-sides-1 ${formatOptionsClass}` }, h("pdf-download", { defaultNumLabelsPerPage: parseInt(this.defaultNumLabelsPerPage.toString(), 10), disabled: !this._downloadActive, ref: (el) => { this._downloadTools = el; } })), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0", layout: "inline" }, h("calcite-checkbox", { checked: this._addTitle, onCalciteCheckboxChange: () => this._addTitle = !this._addTitle }), this._translations.title)), h("div", { class: titleOptionsClass }, this._getLabel(this._translations.title, true, ""), h("calcite-input-text", { class: "padding-sides-1", onCalciteInputTextInput: () => this._changeTitle(), placeholder: this._translations.titlePlaceholder, ref: (el) => { this._titleElement = el; }, value: title })), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0", layout: "inline" }, h("calcite-checkbox", { checked: this._addMap, onCalciteCheckboxChange: () => this.
|
547
|
+
return (h("div", { class: displayClass }, this._getLabel(this._translations.pdfOptions, true), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0", layout: "inline" }, h("calcite-checkbox", { checked: this._addResults, onCalciteCheckboxChange: () => this._addResults = !this._addResults }), this._translations.addResults)), h("div", { class: `padding-top-sides-1 ${formatOptionsClass}` }, h("calcite-label", { class: "label-margin-0" }, this._translations.selectPDFLabelOption)), h("div", { class: `padding-sides-1 ${formatOptionsClass}` }, h("pdf-download", { defaultNumLabelsPerPage: parseInt(this.defaultNumLabelsPerPage.toString(), 10), disabled: !this._downloadActive, ref: (el) => { this._downloadTools = el; } })), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0", layout: "inline" }, h("calcite-checkbox", { checked: this._addTitle, onCalciteCheckboxChange: () => this._addTitle = !this._addTitle }), this._translations.title)), h("div", { class: titleOptionsClass }, this._getLabel(this._translations.title, true, ""), h("calcite-input-text", { class: "padding-sides-1", onCalciteInputTextInput: () => this._changeTitle(), placeholder: this._translations.titlePlaceholder, ref: (el) => { this._titleElement = el; }, value: title })), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0", layout: "inline" }, h("calcite-checkbox", { checked: this._addMap, onCalciteCheckboxChange: () => this._handleAddMapChange() }), this._translations.includeMap)), h("div", { class: `padding-top-sides-1 ${graphicsOptionsClass}` }, h("calcite-label", { class: "label-margin-0", layout: "inline" }, h("calcite-checkbox", { checked: this._exportGraphics, onCalciteCheckboxChange: () => this._handleExportGraphicsChange() }), this._translations.listGraphics), h("calcite-icon", { class: "padding-start-1-2 icon", icon: "question", id: "list-graphics-icon", scale: "s" }), h("calcite-popover", { closable: true, label: "", referenceElement: "list-graphics-icon" }, h("span", { class: "tooltip-message" }, this._translations.listGraphicsTip)))));
|
548
|
+
}
|
549
|
+
/**
|
550
|
+
* Toggle the _addMap state variable and update the graphics on the map
|
551
|
+
*
|
552
|
+
* @protected
|
553
|
+
*/
|
554
|
+
_handleAddMapChange() {
|
555
|
+
this._addMap = !this._addMap;
|
556
|
+
this._updateExportGraphics();
|
557
|
+
}
|
558
|
+
/**
|
559
|
+
* Toggle the _exportGraphics state variable and update the graphics on the map
|
560
|
+
*
|
561
|
+
* @protected
|
562
|
+
*/
|
563
|
+
_handleExportGraphicsChange() {
|
564
|
+
this._exportGraphics = !this._exportGraphics;
|
565
|
+
this._updateExportGraphics();
|
566
|
+
}
|
567
|
+
/**
|
568
|
+
* Get the "sketch" or "buffer" graphics layer
|
569
|
+
*
|
570
|
+
* @param type The type of managed layer to fetch "sketch" | "buffer"
|
571
|
+
*
|
572
|
+
* @protected
|
573
|
+
*/
|
574
|
+
_getManagedLayer(type) {
|
575
|
+
let layer;
|
576
|
+
Object.keys(state.managedLayers).some((k) => {
|
577
|
+
const i = this.mapView.map.layers.findIndex((l) => l.title === k);
|
578
|
+
if (state.managedLayers[k] === type) {
|
579
|
+
layer = this.mapView.map.layers.getItemAt(i);
|
580
|
+
return true;
|
581
|
+
}
|
582
|
+
});
|
583
|
+
return layer;
|
584
|
+
}
|
585
|
+
/**
|
586
|
+
* Update the export graphics by adding or removeing them
|
587
|
+
*
|
588
|
+
* @param clear When true the graphics layers will be cleared prior to adding any new graphics, defaults to false
|
589
|
+
*
|
590
|
+
* @protected
|
591
|
+
*/
|
592
|
+
_updateExportGraphics(clear = false) {
|
593
|
+
if (clear || !this._exportGraphics || !this._addMap) {
|
594
|
+
this._removeExportGraphics();
|
595
|
+
}
|
596
|
+
if (this._exportGraphics && this._addMap) {
|
597
|
+
this._addExportGraphics();
|
598
|
+
}
|
599
|
+
}
|
600
|
+
/**
|
601
|
+
* Remove all buffer and sketch graphics
|
602
|
+
*
|
603
|
+
* @protected
|
604
|
+
*/
|
605
|
+
_removeExportGraphics() {
|
606
|
+
const sketchLayer = this._getManagedLayer("sketch");
|
607
|
+
const bufferLayer = this._getManagedLayer("buffer");
|
608
|
+
if (sketchLayer) {
|
609
|
+
sketchLayer.graphics.removeAll();
|
610
|
+
}
|
611
|
+
if (bufferLayer) {
|
612
|
+
bufferLayer.graphics.removeAll();
|
613
|
+
}
|
614
|
+
}
|
615
|
+
/**
|
616
|
+
* Add all buffer and sketch graphics that are flagged for download
|
617
|
+
*
|
618
|
+
* @protected
|
619
|
+
*/
|
620
|
+
_addExportGraphics() {
|
621
|
+
const sketchLayer = this._getManagedLayer("sketch");
|
622
|
+
const bufferLayer = this._getManagedLayer("buffer");
|
623
|
+
this._selectionSets.forEach(ss => {
|
624
|
+
if (ss.download) {
|
625
|
+
if (sketchLayer) {
|
626
|
+
sketchLayer.graphics.add(ss.sketchGraphic);
|
627
|
+
}
|
628
|
+
if (bufferLayer) {
|
629
|
+
const symbol = {
|
630
|
+
type: "simple-fill",
|
631
|
+
color: this.bufferColor,
|
632
|
+
outline: {
|
633
|
+
color: this.bufferOutlineColor,
|
634
|
+
width: 1
|
635
|
+
}
|
636
|
+
};
|
637
|
+
const bufferGraphic = new this.Graphic({
|
638
|
+
geometry: ss.buffer,
|
639
|
+
symbol
|
640
|
+
});
|
641
|
+
bufferLayer.graphics.add(bufferGraphic);
|
642
|
+
}
|
643
|
+
}
|
644
|
+
});
|
540
645
|
}
|
541
646
|
/**
|
542
647
|
* Render the refine page
|
@@ -630,6 +735,7 @@ const PublicNotification = class {
|
|
630
735
|
isActive = ss.download ? true : isActive;
|
631
736
|
return ss;
|
632
737
|
});
|
738
|
+
this._updateExportGraphics(true);
|
633
739
|
this._downloadActive = isActive;
|
634
740
|
this._fetchingData = true;
|
635
741
|
this._numDuplicates = await this._getNumDuplicates();
|
package/dist/esm/{publicNotificationStore-3bf4de75.js → publicNotificationStore-223faed2.js}
RENAMED
@@ -21,8 +21,8 @@ import { c as createStore } from './index-477ea182.js';
|
|
21
21
|
* limitations under the License.
|
22
22
|
*/
|
23
23
|
const { state, onChange } = createStore({
|
24
|
-
//
|
25
|
-
managedLayers:
|
24
|
+
// Key Value pair whose Key is the layer name and the Value is the type of layer ("buffer" | "sketch")
|
25
|
+
managedLayers: {},
|
26
26
|
// List of tables added and managed by the component
|
27
27
|
managedTables: [],
|
28
28
|
// Handle[]: https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Handles.html#Handle
|