@arcgis/map-components
Version:
ArcGIS Map Components
152 lines (150 loc) • 6.02 kB
TypeScript
/// <reference types="@arcgis/core/interfaces.d.ts" />
/// <reference types="../../index.d.ts" />
import { Use } from '@arcgis/lumina/controllers';
import { default as ValuePicker } from '@arcgis/core/widgets/ValuePicker.js';
import { PublicLitElement as LitElement, TargetedEvent } from '@arcgis/lumina';
import { ArcgisReferenceElement } from '../../utils/component-utils';
declare const useValuePickerWidget: (component: LitElement & Pick<ValuePicker, "icon" | "label" | "component" | "values" | "caption" | "layout" | "canNext" | "canPlay" | "canPrevious" | "loop" | "playRate"> & {
state?: unknown;
viewModel?: unknown;
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>;
}) => ValuePicker;
/**
* [Read more...](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-value-picker/)
*
* @internal
*/
export declare class ArcgisValuePicker 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-value-picker/#destroy) method when you are done to
* prevent memory leaks.
*
* @default false
*/
autoDestroyDisabled: boolean;
/**
* Returns `true` if the ValuePicker can be advanced to the next position.
*
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-ValuePicker.html#canNext)
*
* @default false
*/
canNext: boolean;
/**
* Returns `true` if the ValuePicker can be played.
*
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-ValuePicker.html#canPlay)
*
* @default false
*/
canPlay: boolean;
/**
* Returns `true` if the ValuePicker can moved to the previous item.
*
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-ValuePicker.html#canPrevious)
*
* @default false
*/
canPrevious: boolean;
/**
* An optional caption that appears on the ValuePicker widget to give context for the user.
*
* @default null
*/
caption: string | nullish;
/**
* An optional component for presenting and managing data.
*
* @default null
*/
component: nullish | __esri.ValuePickerCollection | __esri.ValuePickerCombobox | __esri.ValuePickerLabel | __esri.ValuePickerSlider;
/** @default false */
hideNextButton: boolean | undefined;
/** @default false */
hidePlayButton: boolean | undefined;
/** @default false */
hidePreviousButton: 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 "list-rectangle"
*/
icon: string;
/**
* The widget's label.
*
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Widget.html#label)
*/
label: string | nullish;
/**
* Indicates if the widget should be orientated horizontally (default) or vertically.
*
* @default "horizontal"
*/
layout: "vertical" | "horizontal";
/**
* If true, playback will restart when it reaches the end.
*
* @default false
*/
loop: boolean;
/**
* The pause, in milliseconds between playback advancement.
*
* @default 1000
*/
playRate: number;
/** @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 current value of the ValuePicker.
*
* @default null
*/
values: any[] | nullish | number[] | string[];
/** Permanently destroy the component. */
destroy(): Promise<void>;
next(): Promise<void>;
pause(): Promise<void>;
play(): Promise<void>;
previous(): Promise<void>;
readonly arcgisAnimate: TargetedEvent<this, __esri.ValuePickerAnimateEvent>;
readonly arcgisNext: TargetedEvent<this, __esri.ValuePickerNextEvent>;
readonly arcgisPause: TargetedEvent<this, __esri.ValuePickerPauseEvent>;
readonly arcgisPlay: TargetedEvent<this, __esri.ValuePickerPlayEvent>;
readonly arcgisPrevious: TargetedEvent<this, __esri.ValuePickerPreviousEvent>;
/** Emitted when the value of a property is changed. Use this to listen to changes to properties. */
readonly arcgisPropertyChange: TargetedEvent<this, {
name: "values";
}>;
/** Emitted when the component associated with a map or scene view is is ready to be interacted with. */
readonly arcgisReady: TargetedEvent<this, void>;
}
export {};