@dhtmlx/chart 9.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +216 -0
- package/codebase/chart.d.ts +3 -0
- package/codebase/chart.min.css +1 -0
- package/codebase/chart.min.js +21 -0
- package/codebase/chart.min.js.map +1 -0
- package/codebase/fonts/roboto-bold-webfont.woff +0 -0
- package/codebase/fonts/roboto-bold-webfont.woff2 +0 -0
- package/codebase/fonts/roboto-medium-webfont.woff +0 -0
- package/codebase/fonts/roboto-medium-webfont.woff2 +0 -0
- package/codebase/fonts/roboto-regular-webfont.woff +0 -0
- package/codebase/fonts/roboto-regular-webfont.woff2 +0 -0
- package/codebase/types/ts-calendar/index.d.ts +2 -0
- package/codebase/types/ts-calendar/sources/Calendar.d.ts +37 -0
- package/codebase/types/ts-calendar/sources/helper.d.ts +1 -0
- package/codebase/types/ts-calendar/sources/types.d.ts +64 -0
- package/codebase/types/ts-chart/sources/AxisCreator.d.ts +11 -0
- package/codebase/types/ts-chart/sources/Chart.d.ts +28 -0
- package/codebase/types/ts-chart/sources/ComposeLayer.d.ts +10 -0
- package/codebase/types/ts-chart/sources/Export.d.ts +12 -0
- package/codebase/types/ts-chart/sources/Filters.d.ts +2 -0
- package/codebase/types/ts-chart/sources/Legend.d.ts +15 -0
- package/codebase/types/ts-chart/sources/Tooltip.d.ts +13 -0
- package/codebase/types/ts-chart/sources/entry.d.ts +8 -0
- package/codebase/types/ts-chart/sources/helpers/circle.d.ts +9 -0
- package/codebase/types/ts-chart/sources/helpers/common.d.ts +45 -0
- package/codebase/types/ts-chart/sources/helpers/spline.d.ts +2 -0
- package/codebase/types/ts-chart/sources/scales/RadialScale.d.ts +8 -0
- package/codebase/types/ts-chart/sources/scales/Scale.d.ts +22 -0
- package/codebase/types/ts-chart/sources/scales/SvgScales.d.ts +12 -0
- package/codebase/types/ts-chart/sources/scales/TextScale.d.ts +11 -0
- package/codebase/types/ts-chart/sources/scales/index.d.ts +9 -0
- package/codebase/types/ts-chart/sources/series/Area.d.ts +9 -0
- package/codebase/types/ts-chart/sources/series/Bar.d.ts +22 -0
- package/codebase/types/ts-chart/sources/series/BarX.d.ts +18 -0
- package/codebase/types/ts-chart/sources/series/BaseSeria.d.ts +31 -0
- package/codebase/types/ts-chart/sources/series/CalendarHeatMap.d.ts +20 -0
- package/codebase/types/ts-chart/sources/series/Donut.d.ts +5 -0
- package/codebase/types/ts-chart/sources/series/Line.d.ts +7 -0
- package/codebase/types/ts-chart/sources/series/NoScaleSeria.d.ts +22 -0
- package/codebase/types/ts-chart/sources/series/Pie.d.ts +5 -0
- package/codebase/types/ts-chart/sources/series/Pie3D.d.ts +5 -0
- package/codebase/types/ts-chart/sources/series/Radar.d.ts +16 -0
- package/codebase/types/ts-chart/sources/series/ScaleSeria.d.ts +15 -0
- package/codebase/types/ts-chart/sources/series/Scatter.d.ts +6 -0
- package/codebase/types/ts-chart/sources/series/Spline.d.ts +5 -0
- package/codebase/types/ts-chart/sources/series/SplineArea.d.ts +5 -0
- package/codebase/types/ts-chart/sources/series/Stacker.d.ts +9 -0
- package/codebase/types/ts-chart/sources/series/TreeMap.d.ts +30 -0
- package/codebase/types/ts-chart/sources/series/index.d.ts +29 -0
- package/codebase/types/ts-chart/sources/shapes/legend.d.ts +2 -0
- package/codebase/types/ts-chart/sources/shapes/line.d.ts +7 -0
- package/codebase/types/ts-chart/sources/types.d.ts +301 -0
- package/codebase/types/ts-combobox/index.d.ts +3 -0
- package/codebase/types/ts-combobox/sources/Combobox.d.ts +53 -0
- package/codebase/types/ts-combobox/sources/ProCombobox.d.ts +6 -0
- package/codebase/types/ts-combobox/sources/helper.d.ts +4 -0
- package/codebase/types/ts-combobox/sources/keyListener.d.ts +14 -0
- package/codebase/types/ts-combobox/sources/locales/en.d.ts +8 -0
- package/codebase/types/ts-combobox/sources/types.d.ts +95 -0
- package/codebase/types/ts-common/FocusManager.d.ts +15 -0
- package/codebase/types/ts-common/KeyManager.d.ts +19 -0
- package/codebase/types/ts-common/ScrollView.d.ts +40 -0
- package/codebase/types/ts-common/core.d.ts +40 -0
- package/codebase/types/ts-common/date.d.ts +34 -0
- package/codebase/types/ts-common/dom.d.ts +24 -0
- package/codebase/types/ts-common/events.d.ts +35 -0
- package/codebase/types/ts-common/html.d.ts +74 -0
- package/codebase/types/ts-common/input.d.ts +24 -0
- package/codebase/types/ts-common/keycodes.d.ts +9 -0
- package/codebase/types/ts-common/polyfills/array.d.ts +0 -0
- package/codebase/types/ts-common/polyfills/element.d.ts +0 -0
- package/codebase/types/ts-common/polyfills/fetch.d.ts +0 -0
- package/codebase/types/ts-common/polyfills/math.d.ts +0 -0
- package/codebase/types/ts-common/polyfills/object.d.ts +0 -0
- package/codebase/types/ts-common/polyfills/string.d.ts +0 -0
- package/codebase/types/ts-common/types.d.ts +76 -0
- package/codebase/types/ts-common/view.d.ts +27 -0
- package/codebase/types/ts-data/index.d.ts +13 -0
- package/codebase/types/ts-data/sources/CollectionStore.d.ts +7 -0
- package/codebase/types/ts-data/sources/DragManager.d.ts +19 -0
- package/codebase/types/ts-data/sources/ajax.d.ts +2 -0
- package/codebase/types/ts-data/sources/datacollection/group.d.ts +43 -0
- package/codebase/types/ts-data/sources/datacollection/loader.d.ts +16 -0
- package/codebase/types/ts-data/sources/datacollection/sort.d.ts +7 -0
- package/codebase/types/ts-data/sources/datacollection.d.ts +101 -0
- package/codebase/types/ts-data/sources/dataproxy.d.ts +10 -0
- package/codebase/types/ts-data/sources/drivers/CsvDriver.d.ts +16 -0
- package/codebase/types/ts-data/sources/drivers/JsonDriver.d.ts +10 -0
- package/codebase/types/ts-data/sources/drivers/XMLDriver.d.ts +18 -0
- package/codebase/types/ts-data/sources/drivers/drivers.d.ts +12 -0
- package/codebase/types/ts-data/sources/helpers.d.ts +17 -0
- package/codebase/types/ts-data/sources/lazydataproxy.d.ts +9 -0
- package/codebase/types/ts-data/sources/methods.d.ts +11 -0
- package/codebase/types/ts-data/sources/selection.d.ts +17 -0
- package/codebase/types/ts-data/sources/serializers/xml.d.ts +2 -0
- package/codebase/types/ts-data/sources/treecollection.d.ts +72 -0
- package/codebase/types/ts-data/sources/types.d.ts +340 -0
- package/codebase/types/ts-grid/index.d.ts +7 -0
- package/codebase/types/ts-grid/sources/ExtendedGrid.d.ts +47 -0
- package/codebase/types/ts-grid/sources/Grid.d.ts +114 -0
- package/codebase/types/ts-grid/sources/ProGrid.d.ts +67 -0
- package/codebase/types/ts-grid/sources/helpers/cells.d.ts +9 -0
- package/codebase/types/ts-grid/sources/helpers/data.d.ts +36 -0
- package/codebase/types/ts-grid/sources/helpers/default.d.ts +6 -0
- package/codebase/types/ts-grid/sources/helpers/dom.d.ts +3 -0
- package/codebase/types/ts-grid/sources/helpers/keys.d.ts +27 -0
- package/codebase/types/ts-grid/sources/helpers/main.d.ts +23 -0
- package/codebase/types/ts-grid/sources/locales/en.d.ts +7 -0
- package/codebase/types/ts-grid/sources/modules/BlockSelection.d.ts +122 -0
- package/codebase/types/ts-grid/sources/modules/Clipboard.d.ts +55 -0
- package/codebase/types/ts-grid/sources/modules/DropManager.d.ts +21 -0
- package/codebase/types/ts-grid/sources/modules/Exporter.d.ts +80 -0
- package/codebase/types/ts-grid/sources/modules/History.d.ts +72 -0
- package/codebase/types/ts-grid/sources/modules/Range.d.ts +71 -0
- package/codebase/types/ts-grid/sources/modules/Resizer.d.ts +2 -0
- package/codebase/types/ts-grid/sources/modules/Selection.d.ts +58 -0
- package/codebase/types/ts-grid/sources/types.d.ts +660 -0
- package/codebase/types/ts-grid/sources/ui/FixedCols.d.ts +3 -0
- package/codebase/types/ts-grid/sources/ui/FixedRows.d.ts +5 -0
- package/codebase/types/ts-grid/sources/ui/cells.d.ts +34 -0
- package/codebase/types/ts-grid/sources/ui/common.d.ts +8 -0
- package/codebase/types/ts-grid/sources/ui/components/dragPanel.d.ts +7 -0
- package/codebase/types/ts-grid/sources/ui/components/groupPanel.d.ts +13 -0
- package/codebase/types/ts-grid/sources/ui/components/subRow.d.ts +4 -0
- package/codebase/types/ts-grid/sources/ui/content/ComboFilter.d.ts +35 -0
- package/codebase/types/ts-grid/sources/ui/content/DateFilter.d.ts +42 -0
- package/codebase/types/ts-grid/sources/ui/content/InputFilter.d.ts +32 -0
- package/codebase/types/ts-grid/sources/ui/content/SelectFilter.d.ts +28 -0
- package/codebase/types/ts-grid/sources/ui/content.d.ts +55 -0
- package/codebase/types/ts-grid/sources/ui/editors/CheckboxEditor.d.ts +18 -0
- package/codebase/types/ts-grid/sources/ui/editors/ComboboxEditor.d.ts +18 -0
- package/codebase/types/ts-grid/sources/ui/editors/DateEditor.d.ts +37 -0
- package/codebase/types/ts-grid/sources/ui/editors/InputEditor.d.ts +22 -0
- package/codebase/types/ts-grid/sources/ui/editors/SelectEditor.d.ts +16 -0
- package/codebase/types/ts-grid/sources/ui/editors/TextAreaEditor.d.ts +27 -0
- package/codebase/types/ts-grid/sources/ui/editors/editors.d.ts +2 -0
- package/codebase/types/ts-grid/sources/ui/proContent.d.ts +37 -0
- package/codebase/types/ts-grid/sources/ui/render.d.ts +9 -0
- package/codebase/types/ts-layout/index.d.ts +3 -0
- package/codebase/types/ts-layout/sources/Cell.d.ts +60 -0
- package/codebase/types/ts-layout/sources/Layout.d.ts +29 -0
- package/codebase/types/ts-layout/sources/ProCell.d.ts +9 -0
- package/codebase/types/ts-layout/sources/ProLayout.d.ts +6 -0
- package/codebase/types/ts-layout/sources/helpers.d.ts +6 -0
- package/codebase/types/ts-layout/sources/types.d.ts +129 -0
- package/codebase/types/ts-list/index.d.ts +4 -0
- package/codebase/types/ts-list/sources/List.d.ts +56 -0
- package/codebase/types/ts-list/sources/ProList.d.ts +11 -0
- package/codebase/types/ts-list/sources/Selection.d.ts +24 -0
- package/codebase/types/ts-list/sources/editors/InputEditor.d.ts +16 -0
- package/codebase/types/ts-list/sources/editors/editors.d.ts +4 -0
- package/codebase/types/ts-list/sources/types.d.ts +98 -0
- package/codebase/types/ts-message/index.d.ts +5 -0
- package/codebase/types/ts-message/sources/alert.d.ts +2 -0
- package/codebase/types/ts-message/sources/common.d.ts +1 -0
- package/codebase/types/ts-message/sources/confirm.d.ts +2 -0
- package/codebase/types/ts-message/sources/locales/en.d.ts +5 -0
- package/codebase/types/ts-message/sources/message.d.ts +4 -0
- package/codebase/types/ts-message/sources/tooltip.d.ts +6 -0
- package/codebase/types/ts-message/sources/types.d.ts +79 -0
- package/codebase/types/ts-popup/index.d.ts +2 -0
- package/codebase/types/ts-popup/sources/Popup.d.ts +29 -0
- package/codebase/types/ts-popup/sources/types.d.ts +42 -0
- package/codebase/types/ts-slider/index.d.ts +2 -0
- package/codebase/types/ts-slider/sources/Slider.d.ts +55 -0
- package/codebase/types/ts-slider/sources/types.d.ts +60 -0
- package/codebase/types/ts-timepicker/index.d.ts +2 -0
- package/codebase/types/ts-timepicker/sources/Timepicker.d.ts +28 -0
- package/codebase/types/ts-timepicker/sources/helper.d.ts +4 -0
- package/codebase/types/ts-timepicker/sources/locales/en.d.ts +6 -0
- package/codebase/types/ts-timepicker/sources/types.d.ts +52 -0
- package/codebase/types/ts-treegrid/index.d.ts +3 -0
- package/codebase/types/ts-treegrid/sources/TreeGrid.d.ts +26 -0
- package/codebase/types/ts-treegrid/sources/TreeGridCollection.d.ts +21 -0
- package/codebase/types/ts-treegrid/sources/types.d.ts +17 -0
- package/dhtmlx_chart.png +0 -0
- package/dhtmlx_logo.svg +4 -0
- package/license.md +360 -0
- package/package.json +13 -0
- package/whatsnew.txt +582 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import area from "./Area";
|
|
2
|
+
import bar from "./Bar";
|
|
3
|
+
import xbar from "./BarX";
|
|
4
|
+
import donut from "./Donut";
|
|
5
|
+
import line from "./Line";
|
|
6
|
+
import pie from "./Pie";
|
|
7
|
+
import pie3D from "./Pie3D";
|
|
8
|
+
import radar from "./Radar";
|
|
9
|
+
import scatter from "./Scatter";
|
|
10
|
+
import spline from "./Spline";
|
|
11
|
+
import splineArea from "./SplineArea";
|
|
12
|
+
import treeMap from "./TreeMap";
|
|
13
|
+
import calendarHeatMap from "./CalendarHeatMap";
|
|
14
|
+
declare const seriesTypes: {
|
|
15
|
+
line: typeof line;
|
|
16
|
+
spline: typeof spline;
|
|
17
|
+
area: typeof area;
|
|
18
|
+
splineArea: typeof splineArea;
|
|
19
|
+
scatter: typeof scatter;
|
|
20
|
+
pie: typeof pie;
|
|
21
|
+
pie3D: typeof pie3D;
|
|
22
|
+
donut: typeof donut;
|
|
23
|
+
radar: typeof radar;
|
|
24
|
+
bar: typeof bar;
|
|
25
|
+
xbar: typeof xbar;
|
|
26
|
+
treeMap: typeof treeMap;
|
|
27
|
+
calendarHeatMap: typeof calendarHeatMap;
|
|
28
|
+
};
|
|
29
|
+
export default seriesTypes;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PointType } from "../types";
|
|
2
|
+
export declare function getHelper(type: PointType): any;
|
|
3
|
+
export declare function getHTMLHelper(type: PointType): any;
|
|
4
|
+
type drawFn = (x: number, y: number, id: string) => any;
|
|
5
|
+
export declare function getShadeHelper(type: PointType, color: string): drawFn;
|
|
6
|
+
export declare function getShadeHTMLHelper(type: PointType, color: string): drawFn;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
import { IEventSystem } from "../../ts-common/events";
|
|
2
|
+
import { DataCollection, DataEvents, IDataEventsHandlersMap } from "../../ts-data";
|
|
3
|
+
import { IFitPosition } from "../../ts-common/html";
|
|
4
|
+
export interface IChart {
|
|
5
|
+
events: IEventSystem<DataEvents | ChartEvents, IDataEventsHandlersMap & IChartEventHandlersMap>;
|
|
6
|
+
data: DataCollection;
|
|
7
|
+
eachSeries(handler: (seria: ISeria) => any): any[];
|
|
8
|
+
setConfig(config: IChartConfig): void;
|
|
9
|
+
paint(): void;
|
|
10
|
+
getSeries(id: string): ISeria;
|
|
11
|
+
}
|
|
12
|
+
export interface IChartConfig {
|
|
13
|
+
type?: TChartType;
|
|
14
|
+
css?: string;
|
|
15
|
+
barWidth?: number;
|
|
16
|
+
scales?: IScalesConfig;
|
|
17
|
+
legend?: ILegendConfig;
|
|
18
|
+
series?: SeriaConfig[];
|
|
19
|
+
maxPoints?: number;
|
|
20
|
+
data?: DataCollection<any> | any[];
|
|
21
|
+
exportStyles?: boolean | string[];
|
|
22
|
+
}
|
|
23
|
+
export type TChartType = "bar" | "line" | "spline" | "scatter" | "area" | "donut" | "pie" | "pie3D" | "radar" | "xbar" | "splineArea" | "treeMap" | "calendarHeatMap";
|
|
24
|
+
export declare enum ChartEvents {
|
|
25
|
+
toggleSeries = "toggleSeries",
|
|
26
|
+
chartMouseMove = "chartMouseMove",
|
|
27
|
+
chartMouseLeave = "chartMouseLeave",
|
|
28
|
+
resize = "resize",
|
|
29
|
+
serieClick = "serieClick",
|
|
30
|
+
seriaMouseMove = "seriaMouseMove",
|
|
31
|
+
seriaMouseLeave = "seriaMouseLeave"
|
|
32
|
+
}
|
|
33
|
+
export interface IChartEventHandlersMap {
|
|
34
|
+
[key: string]: (...args: any[]) => any;
|
|
35
|
+
[ChartEvents.toggleSeries]: (id: string, pieLike: object | undefined) => void;
|
|
36
|
+
[ChartEvents.chartMouseMove]: (x: number, y: number, left: number, top: number) => void;
|
|
37
|
+
[ChartEvents.chartMouseLeave]: () => void;
|
|
38
|
+
[ChartEvents.resize]: (width: number, height: number) => void;
|
|
39
|
+
[ChartEvents.serieClick]: (id: string, value: string) => void;
|
|
40
|
+
[ChartEvents.seriaMouseMove]: (id: string, value: string, e: MouseEvent) => void;
|
|
41
|
+
[ChartEvents.seriaMouseLeave]: (id: string, value: string) => void;
|
|
42
|
+
}
|
|
43
|
+
export interface IChartSeries {
|
|
44
|
+
[id: string]: ISeria;
|
|
45
|
+
}
|
|
46
|
+
export interface ISeria extends ILikeSeria {
|
|
47
|
+
id: string;
|
|
48
|
+
config: ISeriaConfig;
|
|
49
|
+
toggle(id?: string): void;
|
|
50
|
+
addScale(type: ScaleType, scale: IScale): void;
|
|
51
|
+
getPoints(): PointData[];
|
|
52
|
+
getTooltipText(id: string): string;
|
|
53
|
+
getTooltipType(id: string, x?: number, y?: number): TooltipType;
|
|
54
|
+
getClosest(x: number, y: number): [number, number, number, string];
|
|
55
|
+
getClosestVertical(x: number): [number, number, number, string, number];
|
|
56
|
+
}
|
|
57
|
+
export type TreeDirectionType = "asc" | "desc";
|
|
58
|
+
export interface ISeriaConfig {
|
|
59
|
+
id?: string;
|
|
60
|
+
type?: TChartType;
|
|
61
|
+
value?: string;
|
|
62
|
+
valueY?: string;
|
|
63
|
+
label?: ((item: ISeriaConfig) => string) | string;
|
|
64
|
+
pointType?: PointType;
|
|
65
|
+
legendType?: LegendType;
|
|
66
|
+
scales?: ScaleType[];
|
|
67
|
+
active?: boolean;
|
|
68
|
+
pointColor?: string;
|
|
69
|
+
dashed?: boolean;
|
|
70
|
+
stroke?: string;
|
|
71
|
+
strokeWidth?: number;
|
|
72
|
+
barWidth?: number;
|
|
73
|
+
css?: string;
|
|
74
|
+
fill?: string;
|
|
75
|
+
color?: string;
|
|
76
|
+
alpha?: number;
|
|
77
|
+
gradient?: Gradient;
|
|
78
|
+
showText?: boolean;
|
|
79
|
+
showTextRotate?: number | string;
|
|
80
|
+
showTextTemplate?: (points: any) => string;
|
|
81
|
+
valueTemplate?: (value: number) => string;
|
|
82
|
+
tooltip?: boolean;
|
|
83
|
+
tooltipType?: TooltipType;
|
|
84
|
+
tooltipTemplate?: (points: any[]) => string;
|
|
85
|
+
direction?: TreeDirectionType;
|
|
86
|
+
treeSeries?: ITreeSeries[];
|
|
87
|
+
baseLine?: number;
|
|
88
|
+
stacked?: boolean;
|
|
89
|
+
}
|
|
90
|
+
export type SeriaConfig = ISeriaConfig | INoScaleConfig;
|
|
91
|
+
export interface IScale extends IComposable {
|
|
92
|
+
locator?: Locator;
|
|
93
|
+
add(chart: ILikeSeria): void;
|
|
94
|
+
point(item: object | number): number;
|
|
95
|
+
getSize(): number;
|
|
96
|
+
addPadding(): void;
|
|
97
|
+
}
|
|
98
|
+
export interface IScaleConfig extends IAxisCreatorConfig {
|
|
99
|
+
type?: ScaleType;
|
|
100
|
+
title?: string;
|
|
101
|
+
text?: SmartLocator;
|
|
102
|
+
textTemplate?: <T>(value: T) => string;
|
|
103
|
+
size?: number;
|
|
104
|
+
scalePadding?: number;
|
|
105
|
+
scaleRotate?: number;
|
|
106
|
+
textPadding?: number;
|
|
107
|
+
hidden?: boolean;
|
|
108
|
+
grid?: boolean;
|
|
109
|
+
dashed?: boolean;
|
|
110
|
+
targetLine?: number | string;
|
|
111
|
+
targetValue?: number;
|
|
112
|
+
showText?: boolean;
|
|
113
|
+
locator?: SmartLocator;
|
|
114
|
+
}
|
|
115
|
+
export type ScaleType = "left" | "right" | "top" | "bottom" | "radial";
|
|
116
|
+
export interface IScales {
|
|
117
|
+
left?: IScale | ITextScale;
|
|
118
|
+
right?: IScale | ITextScale;
|
|
119
|
+
top?: IScale | ITextScale;
|
|
120
|
+
bottom?: IScale | ITextScale;
|
|
121
|
+
radial?: IScale;
|
|
122
|
+
}
|
|
123
|
+
export interface IScalesConfig {
|
|
124
|
+
left?: IScaleConfig | boolean;
|
|
125
|
+
right?: IScaleConfig | boolean;
|
|
126
|
+
top?: IScaleConfig | boolean;
|
|
127
|
+
bottom?: IScaleConfig | boolean;
|
|
128
|
+
radial?: IRadialScaleConfig;
|
|
129
|
+
}
|
|
130
|
+
export interface ILegendConfig {
|
|
131
|
+
values?: {
|
|
132
|
+
id?: SmartLocator;
|
|
133
|
+
text: SmartLocator;
|
|
134
|
+
color: SmartLocator;
|
|
135
|
+
alpha?: SmartLocator;
|
|
136
|
+
positiveColor?: SmartLocator;
|
|
137
|
+
negativeColor?: SmartLocator;
|
|
138
|
+
minValue?: number;
|
|
139
|
+
maxValue?: number;
|
|
140
|
+
value?: string;
|
|
141
|
+
step?: number;
|
|
142
|
+
tick?: number;
|
|
143
|
+
majorTick?: number;
|
|
144
|
+
tickTemplate?: <T>(value: T) => string;
|
|
145
|
+
};
|
|
146
|
+
size?: number;
|
|
147
|
+
form?: Shape;
|
|
148
|
+
type?: LegendType;
|
|
149
|
+
itemPadding?: number;
|
|
150
|
+
halign?: HorizontalPosition;
|
|
151
|
+
valign?: VerticalPosition;
|
|
152
|
+
series?: string[];
|
|
153
|
+
treeSeries?: ITreeSeries[];
|
|
154
|
+
margin?: number;
|
|
155
|
+
direction?: LegendDirection;
|
|
156
|
+
$seriesInfo?: ISeria[];
|
|
157
|
+
$sizes?: LegendSizes;
|
|
158
|
+
}
|
|
159
|
+
export interface ITreeSeries {
|
|
160
|
+
less?: number | string;
|
|
161
|
+
from?: number | string;
|
|
162
|
+
to?: number | string;
|
|
163
|
+
greater?: number | string;
|
|
164
|
+
color?: string;
|
|
165
|
+
active?: boolean;
|
|
166
|
+
id?: string;
|
|
167
|
+
name?: string;
|
|
168
|
+
}
|
|
169
|
+
export interface ILegendDrawData {
|
|
170
|
+
id: string;
|
|
171
|
+
alpha: number;
|
|
172
|
+
text: string;
|
|
173
|
+
fill: string;
|
|
174
|
+
active?: boolean;
|
|
175
|
+
color?: string;
|
|
176
|
+
minValue?: number;
|
|
177
|
+
maxValue?: number;
|
|
178
|
+
negativeColor?: string;
|
|
179
|
+
positiveColor?: string;
|
|
180
|
+
step?: number;
|
|
181
|
+
tick?: number;
|
|
182
|
+
majorTick?: number;
|
|
183
|
+
tickTemplate?: <T>(value: T) => string;
|
|
184
|
+
}
|
|
185
|
+
export interface IComposable {
|
|
186
|
+
paint(width: number, height: number, prev?: PointData[]): object;
|
|
187
|
+
paintformAndMarkers?(width: number, height: number, prev?: PointData[]): [object, object];
|
|
188
|
+
dataReady?(prev?: PointData[]): PointData[];
|
|
189
|
+
scaleReady?(sizes: IFitPosition): void;
|
|
190
|
+
destructor?(): void;
|
|
191
|
+
}
|
|
192
|
+
export interface IComposeLayer {
|
|
193
|
+
add(obj: any): void;
|
|
194
|
+
clear(): void;
|
|
195
|
+
getSizes(): IFitPosition;
|
|
196
|
+
toVDOM(width: number, height: number): void;
|
|
197
|
+
}
|
|
198
|
+
export interface IRadarConfig extends ISeriaConfig {
|
|
199
|
+
radius?: number;
|
|
200
|
+
paddings?: number;
|
|
201
|
+
scales: ScaleType[];
|
|
202
|
+
}
|
|
203
|
+
export interface IRadialScaleConfig extends IScaleConfig {
|
|
204
|
+
value?: string;
|
|
205
|
+
zebra?: boolean;
|
|
206
|
+
showAxis?: boolean;
|
|
207
|
+
}
|
|
208
|
+
export interface IRadarScaleDrawData {
|
|
209
|
+
scales: string[];
|
|
210
|
+
axis: number[];
|
|
211
|
+
realAxis: number[];
|
|
212
|
+
zebra: boolean;
|
|
213
|
+
attribute: string;
|
|
214
|
+
}
|
|
215
|
+
export interface ITreeMapConfig extends ISeriaConfig {
|
|
216
|
+
paddings?: number;
|
|
217
|
+
text?: string;
|
|
218
|
+
}
|
|
219
|
+
export interface ICalendarHeatMapConfig extends ISeriaConfig {
|
|
220
|
+
paddings?: number;
|
|
221
|
+
date?: string;
|
|
222
|
+
dateFormat?: string;
|
|
223
|
+
weekStart?: "saturday" | "sunday" | "monday";
|
|
224
|
+
positiveColor?: SmartLocator;
|
|
225
|
+
negativeColor?: SmartLocator;
|
|
226
|
+
minValue?: number;
|
|
227
|
+
maxValue?: number;
|
|
228
|
+
startDate?: string | Date;
|
|
229
|
+
endDate?: string | Date;
|
|
230
|
+
days?: string[];
|
|
231
|
+
months?: string[];
|
|
232
|
+
}
|
|
233
|
+
export interface IAxisCreatorConfig {
|
|
234
|
+
max?: number;
|
|
235
|
+
min?: number;
|
|
236
|
+
log?: boolean;
|
|
237
|
+
padding?: number;
|
|
238
|
+
maxTicks?: number;
|
|
239
|
+
type?: string;
|
|
240
|
+
}
|
|
241
|
+
export interface IAxisScale {
|
|
242
|
+
min: number;
|
|
243
|
+
max: number;
|
|
244
|
+
steps: number[];
|
|
245
|
+
}
|
|
246
|
+
export interface IAxisCreator {
|
|
247
|
+
config: IAxisCreatorConfig;
|
|
248
|
+
getScale(): IAxisScale;
|
|
249
|
+
}
|
|
250
|
+
export interface IAxisLike<T> {
|
|
251
|
+
steps: T[];
|
|
252
|
+
max: number;
|
|
253
|
+
min?: number;
|
|
254
|
+
}
|
|
255
|
+
export interface INoScaleConfig extends ISeriaConfig {
|
|
256
|
+
text?: SmartLocator;
|
|
257
|
+
value?: string;
|
|
258
|
+
useLines?: boolean;
|
|
259
|
+
subType?: NoScaleSubType;
|
|
260
|
+
stroke?: string;
|
|
261
|
+
monochrome?: string;
|
|
262
|
+
paddings?: number;
|
|
263
|
+
}
|
|
264
|
+
export type PointType = "circle" | "rect" | "triangle" | "rhombus" | "simpleRect" | "simpleCircle" | "empty";
|
|
265
|
+
export type Gradient = (color: string) => any;
|
|
266
|
+
export type TooltipType = "simple" | "right" | "left" | "top" | "bot";
|
|
267
|
+
export type SvgElement = any;
|
|
268
|
+
export type Shape = "rect" | "circle" | "line";
|
|
269
|
+
export type HorizontalPosition = "left" | "center" | "right";
|
|
270
|
+
export type VerticalPosition = "top" | "middle" | "bottom";
|
|
271
|
+
export type LegendDirection = "row" | "column";
|
|
272
|
+
export type LegendType = "groupName" | "range" | "scale";
|
|
273
|
+
export type LegendSizes = {
|
|
274
|
+
width: number;
|
|
275
|
+
height: number;
|
|
276
|
+
};
|
|
277
|
+
export interface ILikeSeria extends IComposable {
|
|
278
|
+
getPoints(): PointData[];
|
|
279
|
+
seriesShift?(size?: number): number;
|
|
280
|
+
}
|
|
281
|
+
export interface ITextScale extends IScale {
|
|
282
|
+
addPadding(): void;
|
|
283
|
+
}
|
|
284
|
+
export type Locator = (item: any) => any;
|
|
285
|
+
export type DrawPoint = (x: number, y: number, ref?: string) => any;
|
|
286
|
+
export type NoScaleSubType = "basic" | "percentOnly" | "valueOnly";
|
|
287
|
+
export type SmartLocator = Locator | string;
|
|
288
|
+
export interface IStacker extends IComposable, ILikeSeria {
|
|
289
|
+
add(seria: ISeria): void;
|
|
290
|
+
}
|
|
291
|
+
export type PointData = [number, number, string, (number | string)?, number?, TreePointData?];
|
|
292
|
+
export type TreePointData = {
|
|
293
|
+
items: PointData[];
|
|
294
|
+
};
|
|
295
|
+
export interface IGridRenderConfig {
|
|
296
|
+
targetLine?: number;
|
|
297
|
+
dashed: boolean;
|
|
298
|
+
grid: boolean;
|
|
299
|
+
targetValue?: number;
|
|
300
|
+
hidden?: boolean;
|
|
301
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { VNode } from "../../ts-common/dom";
|
|
2
|
+
import { IEventSystem } from "../../ts-common/events";
|
|
3
|
+
import { View } from "../../ts-common/view";
|
|
4
|
+
import { DataCollection, DataEvents, IDataEventsHandlersMap, IDataItem } from "../../ts-data";
|
|
5
|
+
import { Layout } from "../../ts-layout";
|
|
6
|
+
import { List } from "../../ts-list";
|
|
7
|
+
import { Popup } from "../../ts-popup";
|
|
8
|
+
import { Id, IHandlers } from "../../ts-common/types";
|
|
9
|
+
import { ComboboxEvents, ICombobox, IComboboxConfig, IComboboxEventHandlersMap, State } from "./types";
|
|
10
|
+
export declare const $template: VNode;
|
|
11
|
+
export declare class Combobox extends View implements ICombobox {
|
|
12
|
+
data: DataCollection;
|
|
13
|
+
config: IComboboxConfig;
|
|
14
|
+
events: IEventSystem<DataEvents | ComboboxEvents, IComboboxEventHandlersMap | IDataEventsHandlersMap>;
|
|
15
|
+
list: List;
|
|
16
|
+
popup: Popup;
|
|
17
|
+
protected _helper: Popup;
|
|
18
|
+
private _keyListener;
|
|
19
|
+
protected _layout: Layout;
|
|
20
|
+
private _isPopupConfiqureted;
|
|
21
|
+
private _state;
|
|
22
|
+
protected _handlers: IHandlers;
|
|
23
|
+
constructor(element: HTMLElement | string, config: IComboboxConfig);
|
|
24
|
+
focus(): void | boolean;
|
|
25
|
+
blur(): void | boolean;
|
|
26
|
+
enable(): void;
|
|
27
|
+
disable(): void;
|
|
28
|
+
isDisabled(): boolean;
|
|
29
|
+
clear(): void | boolean;
|
|
30
|
+
getValue<T extends boolean = false>(asArray?: T): T extends true ? Id[] : Id;
|
|
31
|
+
setValue(ids: Id[] | Id, silent?: boolean): void | boolean;
|
|
32
|
+
addOption<T extends IDataItem>(value: T | string, join?: boolean): void;
|
|
33
|
+
destructor(): void;
|
|
34
|
+
/** @deprecated See a documentation: https://docs.dhtmlx.com/ */
|
|
35
|
+
setState(state: State): void;
|
|
36
|
+
private _setValue;
|
|
37
|
+
protected _createLayout(): void;
|
|
38
|
+
private _initHandlers;
|
|
39
|
+
private _initEvents;
|
|
40
|
+
private _showOptions;
|
|
41
|
+
private _configurePopup;
|
|
42
|
+
private _hideOptions;
|
|
43
|
+
private _filter;
|
|
44
|
+
private _findBest;
|
|
45
|
+
private _exsistId;
|
|
46
|
+
private _draw;
|
|
47
|
+
private _drawSelectedItems;
|
|
48
|
+
private _drawImageOrIcon;
|
|
49
|
+
private _getItemText;
|
|
50
|
+
private _updateSelectedItem;
|
|
51
|
+
private _changePopupPosition;
|
|
52
|
+
private _updatePopup;
|
|
53
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare class KeyListener {
|
|
2
|
+
private _isActive;
|
|
3
|
+
private _sequence;
|
|
4
|
+
private _currentAction;
|
|
5
|
+
private _clearTimeout;
|
|
6
|
+
private _handler;
|
|
7
|
+
constructor();
|
|
8
|
+
startNewListen(action: (seq: string) => any): void;
|
|
9
|
+
endListen(): void;
|
|
10
|
+
reset(): void;
|
|
11
|
+
destructor(): void;
|
|
12
|
+
private _change;
|
|
13
|
+
private _addClearTimeout;
|
|
14
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { Id } from "../../ts-common/types";
|
|
2
|
+
import { DataCollection, IDataItem } from "../../ts-data";
|
|
3
|
+
export type ILabelPosition = "left" | "top";
|
|
4
|
+
export interface IComboboxConfig {
|
|
5
|
+
data?: DataCollection<any> | any[];
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
readOnly?: boolean;
|
|
8
|
+
template?: (item: any) => string;
|
|
9
|
+
filter?: (item: any, input: string) => boolean;
|
|
10
|
+
multiselection?: boolean;
|
|
11
|
+
label?: string;
|
|
12
|
+
labelPosition?: ILabelPosition;
|
|
13
|
+
labelWidth?: string | number;
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
selectAllButton?: boolean;
|
|
16
|
+
itemsCount?: boolean | ((count: number) => string);
|
|
17
|
+
itemHeight?: number | string;
|
|
18
|
+
virtual?: boolean;
|
|
19
|
+
listHeight?: number | string;
|
|
20
|
+
required?: boolean;
|
|
21
|
+
helpMessage?: string;
|
|
22
|
+
hiddenLabel?: boolean;
|
|
23
|
+
css?: string;
|
|
24
|
+
value?: Id | Id[];
|
|
25
|
+
newOptions?: boolean;
|
|
26
|
+
htmlEnable?: boolean;
|
|
27
|
+
eventHandlers?: {
|
|
28
|
+
[eventName: string]: {
|
|
29
|
+
[className: string]: (event: Event, id: Id) => void | boolean;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
/** @deprecated See a documentation: https://docs.dhtmlx.com/ */
|
|
33
|
+
cellHeight?: number;
|
|
34
|
+
/** @deprecated See a documentation: https://docs.dhtmlx.com/ */
|
|
35
|
+
help?: string;
|
|
36
|
+
/** @deprecated See a documentation: https://docs.dhtmlx.com/ */
|
|
37
|
+
showItemsCount?: boolean | ((count: number) => string);
|
|
38
|
+
/** @deprecated See a documentation: https://docs.dhtmlx.com/ */
|
|
39
|
+
labelInline?: boolean;
|
|
40
|
+
/** @deprecated See a documentation: https://docs.dhtmlx.com/ */
|
|
41
|
+
readonly?: boolean;
|
|
42
|
+
}
|
|
43
|
+
export declare enum ComboboxEvents {
|
|
44
|
+
beforeChange = "beforeChange",
|
|
45
|
+
change = "change",
|
|
46
|
+
focus = "focus",
|
|
47
|
+
blur = "blur",
|
|
48
|
+
keydown = "keydown",
|
|
49
|
+
input = "input",
|
|
50
|
+
beforeOpen = "beforeOpen",
|
|
51
|
+
afterOpen = "afterOpen",
|
|
52
|
+
beforeClose = "beforeClose",
|
|
53
|
+
afterClose = "afterClose",
|
|
54
|
+
/** @deprecated See a documentation: https://docs.dhtmlx.com/ */
|
|
55
|
+
open = "open",
|
|
56
|
+
/** @deprecated See a documentation: https://docs.dhtmlx.com/ */
|
|
57
|
+
close = "close"
|
|
58
|
+
}
|
|
59
|
+
export interface IComboboxEventHandlersMap {
|
|
60
|
+
[key: string]: (...args: any[]) => any;
|
|
61
|
+
[ComboboxEvents.beforeChange]: (ids: Id | Id[]) => boolean | void;
|
|
62
|
+
[ComboboxEvents.change]: (ids: Id | Id[]) => void;
|
|
63
|
+
[ComboboxEvents.focus]: () => void;
|
|
64
|
+
[ComboboxEvents.blur]: () => void;
|
|
65
|
+
[ComboboxEvents.keydown]: (event: KeyboardEvent, id: Id | undefined) => void;
|
|
66
|
+
[ComboboxEvents.input]: (value: string) => void;
|
|
67
|
+
[ComboboxEvents.beforeOpen]: () => boolean | void;
|
|
68
|
+
[ComboboxEvents.afterOpen]: () => void;
|
|
69
|
+
[ComboboxEvents.beforeClose]: () => boolean | void;
|
|
70
|
+
[ComboboxEvents.afterClose]: () => void;
|
|
71
|
+
[ComboboxEvents.open]: () => void;
|
|
72
|
+
[ComboboxEvents.close]: () => void;
|
|
73
|
+
}
|
|
74
|
+
export interface ICombobox {
|
|
75
|
+
disable(): void;
|
|
76
|
+
enable(): void;
|
|
77
|
+
isDisabled(): boolean;
|
|
78
|
+
destructor(): void;
|
|
79
|
+
paint(): void;
|
|
80
|
+
clear(): void;
|
|
81
|
+
focus(): void;
|
|
82
|
+
blur(): void;
|
|
83
|
+
getValue(asArray?: boolean): Id[] | Id;
|
|
84
|
+
setValue(ids: Id[] | Id): void;
|
|
85
|
+
addOption<T extends IDataItem>(value: T | string, join?: boolean): void;
|
|
86
|
+
/** @deprecated See a documentation: https://docs.dhtmlx.com/ */
|
|
87
|
+
setState(state: State): void;
|
|
88
|
+
}
|
|
89
|
+
export declare enum ComboState {
|
|
90
|
+
default = 0,
|
|
91
|
+
error = 1,
|
|
92
|
+
success = 2
|
|
93
|
+
}
|
|
94
|
+
/** @deprecated See a documentation: https://docs.dhtmlx.com/ */
|
|
95
|
+
export type State = "success" | "error" | "default";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface IFocusManager {
|
|
2
|
+
getFocusId(): string;
|
|
3
|
+
setFocusId(id: string): void;
|
|
4
|
+
}
|
|
5
|
+
declare class FocusManager implements IFocusManager {
|
|
6
|
+
private _activeWidgetId;
|
|
7
|
+
private _initHandler;
|
|
8
|
+
private _removeFocusClass;
|
|
9
|
+
private _addFocusClass;
|
|
10
|
+
constructor();
|
|
11
|
+
getFocusId(): string;
|
|
12
|
+
setFocusId(id: string): void;
|
|
13
|
+
}
|
|
14
|
+
export declare const focusManager: FocusManager;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { anyFunction } from "./types";
|
|
2
|
+
export interface IKeyManager {
|
|
3
|
+
destructor(): void;
|
|
4
|
+
addHotKey(key: string, handler: any): void;
|
|
5
|
+
removeHotKey(key?: string, context?: any): void;
|
|
6
|
+
exist(key: string): boolean;
|
|
7
|
+
getKeyStorageLength(): number;
|
|
8
|
+
}
|
|
9
|
+
export declare class KeyManager implements IKeyManager {
|
|
10
|
+
private _keysStorage;
|
|
11
|
+
private _beforeCall;
|
|
12
|
+
private _initHandler;
|
|
13
|
+
constructor(beforeCall?: (e: Event, focus: any) => boolean);
|
|
14
|
+
destructor(): void;
|
|
15
|
+
addHotKey(key: string, handler: any): void;
|
|
16
|
+
removeHotKey(key?: string, handler?: anyFunction): void;
|
|
17
|
+
exist(key: string): boolean;
|
|
18
|
+
getKeyStorageLength(): number;
|
|
19
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { anyFunction } from "./types";
|
|
2
|
+
interface IScrollViewConfig {
|
|
3
|
+
enable: boolean;
|
|
4
|
+
autoHide: boolean;
|
|
5
|
+
timeout: number;
|
|
6
|
+
scrollHandler: anyFunction;
|
|
7
|
+
}
|
|
8
|
+
export declare const scrollViewConfig: IScrollViewConfig;
|
|
9
|
+
export interface IScrollView {
|
|
10
|
+
config: IScrollViewConfig;
|
|
11
|
+
enable(): void;
|
|
12
|
+
disable(): void;
|
|
13
|
+
render(nods?: any[]): any;
|
|
14
|
+
update(): void;
|
|
15
|
+
}
|
|
16
|
+
export declare class ScrollView implements IScrollView {
|
|
17
|
+
config: IScrollViewConfig;
|
|
18
|
+
private _getRootView;
|
|
19
|
+
private _scrollYTop;
|
|
20
|
+
private _scrollXLeft;
|
|
21
|
+
private _runnerYTop;
|
|
22
|
+
private _runnerXLeft;
|
|
23
|
+
private _runnerHeight;
|
|
24
|
+
private _runnerWidth;
|
|
25
|
+
private _visibleYArea;
|
|
26
|
+
private _visibleXArea;
|
|
27
|
+
private _scrollWidth;
|
|
28
|
+
private _scrollHeight;
|
|
29
|
+
private _wheelName;
|
|
30
|
+
private _handlers;
|
|
31
|
+
private _autoHideFunc;
|
|
32
|
+
private _uid;
|
|
33
|
+
constructor(getRootView: any, config?: {});
|
|
34
|
+
enable(): void;
|
|
35
|
+
disable(): void;
|
|
36
|
+
render(element: any, uid?: string): any;
|
|
37
|
+
update(): void;
|
|
38
|
+
private _getRefs;
|
|
39
|
+
}
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
type fn<T extends any[], K> = (...args: T) => K;
|
|
2
|
+
type anyFunction = fn<any[], any>;
|
|
3
|
+
export declare function uid(): string;
|
|
4
|
+
export declare function extendComponent(target: any, source: any): any;
|
|
5
|
+
export declare function extend(target: any, source: any, deep?: boolean): any;
|
|
6
|
+
interface IOBj {
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
}
|
|
9
|
+
export declare function copy(source: IOBj, withoutInner?: boolean): IOBj;
|
|
10
|
+
export declare function naturalSort(arr: any): any[];
|
|
11
|
+
export declare function findIndex<T = any>(arr: T[], predicate: (obj: T) => boolean): number;
|
|
12
|
+
export declare function isExistValue(target: number | string, value: number | string): boolean;
|
|
13
|
+
export declare function singleOuterClick(fn: (e: MouseEvent) => boolean): void;
|
|
14
|
+
export declare function detectWidgetClick(widgetId: string, cb: (inner: boolean) => void): () => void;
|
|
15
|
+
export declare function unwrapBox<T>(box: T | T[]): T;
|
|
16
|
+
export declare function wrapBox<T>(unboxed: T | T[]): T[];
|
|
17
|
+
export declare function isDefined<T>(some: T): boolean;
|
|
18
|
+
export declare function isId<T>(some: T): boolean;
|
|
19
|
+
export declare function range(from: number, to: number): number[];
|
|
20
|
+
export declare function isNumeric(val: any): boolean;
|
|
21
|
+
export declare function downloadFile(data: Blob | string, filename: string, mimeType?: string): void;
|
|
22
|
+
export declare function debounce(func: anyFunction, wait: number, immediate?: boolean): (...args: any[]) => void;
|
|
23
|
+
export declare function compare(obj1: any, obj2: any): boolean;
|
|
24
|
+
export declare const isType: (value: any) => string;
|
|
25
|
+
export declare const isEmptyObj: (obj: any) => boolean;
|
|
26
|
+
export declare const getMaxArrayNumber: (array: number[]) => number;
|
|
27
|
+
export declare const getMinArrayNumber: (array: number[]) => number;
|
|
28
|
+
export interface IContainerConfig {
|
|
29
|
+
lineHeight?: number;
|
|
30
|
+
font?: string;
|
|
31
|
+
}
|
|
32
|
+
export declare const getStringWidth: (value: string, config?: IContainerConfig) => number;
|
|
33
|
+
export declare const rgbToHex: (color: string) => string;
|
|
34
|
+
export declare function getCloneObject(obj: any): any;
|
|
35
|
+
export declare function getTextLines({ ctx, text, maxWidth }: {
|
|
36
|
+
ctx: any;
|
|
37
|
+
text: any;
|
|
38
|
+
maxWidth: any;
|
|
39
|
+
}): string[];
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export declare const locale: {
|
|
2
|
+
monthsShort: string[];
|
|
3
|
+
months: string[];
|
|
4
|
+
daysShort: string[];
|
|
5
|
+
days: string[];
|
|
6
|
+
cancel: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function getFormattedDate(format: string, date: Date): string;
|
|
9
|
+
export declare function getExcelDate(date: Date): number;
|
|
10
|
+
export declare function stringToDate(str: string, format: string, validate?: boolean): any;
|
|
11
|
+
export declare class DateHelper {
|
|
12
|
+
static nullTimestampDate: Date;
|
|
13
|
+
static copy(d: Date): Date;
|
|
14
|
+
static fromYear(year: number): Date;
|
|
15
|
+
static fromYearAndMonth(year: number, month: number): Date;
|
|
16
|
+
static weekStart(d: Date, firstWeekday: -1 | 0 | 1): Date;
|
|
17
|
+
static monthStart(d: Date): Date;
|
|
18
|
+
static yearStart(d: Date): Date;
|
|
19
|
+
static dayStart(d: Date): Date;
|
|
20
|
+
static addDay(d: Date, count?: number): Date;
|
|
21
|
+
static addMonth(d: Date, count?: number): Date;
|
|
22
|
+
static addYear(d: Date, count?: number): Date;
|
|
23
|
+
static withHoursAndMinutes(d: Date, hours: number, minutes: number, dateFormat: boolean): Date;
|
|
24
|
+
static setMonth(d: Date, month: number): void;
|
|
25
|
+
static setYear(d: Date, year: number): void;
|
|
26
|
+
static mergeHoursAndMinutes(source: Date, target: Date): Date;
|
|
27
|
+
static isWeekEnd(d: Date): boolean;
|
|
28
|
+
static getTwelweYears(d: Date): number[];
|
|
29
|
+
static getDayOrdinal(d: Date): number;
|
|
30
|
+
static getWeekNumber(d: Date): number;
|
|
31
|
+
static isSameDay(d1: Date, d2: Date): boolean;
|
|
32
|
+
static toDateObject(date: Date | string, dateFormat: string): Date;
|
|
33
|
+
}
|
|
34
|
+
export declare function stripTime(d: Date, full?: boolean): Date;
|