UNPKG

@arcgis/map-components

Version:
38 lines (37 loc) 1.26 kB
import { c as a } from "../../chunks/runtime.js"; import { html as n } from "lit-html"; import { watch as c } from "@arcgis/core/core/reactiveUtils.js"; import { LitElement as u, noShadowRoot as p } from "@arcgis/lumina"; /*! 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 */ class d extends u { static { this.properties = { viewModel: 0 }; } static { this.shadowRootOptions = p; } loaded() { this.manager.onLifecycle(() => [ c(() => this.viewModel.templateOptions.customTextElements, () => this.requestUpdate(), { initial: !0 }) ]); } render() { const e = this.viewModel.templateOptions.customTextElements; return e ? n`<div>${e.map((l) => { const [t, s] = Object.entries(l)[0]; return t === "date" ? null : n`<calcite-label>${t}<calcite-input .value=${s ?? ""} @calciteInputInput=${(o) => { const i = e.find((r) => { const [m] = Object.entries(r)[0]; return m === t; }); i && (i[t] = o.target.value); }}></calcite-input></calcite-label>`; })}</div>` : null; } } a("arcgis-print-custom-text-elements", d); export { d as PrintCustomTextElements };