range-selector.d.ts 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716
  1. /*!
  2. * devextreme-angular
  3. * Version: 19.1.16
  4. * Build date: Tue Oct 18 2022
  5. *
  6. * Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
  7. *
  8. * This software may be modified and distributed under the terms
  9. * of the MIT license. See the LICENSE file in the root of the project for details.
  10. *
  11. * https://github.com/DevExpress/devextreme-angular
  12. */
  13. import { TransferState } from '@angular/platform-browser';
  14. import { ElementRef, NgZone, OnDestroy, EventEmitter, OnChanges, DoCheck, SimpleChanges } from '@angular/core';
  15. import DevExpress from 'devextreme/bundles/dx.all';
  16. import DxRangeSelector from 'devextreme/viz/range_selector';
  17. import { ControlValueAccessor } from '@angular/forms';
  18. import { DxComponent } from '../core/component';
  19. import { DxTemplateHost } from '../core/template-host';
  20. import { NestedOptionHost } from '../core/nested-option';
  21. import { WatcherHelper } from '../core/watcher-helper';
  22. import { IterableDifferHelper } from '../core/iterable-differ-helper';
  23. /**
  24. * The RangeSelector is a widget that allows a user to select a range of values on a scale.
  25. */
  26. export declare class DxRangeSelectorComponent extends DxComponent implements OnDestroy, ControlValueAccessor, OnChanges, DoCheck {
  27. private _watcherHelper;
  28. private _idh;
  29. instance: DxRangeSelector;
  30. /**
  31. * Specifies the options for the range selector's background.
  32. */
  33. background: {
  34. color?: string;
  35. image?: {
  36. location?: string;
  37. url?: string;
  38. };
  39. visible?: boolean;
  40. };
  41. /**
  42. * Specifies the RangeSelector's behavior options.
  43. */
  44. behavior: {
  45. allowSlidersSwap?: boolean;
  46. animationEnabled?: boolean;
  47. callValueChanged?: string;
  48. manualRangeSelectionEnabled?: boolean;
  49. moveSelectedRangeByClick?: boolean;
  50. snapToTicks?: boolean;
  51. };
  52. /**
  53. * Specifies the options required to display a chart as the range selector's background.
  54. */
  55. chart: {
  56. barGroupPadding?: number;
  57. barGroupWidth?: number;
  58. barWidth?: number;
  59. bottomIndent?: number;
  60. commonSeriesSettings?: any;
  61. dataPrepareSettings?: {
  62. checkTypeForAllData?: boolean;
  63. convertToAxisDataType?: boolean;
  64. sortingMethod?: boolean | Function;
  65. };
  66. equalBarWidth?: boolean;
  67. maxBubbleSize?: number;
  68. minBubbleSize?: number;
  69. negativesAsZeroes?: boolean;
  70. palette?: string | Array<string>;
  71. paletteExtensionMode?: string;
  72. series?: any | Array<any>;
  73. seriesTemplate?: {
  74. customizeSeries?: Function;
  75. nameField?: string;
  76. };
  77. topIndent?: number;
  78. useAggregation?: boolean;
  79. valueAxis?: {
  80. inverted?: boolean;
  81. logarithmBase?: number;
  82. max?: number;
  83. min?: number;
  84. type?: string;
  85. valueType?: string;
  86. };
  87. };
  88. /**
  89. * Specifies the color of the parent page element.
  90. */
  91. containerBackgroundColor: string;
  92. /**
  93. * Specifies a data source for the scale values and for the chart at the background.
  94. */
  95. dataSource: DevExpress.data.DataSource | DevExpress.data.DataSourceOptions | string | Array<any>;
  96. /**
  97. * Specifies the data source field that provides data for the scale.
  98. */
  99. dataSourceField: string;
  100. /**
  101. * Specifies whether the widget responds to the user interaction.
  102. */
  103. disabled: boolean;
  104. /**
  105. * Specifies the attributes to be attached to the widget's root element.
  106. */
  107. elementAttr: any;
  108. /**
  109. * Configures the exporting and printing features.
  110. */
  111. export: {
  112. backgroundColor?: string;
  113. enabled?: boolean;
  114. fileName?: string;
  115. formats?: Array<string>;
  116. margin?: number;
  117. printingEnabled?: boolean;
  118. proxyUrl?: string;
  119. };
  120. /**
  121. * Range selector's indent options.
  122. */
  123. indent: {
  124. left?: number;
  125. right?: number;
  126. };
  127. /**
  128. * Configures the loading indicator.
  129. */
  130. loadingIndicator: {
  131. backgroundColor?: string;
  132. enabled?: boolean;
  133. font?: DevExpress.viz.Font;
  134. show?: boolean;
  135. text?: string;
  136. };
  137. /**
  138. * Generates space around the widget.
  139. */
  140. margin: {
  141. bottom?: number;
  142. left?: number;
  143. right?: number;
  144. top?: number;
  145. };
  146. /**
  147. * Notifies the widget that it is embedded into an HTML page that uses a tag modifying the path.
  148. */
  149. pathModified: boolean;
  150. /**
  151. * Specifies whether to redraw the widget when the size of the parent browser window changes or a mobile device rotates.
  152. */
  153. redrawOnResize: boolean;
  154. /**
  155. * Switches the widget to a right-to-left representation.
  156. */
  157. rtlEnabled: boolean;
  158. /**
  159. * Specifies options of the range selector's scale.
  160. */
  161. scale: {
  162. aggregationGroupWidth?: number;
  163. aggregationInterval?: number | string | {
  164. days?: number;
  165. hours?: number;
  166. milliseconds?: number;
  167. minutes?: number;
  168. months?: number;
  169. quarters?: number;
  170. seconds?: number;
  171. weeks?: number;
  172. years?: number;
  173. };
  174. allowDecimals?: boolean;
  175. breaks?: Array<DevExpress.viz.ScaleBreak>;
  176. breakStyle?: {
  177. color?: string;
  178. line?: string;
  179. width?: number;
  180. };
  181. categories?: Array<number | string | Date>;
  182. endOnTick?: boolean;
  183. endValue?: Date | number | string;
  184. holidays?: Array<Date | string | number>;
  185. label?: {
  186. customizeText?: Function;
  187. font?: DevExpress.viz.Font;
  188. format?: DevExpress.ui.format | string;
  189. overlappingBehavior?: string;
  190. topIndent?: number;
  191. visible?: boolean;
  192. };
  193. logarithmBase?: number;
  194. marker?: {
  195. label?: {
  196. customizeText?: Function;
  197. format?: DevExpress.ui.format | string;
  198. };
  199. separatorHeight?: number;
  200. textLeftIndent?: number;
  201. textTopIndent?: number;
  202. topIndent?: number;
  203. visible?: boolean;
  204. };
  205. maxRange?: number | string | {
  206. days?: number;
  207. hours?: number;
  208. milliseconds?: number;
  209. minutes?: number;
  210. months?: number;
  211. quarters?: number;
  212. seconds?: number;
  213. weeks?: number;
  214. years?: number;
  215. };
  216. minorTick?: {
  217. color?: string;
  218. opacity?: number;
  219. visible?: boolean;
  220. width?: number;
  221. };
  222. minorTickCount?: number;
  223. minorTickInterval?: number | string | {
  224. days?: number;
  225. hours?: number;
  226. milliseconds?: number;
  227. minutes?: number;
  228. months?: number;
  229. quarters?: number;
  230. seconds?: number;
  231. weeks?: number;
  232. years?: number;
  233. };
  234. minRange?: number | string | {
  235. days?: number;
  236. hours?: number;
  237. milliseconds?: number;
  238. minutes?: number;
  239. months?: number;
  240. quarters?: number;
  241. seconds?: number;
  242. weeks?: number;
  243. years?: number;
  244. };
  245. placeholderHeight?: number;
  246. showCustomBoundaryTicks?: boolean;
  247. singleWorkdays?: Array<Date | string | number>;
  248. startValue?: Date | number | string;
  249. tick?: {
  250. color?: string;
  251. opacity?: number;
  252. width?: number;
  253. };
  254. tickInterval?: number | string | {
  255. days?: number;
  256. hours?: number;
  257. milliseconds?: number;
  258. minutes?: number;
  259. months?: number;
  260. quarters?: number;
  261. seconds?: number;
  262. weeks?: number;
  263. years?: number;
  264. };
  265. type?: string;
  266. valueType?: string;
  267. workdaysOnly?: boolean;
  268. workWeek?: Array<number>;
  269. };
  270. /**
  271. * Specifies the color of the selected range.
  272. */
  273. selectedRangeColor: string;
  274. /**
  275. * Specifies how the selected range should behave when data is updated. Applies only when the RangeSelector is bound to a data source.
  276. */
  277. selectedRangeUpdateMode: string;
  278. /**
  279. * Specifies range selector shutter options.
  280. */
  281. shutter: {
  282. color?: string;
  283. opacity?: number;
  284. };
  285. /**
  286. * Specifies the widget's size in pixels.
  287. */
  288. size: {
  289. height?: number;
  290. width?: number;
  291. };
  292. /**
  293. * Specifies the appearance of the range selector's slider handles.
  294. */
  295. sliderHandle: {
  296. color?: string;
  297. opacity?: number;
  298. width?: number;
  299. };
  300. /**
  301. * Defines the options of the range selector slider markers.
  302. */
  303. sliderMarker: {
  304. color?: string;
  305. customizeText?: Function;
  306. font?: DevExpress.viz.Font;
  307. format?: DevExpress.ui.format | string;
  308. invalidRangeColor?: string;
  309. paddingLeftRight?: number;
  310. paddingTopBottom?: number;
  311. placeholderHeight?: number;
  312. visible?: boolean;
  313. };
  314. /**
  315. * Sets the name of the theme the widget uses.
  316. */
  317. theme: string;
  318. /**
  319. * Configures the widget's title.
  320. */
  321. title: string | {
  322. font?: DevExpress.viz.Font;
  323. horizontalAlignment?: string;
  324. margin?: number | {
  325. bottom?: number;
  326. left?: number;
  327. right?: number;
  328. top?: number;
  329. };
  330. placeholderSize?: number;
  331. subtitle?: string | {
  332. font?: DevExpress.viz.Font;
  333. offset?: number;
  334. text?: string;
  335. textOverflow?: string;
  336. wordWrap?: string;
  337. };
  338. text?: string;
  339. textOverflow?: string;
  340. verticalAlignment?: string;
  341. wordWrap?: string;
  342. };
  343. /**
  344. * The selected range (initial or current). Equals the entire scale when not set.
  345. */
  346. value: DevExpress.viz.VizRange | Array<number | string | Date>;
  347. /**
  348. * A function that is executed before the widget is disposed of.
  349. */
  350. onDisposing: EventEmitter<any>;
  351. /**
  352. * A function that is executed when the widget's rendering has finished.
  353. */
  354. onDrawn: EventEmitter<any>;
  355. /**
  356. * A function that is executed after the widget is exported.
  357. */
  358. onExported: EventEmitter<any>;
  359. /**
  360. * A function that is executed before the widget is exported.
  361. */
  362. onExporting: EventEmitter<any>;
  363. /**
  364. * A function that is executed before a file with exported widget is saved to the user's local storage.
  365. */
  366. onFileSaving: EventEmitter<any>;
  367. /**
  368. * A function that is executed when an error or warning occurs.
  369. */
  370. onIncidentOccurred: EventEmitter<any>;
  371. /**
  372. * A function used in JavaScript frameworks to save the widget instance.
  373. */
  374. onInitialized: EventEmitter<any>;
  375. /**
  376. * A function that is executed after a widget option is changed.
  377. */
  378. onOptionChanged: EventEmitter<any>;
  379. /**
  380. * A function that is executed after the widget's value is changed.
  381. */
  382. onValueChanged: EventEmitter<any>;
  383. /**
  384. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  385. */
  386. backgroundChange: EventEmitter<{
  387. color?: string;
  388. image?: {
  389. location?: string;
  390. url?: string;
  391. };
  392. visible?: boolean;
  393. }>;
  394. /**
  395. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  396. */
  397. behaviorChange: EventEmitter<{
  398. allowSlidersSwap?: boolean;
  399. animationEnabled?: boolean;
  400. callValueChanged?: string;
  401. manualRangeSelectionEnabled?: boolean;
  402. moveSelectedRangeByClick?: boolean;
  403. snapToTicks?: boolean;
  404. }>;
  405. /**
  406. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  407. */
  408. chartChange: EventEmitter<{
  409. barGroupPadding?: number;
  410. barGroupWidth?: number;
  411. barWidth?: number;
  412. bottomIndent?: number;
  413. commonSeriesSettings?: any;
  414. dataPrepareSettings?: {
  415. checkTypeForAllData?: boolean;
  416. convertToAxisDataType?: boolean;
  417. sortingMethod?: boolean | Function;
  418. };
  419. equalBarWidth?: boolean;
  420. maxBubbleSize?: number;
  421. minBubbleSize?: number;
  422. negativesAsZeroes?: boolean;
  423. palette?: string | Array<string>;
  424. paletteExtensionMode?: string;
  425. series?: any | Array<any>;
  426. seriesTemplate?: {
  427. customizeSeries?: Function;
  428. nameField?: string;
  429. };
  430. topIndent?: number;
  431. useAggregation?: boolean;
  432. valueAxis?: {
  433. inverted?: boolean;
  434. logarithmBase?: number;
  435. max?: number;
  436. min?: number;
  437. type?: string;
  438. valueType?: string;
  439. };
  440. }>;
  441. /**
  442. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  443. */
  444. containerBackgroundColorChange: EventEmitter<string>;
  445. /**
  446. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  447. */
  448. dataSourceChange: EventEmitter<DevExpress.data.DataSource | DevExpress.data.DataSourceOptions | string | Array<any>>;
  449. /**
  450. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  451. */
  452. dataSourceFieldChange: EventEmitter<string>;
  453. /**
  454. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  455. */
  456. disabledChange: EventEmitter<boolean>;
  457. /**
  458. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  459. */
  460. elementAttrChange: EventEmitter<any>;
  461. /**
  462. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  463. */
  464. exportChange: EventEmitter<{
  465. backgroundColor?: string;
  466. enabled?: boolean;
  467. fileName?: string;
  468. formats?: Array<string>;
  469. margin?: number;
  470. printingEnabled?: boolean;
  471. proxyUrl?: string;
  472. }>;
  473. /**
  474. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  475. */
  476. indentChange: EventEmitter<{
  477. left?: number;
  478. right?: number;
  479. }>;
  480. /**
  481. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  482. */
  483. loadingIndicatorChange: EventEmitter<{
  484. backgroundColor?: string;
  485. enabled?: boolean;
  486. font?: DevExpress.viz.Font;
  487. show?: boolean;
  488. text?: string;
  489. }>;
  490. /**
  491. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  492. */
  493. marginChange: EventEmitter<{
  494. bottom?: number;
  495. left?: number;
  496. right?: number;
  497. top?: number;
  498. }>;
  499. /**
  500. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  501. */
  502. pathModifiedChange: EventEmitter<boolean>;
  503. /**
  504. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  505. */
  506. redrawOnResizeChange: EventEmitter<boolean>;
  507. /**
  508. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  509. */
  510. rtlEnabledChange: EventEmitter<boolean>;
  511. /**
  512. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  513. */
  514. scaleChange: EventEmitter<{
  515. aggregationGroupWidth?: number;
  516. aggregationInterval?: number | string | {
  517. days?: number;
  518. hours?: number;
  519. milliseconds?: number;
  520. minutes?: number;
  521. months?: number;
  522. quarters?: number;
  523. seconds?: number;
  524. weeks?: number;
  525. years?: number;
  526. };
  527. allowDecimals?: boolean;
  528. breaks?: Array<DevExpress.viz.ScaleBreak>;
  529. breakStyle?: {
  530. color?: string;
  531. line?: string;
  532. width?: number;
  533. };
  534. categories?: Array<number | string | Date>;
  535. endOnTick?: boolean;
  536. endValue?: Date | number | string;
  537. holidays?: Array<Date | string | number>;
  538. label?: {
  539. customizeText?: Function;
  540. font?: DevExpress.viz.Font;
  541. format?: DevExpress.ui.format | string;
  542. overlappingBehavior?: string;
  543. topIndent?: number;
  544. visible?: boolean;
  545. };
  546. logarithmBase?: number;
  547. marker?: {
  548. label?: {
  549. customizeText?: Function;
  550. format?: DevExpress.ui.format | string;
  551. };
  552. separatorHeight?: number;
  553. textLeftIndent?: number;
  554. textTopIndent?: number;
  555. topIndent?: number;
  556. visible?: boolean;
  557. };
  558. maxRange?: number | string | {
  559. days?: number;
  560. hours?: number;
  561. milliseconds?: number;
  562. minutes?: number;
  563. months?: number;
  564. quarters?: number;
  565. seconds?: number;
  566. weeks?: number;
  567. years?: number;
  568. };
  569. minorTick?: {
  570. color?: string;
  571. opacity?: number;
  572. visible?: boolean;
  573. width?: number;
  574. };
  575. minorTickCount?: number;
  576. minorTickInterval?: number | string | {
  577. days?: number;
  578. hours?: number;
  579. milliseconds?: number;
  580. minutes?: number;
  581. months?: number;
  582. quarters?: number;
  583. seconds?: number;
  584. weeks?: number;
  585. years?: number;
  586. };
  587. minRange?: number | string | {
  588. days?: number;
  589. hours?: number;
  590. milliseconds?: number;
  591. minutes?: number;
  592. months?: number;
  593. quarters?: number;
  594. seconds?: number;
  595. weeks?: number;
  596. years?: number;
  597. };
  598. placeholderHeight?: number;
  599. showCustomBoundaryTicks?: boolean;
  600. singleWorkdays?: Array<Date | string | number>;
  601. startValue?: Date | number | string;
  602. tick?: {
  603. color?: string;
  604. opacity?: number;
  605. width?: number;
  606. };
  607. tickInterval?: number | string | {
  608. days?: number;
  609. hours?: number;
  610. milliseconds?: number;
  611. minutes?: number;
  612. months?: number;
  613. quarters?: number;
  614. seconds?: number;
  615. weeks?: number;
  616. years?: number;
  617. };
  618. type?: string;
  619. valueType?: string;
  620. workdaysOnly?: boolean;
  621. workWeek?: Array<number>;
  622. }>;
  623. /**
  624. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  625. */
  626. selectedRangeColorChange: EventEmitter<string>;
  627. /**
  628. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  629. */
  630. selectedRangeUpdateModeChange: EventEmitter<string>;
  631. /**
  632. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  633. */
  634. shutterChange: EventEmitter<{
  635. color?: string;
  636. opacity?: number;
  637. }>;
  638. /**
  639. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  640. */
  641. sizeChange: EventEmitter<{
  642. height?: number;
  643. width?: number;
  644. }>;
  645. /**
  646. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  647. */
  648. sliderHandleChange: EventEmitter<{
  649. color?: string;
  650. opacity?: number;
  651. width?: number;
  652. }>;
  653. /**
  654. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  655. */
  656. sliderMarkerChange: EventEmitter<{
  657. color?: string;
  658. customizeText?: Function;
  659. font?: DevExpress.viz.Font;
  660. format?: DevExpress.ui.format | string;
  661. invalidRangeColor?: string;
  662. paddingLeftRight?: number;
  663. paddingTopBottom?: number;
  664. placeholderHeight?: number;
  665. visible?: boolean;
  666. }>;
  667. /**
  668. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  669. */
  670. themeChange: EventEmitter<string>;
  671. /**
  672. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  673. */
  674. titleChange: EventEmitter<string | {
  675. font?: DevExpress.viz.Font;
  676. horizontalAlignment?: string;
  677. margin?: number | {
  678. bottom?: number;
  679. left?: number;
  680. right?: number;
  681. top?: number;
  682. };
  683. placeholderSize?: number;
  684. subtitle?: string | {
  685. font?: DevExpress.viz.Font;
  686. offset?: number;
  687. text?: string;
  688. textOverflow?: string;
  689. wordWrap?: string;
  690. };
  691. text?: string;
  692. textOverflow?: string;
  693. verticalAlignment?: string;
  694. wordWrap?: string;
  695. }>;
  696. /**
  697. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  698. */
  699. valueChange: EventEmitter<DevExpress.viz.VizRange | Array<number | string | Date>>;
  700. onBlur: EventEmitter<any>;
  701. change(_: any): void;
  702. touched: (_: any) => void;
  703. constructor(elementRef: ElementRef, ngZone: NgZone, templateHost: DxTemplateHost, _watcherHelper: WatcherHelper, _idh: IterableDifferHelper, optionHost: NestedOptionHost, transferState: TransferState, platformId: any);
  704. protected _createInstance(element: any, options: any): DxRangeSelector;
  705. writeValue(value: any): void;
  706. registerOnChange(fn: (_: any) => void): void;
  707. registerOnTouched(fn: () => void): void;
  708. _createWidget(element: any): void;
  709. ngOnDestroy(): void;
  710. ngOnChanges(changes: SimpleChanges): void;
  711. setupChanges(prop: string, changes: SimpleChanges): void;
  712. ngDoCheck(): void;
  713. _setOption(name: string, value: any): void;
  714. }
  715. export declare class DxRangeSelectorModule {
  716. }