@arcgis/map-components
Version:
ArcGIS Map Components
29 lines (28 loc) • 1.11 kB
JavaScript
import { c as a } from "../../chunks/runtime.js";
import { html as r } from "lit-html";
import { LitElement as l, noShadowRoot as n } 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 c extends l {
static {
this.properties = { viewModel: 0, messages: 0, fileName: 1, selectExportsTab: 0 };
}
static {
this.shadowRootOptions = n;
}
loaded() {
this.manager.onLifecycle(() => []);
}
async _handlePrintMap() {
this.viewModel.export(this.fileName || this.messages.untitled), this.selectExportsTab();
}
render() {
const { messages: t } = this, { layout: e, layoutItem: i, format: s } = this.viewModel.templateOptions, o = this.viewModel.state !== "ready" || !(e || i);
return r`<div><calcite-button .ariaLabel=${t.exportDescription} .disabled=${o || !(e || i?.id) && !s} @click=${this._handlePrintMap} scale=l width=full>${t.export}</calcite-button></div>`;
}
}
a("arcgis-print-export-button", c);
export {
c as PrintExportButton
};