@esri/solutions-components 0.8.4 → 0.8.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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
|
@@ -11,7 +11,7 @@ const index = require('./index-105cf2b9.js');
|
|
|
11
11
|
const locale = require('./locale-3d0a4bc2.js');
|
|
12
12
|
const mapViewUtils = require('./mapViewUtils-3e0fa457.js');
|
|
13
13
|
const interfaces = require('./interfaces-7cd0a48a.js');
|
|
14
|
-
const publicNotificationStore = require('./publicNotificationStore-
|
|
14
|
+
const publicNotificationStore = require('./publicNotificationStore-e790601d.js');
|
|
15
15
|
const downloadUtils = require('./downloadUtils-8b05d7cc.js');
|
|
16
16
|
require('./esri-loader-ce6c3d3d.js');
|
|
17
17
|
require('./_commonjsHelpers-480c2e77.js');
|
|
@@ -426,7 +426,7 @@ const MapSelectTools = class {
|
|
|
426
426
|
}
|
|
427
427
|
else {
|
|
428
428
|
this._bufferGraphicsLayer = new this.GraphicsLayer({ title, listMode: "hide" });
|
|
429
|
-
publicNotificationStore.state.managedLayers
|
|
429
|
+
publicNotificationStore.state.managedLayers[title] = "buffer";
|
|
430
430
|
const sketchIndex = this.mapView.map.layers.findIndex((l) => l.title === this._translations.sketchLayer);
|
|
431
431
|
if (sketchIndex > -1) {
|
|
432
432
|
this.mapView.map.layers.add(this._bufferGraphicsLayer, sketchIndex);
|
|
@@ -11,7 +11,7 @@ const index = require('./index-105cf2b9.js');
|
|
|
11
11
|
const interfaces = require('./interfaces-7cd0a48a.js');
|
|
12
12
|
const locale = require('./locale-3d0a4bc2.js');
|
|
13
13
|
const mapViewUtils = require('./mapViewUtils-3e0fa457.js');
|
|
14
|
-
const publicNotificationStore = require('./publicNotificationStore-
|
|
14
|
+
const publicNotificationStore = require('./publicNotificationStore-e790601d.js');
|
|
15
15
|
const downloadUtils = require('./downloadUtils-8b05d7cc.js');
|
|
16
16
|
require('./esri-loader-ce6c3d3d.js');
|
|
17
17
|
require('./_commonjsHelpers-480c2e77.js');
|
|
@@ -57,6 +57,7 @@ const PublicNotification = class {
|
|
|
57
57
|
this.sketchLineSymbol = undefined;
|
|
58
58
|
this.sketchPointSymbol = undefined;
|
|
59
59
|
this.sketchPolygonSymbol = undefined;
|
|
60
|
+
this._exportGraphics = false;
|
|
60
61
|
this._addMap = false;
|
|
61
62
|
this._addResults = true;
|
|
62
63
|
this._addTitle = false;
|
|
@@ -135,6 +136,7 @@ const PublicNotification = class {
|
|
|
135
136
|
if (pageType === interfaces.EPageType.EXPORT) {
|
|
136
137
|
this._fetchingData = true;
|
|
137
138
|
this._numDuplicates = await this._getNumDuplicates();
|
|
139
|
+
this._updateExportGraphics();
|
|
138
140
|
this._fetchingData = false;
|
|
139
141
|
}
|
|
140
142
|
this._clearHighlight();
|
|
@@ -142,6 +144,9 @@ const PublicNotification = class {
|
|
|
142
144
|
// clear any draw shapes or buffers
|
|
143
145
|
await this._clearSelection();
|
|
144
146
|
}
|
|
147
|
+
if (oldPageType === interfaces.EPageType.EXPORT) {
|
|
148
|
+
this._removeExportGraphics();
|
|
149
|
+
}
|
|
145
150
|
if (pageType !== interfaces.EPageType.SELECT) {
|
|
146
151
|
return this._highlightFeatures();
|
|
147
152
|
}
|
|
@@ -205,12 +210,14 @@ const PublicNotification = class {
|
|
|
205
210
|
* @protected
|
|
206
211
|
*/
|
|
207
212
|
async _initModules() {
|
|
208
|
-
const [geometryEngine, jsonUtils] = await locale.loadModules([
|
|
213
|
+
const [geometryEngine, jsonUtils, graphic] = await locale.loadModules([
|
|
209
214
|
"esri/geometry/geometryEngine",
|
|
210
|
-
"esri/symbols/support/jsonUtils"
|
|
215
|
+
"esri/symbols/support/jsonUtils",
|
|
216
|
+
"esri/Graphic"
|
|
211
217
|
]);
|
|
212
218
|
this._geometryEngine = geometryEngine;
|
|
213
219
|
this._jsonUtils = jsonUtils;
|
|
220
|
+
this.Graphic = graphic;
|
|
214
221
|
}
|
|
215
222
|
/**
|
|
216
223
|
* Load the search configuration
|
|
@@ -538,9 +545,107 @@ const PublicNotification = class {
|
|
|
538
545
|
_getExportOptions() {
|
|
539
546
|
const displayClass = this._exportType === interfaces.EExportType.PDF ? "display-block" : "display-none";
|
|
540
547
|
const titleOptionsClass = this._addTitle ? "display-block" : "display-none";
|
|
548
|
+
const graphicsOptionsClass = this._addMap ? "display-flex" : "display-none";
|
|
541
549
|
const title = this._titleValue ? this._titleValue : this.defaultExportTitle ? this.defaultExportTitle : "";
|
|
542
550
|
const formatOptionsClass = this._addResults ? "" : "display-none";
|
|
543
|
-
return (index.h("div", { class: displayClass }, this._getLabel(this._translations.pdfOptions, true), index.h("div", { class: "padding-top-sides-1" }, index.h("calcite-label", { class: "label-margin-0", layout: "inline" }, index.h("calcite-checkbox", { checked: this._addResults, onCalciteCheckboxChange: () => this._addResults = !this._addResults }), this._translations.addResults)), index.h("div", { class: `padding-top-sides-1 ${formatOptionsClass}` }, index.h("calcite-label", { class: "label-margin-0" }, this._translations.selectPDFLabelOption)), index.h("div", { class: `padding-sides-1 ${formatOptionsClass}` }, index.h("pdf-download", { defaultNumLabelsPerPage: parseInt(this.defaultNumLabelsPerPage.toString(), 10), disabled: !this._downloadActive, ref: (el) => { this._downloadTools = el; } })), index.h("div", { class: "padding-top-sides-1" }, index.h("calcite-label", { class: "label-margin-0", layout: "inline" }, index.h("calcite-checkbox", { checked: this._addTitle, onCalciteCheckboxChange: () => this._addTitle = !this._addTitle }), this._translations.title)), index.h("div", { class: titleOptionsClass }, this._getLabel(this._translations.title, true, ""), index.h("calcite-input-text", { class: "padding-sides-1", onCalciteInputTextInput: () => this._changeTitle(), placeholder: this._translations.titlePlaceholder, ref: (el) => { this._titleElement = el; }, value: title })), index.h("div", { class: "padding-top-sides-1" }, index.h("calcite-label", { class: "label-margin-0", layout: "inline" }, index.h("calcite-checkbox", { checked: this._addMap, onCalciteCheckboxChange: () => this.
|
|
551
|
+
return (index.h("div", { class: displayClass }, this._getLabel(this._translations.pdfOptions, true), index.h("div", { class: "padding-top-sides-1" }, index.h("calcite-label", { class: "label-margin-0", layout: "inline" }, index.h("calcite-checkbox", { checked: this._addResults, onCalciteCheckboxChange: () => this._addResults = !this._addResults }), this._translations.addResults)), index.h("div", { class: `padding-top-sides-1 ${formatOptionsClass}` }, index.h("calcite-label", { class: "label-margin-0" }, this._translations.selectPDFLabelOption)), index.h("div", { class: `padding-sides-1 ${formatOptionsClass}` }, index.h("pdf-download", { defaultNumLabelsPerPage: parseInt(this.defaultNumLabelsPerPage.toString(), 10), disabled: !this._downloadActive, ref: (el) => { this._downloadTools = el; } })), index.h("div", { class: "padding-top-sides-1" }, index.h("calcite-label", { class: "label-margin-0", layout: "inline" }, index.h("calcite-checkbox", { checked: this._addTitle, onCalciteCheckboxChange: () => this._addTitle = !this._addTitle }), this._translations.title)), index.h("div", { class: titleOptionsClass }, this._getLabel(this._translations.title, true, ""), index.h("calcite-input-text", { class: "padding-sides-1", onCalciteInputTextInput: () => this._changeTitle(), placeholder: this._translations.titlePlaceholder, ref: (el) => { this._titleElement = el; }, value: title })), index.h("div", { class: "padding-top-sides-1" }, index.h("calcite-label", { class: "label-margin-0", layout: "inline" }, index.h("calcite-checkbox", { checked: this._addMap, onCalciteCheckboxChange: () => this._handleAddMapChange() }), this._translations.includeMap)), index.h("div", { class: `padding-top-sides-1 ${graphicsOptionsClass}` }, index.h("calcite-label", { class: "label-margin-0", layout: "inline" }, index.h("calcite-checkbox", { checked: this._exportGraphics, onCalciteCheckboxChange: () => this._handleExportGraphicsChange() }), this._translations.listGraphics), index.h("calcite-icon", { class: "padding-start-1-2 icon", icon: "question", id: "list-graphics-icon", scale: "s" }), index.h("calcite-popover", { closable: true, label: "", referenceElement: "list-graphics-icon" }, index.h("span", { class: "tooltip-message" }, this._translations.listGraphicsTip)))));
|
|
552
|
+
}
|
|
553
|
+
/**
|
|
554
|
+
* Toggle the _addMap state variable and update the graphics on the map
|
|
555
|
+
*
|
|
556
|
+
* @protected
|
|
557
|
+
*/
|
|
558
|
+
_handleAddMapChange() {
|
|
559
|
+
this._addMap = !this._addMap;
|
|
560
|
+
this._updateExportGraphics();
|
|
561
|
+
}
|
|
562
|
+
/**
|
|
563
|
+
* Toggle the _exportGraphics state variable and update the graphics on the map
|
|
564
|
+
*
|
|
565
|
+
* @protected
|
|
566
|
+
*/
|
|
567
|
+
_handleExportGraphicsChange() {
|
|
568
|
+
this._exportGraphics = !this._exportGraphics;
|
|
569
|
+
this._updateExportGraphics();
|
|
570
|
+
}
|
|
571
|
+
/**
|
|
572
|
+
* Get the "sketch" or "buffer" graphics layer
|
|
573
|
+
*
|
|
574
|
+
* @param type The type of managed layer to fetch "sketch" | "buffer"
|
|
575
|
+
*
|
|
576
|
+
* @protected
|
|
577
|
+
*/
|
|
578
|
+
_getManagedLayer(type) {
|
|
579
|
+
let layer;
|
|
580
|
+
Object.keys(publicNotificationStore.state.managedLayers).some((k) => {
|
|
581
|
+
const i = this.mapView.map.layers.findIndex((l) => l.title === k);
|
|
582
|
+
if (publicNotificationStore.state.managedLayers[k] === type) {
|
|
583
|
+
layer = this.mapView.map.layers.getItemAt(i);
|
|
584
|
+
return true;
|
|
585
|
+
}
|
|
586
|
+
});
|
|
587
|
+
return layer;
|
|
588
|
+
}
|
|
589
|
+
/**
|
|
590
|
+
* Update the export graphics by adding or removeing them
|
|
591
|
+
*
|
|
592
|
+
* @param clear When true the graphics layers will be cleared prior to adding any new graphics, defaults to false
|
|
593
|
+
*
|
|
594
|
+
* @protected
|
|
595
|
+
*/
|
|
596
|
+
_updateExportGraphics(clear = false) {
|
|
597
|
+
if (clear || !this._exportGraphics || !this._addMap) {
|
|
598
|
+
this._removeExportGraphics();
|
|
599
|
+
}
|
|
600
|
+
if (this._exportGraphics && this._addMap) {
|
|
601
|
+
this._addExportGraphics();
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
/**
|
|
605
|
+
* Remove all buffer and sketch graphics
|
|
606
|
+
*
|
|
607
|
+
* @protected
|
|
608
|
+
*/
|
|
609
|
+
_removeExportGraphics() {
|
|
610
|
+
const sketchLayer = this._getManagedLayer("sketch");
|
|
611
|
+
const bufferLayer = this._getManagedLayer("buffer");
|
|
612
|
+
if (sketchLayer) {
|
|
613
|
+
sketchLayer.graphics.removeAll();
|
|
614
|
+
}
|
|
615
|
+
if (bufferLayer) {
|
|
616
|
+
bufferLayer.graphics.removeAll();
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
/**
|
|
620
|
+
* Add all buffer and sketch graphics that are flagged for download
|
|
621
|
+
*
|
|
622
|
+
* @protected
|
|
623
|
+
*/
|
|
624
|
+
_addExportGraphics() {
|
|
625
|
+
const sketchLayer = this._getManagedLayer("sketch");
|
|
626
|
+
const bufferLayer = this._getManagedLayer("buffer");
|
|
627
|
+
this._selectionSets.forEach(ss => {
|
|
628
|
+
if (ss.download) {
|
|
629
|
+
if (sketchLayer) {
|
|
630
|
+
sketchLayer.graphics.add(ss.sketchGraphic);
|
|
631
|
+
}
|
|
632
|
+
if (bufferLayer) {
|
|
633
|
+
const symbol = {
|
|
634
|
+
type: "simple-fill",
|
|
635
|
+
color: this.bufferColor,
|
|
636
|
+
outline: {
|
|
637
|
+
color: this.bufferOutlineColor,
|
|
638
|
+
width: 1
|
|
639
|
+
}
|
|
640
|
+
};
|
|
641
|
+
const bufferGraphic = new this.Graphic({
|
|
642
|
+
geometry: ss.buffer,
|
|
643
|
+
symbol
|
|
644
|
+
});
|
|
645
|
+
bufferLayer.graphics.add(bufferGraphic);
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
});
|
|
544
649
|
}
|
|
545
650
|
/**
|
|
546
651
|
* Render the refine page
|
|
@@ -634,6 +739,7 @@ const PublicNotification = class {
|
|
|
634
739
|
isActive = ss.download ? true : isActive;
|
|
635
740
|
return ss;
|
|
636
741
|
});
|
|
742
|
+
this._updateExportGraphics(true);
|
|
637
743
|
this._downloadActive = isActive;
|
|
638
744
|
this._fetchingData = true;
|
|
639
745
|
this._numDuplicates = await this._getNumDuplicates();
|
package/dist/cjs/{publicNotificationStore-ef379d11.js → publicNotificationStore-e790601d.js}
RENAMED
|
@@ -23,8 +23,8 @@ const index = require('./index-ae65e42f.js');
|
|
|
23
23
|
* limitations under the License.
|
|
24
24
|
*/
|
|
25
25
|
const { state, onChange } = index.createStore({
|
|
26
|
-
//
|
|
27
|
-
managedLayers:
|
|
26
|
+
// Key Value pair whose Key is the layer name and the Value is the type of layer ("buffer" | "sketch")
|
|
27
|
+
managedLayers: {},
|
|
28
28
|
// List of tables added and managed by the component
|
|
29
29
|
managedTables: [],
|
|
30
30
|
// Handle[]: https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Handles.html#Handle
|