@arcgis/map-components
Version:
ArcGIS Map Components
41 lines (40 loc) • 7.57 kB
JavaScript
import { c as l } from "../../chunks/runtime.js";
import a from "@arcgis/core/widgets/UtilityNetworkAssociations.js";
import { LitElement as c, createEvent as r, noShadowRoot as h } from "@arcgis/lumina";
import { m as A } from "../../chunks/useWidget.js";
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
v4.33.13 */
const S = A(a);
class g extends c {
constructor() {
super(...arguments), this.widget = S(this), this.viewModel = this.widget.viewModel, this.autoDestroyDisabled = !1, this.autoRefreshAssociationsDisabled = this.widget.autoRefreshAssociations, this.connectivityAssociationsLineSymbol = this.widget.connectivityAssociationsLineSymbol, this.includeConnectivityAssociationsDisabled = this.widget.includeConnectivityAssociations, this.includeStructuralAttachmentAssociationsDisabled = this.widget.includeStructuralAttachmentAssociations, this.maxAllowableAssociations = this.widget.maxAllowableAssociations, this.maxAllowableAssociationsSliderMax = this.widget.maxAllowableAssociationsSliderMax, this.maxAllowableAssociationsSliderMin = this.widget.maxAllowableAssociationsSliderMin, this.maxAllowableAssociationsSliderStep = this.widget.maxAllowableAssociationsSliderStep, this.position = "bottom-left", this.showArrowsConnectivity = this.widget.showArrowsConnectivity, this.showArrowsStructuralAttachment = this.widget.showArrowsStructuralAttachment, this.showAssociationsEnabled = this.widget.showAssociationsEnabled, this.structuralAttachmentAssociationsLineSymbol = this.widget.structuralAttachmentAssociationsLineSymbol, this.utilityNetwork = this.widget.utilityNetwork, this.showConnectivityAssociationsSettingsArrowsToggle = this.widget.visibleElements.connectivityAssociationsSettings.arrowsToggle, this.visibleElementsConnectivityAssociationsSettingsArrowsToggle = !1, this.showConnectivityAssociationsSettingsCapSelect = this.widget.visibleElements.connectivityAssociationsSettings.capSelect, this.visibleElementsConnectivityAssociationsSettingsCapSelect = !1, this.hideConnectivityAssociationsSettingsColorPicker = this.widget.visibleElements.connectivityAssociationsSettings.colorPicker, this.visibleElementsConnectivityAssociationsSettingsColorPicker = !0, this.hideConnectivityAssociationsSettingsStylePicker = this.widget.visibleElements.connectivityAssociationsSettings.stylePicker, this.visibleElementsConnectivityAssociationsSettingsStylePicker = !0, this.hideConnectivityAssociationsSettingsWidthInput = this.widget.visibleElements.connectivityAssociationsSettings.widthInput, this.visibleElementsConnectivityAssociationsSettingsWidthInput = !0, this.showMaxAllowableAssociationsSlider = this.widget.visibleElements.maxAllowableAssociationsSlider, this.visibleElementsMaxAllowableAssociationsSlider = !1, this.showStructuralAttachmentAssociationsSettingsArrowsToggle = this.widget.visibleElements.structuralAttachmentAssociationsSettings.arrowsToggle, this.visibleElementsStructuralAttachmentAssociationsSettingsArrowsToggle = !1, this.showStructuralAttachmentAssociationsSettingsCapSelect = this.widget.visibleElements.structuralAttachmentAssociationsSettings.capSelect, this.visibleElementsStructuralAttachmentAssociationsSettingsCapSelect = !1, this.hideStructuralAttachmentAssociationsSettingsColorPicker = this.widget.visibleElements.structuralAttachmentAssociationsSettings.colorPicker, this.visibleElementsStructuralAttachmentAssociationsSettingsColorPicker = !0, this.hideStructuralAttachmentAssociationsSettingsStylePicker = this.widget.visibleElements.structuralAttachmentAssociationsSettings.stylePicker, this.visibleElementsStructuralAttachmentAssociationsSettingsStylePicker = !0, this.hideStructuralAttachmentAssociationsSettingsWidthInput = this.widget.visibleElements.structuralAttachmentAssociationsSettings.widthInput, this.visibleElementsStructuralAttachmentAssociationsSettingsWidthInput = !0, this.icon = this.widget.icon, this.label = this.widget.label, this.arcgisReady = r();
}
static {
this.properties = { autoDestroyDisabled: 5, autoRefreshAssociationsDisabled: 5, connectivityAssociationsLineSymbol: 0, includeConnectivityAssociationsDisabled: 5, includeStructuralAttachmentAssociationsDisabled: 5, maxAllowableAssociations: 9, maxAllowableAssociationsSliderMax: 9, maxAllowableAssociationsSliderMin: 9, maxAllowableAssociationsSliderStep: 9, position: 1, referenceElement: 1, showArrowsConnectivity: 5, showArrowsStructuralAttachment: 5, showAssociationsEnabled: 5, structuralAttachmentAssociationsLineSymbol: 0, utilityNetwork: 0, showConnectivityAssociationsSettingsArrowsToggle: 5, visibleElementsConnectivityAssociationsSettingsArrowsToggle: 5, showConnectivityAssociationsSettingsCapSelect: 5, visibleElementsConnectivityAssociationsSettingsCapSelect: 5, hideConnectivityAssociationsSettingsColorPicker: 5, visibleElementsConnectivityAssociationsSettingsColorPicker: 5, hideConnectivityAssociationsSettingsStylePicker: 5, visibleElementsConnectivityAssociationsSettingsStylePicker: 5, hideConnectivityAssociationsSettingsWidthInput: 5, visibleElementsConnectivityAssociationsSettingsWidthInput: 5, showMaxAllowableAssociationsSlider: 5, visibleElementsMaxAllowableAssociationsSlider: 5, showStructuralAttachmentAssociationsSettingsArrowsToggle: 5, visibleElementsStructuralAttachmentAssociationsSettingsArrowsToggle: 5, showStructuralAttachmentAssociationsSettingsCapSelect: 5, visibleElementsStructuralAttachmentAssociationsSettingsCapSelect: 5, hideStructuralAttachmentAssociationsSettingsColorPicker: 5, visibleElementsStructuralAttachmentAssociationsSettingsColorPicker: 5, hideStructuralAttachmentAssociationsSettingsStylePicker: 5, visibleElementsStructuralAttachmentAssociationsSettingsStylePicker: 5, hideStructuralAttachmentAssociationsSettingsWidthInput: 5, visibleElementsStructuralAttachmentAssociationsSettingsWidthInput: 5, icon: 1, label: 1 };
}
static {
this.shadowRootOptions = h;
}
async destroy() {
await this.manager.destroy();
}
async load() {
if (this.el.view?.map && this.el.view.map.portalItem) {
await this.el.view.map.load();
const t = this.el.view.map.utilityNetworks?.getItemAt(0);
await t?.load(), this.utilityNetwork = t;
}
}
willUpdate(t) {
this._handleVisibilityChange(t, "ConnectivityAssociationsSettingsArrowsToggle"), this._handleVisibilityChange(t, "ConnectivityAssociationsSettingsCapSelect"), this._handleVisibilityChange(t, "ConnectivityAssociationsSettingsColorPicker"), this._handleVisibilityChange(t, "ConnectivityAssociationsSettingsStylePicker"), this._handleVisibilityChange(t, "ConnectivityAssociationsSettingsWidthInput"), this._handleVisibilityChange(t, "MaxAllowableAssociationsSlider"), this._handleVisibilityChange(t, "StructuralAttachmentAssociationsSettingsArrowsToggle"), this._handleVisibilityChange(t, "StructuralAttachmentAssociationsSettingsCapSelect"), this._handleVisibilityChange(t, "StructuralAttachmentAssociationsSettingsStylePicker"), this._handleVisibilityChange(t, "StructuralAttachmentAssociationsSettingsWidthInput");
}
_handleVisibilityChange(t, n) {
const s = `show${n}`, o = `hide${n}`, e = `visibleElements${n}`, i = this;
t.has(s) ? i[e] = !!i[s] : t.has(o) ? i[e] = !i[o] : t.has(e) && (console.warn(`${this.el.tagName.toLowerCase()}: The property ${e} is deprecated. Use ${s in i ? s : o} instead.`), s in i ? i[s] = !!i[e] : o in i && (i[o] = !i[e]));
}
}
l("arcgis-utility-network-associations", g);
export {
g as ArcgisUtilityNetworkAssociations
};