@arcgis/map-components
Version:
ArcGIS Map Components
147 lines (145 loc) • 6.22 kB
TypeScript
/// <reference types="@arcgis/core/interfaces.d.ts" />
/// <reference types="../../index.d.ts" />
import { Use } from '@arcgis/lumina/controllers';
import { default as Daylight } from '@arcgis/core/widgets/Daylight.js';
import { PublicLitElement as LitElement, TargetedEvent } from '@arcgis/lumina';
import { ArcgisReferenceElement } from '../../utils/component-utils';
declare const useDaylightWidget: (component: LitElement & Pick<Daylight, "icon" | "label" | "viewModel" | "headingLevel" | "dateOrSeason" | "playSpeedMultiplier" | "timeSliderSteps"> & {
state?: unknown;
viewModel?: __esri.DaylightViewModel | 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>;
}) => Daylight;
/**
* The Daylight component can be used to manipulate the lighting conditions of a [Scene](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-scene/).
*
* **Known limitations**
*
* Daylight is only supported in a 3D [Scene](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-scene/) component.
*
* **See also**
*
* - [Environment](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-scene/#environment)
* - [Sample - Daylight component](https://developers.arcgis.com/javascript/latest/sample-code/daylight/)
*
* [Read more...](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-daylight/)
*/
export declare class ArcgisDaylight 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-daylight/#destroy) method when you are done to
* prevent memory leaks.
*
* @default false
*/
autoDestroyDisabled: boolean;
/**
* A season can be set instead of a date.
*
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Daylight-DaylightViewModel.html#currentSeason)
*/
currentSeason: "spring" | "summer" | "fall" | "winter";
/**
* Controls whether the component displays a date or a season picker.
*
* [Read more](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Daylight.html#dateOrSeason)
*
* @default "date"
*/
dateOrSeason: "date" | "season";
/**
* Starts or pauses the daytime animation cycling through the minutes of the day.
*
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Daylight-DaylightViewModel.html#dayPlaying)
*
* @default false
*/
dayPlaying: boolean;
/**
* Indicates the heading level to use for the component title.
*
* @default 3
*/
headingLevel: number;
/** @default false */
hideDatePicker: boolean | undefined;
/** @default false */
hideHeader: boolean | undefined;
/** @default false */
hidePlayButtons: boolean | undefined;
/** @default false */
hideShadowsToggle: boolean | undefined;
/** @default false */
hideSunLightingToggle: boolean | undefined;
/** @default false */
hideTimezone: boolean | undefined;
/**
* Icon which represents the component. Typically used when the component is controlled by another component (e.g. by the Expand component).
*
* See also: [Calcite Icons](https://developers.arcgis.com/calcite-design-system/icons/)
*
* @default "brightness"
*/
icon: string;
/** The component's default label. */
label: string;
/**
* Controls the speed of the daytime and date animation.
*
* @default 1.0
*/
playSpeedMultiplier: 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;
/**
* Sets steps, or intervals, on the time slider to restrict the times of the day that can be selected when dragging the thumb.
*
* [Read more](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Daylight.html#timeSliderSteps)
*
* @default 5
*/
timeSliderSteps: number | number[];
/**
* Starts or pauses the date animation cycling through the months of the year.
*
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Daylight-DaylightViewModel.html#yearPlaying)
*
* @default false
*/
yearPlaying: boolean;
/** Permanently destroy the component. */
destroy(): Promise<void>;
/** Emitted when the component associated with a map or scene view is is ready to be interacted with. */
readonly arcgisReady: TargetedEvent<this, void>;
/**
* Fires when the user changes the date or time in the component by interacting with the slider, the date picker, the
* season selector or the play buttons.
*
* @since 4.33
*/
readonly arcgisUserDateTimeChange: TargetedEvent<this, void>;
}
export {};