@esri/solutions-components 0.2.6 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/deduct-calculator.cjs.entry.js +1 -1
- package/dist/cjs/pci-calculator.cjs.entry.js +1 -1
- package/dist/cjs/{pciUtils-6a806ba4.js → pciUtils-423cfc68.js} +25 -7
- package/dist/collection/demos/deduct-calculator.html +2 -5
- package/dist/collection/demos/new-public-notification.html +6 -4
- package/dist/collection/utils/pciUtils.js +25 -7
- package/dist/collection/utils/pciUtils.ts +30 -7
- package/dist/components/ExpandToggle.js +110 -0
- package/dist/components/Heading.js +22 -0
- package/dist/components/_commonjsHelpers.js +22 -0
- package/dist/components/action-bar.js +276 -0
- package/dist/components/action-group.js +149 -0
- package/dist/components/action-menu.js +356 -0
- package/dist/components/action.js +214 -0
- package/dist/components/add-record-modal.d.ts +11 -0
- package/dist/components/add-record-modal.js +171 -0
- package/dist/components/array.js +15 -0
- package/dist/components/block.js +272 -0
- package/dist/components/buffer-tools.d.ts +11 -0
- package/dist/components/buffer-tools.js +11 -0
- package/dist/components/buffer-tools2.js +262 -0
- package/dist/components/button.js +263 -0
- package/dist/components/calcite-accordion-item.js +244 -0
- package/dist/components/calcite-accordion.js +180 -0
- package/dist/components/calcite-action-bar.js +11 -0
- package/dist/components/calcite-action-group.js +11 -0
- package/dist/components/calcite-action-menu.js +11 -0
- package/dist/components/calcite-action-pad.js +197 -0
- package/dist/components/calcite-action.js +11 -0
- package/dist/components/calcite-alert.js +297 -0
- package/dist/components/calcite-avatar.js +182 -0
- package/dist/components/calcite-block-section.js +155 -0
- package/dist/components/calcite-block.js +11 -0
- package/dist/components/calcite-button.js +11 -0
- package/dist/components/calcite-card.js +187 -0
- package/dist/components/calcite-checkbox.js +11 -0
- package/dist/components/calcite-chip.js +11 -0
- package/dist/components/calcite-color-picker-hex-input.js +11 -0
- package/dist/components/calcite-color-picker-swatch.js +11 -0
- package/dist/components/calcite-color-picker.js +1036 -0
- package/dist/components/calcite-combobox-item-group.js +75 -0
- package/dist/components/calcite-combobox-item.js +11 -0
- package/dist/components/calcite-combobox.js +11 -0
- package/dist/components/calcite-date-picker-day.js +11 -0
- package/dist/components/calcite-date-picker-month-header.js +11 -0
- package/dist/components/calcite-date-picker-month.js +11 -0
- package/dist/components/calcite-date-picker.js +11 -0
- package/dist/components/calcite-dropdown-group.js +11 -0
- package/dist/components/calcite-dropdown-item.js +11 -0
- package/dist/components/calcite-dropdown.js +11 -0
- package/dist/components/calcite-fab.js +144 -0
- package/dist/components/calcite-filter.js +195 -0
- package/dist/components/calcite-flow-item.js +243 -0
- package/dist/components/calcite-flow.js +147 -0
- package/dist/components/calcite-graph.js +11 -0
- package/dist/components/calcite-handle.js +11 -0
- package/dist/components/calcite-icon.js +11 -0
- package/dist/components/calcite-inline-editable.js +294 -0
- package/dist/components/calcite-input-date-picker.js +713 -0
- package/dist/components/calcite-input-message.js +11 -0
- package/dist/components/calcite-input-number.js +637 -0
- package/dist/components/calcite-input-text.js +400 -0
- package/dist/components/calcite-input-time-picker.js +434 -0
- package/dist/components/calcite-input.js +11 -0
- package/dist/components/calcite-label.js +11 -0
- package/dist/components/calcite-link.js +11 -0
- package/dist/components/calcite-list-item-group.js +65 -0
- package/dist/components/calcite-list-item.js +11 -0
- package/dist/components/calcite-list.js +11 -0
- package/dist/components/calcite-loader.js +11 -0
- package/dist/components/calcite-modal.js +11 -0
- package/dist/components/calcite-notice.js +11 -0
- package/dist/components/calcite-option-group.js +64 -0
- package/dist/components/calcite-option.js +11 -0
- package/dist/components/calcite-pagination.js +258 -0
- package/dist/components/calcite-panel.js +11 -0
- package/dist/components/calcite-pick-list-group.js +74 -0
- package/dist/components/calcite-pick-list-item.js +11 -0
- package/dist/components/calcite-pick-list.js +11 -0
- package/dist/components/calcite-popover-manager.js +94 -0
- package/dist/components/calcite-popover.js +11 -0
- package/dist/components/calcite-progress.js +11 -0
- package/dist/components/calcite-radio-button-group.js +132 -0
- package/dist/components/calcite-radio-button.js +310 -0
- package/dist/components/calcite-radio-group-item.js +11 -0
- package/dist/components/calcite-radio-group.js +11 -0
- package/dist/components/calcite-rating.js +201 -0
- package/dist/components/calcite-scrim.js +11 -0
- package/dist/components/calcite-select.js +11 -0
- package/dist/components/calcite-shell-center-row.js +100 -0
- package/dist/components/calcite-shell-panel.js +11 -0
- package/dist/components/calcite-shell.js +11 -0
- package/dist/components/calcite-slider.js +11 -0
- package/dist/components/calcite-sortable-list.js +202 -0
- package/dist/components/calcite-split-button.js +11 -0
- package/dist/components/calcite-stepper-item.js +271 -0
- package/dist/components/calcite-stepper.js +256 -0
- package/dist/components/calcite-switch.js +11 -0
- package/dist/components/calcite-tab-nav.js +11 -0
- package/dist/components/calcite-tab-title.js +11 -0
- package/dist/components/calcite-tab.js +11 -0
- package/dist/components/calcite-tabs.js +11 -0
- package/dist/components/calcite-tile-select-group.js +65 -0
- package/dist/components/calcite-tile-select.js +266 -0
- package/dist/components/calcite-tile.js +11 -0
- package/dist/components/calcite-time-picker.js +11 -0
- package/dist/components/calcite-tip-group.js +41 -0
- package/dist/components/calcite-tip-manager.js +223 -0
- package/dist/components/calcite-tip.js +162 -0
- package/dist/components/calcite-tooltip-manager.js +57 -0
- package/dist/components/calcite-tooltip.js +11 -0
- package/dist/components/calcite-tree-item.js +11 -0
- package/dist/components/calcite-tree.js +11 -0
- package/dist/components/calcite-value-list-item.js +11 -0
- package/dist/components/calcite-value-list.js +11 -0
- package/dist/components/card-manager.d.ts +11 -0
- package/dist/components/card-manager.js +143 -0
- package/dist/components/check-list.d.ts +11 -0
- package/dist/components/check-list.js +11 -0
- package/dist/components/check-list2.js +131 -0
- package/dist/components/checkbox.js +165 -0
- package/dist/components/chip.js +170 -0
- package/dist/components/color-picker-hex-input.js +363 -0
- package/dist/components/color-picker-swatch.js +2034 -0
- package/dist/components/combobox-item.js +182 -0
- package/dist/components/combobox.js +912 -0
- package/dist/components/comment-card.d.ts +11 -0
- package/dist/components/comment-card.js +90 -0
- package/dist/components/conditionalSlot.js +50 -0
- package/dist/components/config-buffer-tools.d.ts +11 -0
- package/dist/components/config-buffer-tools.js +187 -0
- package/dist/components/config-draw-tools.d.ts +11 -0
- package/dist/components/config-draw-tools.js +121 -0
- package/dist/components/config-layer-picker.d.ts +11 -0
- package/dist/components/config-layer-picker.js +163 -0
- package/dist/components/config-pdf-download.d.ts +11 -0
- package/dist/components/config-pdf-download.js +154 -0
- package/dist/components/crowdsource-manager.d.ts +11 -0
- package/dist/components/crowdsource-manager.js +90 -0
- package/dist/components/crowdsource-reporter.d.ts +11 -0
- package/dist/components/crowdsource-reporter.js +90 -0
- package/dist/components/csvUtils.js +74 -0
- package/dist/components/date-picker-day.js +111 -0
- package/dist/components/date-picker-month-header.js +224 -0
- package/dist/components/date-picker-month.js +344 -0
- package/dist/components/date-picker.js +575 -0
- package/dist/components/date.js +180 -0
- package/dist/components/debounce.js +487 -0
- package/dist/components/deduct-calculator.d.ts +11 -0
- package/dist/components/deduct-calculator.js +11 -0
- package/dist/components/deduct-calculator2.js +1002 -0
- package/dist/components/dom.js +231 -0
- package/dist/components/dropdown-group.js +96 -0
- package/dist/components/dropdown-item.js +232 -0
- package/dist/components/dropdown.js +505 -0
- package/dist/components/edit-record-modal.d.ts +11 -0
- package/dist/components/edit-record-modal.js +11 -0
- package/dist/components/edit-record-modal2.js +161 -0
- package/dist/components/filter.js +763 -0
- package/dist/components/floating-ui.js +1768 -0
- package/dist/components/form.js +228 -0
- package/dist/components/graph.js +254 -0
- package/dist/components/guid.js +24 -0
- package/dist/components/handle.js +119 -0
- package/dist/components/icon.js +202 -0
- package/dist/components/index.d.ts +61 -0
- package/dist/components/index.js +196 -0
- package/dist/components/index2.js +199 -0
- package/dist/components/info-card.d.ts +11 -0
- package/dist/components/info-card.js +11 -0
- package/dist/components/info-card2.js +97 -0
- package/dist/components/input-message.js +101 -0
- package/dist/components/input.js +740 -0
- package/dist/components/interactive.js +51 -0
- package/dist/components/interfaces.js +19 -0
- package/dist/components/interfaces2.js +21 -0
- package/dist/components/interfaces3.js +80 -0
- package/dist/components/json-editor.d.ts +11 -0
- package/dist/components/json-editor.js +11 -0
- package/dist/components/json-editor2.js +441 -0
- package/dist/components/key.js +16 -0
- package/dist/components/label.js +106 -0
- package/dist/components/label2.js +131 -0
- package/dist/components/labelFormats.js +210 -0
- package/dist/components/layer-table.d.ts +11 -0
- package/dist/components/layer-table.js +453 -0
- package/dist/components/link.js +123 -0
- package/dist/components/list-item.d.ts +11 -0
- package/dist/components/list-item.js +90 -0
- package/dist/components/list-item2.js +149 -0
- package/dist/components/list.js +83 -0
- package/dist/components/loadModules.js +28 -0
- package/dist/components/loader.js +116 -0
- package/dist/components/locale.js +412 -0
- package/dist/components/locale2.js +413 -0
- package/dist/components/map-card.d.ts +11 -0
- package/dist/components/map-card.js +354 -0
- package/dist/components/map-draw-tools.d.ts +11 -0
- package/dist/components/map-draw-tools.js +11 -0
- package/dist/components/map-draw-tools2.js +228 -0
- package/dist/components/map-layer-picker.d.ts +11 -0
- package/dist/components/map-layer-picker.js +11 -0
- package/dist/components/map-layer-picker2.js +188 -0
- package/dist/components/map-search.d.ts +11 -0
- package/dist/components/map-search.js +155 -0
- package/dist/components/map-select-tools.d.ts +11 -0
- package/dist/components/map-select-tools.js +11 -0
- package/dist/components/map-select-tools2.js +588 -0
- package/dist/components/mapViewUtils.js +129 -0
- package/dist/components/math.js +24 -0
- package/dist/components/media-card.d.ts +11 -0
- package/dist/components/media-card.js +11 -0
- package/dist/components/media-card2.js +177 -0
- package/dist/components/modal.js +495 -0
- package/dist/components/nonChromiumPlatformUtils.js +503 -0
- package/dist/components/notice.js +192 -0
- package/dist/components/observers.js +56 -0
- package/dist/components/openCloseComponent.js +56 -0
- package/dist/components/option.js +109 -0
- package/dist/components/panel.js +459 -0
- package/dist/components/pci-calculator.d.ts +11 -0
- package/dist/components/pci-calculator.js +193 -0
- package/dist/components/pdf-download.d.ts +11 -0
- package/dist/components/pdf-download.js +11 -0
- package/dist/components/pdf-download2.js +189 -0
- package/dist/components/pick-list-item.js +255 -0
- package/dist/components/pick-list.js +170 -0
- package/dist/components/popover.js +500 -0
- package/dist/components/progress.js +60 -0
- package/dist/components/public-notification.d.ts +11 -0
- package/dist/components/public-notification.js +825 -0
- package/dist/components/publicNotificationStore.js +38 -0
- package/dist/components/queryUtils.js +187 -0
- package/dist/components/radio-group-item.js +101 -0
- package/dist/components/radio-group.js +235 -0
- package/dist/components/refine-selection-tools.d.ts +11 -0
- package/dist/components/refine-selection-tools.js +11 -0
- package/dist/components/refine-selection-tools2.js +492 -0
- package/dist/components/refine-selection.d.ts +11 -0
- package/dist/components/refine-selection.js +11 -0
- package/dist/components/refine-selection2.js +376 -0
- package/dist/components/resources.js +24 -0
- package/dist/components/resources2.js +21 -0
- package/dist/components/resources3.js +38 -0
- package/dist/components/scrim.js +83 -0
- package/dist/components/select.js +259 -0
- package/dist/components/shared-list-render.js +319 -0
- package/dist/components/shell-panel.js +281 -0
- package/dist/components/shell.js +121 -0
- package/dist/components/slider.js +896 -0
- package/dist/components/solution-configuration.d.ts +11 -0
- package/dist/components/solution-configuration.js +2233 -0
- package/dist/components/solution-contents.d.ts +11 -0
- package/dist/components/solution-contents.js +11 -0
- package/dist/components/solution-contents2.js +128 -0
- package/dist/components/solution-item-details.d.ts +11 -0
- package/dist/components/solution-item-details.js +11 -0
- package/dist/components/solution-item-details2.js +234 -0
- package/dist/components/solution-item-icon.d.ts +11 -0
- package/dist/components/solution-item-icon.js +11 -0
- package/dist/components/solution-item-icon2.js +342 -0
- package/dist/components/solution-item-sharing.d.ts +11 -0
- package/dist/components/solution-item-sharing.js +11 -0
- package/dist/components/solution-item-sharing2.js +167 -0
- package/dist/components/solution-item.d.ts +11 -0
- package/dist/components/solution-item.js +11 -0
- package/dist/components/solution-item2.js +315 -0
- package/dist/components/solution-organization-variables.d.ts +11 -0
- package/dist/components/solution-organization-variables.js +11 -0
- package/dist/components/solution-organization-variables2.js +132 -0
- package/dist/components/solution-resource-item.d.ts +11 -0
- package/dist/components/solution-resource-item.js +11 -0
- package/dist/components/solution-resource-item2.js +356 -0
- package/dist/components/solution-spatial-ref.d.ts +11 -0
- package/dist/components/solution-spatial-ref.js +11 -0
- package/dist/components/solution-spatial-ref2.js +21446 -0
- package/dist/components/solution-store.js +4092 -0
- package/dist/components/solution-template-data.d.ts +11 -0
- package/dist/components/solution-template-data.js +11 -0
- package/dist/components/solution-template-data2.js +233 -0
- package/dist/components/solution-variables.d.ts +11 -0
- package/dist/components/solution-variables.js +11 -0
- package/dist/components/solution-variables2.js +150 -0
- package/dist/components/sortable.esm.js +3026 -0
- package/dist/components/split-button.js +165 -0
- package/dist/components/store-manager.d.ts +11 -0
- package/dist/components/store-manager.js +83 -0
- package/dist/components/switch.js +139 -0
- package/dist/components/tab-nav.js +241 -0
- package/dist/components/tab-title.js +276 -0
- package/dist/components/tab.js +154 -0
- package/dist/components/tabs.js +188 -0
- package/dist/components/tile.js +129 -0
- package/dist/components/time-picker.js +943 -0
- package/dist/components/tooltip.js +399 -0
- package/dist/components/tree-item.js +294 -0
- package/dist/components/tree.js +327 -0
- package/dist/components/utils.js +119 -0
- package/dist/components/utils2.js +51 -0
- package/dist/components/value-list-item.js +204 -0
- package/dist/components/value-list.js +333 -0
- package/dist/esm/deduct-calculator.entry.js +1 -1
- package/dist/esm/pci-calculator.entry.js +1 -1
- package/dist/esm/{pciUtils-e3007a1c.js → pciUtils-ecda46e5.js} +25 -7
- package/dist/solutions-components/demos/deduct-calculator.html +2 -5
- package/dist/solutions-components/demos/new-public-notification.html +6 -4
- package/dist/solutions-components/{p-ff80ffbb.entry.js → p-0512635b.entry.js} +1 -1
- package/dist/solutions-components/{p-5ec407c2.entry.js → p-0c088725.entry.js} +1 -1
- package/dist/solutions-components/p-cc815aca.js +21 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/pciUtils.ts +30 -7
- package/dist/types/utils/pciUtils.d.ts +2 -1
- package/package.json +4 -3
- package/dist/solutions-components/p-647bbd18.js +0 -21
|
@@ -0,0 +1,825 @@
|
|
|
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 { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
7
|
+
import { l as loadModules } from './loadModules.js';
|
|
8
|
+
import { a as EPageType, b as ESketchType, c as EWorkflowType, d as EExportType } from './interfaces3.js';
|
|
9
|
+
import { b as getMapLayerView, a as goToSelection, h as highlightFeatures } from './mapViewUtils.js';
|
|
10
|
+
import { g as getSelectionSetQuery } from './queryUtils.js';
|
|
11
|
+
import { s as state } from './publicNotificationStore.js';
|
|
12
|
+
import { g as getLocaleComponentStrings } from './locale.js';
|
|
13
|
+
import { g as getTotal, a as getSelectionIds, d as defineCustomElement$3 } from './refine-selection2.js';
|
|
14
|
+
import { d as defineCustomElement$B } from './buffer-tools2.js';
|
|
15
|
+
import { d as defineCustomElement$A } from './action.js';
|
|
16
|
+
import { d as defineCustomElement$z } from './action-bar.js';
|
|
17
|
+
import { d as defineCustomElement$y } from './action-group.js';
|
|
18
|
+
import { d as defineCustomElement$x } from './action-menu.js';
|
|
19
|
+
import { d as defineCustomElement$w } from './button.js';
|
|
20
|
+
import { d as defineCustomElement$v } from './checkbox.js';
|
|
21
|
+
import { d as defineCustomElement$u } from './chip.js';
|
|
22
|
+
import { d as defineCustomElement$t } from './combobox.js';
|
|
23
|
+
import { d as defineCustomElement$s } from './combobox-item.js';
|
|
24
|
+
import { d as defineCustomElement$r } from './graph.js';
|
|
25
|
+
import { d as defineCustomElement$q } from './icon.js';
|
|
26
|
+
import { d as defineCustomElement$p } from './input.js';
|
|
27
|
+
import { d as defineCustomElement$o } from './input-message.js';
|
|
28
|
+
import { d as defineCustomElement$n } from './label.js';
|
|
29
|
+
import { d as defineCustomElement$m } from './list.js';
|
|
30
|
+
import { d as defineCustomElement$l } from './list-item2.js';
|
|
31
|
+
import { d as defineCustomElement$k } from './loader.js';
|
|
32
|
+
import { d as defineCustomElement$j } from './notice.js';
|
|
33
|
+
import { d as defineCustomElement$i } from './option.js';
|
|
34
|
+
import { d as defineCustomElement$h } from './panel.js';
|
|
35
|
+
import { d as defineCustomElement$g } from './popover.js';
|
|
36
|
+
import { d as defineCustomElement$f } from './progress.js';
|
|
37
|
+
import { d as defineCustomElement$e } from './radio-group.js';
|
|
38
|
+
import { d as defineCustomElement$d } from './radio-group-item.js';
|
|
39
|
+
import { d as defineCustomElement$c } from './scrim.js';
|
|
40
|
+
import { d as defineCustomElement$b } from './select.js';
|
|
41
|
+
import { d as defineCustomElement$a } from './shell.js';
|
|
42
|
+
import { d as defineCustomElement$9 } from './slider.js';
|
|
43
|
+
import { d as defineCustomElement$8 } from './tooltip.js';
|
|
44
|
+
import { d as defineCustomElement$7 } from './map-draw-tools2.js';
|
|
45
|
+
import { d as defineCustomElement$6 } from './map-layer-picker2.js';
|
|
46
|
+
import { d as defineCustomElement$5 } from './map-select-tools2.js';
|
|
47
|
+
import { d as defineCustomElement$4 } from './pdf-download2.js';
|
|
48
|
+
import { d as defineCustomElement$2 } from './refine-selection-tools2.js';
|
|
49
|
+
|
|
50
|
+
const publicNotificationCss = ":host{display:block}.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}.position-right{position:absolute;right:1rem}.position-right[dir=\"rtl\"]{position:absolute;left:1rem}.position-left{position:absolute;left:1rem}.position-left[dir=\"rtl\"]{position:absolute;right:1rem}.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)}";
|
|
51
|
+
|
|
52
|
+
const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
53
|
+
constructor() {
|
|
54
|
+
super();
|
|
55
|
+
this.__registerHost();
|
|
56
|
+
this.addresseeLayer = undefined;
|
|
57
|
+
this.mapView = undefined;
|
|
58
|
+
this.showRefineSelection = false;
|
|
59
|
+
this._downloadActive = true;
|
|
60
|
+
this._numSelected = 0;
|
|
61
|
+
this._pageType = EPageType.LIST;
|
|
62
|
+
this._saveEnabled = false;
|
|
63
|
+
this._selectionSets = [];
|
|
64
|
+
this._sketchType = ESketchType.INTERACTIVE;
|
|
65
|
+
this._selectionWorkflowType = EWorkflowType.SEARCH;
|
|
66
|
+
this._translations = undefined;
|
|
67
|
+
}
|
|
68
|
+
//--------------------------------------------------------------------------
|
|
69
|
+
//
|
|
70
|
+
// Watch handlers
|
|
71
|
+
//
|
|
72
|
+
//--------------------------------------------------------------------------
|
|
73
|
+
/**
|
|
74
|
+
* Called each time the mapView prop is changed.
|
|
75
|
+
*/
|
|
76
|
+
async mapViewWatchHandler(v) {
|
|
77
|
+
this._popupsEnabled = v.popup.autoOpenEnabled;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Called each time the selectionSets prop is changed.
|
|
81
|
+
*/
|
|
82
|
+
async selectionSetsWatchHandler(v, oldV) {
|
|
83
|
+
if (v && v !== oldV && v.length > 0) {
|
|
84
|
+
const nonRefineSets = v.filter(ss => ss.workflowType !== EWorkflowType.REFINE);
|
|
85
|
+
if (nonRefineSets.length === 0) {
|
|
86
|
+
this._selectionSets = [];
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Called each time the pageType prop is changed.
|
|
92
|
+
*/
|
|
93
|
+
async pageTypeWatchHandler(pageType, oldPageType) {
|
|
94
|
+
this._checkPopups();
|
|
95
|
+
this._clearHighlight();
|
|
96
|
+
if (oldPageType === EPageType.SELECT || oldPageType === EPageType.REFINE) {
|
|
97
|
+
// clear any draw shapes or buffers
|
|
98
|
+
await this._clearSelection();
|
|
99
|
+
}
|
|
100
|
+
if (pageType !== EPageType.SELECT) {
|
|
101
|
+
return this._highlightFeatures();
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
//--------------------------------------------------------------------------
|
|
105
|
+
//
|
|
106
|
+
// Methods (public)
|
|
107
|
+
//
|
|
108
|
+
//--------------------------------------------------------------------------
|
|
109
|
+
//--------------------------------------------------------------------------
|
|
110
|
+
//
|
|
111
|
+
// Events (public)
|
|
112
|
+
//
|
|
113
|
+
//--------------------------------------------------------------------------
|
|
114
|
+
/**
|
|
115
|
+
* Handle changes to the selection sets
|
|
116
|
+
*/
|
|
117
|
+
selectionSetsChanged(event) {
|
|
118
|
+
this._selectionSets = [...event.detail];
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Handle changes to the selection sets
|
|
122
|
+
*/
|
|
123
|
+
sketchTypeChange(event) {
|
|
124
|
+
this._sketchType = event.detail;
|
|
125
|
+
}
|
|
126
|
+
//--------------------------------------------------------------------------
|
|
127
|
+
//
|
|
128
|
+
// Functions (lifecycle)
|
|
129
|
+
//
|
|
130
|
+
//--------------------------------------------------------------------------
|
|
131
|
+
/**
|
|
132
|
+
* StencilJS: Called once just after the component is first connected to the DOM.
|
|
133
|
+
*/
|
|
134
|
+
async componentWillLoad() {
|
|
135
|
+
await this._getTranslations();
|
|
136
|
+
await this._initModules();
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Renders the component.
|
|
140
|
+
*/
|
|
141
|
+
render() {
|
|
142
|
+
const hasSelections = this._selectionSets.length > 0;
|
|
143
|
+
return (h(Host, null, h("calcite-shell", null, h("calcite-action-bar", { class: "border-bottom-1 action-bar-size", "expand-disabled": true, layout: "horizontal", slot: "header" }, this._getActionGroup("list-check", false, EPageType.LIST, this._translations.myLists), this.showRefineSelection ? this._getActionGroup("test-data", !hasSelections, EPageType.REFINE, this._translations.refineSelection) : undefined, this._getActionGroup("file-pdf", !hasSelections, EPageType.PDF, this._translations.downloadPDF), this._getActionGroup("file-csv", !hasSelections, EPageType.CSV, this._translations.downloadCSV)), this._getPage(this._pageType))));
|
|
144
|
+
}
|
|
145
|
+
//--------------------------------------------------------------------------
|
|
146
|
+
//
|
|
147
|
+
// Functions (protected)
|
|
148
|
+
//
|
|
149
|
+
//--------------------------------------------------------------------------
|
|
150
|
+
/**
|
|
151
|
+
* Load esri javascript api modules
|
|
152
|
+
*
|
|
153
|
+
* @returns Promise resolving when function is done
|
|
154
|
+
*
|
|
155
|
+
* @protected
|
|
156
|
+
*/
|
|
157
|
+
async _initModules() {
|
|
158
|
+
const [geometryEngine] = await loadModules([
|
|
159
|
+
"esri/geometry/geometryEngine"
|
|
160
|
+
]);
|
|
161
|
+
this._geometryEngine = geometryEngine;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Get a calcite action group for the current action
|
|
165
|
+
*
|
|
166
|
+
* @param icon the icon to display for the current action
|
|
167
|
+
* @param disabled should the action be disabled
|
|
168
|
+
* @param pageType what page type will the action navigate to
|
|
169
|
+
* @param tip information tip to display helpful details to end user
|
|
170
|
+
*
|
|
171
|
+
* @protected
|
|
172
|
+
*/
|
|
173
|
+
_getActionGroup(icon, disabled, pageType, tip) {
|
|
174
|
+
const groupClass = this.showRefineSelection ? "action-center w-1-4" : "action-center w-1-3";
|
|
175
|
+
return (h("calcite-action-group", { class: groupClass, layout: "horizontal" }, h("calcite-action", { active: this._pageType === pageType, alignment: "center", class: "width-full height-full", compact: false, disabled: disabled, icon: icon, id: icon, onClick: () => { this._setPageType(pageType); }, text: "" }), h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": icon }, h("span", null, tip))));
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Navigate to the defined page type
|
|
179
|
+
*
|
|
180
|
+
* @param pageType what page type will the action navigate to
|
|
181
|
+
*
|
|
182
|
+
* @protected
|
|
183
|
+
*/
|
|
184
|
+
_setPageType(pageType) {
|
|
185
|
+
this._pageType = pageType;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Navigate to the defined page type
|
|
189
|
+
*
|
|
190
|
+
* @param pageType what page type will the action navigate to
|
|
191
|
+
*
|
|
192
|
+
* @returns the page node
|
|
193
|
+
* @protected
|
|
194
|
+
*/
|
|
195
|
+
_getPage(pageType) {
|
|
196
|
+
let page;
|
|
197
|
+
switch (pageType) {
|
|
198
|
+
case EPageType.LIST:
|
|
199
|
+
page = this._getListPage();
|
|
200
|
+
break;
|
|
201
|
+
case EPageType.SELECT:
|
|
202
|
+
page = this._getSelectPage();
|
|
203
|
+
break;
|
|
204
|
+
case EPageType.REFINE:
|
|
205
|
+
page = this._getRefinePage();
|
|
206
|
+
break;
|
|
207
|
+
case EPageType.PDF:
|
|
208
|
+
page = this._getPDFPage();
|
|
209
|
+
break;
|
|
210
|
+
case EPageType.CSV:
|
|
211
|
+
page = this._getCSVPage();
|
|
212
|
+
break;
|
|
213
|
+
}
|
|
214
|
+
return page;
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Create the List page that shows as the initial home screen
|
|
218
|
+
* This page is also used to show and selection sets that have been created
|
|
219
|
+
*
|
|
220
|
+
* @returns the page node
|
|
221
|
+
* @protected
|
|
222
|
+
*/
|
|
223
|
+
_getListPage() {
|
|
224
|
+
var _a, _b;
|
|
225
|
+
const hasSets = this._selectionSets.filter(ss => ss.workflowType !== EWorkflowType.REFINE).length > 0;
|
|
226
|
+
const total = getTotal(this._selectionSets);
|
|
227
|
+
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"), h("div", { class: "display-flex padding-sides-1" }, h("calcite-label", { class: "font-bold width-full" }, this._translations.addresseeLayer, h("map-layer-picker", { mapView: this.mapView, onLayerSelectionChange: (evt) => this._layerSelectionChange(evt), selectedLayers: this.addresseeLayer ? [(_a = this.addresseeLayer) === null || _a === void 0 ? void 0 : _a.layer.title] : [], selectionMode: "single" }))), h("div", { class: "padding-sides-1 height-1-1-2" }, h("div", { class: "position-left" }, h("calcite-label", { alignment: "start", class: "font-bold" }, this._translations.notifications)), h("div", { class: "position-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)))) : (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"), h("div", { class: "display-flex padding-sides-1" }, h("calcite-label", { class: "font-bold width-full" }, this._translations.addresseeLayer, h("map-layer-picker", { mapView: this.mapView, onLayerSelectionChange: (evt) => this._layerSelectionChange(evt), selectedLayers: this.addresseeLayer ? [(_b = this.addresseeLayer) === null || _b === void 0 ? void 0 : _b.layer.title] : [], selectionMode: "single" }))), h("div", { class: "display-flex padding-1" }, h("calcite-button", { onClick: () => { this._setPageType(EPageType.SELECT); }, width: "full" }, this._translations.add))));
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Create the selection sets list node for the List page
|
|
231
|
+
*
|
|
232
|
+
* @returns selection sets list node
|
|
233
|
+
* @protected
|
|
234
|
+
*/
|
|
235
|
+
_getSelectionSetList() {
|
|
236
|
+
return (h("calcite-list", { class: "list-border margin-sides-1" },
|
|
237
|
+
// REFINE is handled seperately from the core selection sets
|
|
238
|
+
// You can only access after clicking the refine action
|
|
239
|
+
this._selectionSets.reduce((prev, cur, i) => {
|
|
240
|
+
if (cur.workflowType !== EWorkflowType.REFINE) {
|
|
241
|
+
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"))));
|
|
242
|
+
}
|
|
243
|
+
return prev;
|
|
244
|
+
}, [])));
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Create the Select page that shows the selection workflows
|
|
248
|
+
*
|
|
249
|
+
* @returns the page node
|
|
250
|
+
* @protected
|
|
251
|
+
*/
|
|
252
|
+
_getSelectPage() {
|
|
253
|
+
var _a, _b;
|
|
254
|
+
// const searchTip = `${this._translations.selectSearchTip} ${this._translations.optionalSearchDistance}`;
|
|
255
|
+
const searchTip = this._translations.selectSearchTip;
|
|
256
|
+
// const selectTip = `${this._translations.selectLayerTip} ${this._translations.optionalSearchDistance}`;
|
|
257
|
+
const selectTip = this._translations.selectLayerTip;
|
|
258
|
+
// const sketchTip = this._sketchType === ESketchType.INTERACTIVE ?
|
|
259
|
+
// `${this._translations.selectSketchTip} ${this._translations.optionalSearchDistance}` :
|
|
260
|
+
// `${this._translations.selectLayerTip} ${this._translations.optionalSearchDistance}`;
|
|
261
|
+
const sketchTip = this._sketchType === ESketchType.INTERACTIVE ?
|
|
262
|
+
this._translations.selectSketchTip :
|
|
263
|
+
this._translations.selectLayerTip;
|
|
264
|
+
const noticeText = this._selectionWorkflowType === EWorkflowType.SELECT ? selectTip :
|
|
265
|
+
this._selectionWorkflowType === EWorkflowType.SKETCH ? sketchTip : searchTip;
|
|
266
|
+
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-1" }, h("map-select-tools", { class: "font-bold", isUpdate: !!this._activeSelection, mapView: this.mapView, onSelectionSetChange: (evt) => this._updateForSelection(evt), onWorkflowTypeChange: (evt) => this._updateForWorkflowType(evt), ref: (el) => { this._selectTools = el; }, selectLayerView: this.addresseeLayer, selectionSet: this._activeSelection })), h("div", { class: "padding-sides-1 padding-bottom-1", style: { "align-items": "end", "display": "flex" } }, 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._translations.selectedAddresses.replace("{{n}}", this._numSelected.toString()).replace("{{layer}}", ((_b = this.addresseeLayer) === null || _b === void 0 ? void 0 : _b.layer.title) || ""))), this._getPageNavButtons(this._translations.done, this._numSelected === 0, () => { void this._saveSelection(); }, this._translations.cancel, false, () => { void this._home(); })));
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* Create the Refine page that users can interactively add/remove features from existing selection sets
|
|
270
|
+
*
|
|
271
|
+
* @returns the page node
|
|
272
|
+
* @protected
|
|
273
|
+
*/
|
|
274
|
+
_getRefinePage() {
|
|
275
|
+
return (h("calcite-panel", null, this._getLabel(this._translations.refineSelection), this._getNotice(this._translations.refineTip, "padding-sides-1"), h("refine-selection", { addresseeLayer: this.addresseeLayer, mapView: this.mapView, selectionSets: this._selectionSets })));
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Create the PDF download page that shows the download options
|
|
279
|
+
*
|
|
280
|
+
* @returns the page node
|
|
281
|
+
* @protected
|
|
282
|
+
*/
|
|
283
|
+
_getPDFPage() {
|
|
284
|
+
return this._getDownloadPage(EExportType.PDF);
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* Create the CSV download page that shows the download options
|
|
288
|
+
*
|
|
289
|
+
* @returns the page node
|
|
290
|
+
* @protected
|
|
291
|
+
*/
|
|
292
|
+
_getCSVPage() {
|
|
293
|
+
return this._getDownloadPage(EExportType.CSV);
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* Create the main download page that has the shared aspects of both PDF and CSV
|
|
297
|
+
* But only show the current PDF or CSV page content
|
|
298
|
+
*
|
|
299
|
+
* @param type EExportType of the current type expected
|
|
300
|
+
*
|
|
301
|
+
* @returns the page node
|
|
302
|
+
* @protected
|
|
303
|
+
*/
|
|
304
|
+
_getDownloadPage(type) {
|
|
305
|
+
const isPdf = type === EExportType.PDF;
|
|
306
|
+
return (h("calcite-panel", null, h("div", null, h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "font-bold" }, isPdf ? this._translations.pdfDownloads : this._translations.csvDownloads), 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", { layout: "inline" }, h("calcite-checkbox", { disabled: !this._downloadActive, ref: (el) => { this._removeDuplicates = 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)))));
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Create the stacked navigation buttons for a page
|
|
310
|
+
*
|
|
311
|
+
* @param topLabel the label to use for the button on top
|
|
312
|
+
* @param topDisabled should the button be disabled
|
|
313
|
+
* @param topFunc the fucntion to execute when the button is clicked
|
|
314
|
+
* @param bottomLabel the label to use for the button on bottom
|
|
315
|
+
* @param bottomDisabled should the button be disabled
|
|
316
|
+
* @param bottomFunc the fucntion to execute when the button is clicked
|
|
317
|
+
*
|
|
318
|
+
* @returns the page node
|
|
319
|
+
* @protected
|
|
320
|
+
*/
|
|
321
|
+
_getPageNavButtons(topLabel, topDisabled, topFunc, bottomLabel, bottomDisabled, bottomFunc) {
|
|
322
|
+
return (h("div", null, h("div", { class: "display-flex padding-top-sides-1" }, h("calcite-button", { disabled: topDisabled, onClick: topFunc, width: "full" }, topLabel)), h("div", { class: "display-flex padding-top-1-2 padding-sides-1" }, h("calcite-button", { appearance: "outline", disabled: bottomDisabled, onClick: bottomFunc, width: "full" }, bottomLabel))));
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* Create an informational notice
|
|
326
|
+
*
|
|
327
|
+
* @param message the message to display in the notice
|
|
328
|
+
* @param noticeClass any custom css for the notice (default is "padding-1")
|
|
329
|
+
*
|
|
330
|
+
* @returns the notice node
|
|
331
|
+
* @protected
|
|
332
|
+
*/
|
|
333
|
+
_getNotice(message, noticeClass = "padding-1") {
|
|
334
|
+
return (h("calcite-notice", { class: noticeClass, color: "green", icon: "lightbulb", open: true }, h("div", { slot: "message" }, message)));
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* Create a calcite label
|
|
338
|
+
*
|
|
339
|
+
* @param label value to display in the label
|
|
340
|
+
* @param disableSpacing should extra calcite defined spacing be applied
|
|
341
|
+
*
|
|
342
|
+
* @returns the label node
|
|
343
|
+
* @protected
|
|
344
|
+
*/
|
|
345
|
+
_getLabel(label, disableSpacing = false) {
|
|
346
|
+
return (h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "font-bold", "disable-spacing": disableSpacing }, label)));
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Get selection set list node with checkbox for Download pages
|
|
350
|
+
*
|
|
351
|
+
* @returns the list node
|
|
352
|
+
* @protected
|
|
353
|
+
*/
|
|
354
|
+
_getSelectionLists() {
|
|
355
|
+
return this._selectionSets.reduce((prev, cur) => {
|
|
356
|
+
if (cur.workflowType !== EWorkflowType.REFINE) {
|
|
357
|
+
if (!this._downloadActive && cur.download) {
|
|
358
|
+
this._downloadActive = true;
|
|
359
|
+
}
|
|
360
|
+
prev.push((h("div", { class: "display-flex padding-sides-1 padding-bottom-1" }, h("calcite-checkbox", { checked: cur.download, onClick: () => { void this._toggleDownload(cur.id); } }), h("calcite-list", { class: "list-border margin-start-1-2 w-100", id: "download-list" }, h("calcite-list-item", { description: this._translations.selectedFeatures.replace("{{n}}", cur.selectedIds.length.toString()), disabled: !cur.download, label: cur.label, onClick: () => { void this._toggleDownload(cur.id); } })))));
|
|
361
|
+
}
|
|
362
|
+
return prev;
|
|
363
|
+
}, []) || (h("div", null));
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* Toggle the disabled state for the download options based on user selection
|
|
367
|
+
*
|
|
368
|
+
* @param id the selection set id to toggle
|
|
369
|
+
*
|
|
370
|
+
* @protected
|
|
371
|
+
*/
|
|
372
|
+
async _toggleDownload(id) {
|
|
373
|
+
let isActive = false;
|
|
374
|
+
this._selectionSets = this._selectionSets.map(ss => {
|
|
375
|
+
ss.download = ss.id === id ? !ss.download : ss.download;
|
|
376
|
+
isActive = ss.download ? true : isActive;
|
|
377
|
+
return ss;
|
|
378
|
+
});
|
|
379
|
+
this._downloadActive = isActive;
|
|
380
|
+
await this._highlightFeatures();
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* Download all selection sets as PDF
|
|
384
|
+
*
|
|
385
|
+
* @protected
|
|
386
|
+
*/
|
|
387
|
+
_downloadPDF() {
|
|
388
|
+
const ids = getSelectionIds(this._getDownloadSelectionSets());
|
|
389
|
+
void this._downloadTools.downloadPDF(ids, this._removeDuplicates.checked);
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* Download all selection sets as CSV
|
|
393
|
+
*
|
|
394
|
+
* @protected
|
|
395
|
+
*/
|
|
396
|
+
_downloadCSV() {
|
|
397
|
+
const ids = getSelectionIds(this._getDownloadSelectionSets());
|
|
398
|
+
void this._downloadTools.downloadCSV(ids, this._removeDuplicates.checked);
|
|
399
|
+
}
|
|
400
|
+
/**
|
|
401
|
+
* Get all enabled selection sets
|
|
402
|
+
*
|
|
403
|
+
* @returns the selection sets
|
|
404
|
+
* @protected
|
|
405
|
+
*/
|
|
406
|
+
_getDownloadSelectionSets() {
|
|
407
|
+
return this._selectionSets.filter(ss => {
|
|
408
|
+
return ss.download || ss.workflowType === EWorkflowType.REFINE;
|
|
409
|
+
});
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* Store the current workflow type
|
|
413
|
+
*
|
|
414
|
+
* @protected
|
|
415
|
+
*/
|
|
416
|
+
_updateForWorkflowType(evt) {
|
|
417
|
+
this._selectionWorkflowType = evt.detail;
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* Create a calcite action
|
|
421
|
+
*
|
|
422
|
+
* @param enabled controls the enabled state of the control
|
|
423
|
+
* @param icon the image to display in the action
|
|
424
|
+
* @param text and supporting text for the action
|
|
425
|
+
* @param onClick the fucntion the actio will execute
|
|
426
|
+
* @param indicator boolean to control if an indicator should be shown (default is false)
|
|
427
|
+
* @param slot the supporting slot to use
|
|
428
|
+
*
|
|
429
|
+
* @returns the calcite action node
|
|
430
|
+
* @protected
|
|
431
|
+
*/
|
|
432
|
+
_getAction(enabled, icon, text, onClick, indicator = false, slot = "") {
|
|
433
|
+
return (h("calcite-action", { disabled: !enabled, icon: icon, indicator: indicator, onClick: onClick, slot: slot, text: text }));
|
|
434
|
+
}
|
|
435
|
+
/**
|
|
436
|
+
* Store the number of selected features and if it's more than one enable save
|
|
437
|
+
*
|
|
438
|
+
* @returns the page node
|
|
439
|
+
* @protected
|
|
440
|
+
*/
|
|
441
|
+
_updateForSelection(evt) {
|
|
442
|
+
this._numSelected = evt.detail;
|
|
443
|
+
this._saveEnabled = this._numSelected > 0;
|
|
444
|
+
}
|
|
445
|
+
/**
|
|
446
|
+
* Clear the selection and navigate to the home page
|
|
447
|
+
*
|
|
448
|
+
* @returns Promise when the function has completed
|
|
449
|
+
* @protected
|
|
450
|
+
*/
|
|
451
|
+
async _home() {
|
|
452
|
+
await this._clearSelection();
|
|
453
|
+
this.mapView.popup.autoOpenEnabled = this._popupsEnabled;
|
|
454
|
+
this._setPageType(EPageType.LIST);
|
|
455
|
+
}
|
|
456
|
+
/**
|
|
457
|
+
* Fetch the layer defined in the selection change event
|
|
458
|
+
*
|
|
459
|
+
* @returns Promise when the function has completed
|
|
460
|
+
* @protected
|
|
461
|
+
*/
|
|
462
|
+
async _layerSelectionChange(evt) {
|
|
463
|
+
var _a, _b;
|
|
464
|
+
const title = ((_a = evt === null || evt === void 0 ? void 0 : evt.detail) === null || _a === void 0 ? void 0 : _a.length) > 0 ? evt.detail[0] : "";
|
|
465
|
+
if (title !== ((_b = this.addresseeLayer) === null || _b === void 0 ? void 0 : _b.layer.title)) {
|
|
466
|
+
this.addresseeLayer = await getMapLayerView(this.mapView, title);
|
|
467
|
+
await this._updateSelectionSets(this.addresseeLayer);
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
/**
|
|
471
|
+
* Update selection sets when the addressee layer changes.
|
|
472
|
+
* Will remove any "refine" selection set.
|
|
473
|
+
* Will use stored search, select, and sketch geometries and any buffers to select from the new addressee layer.
|
|
474
|
+
*
|
|
475
|
+
* @param layerView The new addressee layer view to select from
|
|
476
|
+
*
|
|
477
|
+
* @returns Promise when the function has completed
|
|
478
|
+
* @protected
|
|
479
|
+
*/
|
|
480
|
+
async _updateSelectionSets(layerView) {
|
|
481
|
+
const _selectionSets = this._selectionSets.filter(selectionSet => selectionSet.workflowType !== EWorkflowType.REFINE);
|
|
482
|
+
const oidDefs = [];
|
|
483
|
+
_selectionSets.forEach(selectionSet => {
|
|
484
|
+
selectionSet.layerView = layerView;
|
|
485
|
+
selectionSet.selectedIds = [];
|
|
486
|
+
oidDefs.push(getSelectionSetQuery(selectionSet, this._geometryEngine));
|
|
487
|
+
});
|
|
488
|
+
return Promise.all(oidDefs).then(async (results) => {
|
|
489
|
+
results.forEach((result, i) => {
|
|
490
|
+
_selectionSets[i].selectedIds = result;
|
|
491
|
+
});
|
|
492
|
+
await this._highlightFeatures();
|
|
493
|
+
this._selectionSets = [
|
|
494
|
+
..._selectionSets
|
|
495
|
+
];
|
|
496
|
+
});
|
|
497
|
+
}
|
|
498
|
+
/**
|
|
499
|
+
* Update the selection sets with any new selections from the select tools
|
|
500
|
+
*
|
|
501
|
+
* @returns Promise when the function has completed
|
|
502
|
+
* @protected
|
|
503
|
+
*/
|
|
504
|
+
async _saveSelection() {
|
|
505
|
+
var _a, _b;
|
|
506
|
+
const results = await ((_a = this._selectTools) === null || _a === void 0 ? void 0 : _a.getSelection());
|
|
507
|
+
const isUpdate = (_b = this._selectTools) === null || _b === void 0 ? void 0 : _b.isUpdate;
|
|
508
|
+
this._selectionSets = isUpdate ? this._selectionSets.map(ss => {
|
|
509
|
+
return ss.id === results.id ? results : ss;
|
|
510
|
+
}) : [
|
|
511
|
+
...this._selectionSets,
|
|
512
|
+
results
|
|
513
|
+
];
|
|
514
|
+
return this._home();
|
|
515
|
+
}
|
|
516
|
+
/**
|
|
517
|
+
* Clear any selections
|
|
518
|
+
*
|
|
519
|
+
* @returns Promise when the function has completed
|
|
520
|
+
* @protected
|
|
521
|
+
*/
|
|
522
|
+
async _clearSelection() {
|
|
523
|
+
var _a;
|
|
524
|
+
await ((_a = this._selectTools) === null || _a === void 0 ? void 0 : _a.clearSelection());
|
|
525
|
+
this._numSelected = 0;
|
|
526
|
+
this._activeSelection = undefined;
|
|
527
|
+
}
|
|
528
|
+
/**
|
|
529
|
+
* Delete the selection at the defined index
|
|
530
|
+
*
|
|
531
|
+
* @param index number that defines what selection set to delete
|
|
532
|
+
*
|
|
533
|
+
* @protected
|
|
534
|
+
*/
|
|
535
|
+
_deleteSelection(index, evt) {
|
|
536
|
+
evt.stopPropagation();
|
|
537
|
+
this._selectionSets = this._selectionSets.filter((ss, i) => {
|
|
538
|
+
if (i !== index) {
|
|
539
|
+
return ss;
|
|
540
|
+
}
|
|
541
|
+
});
|
|
542
|
+
return this._highlightFeatures();
|
|
543
|
+
}
|
|
544
|
+
/**
|
|
545
|
+
* Pan to the current selection
|
|
546
|
+
*
|
|
547
|
+
* @param selSet ISelectionSet to pan to
|
|
548
|
+
* @param mapView Current MapView to pan within
|
|
549
|
+
*
|
|
550
|
+
* @protected
|
|
551
|
+
*/
|
|
552
|
+
_gotoSelection(selSet, mapView) {
|
|
553
|
+
void goToSelection(selSet.selectedIds, selSet.layerView, mapView);
|
|
554
|
+
}
|
|
555
|
+
/**
|
|
556
|
+
* Open the selection set for further adjustment
|
|
557
|
+
*
|
|
558
|
+
* @protected
|
|
559
|
+
*/
|
|
560
|
+
_openSelection(selectionSet, evt) {
|
|
561
|
+
evt.stopPropagation();
|
|
562
|
+
this._activeSelection = selectionSet;
|
|
563
|
+
this._pageType = EPageType.SELECT;
|
|
564
|
+
}
|
|
565
|
+
/**
|
|
566
|
+
* Highlight any selected features in the map
|
|
567
|
+
*
|
|
568
|
+
* @protected
|
|
569
|
+
*/
|
|
570
|
+
async _highlightFeatures() {
|
|
571
|
+
this._clearHighlight();
|
|
572
|
+
const ids = getSelectionIds(this._selectionSets);
|
|
573
|
+
if (ids.length > 0) {
|
|
574
|
+
state.highlightHandle = await highlightFeatures(ids, this.addresseeLayer, this.mapView);
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
/**
|
|
578
|
+
* Clear any highlighted features in the map
|
|
579
|
+
*
|
|
580
|
+
* @protected
|
|
581
|
+
*/
|
|
582
|
+
_checkPopups() {
|
|
583
|
+
if (this._popupsEnabled === undefined) {
|
|
584
|
+
this._popupsEnabled = this.mapView.popup.autoOpenEnabled;
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
/**
|
|
588
|
+
* Clear any highlighted features in the map
|
|
589
|
+
*
|
|
590
|
+
* @protected
|
|
591
|
+
*/
|
|
592
|
+
_clearHighlight() {
|
|
593
|
+
var _a;
|
|
594
|
+
if (state && state.highlightHandle) {
|
|
595
|
+
(_a = state.highlightHandle) === null || _a === void 0 ? void 0 : _a.remove();
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
/**
|
|
599
|
+
* Fetches the component's translations
|
|
600
|
+
*
|
|
601
|
+
* @protected
|
|
602
|
+
*/
|
|
603
|
+
async _getTranslations() {
|
|
604
|
+
const translations = await getLocaleComponentStrings(this.el);
|
|
605
|
+
this._translations = translations[0];
|
|
606
|
+
}
|
|
607
|
+
get el() { return this; }
|
|
608
|
+
static get watchers() { return {
|
|
609
|
+
"mapView": ["mapViewWatchHandler"],
|
|
610
|
+
"_selectionSets": ["selectionSetsWatchHandler"],
|
|
611
|
+
"_pageType": ["pageTypeWatchHandler"]
|
|
612
|
+
}; }
|
|
613
|
+
static get style() { return publicNotificationCss; }
|
|
614
|
+
}, [0, "public-notification", {
|
|
615
|
+
"addresseeLayer": [16],
|
|
616
|
+
"mapView": [16],
|
|
617
|
+
"showRefineSelection": [4, "show-refine-selection"],
|
|
618
|
+
"_downloadActive": [32],
|
|
619
|
+
"_numSelected": [32],
|
|
620
|
+
"_pageType": [32],
|
|
621
|
+
"_saveEnabled": [32],
|
|
622
|
+
"_selectionSets": [32],
|
|
623
|
+
"_sketchType": [32],
|
|
624
|
+
"_selectionWorkflowType": [32],
|
|
625
|
+
"_translations": [32]
|
|
626
|
+
}, [[8, "selectionSetsChanged", "selectionSetsChanged"], [8, "sketchTypeChange", "sketchTypeChange"]]]);
|
|
627
|
+
function defineCustomElement$1() {
|
|
628
|
+
if (typeof customElements === "undefined") {
|
|
629
|
+
return;
|
|
630
|
+
}
|
|
631
|
+
const components = ["public-notification", "buffer-tools", "calcite-action", "calcite-action-bar", "calcite-action-group", "calcite-action-menu", "calcite-button", "calcite-checkbox", "calcite-chip", "calcite-combobox", "calcite-combobox-item", "calcite-graph", "calcite-icon", "calcite-input", "calcite-input-message", "calcite-label", "calcite-list", "calcite-list-item", "calcite-loader", "calcite-notice", "calcite-option", "calcite-panel", "calcite-popover", "calcite-progress", "calcite-radio-group", "calcite-radio-group-item", "calcite-scrim", "calcite-select", "calcite-shell", "calcite-slider", "calcite-tooltip", "map-draw-tools", "map-layer-picker", "map-select-tools", "pdf-download", "refine-selection", "refine-selection-tools"];
|
|
632
|
+
components.forEach(tagName => { switch (tagName) {
|
|
633
|
+
case "public-notification":
|
|
634
|
+
if (!customElements.get(tagName)) {
|
|
635
|
+
customElements.define(tagName, PublicNotification$1);
|
|
636
|
+
}
|
|
637
|
+
break;
|
|
638
|
+
case "buffer-tools":
|
|
639
|
+
if (!customElements.get(tagName)) {
|
|
640
|
+
defineCustomElement$B();
|
|
641
|
+
}
|
|
642
|
+
break;
|
|
643
|
+
case "calcite-action":
|
|
644
|
+
if (!customElements.get(tagName)) {
|
|
645
|
+
defineCustomElement$A();
|
|
646
|
+
}
|
|
647
|
+
break;
|
|
648
|
+
case "calcite-action-bar":
|
|
649
|
+
if (!customElements.get(tagName)) {
|
|
650
|
+
defineCustomElement$z();
|
|
651
|
+
}
|
|
652
|
+
break;
|
|
653
|
+
case "calcite-action-group":
|
|
654
|
+
if (!customElements.get(tagName)) {
|
|
655
|
+
defineCustomElement$y();
|
|
656
|
+
}
|
|
657
|
+
break;
|
|
658
|
+
case "calcite-action-menu":
|
|
659
|
+
if (!customElements.get(tagName)) {
|
|
660
|
+
defineCustomElement$x();
|
|
661
|
+
}
|
|
662
|
+
break;
|
|
663
|
+
case "calcite-button":
|
|
664
|
+
if (!customElements.get(tagName)) {
|
|
665
|
+
defineCustomElement$w();
|
|
666
|
+
}
|
|
667
|
+
break;
|
|
668
|
+
case "calcite-checkbox":
|
|
669
|
+
if (!customElements.get(tagName)) {
|
|
670
|
+
defineCustomElement$v();
|
|
671
|
+
}
|
|
672
|
+
break;
|
|
673
|
+
case "calcite-chip":
|
|
674
|
+
if (!customElements.get(tagName)) {
|
|
675
|
+
defineCustomElement$u();
|
|
676
|
+
}
|
|
677
|
+
break;
|
|
678
|
+
case "calcite-combobox":
|
|
679
|
+
if (!customElements.get(tagName)) {
|
|
680
|
+
defineCustomElement$t();
|
|
681
|
+
}
|
|
682
|
+
break;
|
|
683
|
+
case "calcite-combobox-item":
|
|
684
|
+
if (!customElements.get(tagName)) {
|
|
685
|
+
defineCustomElement$s();
|
|
686
|
+
}
|
|
687
|
+
break;
|
|
688
|
+
case "calcite-graph":
|
|
689
|
+
if (!customElements.get(tagName)) {
|
|
690
|
+
defineCustomElement$r();
|
|
691
|
+
}
|
|
692
|
+
break;
|
|
693
|
+
case "calcite-icon":
|
|
694
|
+
if (!customElements.get(tagName)) {
|
|
695
|
+
defineCustomElement$q();
|
|
696
|
+
}
|
|
697
|
+
break;
|
|
698
|
+
case "calcite-input":
|
|
699
|
+
if (!customElements.get(tagName)) {
|
|
700
|
+
defineCustomElement$p();
|
|
701
|
+
}
|
|
702
|
+
break;
|
|
703
|
+
case "calcite-input-message":
|
|
704
|
+
if (!customElements.get(tagName)) {
|
|
705
|
+
defineCustomElement$o();
|
|
706
|
+
}
|
|
707
|
+
break;
|
|
708
|
+
case "calcite-label":
|
|
709
|
+
if (!customElements.get(tagName)) {
|
|
710
|
+
defineCustomElement$n();
|
|
711
|
+
}
|
|
712
|
+
break;
|
|
713
|
+
case "calcite-list":
|
|
714
|
+
if (!customElements.get(tagName)) {
|
|
715
|
+
defineCustomElement$m();
|
|
716
|
+
}
|
|
717
|
+
break;
|
|
718
|
+
case "calcite-list-item":
|
|
719
|
+
if (!customElements.get(tagName)) {
|
|
720
|
+
defineCustomElement$l();
|
|
721
|
+
}
|
|
722
|
+
break;
|
|
723
|
+
case "calcite-loader":
|
|
724
|
+
if (!customElements.get(tagName)) {
|
|
725
|
+
defineCustomElement$k();
|
|
726
|
+
}
|
|
727
|
+
break;
|
|
728
|
+
case "calcite-notice":
|
|
729
|
+
if (!customElements.get(tagName)) {
|
|
730
|
+
defineCustomElement$j();
|
|
731
|
+
}
|
|
732
|
+
break;
|
|
733
|
+
case "calcite-option":
|
|
734
|
+
if (!customElements.get(tagName)) {
|
|
735
|
+
defineCustomElement$i();
|
|
736
|
+
}
|
|
737
|
+
break;
|
|
738
|
+
case "calcite-panel":
|
|
739
|
+
if (!customElements.get(tagName)) {
|
|
740
|
+
defineCustomElement$h();
|
|
741
|
+
}
|
|
742
|
+
break;
|
|
743
|
+
case "calcite-popover":
|
|
744
|
+
if (!customElements.get(tagName)) {
|
|
745
|
+
defineCustomElement$g();
|
|
746
|
+
}
|
|
747
|
+
break;
|
|
748
|
+
case "calcite-progress":
|
|
749
|
+
if (!customElements.get(tagName)) {
|
|
750
|
+
defineCustomElement$f();
|
|
751
|
+
}
|
|
752
|
+
break;
|
|
753
|
+
case "calcite-radio-group":
|
|
754
|
+
if (!customElements.get(tagName)) {
|
|
755
|
+
defineCustomElement$e();
|
|
756
|
+
}
|
|
757
|
+
break;
|
|
758
|
+
case "calcite-radio-group-item":
|
|
759
|
+
if (!customElements.get(tagName)) {
|
|
760
|
+
defineCustomElement$d();
|
|
761
|
+
}
|
|
762
|
+
break;
|
|
763
|
+
case "calcite-scrim":
|
|
764
|
+
if (!customElements.get(tagName)) {
|
|
765
|
+
defineCustomElement$c();
|
|
766
|
+
}
|
|
767
|
+
break;
|
|
768
|
+
case "calcite-select":
|
|
769
|
+
if (!customElements.get(tagName)) {
|
|
770
|
+
defineCustomElement$b();
|
|
771
|
+
}
|
|
772
|
+
break;
|
|
773
|
+
case "calcite-shell":
|
|
774
|
+
if (!customElements.get(tagName)) {
|
|
775
|
+
defineCustomElement$a();
|
|
776
|
+
}
|
|
777
|
+
break;
|
|
778
|
+
case "calcite-slider":
|
|
779
|
+
if (!customElements.get(tagName)) {
|
|
780
|
+
defineCustomElement$9();
|
|
781
|
+
}
|
|
782
|
+
break;
|
|
783
|
+
case "calcite-tooltip":
|
|
784
|
+
if (!customElements.get(tagName)) {
|
|
785
|
+
defineCustomElement$8();
|
|
786
|
+
}
|
|
787
|
+
break;
|
|
788
|
+
case "map-draw-tools":
|
|
789
|
+
if (!customElements.get(tagName)) {
|
|
790
|
+
defineCustomElement$7();
|
|
791
|
+
}
|
|
792
|
+
break;
|
|
793
|
+
case "map-layer-picker":
|
|
794
|
+
if (!customElements.get(tagName)) {
|
|
795
|
+
defineCustomElement$6();
|
|
796
|
+
}
|
|
797
|
+
break;
|
|
798
|
+
case "map-select-tools":
|
|
799
|
+
if (!customElements.get(tagName)) {
|
|
800
|
+
defineCustomElement$5();
|
|
801
|
+
}
|
|
802
|
+
break;
|
|
803
|
+
case "pdf-download":
|
|
804
|
+
if (!customElements.get(tagName)) {
|
|
805
|
+
defineCustomElement$4();
|
|
806
|
+
}
|
|
807
|
+
break;
|
|
808
|
+
case "refine-selection":
|
|
809
|
+
if (!customElements.get(tagName)) {
|
|
810
|
+
defineCustomElement$3();
|
|
811
|
+
}
|
|
812
|
+
break;
|
|
813
|
+
case "refine-selection-tools":
|
|
814
|
+
if (!customElements.get(tagName)) {
|
|
815
|
+
defineCustomElement$2();
|
|
816
|
+
}
|
|
817
|
+
break;
|
|
818
|
+
} });
|
|
819
|
+
}
|
|
820
|
+
defineCustomElement$1();
|
|
821
|
+
|
|
822
|
+
const PublicNotification = PublicNotification$1;
|
|
823
|
+
const defineCustomElement = defineCustomElement$1;
|
|
824
|
+
|
|
825
|
+
export { PublicNotification, defineCustomElement };
|