@arcgis/map-components
Version:
ArcGIS Map Components
137 lines (135 loc) • 6.03 kB
TypeScript
/// <reference types="@arcgis/core/interfaces.d.ts" />
/// <reference types="../../index.d.ts" />
import { Use } from '@arcgis/lumina/controllers';
import { default as ScaleRangeSlider } from '@arcgis/core/widgets/ScaleRangeSlider.js';
import { PublicLitElement as LitElement, TargetedEvent } from '@arcgis/lumina';
import { ArcgisReferenceElement } from '../../utils/component-utils';
declare const useScaleRangeSliderWidget: (component: LitElement & Pick<ScaleRangeSlider, "icon" | "label" | "viewModel" | "mode" | "layer" | "disabled" | "maxScale" | "maxScaleLimit" | "minScale" | "minScaleLimit" | "region"> & {
state?: unknown;
viewModel?: __esri.ScaleRangeSliderViewModel | undefined;
closed?: boolean;
icon: import('@arcgis/components-utils').Nil | string;
label: import('@arcgis/components-utils').Nil | string;
referenceElement?: ArcgisReferenceElement | string;
position: __esri.UIPosition;
arcgisReady: import('@arcgis/lumina').EventEmitter;
arcgisPropertyChange: import('@arcgis/lumina').EventEmitter<{
name: string;
}> | undefined;
el: HTMLElement & {
childElem?: HTMLElement & {
ownedBy?: HTMLElement;
};
view?: __esri.LinkChartView | __esri.MapView | __esri.SceneView;
};
autoDestroyDisabled: boolean;
destroy: () => Promise<void>;
}) => ScaleRangeSlider;
/**
* The Scale Range Slider component allows the user to set a minimum and maximum scale based on named scale ranges.
*
* [Read more...](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-scale-range-slider/)
*/
export declare class ArcgisScaleRangeSlider 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/arcgis-scale-range-slider/#destroy) method when you are done to
* prevent memory leaks.
*
* @default false
*/
autoDestroyDisabled: boolean;
/**
* When `true`, sets the widget to a disabled state so the user cannot interact with it.
*
* @default false
*/
disabled: boolean;
/** @default false */
hidePreview: boolean | undefined;
/** @default false */
hideScaleMenusMaxScaleMenu: boolean | undefined;
/** @default false */
hideScaleMenusMinScaleMenu: boolean | undefined;
/**
* Icon which represents the component.
* Typically used when the component is controlled by another component (e.g. by the Expand component).
*
* @see [Calcite Icons](https://developers.arcgis.com/calcite-design-system/icons/)
* @default "actual-size"
*/
icon: string;
/**
* The widget's default label.
*
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-ScaleRangeSlider.html#label)
*/
label: string;
/**
* When provided, the initial [minScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-ScaleRangeSlider.html#minScale) and [maxScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-ScaleRangeSlider.html#maxScale) values will match the layer's.
*
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-ScaleRangeSlider.html#layer)
*/
layer: nullish | __esri.Layer | __esri.Sublayer;
/**
* The maximum scale of the active scale range.
*
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-ScaleRangeSlider.html#maxScale)
*/
maxScale: number;
/**
* The lowest possible maximum scale value on the slider.
*
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-ScaleRangeSlider.html#maxScaleLimit)
*/
maxScaleLimit: number;
/**
* The minimum scale of the active scale range.
*
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-ScaleRangeSlider.html#minScale)
*/
minScale: number;
/**
* The highest possible minimum scale value on the slider.
*
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-ScaleRangeSlider.html#minScaleLimit)
*/
minScaleLimit: number;
/**
* The mode of the widget, indicating which slider thumbs can be adjusted.
*
* @default "range"
*/
mode: "range" | "max-scale-only" | "min-scale-only";
/** @default "bottom-left" */
position: __esri.UIPosition;
/**
* By assigning the `id` attribute of the Map or Scene component to this property, you can position a child component anywhere in the DOM while still maintaining a connection to the Map or Scene.
*
* @see [Associate components with a Map or Scene component](https://developers.arcgis.com/javascript/latest/programming-patterns/#associate-components-with-a-map-or-scene-component)
*/
referenceElement?: ArcgisReferenceElement | string;
/**
* The region that the scale thumbnails will focus on.
*
* @default "US"
*/
region: __esri.SupportedRegion;
/**
* The current state of the component.
*
* @default "disabled"
*/
readonly state: "ready" | "disabled";
/** Permanently destroy the component. */
destroy(): Promise<void>;
/** Emitted when the value of a property is changed. Use this to listen to changes to properties. */
readonly arcgisPropertyChange: TargetedEvent<this, {
name: "state" | "maxScale" | "minScale";
}>;
/** Emitted when the component associated with a map or scene view is is ready to be interacted with. */
readonly arcgisReady: TargetedEvent<this, void>;
}
export {};