@arcgis/map-components
Version:
ArcGIS Map Components
35 lines (34 loc) • 2.03 kB
JavaScript
import { c as e } from "../../chunks/runtime.js";
import { usePropertyChange as t } from "@arcgis/components-controllers";
import i from "@arcgis/core/widgets/Legend.js";
import { LitElement as s, createEvent as r, noShadowRoot as a } from "@arcgis/lumina";
import { m as o } from "../../chunks/useWidget.js";
import { css as n } from "@lit/reactive-element/css-tag.js";
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
v4.32.13 */
const l = n` {arcgis-legend{display:block}}`, d = o(i);
class h extends s {
constructor() {
super(...arguments), this.widget = d(this), this.viewModel = this.widget.viewModel, this.activeLayerInfos = this.widget.activeLayerInfos, this.autoDestroyDisabled = !1, this.basemapLegendVisible = this.widget.basemapLegendVisible, this.headingLevel = this.widget.headingLevel, this.hideLayersNotInCurrentView = this.widget.hideLayersNotInCurrentView, this.icon = this.widget.icon, this.label = this.widget.label, this.layerInfos = this.widget.layerInfos, this.legendStyle = this.widget.style, this.position = "bottom-left", this.respectLayerDefinitionExpression = this.widget.respectLayerDefinitionExpression, this.respectLayerVisibilityDisabled = this.widget.respectLayerVisibility, this.state = this.viewModel.state, this.arcgisPropertyChange = t()("state"), this.arcgisReady = r();
}
static {
this.properties = { activeLayerInfos: 0, autoDestroyDisabled: 5, basemapLegendVisible: 5, headingLevel: 9, hideLayersNotInCurrentView: 5, icon: 1, label: 1, layerInfos: 0, legendStyle: 1, position: 1, referenceElement: 1, respectLayerDefinitionExpression: 5, respectLayerVisibilityDisabled: 5, state: 3 };
}
static {
this.shadowRootOptions = a;
}
static {
this.styles = l;
}
// #endregion
// #region Public Methods
/** Permanently destroy the component */
async destroy() {
await this.manager.destroy();
}
}
e("arcgis-legend", h);
export {
h as ArcgisLegend
};