UNPKG

@arcgis/map-components

Version:
77 lines (76 loc) 4.16 kB
/// <reference path="../../index.d.ts" /> import type LinkChartView from "@arcgis/core/views/LinkChartView.js"; import type { ArcgisReferenceElement, IconName } from "../types.js"; import type { PublicLitElement as LitElement } from "@arcgis/lumina"; import type { State, NonspatialMode } from "./types.js"; import type { T9nMeta } from "@arcgis/lumina/controllers"; /** * The <link-chart-nonspatial-visibility-toggle> component is for use in link charts that allows users to switch whether or not nonspatial data is visible in the view. Spatial entities are those with a value in a defined geometry property in a traditional map context. A Spatial relationship is one where both endpoints are spatial * * Note: Sign in to access the data in this demo, U/P: `viewer01`/`I68VGU^nMurF` * * @since 5.0 */ export abstract class ArcgisLinkChartNonspatialVisibilityToggle extends LitElement { /** * If true, the component will not be destroyed automatically when it is * disconnected from the document. This is useful when you want to move the * component to a different place on the page, or temporarily hide it. If this * is set, make sure to call the [destroy()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-link-chart-nonspatial-visibility-toggle/#destroy) method when you are done to * prevent memory leaks. * * @default false */ accessor autoDestroyDisabled: boolean; accessor icon: IconName | undefined; /** The component's default label. */ accessor label: string | undefined; /** * Replace localized message strings with your own strings. * * _**Note**: Individual message keys may change between releases._ */ accessor messageOverrides: { toggleLabel?: string | undefined; }; /** @internal */ protected messages: Partial<{ toggleLabel: string; }> & T9nMeta<{ toggleLabel: string; }>; /** * By assigning the `id` attribute of the LinkChart component to this property, you can position a child component anywhere in the DOM while still maintaining a connection to the LinkChart. * * See also: * - [Associate components with a Map or Scene component](https://developers.arcgis.com/javascript/latest/programming-patterns/#associate-components-with-a-map-or-scene-component) */ accessor referenceElement: ArcgisReferenceElement | string | undefined; /** * The current state of the component. * * @default "loading" */ get state(): State; /** * The view associated with the component. * > **Note:** The recommended approach is to fully migrate applications to use map and scene components and avoid using MapView and SceneView directly. However, if you are migrating a large application from widgets to components, you might prefer a more gradual transition. To support this use case, the SDK includes this `view` property which connects a component to a MapView or SceneView. Ultimately, once migration is complete, the arcgis-link-chart-nonspatial-visibility-toggle component will be associated with a map or scene component rather than using the `view` property. */ accessor view: LinkChartView | undefined; /** * Specifies the size of the component. * * @default "m" */ accessor visualScale: "l" | "m" | "s"; /** Permanently destroy the component. */ destroy(): Promise<void>; /** * Switches the nonspatial visibility setting * * @param nonspatialVisibilitySetting */ switchNonspatialVisibility(nonspatialVisibilitySetting: NonspatialMode): Promise<void>; /** Emitted when the value of a property is changed. Use this to listen to changes to properties. */ readonly arcgisPropertyChange: import("@arcgis/lumina").TargetedEvent<this, { name: "state"; }>; /** Emitted when the component associated with a map or scene view is ready to be interacted with. */ readonly arcgisReady: import("@arcgis/lumina").TargetedEvent<this, void>; readonly "@eventTypes": { arcgisPropertyChange: ArcgisLinkChartNonspatialVisibilityToggle["arcgisPropertyChange"]["detail"]; arcgisReady: ArcgisLinkChartNonspatialVisibilityToggle["arcgisReady"]["detail"]; }; }