@esri/solutions-components 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- 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,342 @@
|
|
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, getAssetPath } from '@stencil/core/internal/client';
|
7
|
+
|
8
|
+
const solutionItemIconCss = ".item-type-icon{pointer-events:none;display:block;height:1rem;box-sizing:border-box;margin-left:0.75rem;margin-right:0.75rem;min-width:0;flex-grow:0;flex-shrink:1}.item-type-icon-group-1-up>.block{flex-basis:calc(100% - 1.5rem);width:calc(100% - 1.5rem)}.item-type-icon-group-2-up>.block{flex-basis:calc(50% - 1.5rem);width:calc(50% - 1.5rem)}.item-type-icon-group-3-up>.block{flex-basis:calc(33.33333% - 1.5rem);width:calc(33.33333% - 1.5rem)}.item-type-icon-group-4-up>.block{flex-basis:calc(25% - 1.5rem);width:calc(25% - 1.5rem)}.item-type-icon-group-5-up>.block{flex-basis:calc(20% - 1.5rem);width:calc(20% - 1.5rem)}.item-type-icon-group-6-up>.block{flex-basis:calc(16.66666% - 1.5rem);width:calc(16.66666% - 1.5rem)}.item-type-icon-group-7-up>.block{flex-basis:calc(14.2857% - 1.5rem);width:calc(14.2857% - 1.5rem)}.item-type-icon-group-8-up>.block{flex-basis:calc(12.5% - 1.5rem);width:calc(12.5% - 1.5rem)}.tablet-block-group-1-up>.item-type-icon{flex-basis:calc(100% - 1.5rem);width:calc(100% - 1.5rem)}.tablet-block-group-2-up>.item-type-icon{flex-basis:calc(50% - 1.5rem);width:calc(50% - 1.5rem)}.tablet-block-group-3-up>.item-type-icon{flex-basis:calc(33.33333% - 1.5rem);width:calc(33.33333% - 1.5rem)}.tablet-block-group-4-up>.item-type-icon{flex-basis:calc(25% - 1.5rem);width:calc(25% - 1.5rem)}.tablet-block-group-5-up>.item-type-icon{flex-basis:calc(20% - 1.5rem);width:calc(20% - 1.5rem)}.tablet-block-group-6-up>.item-type-icon{flex-basis:calc(16.66666% - 1.5rem);width:calc(16.66666% - 1.5rem)}.tablet-block-group-7-up>.item-type-icon{flex-basis:calc(14.2857% - 1.5rem);width:calc(14.2857% - 1.5rem)}.tablet-block-group-8-up>.item-type-icon{flex-basis:calc(12.5% - 1.5rem);width:calc(12.5% - 1.5rem)}.phone-block-group-1-up>.item-type-icon{flex-basis:calc(100% - 1.5rem);width:calc(100% - 1.5rem)}.phone-block-group-2-up>.item-type-icon{flex-basis:calc(50% - 1.5rem);width:calc(50% - 1.5rem)}.phone-block-group-3-up>.item-type-icon{flex-basis:calc(33.33333% - 1.5rem);width:calc(33.33333% - 1.5rem)}.phone-block-group-4-up>.item-type-icon{flex-basis:calc(25% - 1.5rem);width:calc(25% - 1.5rem)}.phone-block-group-5-up>.item-type-icon{flex-basis:calc(20% - 1.5rem);width:calc(20% - 1.5rem)}.phone-block-group-6-up>.item-type-icon{flex-basis:calc(16.66666% - 1.5rem);width:calc(16.66666% - 1.5rem)}.phone-block-group-7-up>.item-type-icon{flex-basis:calc(14.2857% - 1.5rem);width:calc(14.2857% - 1.5rem)}.phone-block-group-8-up>.item-type-icon{flex-basis:calc(12.5% - 1.5rem);width:calc(12.5% - 1.5rem)}.code-face .item-type-icon{letter-spacing:0em;font-family:\"Consolas\", \"Andale Mono\", \"Lucida Console\", \"Monaco\", monospace;font-weight:400;font-style:normal}.code-face .item-type-icon b,.code-face .item-type-icon strong{font-weight:400}.code-italic .item-type-icon{letter-spacing:0em;font-family:\"Consolas\", \"Andale Mono\", \"Lucida Console\", \"Monaco\", monospace;font-weight:400;font-style:italic}.code-italic .item-type-icon b,.code-italic .item-type-icon strong{font-weight:400}.item-type-icon{margin-top:0.15em !important;min-width:16px;fill:currentColor;transform:rotate(360deg)}.item-type-icon-margin{-webkit-margin-end:0.375rem;margin-inline-end:0.375rem}";
|
9
|
+
|
10
|
+
const SolutionItemIcon = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
11
|
+
constructor() {
|
12
|
+
super();
|
13
|
+
this.__registerHost();
|
14
|
+
this.isPortal = false;
|
15
|
+
this.type = "";
|
16
|
+
this.typeKeywords = [];
|
17
|
+
}
|
18
|
+
//--------------------------------------------------------------------------
|
19
|
+
//
|
20
|
+
// Lifecycle
|
21
|
+
//
|
22
|
+
//--------------------------------------------------------------------------
|
23
|
+
/**
|
24
|
+
* Renders the component.
|
25
|
+
*/
|
26
|
+
render() {
|
27
|
+
return h("div", { title: this.type }, h("img", { class: "item-type-icon item-type-icon-margin", height: "16", src: this._getIconUrl(this.type, this.typeKeywords), width: "16" }));
|
28
|
+
}
|
29
|
+
//--------------------------------------------------------------------------
|
30
|
+
//
|
31
|
+
// Properties (protected)
|
32
|
+
//
|
33
|
+
//--------------------------------------------------------------------------
|
34
|
+
//--------------------------------------------------------------------------
|
35
|
+
//
|
36
|
+
// Event Listeners
|
37
|
+
//
|
38
|
+
//--------------------------------------------------------------------------
|
39
|
+
//--------------------------------------------------------------------------
|
40
|
+
//
|
41
|
+
// Events
|
42
|
+
//
|
43
|
+
//--------------------------------------------------------------------------
|
44
|
+
//--------------------------------------------------------------------------
|
45
|
+
//
|
46
|
+
// Public Methods (async)
|
47
|
+
//
|
48
|
+
//--------------------------------------------------------------------------
|
49
|
+
//--------------------------------------------------------------------------
|
50
|
+
//
|
51
|
+
// Private Methods
|
52
|
+
//
|
53
|
+
//--------------------------------------------------------------------------
|
54
|
+
/**
|
55
|
+
* This function was copied and slightly modified from the arcgis-portal-app.
|
56
|
+
*
|
57
|
+
* This will construct the path to the icon based on type and typeKeyword info.
|
58
|
+
*
|
59
|
+
* @param type The item type
|
60
|
+
* @param typeKeywords The item typeKeywords
|
61
|
+
*/
|
62
|
+
_getIconUrl(type, typeKeywords) {
|
63
|
+
const itemType = (type && type.toLowerCase()) || "", imgDir = "./item-icons/", size = "16"; //for now we only support 16x16 pixel images
|
64
|
+
let isHosted = false, isRouteLayer = false, isMarkupLayer = false, isTable = false, isSpatiotemporal = false, isRelational = false, imgName = "";
|
65
|
+
typeKeywords = typeKeywords || [];
|
66
|
+
if (itemType.indexOf("service") > 0 || itemType === "feature collection" || itemType === "kml" || itemType === "wms" || itemType === "wmts" || itemType === "wfs") {
|
67
|
+
isHosted = typeKeywords.indexOf("Hosted Service") > -1;
|
68
|
+
if (itemType === "feature service" || itemType === "feature collection" || itemType === "kml" || itemType === "wfs") {
|
69
|
+
isTable = typeKeywords.indexOf("Table") > -1;
|
70
|
+
isRouteLayer = typeKeywords.indexOf("Route Layer") > -1;
|
71
|
+
isMarkupLayer = typeKeywords.indexOf("Markup") > -1;
|
72
|
+
isSpatiotemporal = typeKeywords.indexOf("Spatiotemporal") !== -1;
|
73
|
+
imgName = isSpatiotemporal && isTable ? "spatiotemporaltable" : (isTable ? "table" : (isRouteLayer ? "routelayer" : (isMarkupLayer ? "markup" : (isSpatiotemporal ? "spatiotemporal" : (isHosted ? "featureshosted" : "features")))));
|
74
|
+
}
|
75
|
+
else if (itemType === "map service" || itemType === "wms" || itemType === "wmts") {
|
76
|
+
isSpatiotemporal = typeKeywords.indexOf("Spatiotemporal") !== -1;
|
77
|
+
isRelational = typeKeywords.indexOf("Relational") !== -1;
|
78
|
+
if (isSpatiotemporal || isRelational) {
|
79
|
+
imgName = "mapimages";
|
80
|
+
}
|
81
|
+
else {
|
82
|
+
imgName = (isHosted || typeKeywords.indexOf("Tiled") > -1 || itemType === "wmts") ? "maptiles" : "mapimages";
|
83
|
+
}
|
84
|
+
}
|
85
|
+
else if (itemType === "scene service") {
|
86
|
+
if (typeKeywords.indexOf("Line") > -1) {
|
87
|
+
imgName = "sceneweblayerline";
|
88
|
+
}
|
89
|
+
else if (typeKeywords.indexOf("3DObject") > -1) {
|
90
|
+
imgName = "sceneweblayermultipatch";
|
91
|
+
}
|
92
|
+
else if (typeKeywords.indexOf("Point") > -1) {
|
93
|
+
imgName = "sceneweblayerpoint";
|
94
|
+
}
|
95
|
+
else if (typeKeywords.indexOf("IntegratedMesh") > -1) {
|
96
|
+
imgName = "sceneweblayermesh";
|
97
|
+
}
|
98
|
+
else if (typeKeywords.indexOf("PointCloud") > -1) {
|
99
|
+
imgName = "sceneweblayerpointcloud";
|
100
|
+
}
|
101
|
+
else if (typeKeywords.indexOf("Polygon") > -1) {
|
102
|
+
imgName = "sceneweblayerpolygon";
|
103
|
+
}
|
104
|
+
else if (typeKeywords.indexOf("Building") > -1) {
|
105
|
+
imgName = "sceneweblayerbuilding";
|
106
|
+
}
|
107
|
+
else {
|
108
|
+
imgName = "sceneweblayer";
|
109
|
+
}
|
110
|
+
}
|
111
|
+
else if (itemType === "image service") {
|
112
|
+
imgName = typeKeywords.indexOf("Elevation 3D Layer") > -1 ? "elevationlayer" : (typeKeywords.indexOf("Tiled Imagery") > -1 ? "tiledimagerylayer" : "imagery");
|
113
|
+
}
|
114
|
+
else if (itemType === "stream service") {
|
115
|
+
imgName = "streamlayer";
|
116
|
+
}
|
117
|
+
else if (itemType === "vector tile service") {
|
118
|
+
imgName = "vectortile";
|
119
|
+
}
|
120
|
+
else if (itemType === "datastore catalog service") {
|
121
|
+
imgName = "datastorecollection";
|
122
|
+
}
|
123
|
+
else if (itemType === "geocoding service") {
|
124
|
+
imgName = "geocodeservice";
|
125
|
+
}
|
126
|
+
else if (itemType === "geoprocessing service") {
|
127
|
+
imgName = (typeKeywords.indexOf("Web Tool") > -1 && (this.isPortal)) ? "tool" : "layers";
|
128
|
+
}
|
129
|
+
else {
|
130
|
+
imgName = "layers";
|
131
|
+
}
|
132
|
+
}
|
133
|
+
else if (itemType === "web map" || itemType === "cityengine web scene") {
|
134
|
+
imgName = "maps";
|
135
|
+
}
|
136
|
+
else if (itemType === "web scene") {
|
137
|
+
imgName = typeKeywords.indexOf("ViewingMode-Local") > -1 ? "webscenelocal" : "websceneglobal";
|
138
|
+
}
|
139
|
+
else if (itemType === "web mapping application" || itemType === "mobile application" || itemType === "application" ||
|
140
|
+
itemType === "operation view" || itemType === "desktop application") {
|
141
|
+
imgName = "apps";
|
142
|
+
}
|
143
|
+
else if (itemType === "map document" || itemType === "map package" || itemType === "published map" || itemType === "scene document" ||
|
144
|
+
itemType === "globe document" || itemType === "basemap package" || itemType === "mobile basemap package" || itemType === "mobile map package" ||
|
145
|
+
itemType === "project package" || itemType === "project template" || itemType === "pro map" || itemType === "layout" ||
|
146
|
+
(itemType === "layer" && typeKeywords.indexOf("ArcGIS Pro") > -1) || (itemType === "explorer map" && typeKeywords.indexOf("Explorer Document"))) {
|
147
|
+
imgName = "mapsgray";
|
148
|
+
}
|
149
|
+
else if (itemType === "service definition" || itemType === "csv" || itemType === "shapefile" || itemType === "cad drawing" || itemType === "geojson" || itemType === "360 vr experience" || itemType === "netcdf" || itemType === "administrative report") {
|
150
|
+
imgName = "datafiles";
|
151
|
+
}
|
152
|
+
else if (itemType === "explorer add in" || itemType === "desktop add in" || itemType === "windows viewer add in" || itemType === "windows viewer configuration") {
|
153
|
+
imgName = "appsgray";
|
154
|
+
}
|
155
|
+
else if (itemType === "arcgis pro add in" || itemType === "arcgis pro configuration") {
|
156
|
+
imgName = "addindesktop";
|
157
|
+
}
|
158
|
+
else if (itemType === "rule package" || itemType === "file geodatabase" || itemType === "sqlite geodatabase" || itemType === "csv collection" || itemType === "kml collection" ||
|
159
|
+
itemType === "windows mobile package" || itemType === "map template" || itemType === "desktop application template" || itemType === "gml" ||
|
160
|
+
itemType === "arcpad package" || itemType === "code sample" || itemType === "form" || itemType === "document link" ||
|
161
|
+
itemType === "operations dashboard add in" || itemType === "rules package" || itemType === "image" || itemType === "workflow manager package" ||
|
162
|
+
(itemType === "explorer map" && typeKeywords.indexOf("Explorer Mapping Application") > -1 || typeKeywords.indexOf("Document") > -1)) {
|
163
|
+
imgName = "datafilesgray";
|
164
|
+
}
|
165
|
+
else if (itemType === "network analysis service" || itemType === "geoprocessing service" ||
|
166
|
+
itemType === "geodata service" || itemType === "geometry service" || itemType === "geoprocessing package" ||
|
167
|
+
itemType === "locator package" || itemType === "geoprocessing sample" || itemType === "workflow manager service") {
|
168
|
+
imgName = "toolsgray";
|
169
|
+
}
|
170
|
+
else if (itemType === "layer" || itemType === "layer package" || itemType === "explorer layer") {
|
171
|
+
imgName = "layersgray";
|
172
|
+
}
|
173
|
+
else if (itemType === "scene package") {
|
174
|
+
imgName = "scenepackage";
|
175
|
+
}
|
176
|
+
else if (itemType === "mobile scene package") {
|
177
|
+
imgName = "mobilescenepackage";
|
178
|
+
}
|
179
|
+
else if (itemType === "tile package" || itemType === "compact tile package") {
|
180
|
+
imgName = "tilepackage";
|
181
|
+
}
|
182
|
+
else if (itemType === "task file") {
|
183
|
+
imgName = "taskfile";
|
184
|
+
}
|
185
|
+
else if (itemType === "report template") {
|
186
|
+
imgName = "report-template";
|
187
|
+
}
|
188
|
+
else if (itemType === "statistical data collection") {
|
189
|
+
imgName = "statisticaldatacollection";
|
190
|
+
}
|
191
|
+
else if (itemType === "insights workbook") {
|
192
|
+
imgName = "workbook";
|
193
|
+
}
|
194
|
+
else if (itemType === "insights model") {
|
195
|
+
imgName = "insightsmodel";
|
196
|
+
}
|
197
|
+
else if (itemType === "insights page") {
|
198
|
+
imgName = "insightspage";
|
199
|
+
}
|
200
|
+
else if (itemType === "insights theme") {
|
201
|
+
imgName = "insightstheme";
|
202
|
+
}
|
203
|
+
else if (itemType === "hub initiative") {
|
204
|
+
imgName = "hubinitiative";
|
205
|
+
}
|
206
|
+
else if (itemType === "hub page") {
|
207
|
+
imgName = "hubpage";
|
208
|
+
}
|
209
|
+
else if (itemType === "hub site application") {
|
210
|
+
imgName = "hubsite";
|
211
|
+
}
|
212
|
+
else if (itemType === "hub event") {
|
213
|
+
imgName = "hubevent";
|
214
|
+
}
|
215
|
+
else if (itemType === "relational database connection") {
|
216
|
+
imgName = "relationaldatabaseconnection";
|
217
|
+
}
|
218
|
+
else if (itemType === "big data file share") {
|
219
|
+
imgName = "datastorecollection";
|
220
|
+
}
|
221
|
+
else if (itemType === "image collection") {
|
222
|
+
imgName = "imagecollection";
|
223
|
+
}
|
224
|
+
else if (itemType === "desktop style") {
|
225
|
+
imgName = "desktopstyle";
|
226
|
+
}
|
227
|
+
else if (itemType === "style") {
|
228
|
+
imgName = "style";
|
229
|
+
}
|
230
|
+
else if (itemType === "dashboard") {
|
231
|
+
imgName = "dashboard";
|
232
|
+
}
|
233
|
+
else if (itemType === "raster function template") {
|
234
|
+
imgName = "rasterprocessingtemplate";
|
235
|
+
}
|
236
|
+
else if (itemType === "vector tile package") {
|
237
|
+
imgName = "vectortilepackage";
|
238
|
+
}
|
239
|
+
else if (itemType === "ortho mapping project") {
|
240
|
+
imgName = "orthomappingproject";
|
241
|
+
}
|
242
|
+
else if (itemType === "ortho mapping template") {
|
243
|
+
imgName = "orthomappingtemplate";
|
244
|
+
}
|
245
|
+
else if (itemType === "solution") {
|
246
|
+
imgName = "solutions";
|
247
|
+
}
|
248
|
+
else if (itemType === "geopackage") {
|
249
|
+
imgName = "geopackage";
|
250
|
+
}
|
251
|
+
else if (itemType === "deep learning package") {
|
252
|
+
imgName = "deeplearningpackage";
|
253
|
+
}
|
254
|
+
else if (itemType === "real time analytic") {
|
255
|
+
imgName = "realtimeanalytics";
|
256
|
+
}
|
257
|
+
else if (itemType === "big data analytic") {
|
258
|
+
imgName = "bigdataanalytics";
|
259
|
+
}
|
260
|
+
else if (itemType === "feed") {
|
261
|
+
imgName = "feed";
|
262
|
+
}
|
263
|
+
else if (itemType === "excalibur imagery project") {
|
264
|
+
imgName = "excaliburimageryproject";
|
265
|
+
}
|
266
|
+
else if (itemType === "notebook") {
|
267
|
+
imgName = "notebook";
|
268
|
+
}
|
269
|
+
else if (itemType === "storymap") {
|
270
|
+
imgName = "storymap";
|
271
|
+
}
|
272
|
+
else if (itemType === "survey123 add in") {
|
273
|
+
imgName = "survey123addin";
|
274
|
+
}
|
275
|
+
else if (itemType === "mission") {
|
276
|
+
imgName = "mission";
|
277
|
+
}
|
278
|
+
else if (itemType === "mission report") {
|
279
|
+
imgName = "missionreport";
|
280
|
+
}
|
281
|
+
else if (itemType === "quickcapture project") {
|
282
|
+
imgName = "quickcaptureproject";
|
283
|
+
}
|
284
|
+
else if (itemType === "pro report") {
|
285
|
+
imgName = "proreport";
|
286
|
+
}
|
287
|
+
else if (itemType === "urban model") {
|
288
|
+
imgName = "urbanmodel";
|
289
|
+
}
|
290
|
+
else if (itemType === "web experience") {
|
291
|
+
imgName = "experiencebuilder";
|
292
|
+
}
|
293
|
+
else if (itemType === "web experience template") {
|
294
|
+
imgName = "webexperiencetemplate";
|
295
|
+
}
|
296
|
+
else if (itemType === "workflow") {
|
297
|
+
imgName = "workflow";
|
298
|
+
}
|
299
|
+
else if (itemType === "kernel gateway connection") {
|
300
|
+
imgName = "kernelgatewayconnection";
|
301
|
+
}
|
302
|
+
else if (itemType === "insights script") {
|
303
|
+
imgName = "insightsscript";
|
304
|
+
}
|
305
|
+
else if (itemType === "hub initiative template") {
|
306
|
+
imgName = "hubinitiativetemplate";
|
307
|
+
}
|
308
|
+
else if (itemType === "storymap theme") {
|
309
|
+
imgName = "storymaptheme";
|
310
|
+
}
|
311
|
+
else if (itemType === "group") {
|
312
|
+
imgName = "group";
|
313
|
+
}
|
314
|
+
else {
|
315
|
+
imgName = "maps";
|
316
|
+
}
|
317
|
+
return imgName ? getAssetPath(imgDir + imgName + size + ".png") : null;
|
318
|
+
}
|
319
|
+
static get assetsDirs() { return ["item-icons"]; }
|
320
|
+
get el() { return this; }
|
321
|
+
static get style() { return solutionItemIconCss; }
|
322
|
+
}, [0, "solution-item-icon", {
|
323
|
+
"isPortal": [4, "is-portal"],
|
324
|
+
"type": [1],
|
325
|
+
"typeKeywords": [16]
|
326
|
+
}]);
|
327
|
+
function defineCustomElement() {
|
328
|
+
if (typeof customElements === "undefined") {
|
329
|
+
return;
|
330
|
+
}
|
331
|
+
const components = ["solution-item-icon"];
|
332
|
+
components.forEach(tagName => { switch (tagName) {
|
333
|
+
case "solution-item-icon":
|
334
|
+
if (!customElements.get(tagName)) {
|
335
|
+
customElements.define(tagName, SolutionItemIcon);
|
336
|
+
}
|
337
|
+
break;
|
338
|
+
} });
|
339
|
+
}
|
340
|
+
defineCustomElement();
|
341
|
+
|
342
|
+
export { SolutionItemIcon as S, defineCustomElement as d };
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
2
|
+
|
3
|
+
interface SolutionItemSharing extends Components.SolutionItemSharing, HTMLElement {}
|
4
|
+
export const SolutionItemSharing: {
|
5
|
+
prototype: SolutionItemSharing;
|
6
|
+
new (): SolutionItemSharing;
|
7
|
+
};
|
8
|
+
/**
|
9
|
+
* Used to define this component and all nested components recursively.
|
10
|
+
*/
|
11
|
+
export const defineCustomElement: () => void;
|
@@ -0,0 +1,11 @@
|
|
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 { S as SolutionItemSharing$1, d as defineCustomElement$1 } from './solution-item-sharing2.js';
|
7
|
+
|
8
|
+
const SolutionItemSharing = SolutionItemSharing$1;
|
9
|
+
const defineCustomElement = defineCustomElement$1;
|
10
|
+
|
11
|
+
export { SolutionItemSharing, defineCustomElement };
|
@@ -0,0 +1,167 @@
|
|
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 { s as state } from './solution-store.js';
|
8
|
+
import { g as getLocaleComponentStrings } from './locale.js';
|
9
|
+
import { d as defineCustomElement$3 } from './label.js';
|
10
|
+
import { d as defineCustomElement$2 } from './switch.js';
|
11
|
+
import { d as defineCustomElement$1 } from './solution-item-icon2.js';
|
12
|
+
|
13
|
+
const solutionItemSharingCss = ":host{display:block;box-sizing:border-box;margin-left:0.75rem;margin-right:0.75rem;min-width:0;flex-grow:0;flex-shrink:1}:host-group-1-up>.block{flex-basis:calc(100% - 1.5rem);width:calc(100% - 1.5rem)}:host-group-2-up>.block{flex-basis:calc(50% - 1.5rem);width:calc(50% - 1.5rem)}:host-group-3-up>.block{flex-basis:calc(33.33333% - 1.5rem);width:calc(33.33333% - 1.5rem)}:host-group-4-up>.block{flex-basis:calc(25% - 1.5rem);width:calc(25% - 1.5rem)}:host-group-5-up>.block{flex-basis:calc(20% - 1.5rem);width:calc(20% - 1.5rem)}:host-group-6-up>.block{flex-basis:calc(16.66666% - 1.5rem);width:calc(16.66666% - 1.5rem)}:host-group-7-up>.block{flex-basis:calc(14.2857% - 1.5rem);width:calc(14.2857% - 1.5rem)}:host-group-8-up>.block{flex-basis:calc(12.5% - 1.5rem);width:calc(12.5% - 1.5rem)}.tablet-block-group-1-up>:host{flex-basis:calc(100% - 1.5rem);width:calc(100% - 1.5rem)}.tablet-block-group-2-up>:host{flex-basis:calc(50% - 1.5rem);width:calc(50% - 1.5rem)}.tablet-block-group-3-up>:host{flex-basis:calc(33.33333% - 1.5rem);width:calc(33.33333% - 1.5rem)}.tablet-block-group-4-up>:host{flex-basis:calc(25% - 1.5rem);width:calc(25% - 1.5rem)}.tablet-block-group-5-up>:host{flex-basis:calc(20% - 1.5rem);width:calc(20% - 1.5rem)}.tablet-block-group-6-up>:host{flex-basis:calc(16.66666% - 1.5rem);width:calc(16.66666% - 1.5rem)}.tablet-block-group-7-up>:host{flex-basis:calc(14.2857% - 1.5rem);width:calc(14.2857% - 1.5rem)}.tablet-block-group-8-up>:host{flex-basis:calc(12.5% - 1.5rem);width:calc(12.5% - 1.5rem)}.phone-block-group-1-up>:host{flex-basis:calc(100% - 1.5rem);width:calc(100% - 1.5rem)}.phone-block-group-2-up>:host{flex-basis:calc(50% - 1.5rem);width:calc(50% - 1.5rem)}.phone-block-group-3-up>:host{flex-basis:calc(33.33333% - 1.5rem);width:calc(33.33333% - 1.5rem)}.phone-block-group-4-up>:host{flex-basis:calc(25% - 1.5rem);width:calc(25% - 1.5rem)}.phone-block-group-5-up>:host{flex-basis:calc(20% - 1.5rem);width:calc(20% - 1.5rem)}.phone-block-group-6-up>:host{flex-basis:calc(16.66666% - 1.5rem);width:calc(16.66666% - 1.5rem)}.phone-block-group-7-up>:host{flex-basis:calc(14.2857% - 1.5rem);width:calc(14.2857% - 1.5rem)}.phone-block-group-8-up>:host{flex-basis:calc(12.5% - 1.5rem);width:calc(12.5% - 1.5rem)}.code-face :host{letter-spacing:0em;font-family:\"Consolas\", \"Andale Mono\", \"Lucida Console\", \"Monaco\", monospace;font-weight:400;font-style:normal}.code-face :host b,.code-face :host strong{font-weight:400}.code-italic :host{letter-spacing:0em;font-family:\"Consolas\", \"Andale Mono\", \"Lucida Console\", \"Monaco\", monospace;font-weight:400;font-style:italic}.code-italic :host b,.code-italic :host strong{font-weight:400}.container-border{padding:1rem}.icon-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}";
|
14
|
+
|
15
|
+
const SolutionItemSharing = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
16
|
+
constructor() {
|
17
|
+
super();
|
18
|
+
this.__registerHost();
|
19
|
+
this.__attachShadow();
|
20
|
+
this.groupId = "";
|
21
|
+
this._translations = undefined;
|
22
|
+
this.sharing = [];
|
23
|
+
}
|
24
|
+
itemIdWatchHandler() {
|
25
|
+
const itemEdit = state.getItemInfo(this.groupId);
|
26
|
+
this.sharing = itemEdit.groupDetails;
|
27
|
+
}
|
28
|
+
//--------------------------------------------------------------------------
|
29
|
+
//
|
30
|
+
// Lifecycle
|
31
|
+
//
|
32
|
+
//--------------------------------------------------------------------------
|
33
|
+
/**
|
34
|
+
* StencilJS: Called once just after the component is first connected to the DOM.
|
35
|
+
*/
|
36
|
+
async componentWillLoad() {
|
37
|
+
return this._getTranslations();
|
38
|
+
}
|
39
|
+
/**
|
40
|
+
* Renders the component.
|
41
|
+
*/
|
42
|
+
render() {
|
43
|
+
return (h(Host, null, h("div", { class: "container-border" }, h("calcite-label", null, this._translations.groupInfo), this._renderItems(this.sharing))));
|
44
|
+
}
|
45
|
+
//--------------------------------------------------------------------------
|
46
|
+
//
|
47
|
+
// Event Listeners
|
48
|
+
//
|
49
|
+
//--------------------------------------------------------------------------
|
50
|
+
//--------------------------------------------------------------------------
|
51
|
+
//
|
52
|
+
// Events
|
53
|
+
//
|
54
|
+
//--------------------------------------------------------------------------
|
55
|
+
//--------------------------------------------------------------------------
|
56
|
+
//
|
57
|
+
// Public Methods (async)
|
58
|
+
//
|
59
|
+
//--------------------------------------------------------------------------
|
60
|
+
async getShareInfo() {
|
61
|
+
return this.sharing;
|
62
|
+
}
|
63
|
+
//--------------------------------------------------------------------------
|
64
|
+
//
|
65
|
+
// Private Methods
|
66
|
+
//
|
67
|
+
//--------------------------------------------------------------------------
|
68
|
+
/**
|
69
|
+
* Render share options based on the list of share details
|
70
|
+
*
|
71
|
+
* @param objs list of IItemShare objects that are used to expose and store share info for the solutions items
|
72
|
+
*/
|
73
|
+
_renderItems(objs) {
|
74
|
+
return objs && objs.length > 0
|
75
|
+
? objs.map(item => {
|
76
|
+
return (h("calcite-label", { layout: "inline" }, h("calcite-switch", { checked: item.shareItem, id: item.id, name: "setting", onCalciteSwitchChange: (event) => this._updateItem(event), scale: "m", value: "enabled" }), h("solution-item-icon", { type: item.type, typeKeywords: item.typeKeywords }), h("span", { class: "icon-text", title: item.title }, item.title)));
|
77
|
+
})
|
78
|
+
: null;
|
79
|
+
}
|
80
|
+
/**
|
81
|
+
* Update the items share prop based on the switch state
|
82
|
+
*
|
83
|
+
* @param event onCalciteSwitchChange event
|
84
|
+
*/
|
85
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
86
|
+
_updateItem(event) {
|
87
|
+
const id = event.target.id;
|
88
|
+
this.sharing = this.sharing.map((itemShare) => {
|
89
|
+
if (itemShare.id === id) {
|
90
|
+
// update the item
|
91
|
+
itemShare.shareItem = event.detail.switched;
|
92
|
+
// update the item in the store
|
93
|
+
const itemEdit = state.getItemInfo(id);
|
94
|
+
if (itemShare.shareItem) {
|
95
|
+
// Add the group to the item if it's not already there
|
96
|
+
if (!itemEdit.groups) {
|
97
|
+
itemEdit.groups = [this.groupId];
|
98
|
+
}
|
99
|
+
else if (itemEdit.groups.indexOf(this.groupId) < 0) {
|
100
|
+
itemEdit.groups.push(this.groupId);
|
101
|
+
}
|
102
|
+
}
|
103
|
+
else {
|
104
|
+
// Remove the group from the item if it's there
|
105
|
+
if (itemEdit.groups) {
|
106
|
+
const i = itemEdit.groups.indexOf(this.groupId);
|
107
|
+
if (i > -1) {
|
108
|
+
itemEdit.groups.splice(i, 1);
|
109
|
+
}
|
110
|
+
}
|
111
|
+
}
|
112
|
+
state.setItemInfo(itemEdit);
|
113
|
+
}
|
114
|
+
return itemShare;
|
115
|
+
});
|
116
|
+
}
|
117
|
+
/**
|
118
|
+
* Fetches the component's translations
|
119
|
+
*
|
120
|
+
* @protected
|
121
|
+
*/
|
122
|
+
async _getTranslations() {
|
123
|
+
const translations = await getLocaleComponentStrings(this.el);
|
124
|
+
this._translations = translations[0];
|
125
|
+
}
|
126
|
+
get el() { return this; }
|
127
|
+
static get watchers() { return {
|
128
|
+
"groupId": ["itemIdWatchHandler"]
|
129
|
+
}; }
|
130
|
+
static get style() { return solutionItemSharingCss; }
|
131
|
+
}, [1, "solution-item-sharing", {
|
132
|
+
"groupId": [1537, "group-id"],
|
133
|
+
"_translations": [32],
|
134
|
+
"sharing": [32],
|
135
|
+
"getShareInfo": [64]
|
136
|
+
}]);
|
137
|
+
function defineCustomElement() {
|
138
|
+
if (typeof customElements === "undefined") {
|
139
|
+
return;
|
140
|
+
}
|
141
|
+
const components = ["solution-item-sharing", "calcite-label", "calcite-switch", "solution-item-icon"];
|
142
|
+
components.forEach(tagName => { switch (tagName) {
|
143
|
+
case "solution-item-sharing":
|
144
|
+
if (!customElements.get(tagName)) {
|
145
|
+
customElements.define(tagName, SolutionItemSharing);
|
146
|
+
}
|
147
|
+
break;
|
148
|
+
case "calcite-label":
|
149
|
+
if (!customElements.get(tagName)) {
|
150
|
+
defineCustomElement$3();
|
151
|
+
}
|
152
|
+
break;
|
153
|
+
case "calcite-switch":
|
154
|
+
if (!customElements.get(tagName)) {
|
155
|
+
defineCustomElement$2();
|
156
|
+
}
|
157
|
+
break;
|
158
|
+
case "solution-item-icon":
|
159
|
+
if (!customElements.get(tagName)) {
|
160
|
+
defineCustomElement$1();
|
161
|
+
}
|
162
|
+
break;
|
163
|
+
} });
|
164
|
+
}
|
165
|
+
defineCustomElement();
|
166
|
+
|
167
|
+
export { SolutionItemSharing as S, defineCustomElement as d };
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
2
|
+
|
3
|
+
interface SolutionItem extends Components.SolutionItem, HTMLElement {}
|
4
|
+
export const SolutionItem: {
|
5
|
+
prototype: SolutionItem;
|
6
|
+
new (): SolutionItem;
|
7
|
+
};
|
8
|
+
/**
|
9
|
+
* Used to define this component and all nested components recursively.
|
10
|
+
*/
|
11
|
+
export const defineCustomElement: () => void;
|
@@ -0,0 +1,11 @@
|
|
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 { S as SolutionItem$1, d as defineCustomElement$1 } from './solution-item2.js';
|
7
|
+
|
8
|
+
const SolutionItem = SolutionItem$1;
|
9
|
+
const defineCustomElement = defineCustomElement$1;
|
10
|
+
|
11
|
+
export { SolutionItem, defineCustomElement };
|