UNPKG

@arcgis/map-components

Version:
32 lines (31 loc) 1.03 kB
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */ import { proxyExports as r } from "@arcgis/lumina/controllers"; import { AccessorController as i } from "@arcgis/lumina/controllers/accessor"; import { isEsriInternalEnv as n } from "@arcgis/toolkit/error"; import { V as l } from "./useView.js"; import { watch as a } from "@arcgis/core/core/reactiveUtils.js"; const u = (t, e) => (o) => p(o, t); class s extends i { #o = void 0; constructor(e, o) { super(e, o), new l(this.component); } hostLoad() { let e = !0; this.#o = a( () => this.component.el.view, (o) => { this.instance.view = o, o == null ? e || (this.instance.map = o) : this.instance.map = o.map, e = !1; }, { sync: !0, initial: !0 } ); } hostDestroy() { this.#o?.remove(), super.hostDestroy(); } } process.env.NODE_ENV !== "production" && n() && (s.devOnly$allowedPropNameMismatches = /* @__PURE__ */ new Set(["el", "manager", "open", "swipePosition"])); const p = r(s); export { u as m };