@fintatech/fintachart 3.1.0
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/CHANGELOG.md +14 -0
- package/LICENSE.md +63 -0
- package/README.md +151 -0
- package/THIRD_PARTY_NOTICES.md +38 -0
- package/basic-objects.html +165 -0
- package/css/FintaChart.min.css +1 -0
- package/css/external/jqNumericField.min.css +1 -0
- package/css/external/spectrum.min.css +7 -0
- package/css/external/toastr.min.css +1 -0
- package/custom-indicator.html +209 -0
- package/d.ts/FintaChart.d.ts +24313 -0
- package/d.ts/frameworks/Intl.d.ts +115 -0
- package/d.ts/frameworks/bootstrap.d.ts +128 -0
- package/d.ts/frameworks/bootstrap.v3.datetimepicker.d.ts +10 -0
- package/d.ts/frameworks/detectizr.d.ts +27 -0
- package/d.ts/frameworks/dom-to-image-more.d.ts +17 -0
- package/d.ts/frameworks/html2canvas.d.ts +101 -0
- package/d.ts/frameworks/i18nextXHRBackend.d.ts +42 -0
- package/d.ts/frameworks/jquery-i18next.d.ts +14 -0
- package/d.ts/frameworks/jquery-ui.d.ts +1914 -0
- package/d.ts/frameworks/jquery.d.ts +3779 -0
- package/d.ts/frameworks/jquery.ui.touch-punch.d.ts +12 -0
- package/d.ts/frameworks/moment-node.d.ts +485 -0
- package/d.ts/frameworks/moment.d.ts +10 -0
- package/d.ts/frameworks/tinycolor.d.ts +377 -0
- package/d.ts/frameworks-modified/bootstrap-select.d.ts +18 -0
- package/d.ts/frameworks-modified/i18next.d.ts +148 -0
- package/d.ts/frameworks-modified/jquery.autocolumnlist.d.ts +17 -0
- package/d.ts/frameworks-modified/jquery.resizable.d.ts +20 -0
- package/d.ts/frameworks-modified/spectrum.d.ts +294 -0
- package/d.ts/frameworks-modified/switchery.d.ts +69 -0
- package/d.ts/frameworks-modified/toastr.d.ts +224 -0
- package/data/offline-market-history/EUR_CAD/Day/1.csv +2001 -0
- package/data/offline-market-history/EUR_CAD/Hour/1.csv +1702 -0
- package/data/offline-market-history/EUR_CAD/Hour/4.csv +442 -0
- package/data/offline-market-history/EUR_CAD/Minute/1.csv +2001 -0
- package/data/offline-market-history/EUR_CAD/Minute/15.csv +2001 -0
- package/data/offline-market-history/EUR_CAD/Minute/5.csv +2001 -0
- package/data/offline-market-history/EUR_CAD/Monthly/1.csv +175 -0
- package/data/offline-market-history/EUR_CAD/Weekly/1.csv +752 -0
- package/data/offline-market-history/EUR_CAD/Yearly/1.csv +16 -0
- package/data/offline-market-history/EUR_GBP/Day/1.csv +2001 -0
- package/data/offline-market-history/EUR_GBP/Hour/1.csv +1702 -0
- package/data/offline-market-history/EUR_GBP/Hour/4.csv +442 -0
- package/data/offline-market-history/EUR_GBP/Minute/1.csv +2001 -0
- package/data/offline-market-history/EUR_GBP/Minute/15.csv +2001 -0
- package/data/offline-market-history/EUR_GBP/Minute/5.csv +2001 -0
- package/data/offline-market-history/EUR_GBP/Monthly/1.csv +199 -0
- package/data/offline-market-history/EUR_GBP/Weekly/1.csv +860 -0
- package/data/offline-market-history/EUR_GBP/Yearly/1.csv +18 -0
- package/data/predefined-templates/EMAAndMACDTemplate.json +100 -0
- package/data/predefined-templates/bigTreeTemplate.json +137 -0
- package/data/predefined-templates/multiIndicator.json +136 -0
- package/data/predefined-templates/renkoTemplate.json +50 -0
- package/data/predefined-templates/standartCandleTemplate.json +73 -0
- package/fonts/calibri/calibri.svg +3707 -0
- package/fonts/calibri/calibri.ttf +0 -0
- package/fonts/calibri/calibri.woff +0 -0
- package/fonts/courier-new/courier-new.svg +633 -0
- package/fonts/courier-new/courier-new.ttf +0 -0
- package/fonts/courier-new/courier-new.woff +0 -0
- package/fonts/open-sans-cyrillic/open-sans-cyrillic.svg +475 -0
- package/fonts/open-sans-cyrillic/open-sans-cyrillic.ttf +0 -0
- package/fonts/open-sans-cyrillic/open-sans-cyrillic.woff +0 -0
- package/fonts/open-sans-cyrillic-ext/open-sans-cyrillic-ext.svg +567 -0
- package/fonts/open-sans-cyrillic-ext/open-sans-cyrillic-ext.ttf +0 -0
- package/fonts/open-sans-cyrillic-ext/open-sans-cyrillic-ext.woff +0 -0
- package/fonts/open-sans-greek/open-sans-greek.svg +603 -0
- package/fonts/open-sans-greek/open-sans-greek.ttf +0 -0
- package/fonts/open-sans-greek/open-sans-greek.woff +0 -0
- package/fonts/open-sans-greek-ext/open-sans-greek-ext.svg +42 -0
- package/fonts/open-sans-greek-ext/open-sans-greek-ext.ttf +0 -0
- package/fonts/open-sans-greek-ext/open-sans-greek-ext.woff +0 -0
- package/fonts/open-sans-latin/open-sans-latin.svg +1863 -0
- package/fonts/open-sans-latin/open-sans-latin.ttf +0 -0
- package/fonts/open-sans-latin/open-sans-latin.woff +0 -0
- package/fonts/open-sans-latin-ext/open-sans-latin-ext.svg +1686 -0
- package/fonts/open-sans-latin-ext/open-sans-latin-ext.ttf +0 -0
- package/fonts/open-sans-latin-ext/open-sans-latin-ext.woff +0 -0
- package/fonts/open-sans-vietnamese/open-sans-vietnamese.svg +375 -0
- package/fonts/open-sans-vietnamese/open-sans-vietnamese.ttf +0 -0
- package/fonts/open-sans-vietnamese/open-sans-vietnamese.woff +0 -0
- package/fonts/rubik-medium/Rubik-Medium.svg +8831 -0
- package/fonts/rubik-medium/Rubik-Medium.ttf +0 -0
- package/fonts/rubik-medium/Rubik-Medium.woff +0 -0
- package/fonts/rubik-regular/Rubik-Regular.svg +8885 -0
- package/fonts/rubik-regular/Rubik-Regular.ttf +0 -0
- package/fonts/rubik-regular/Rubik-Regular.woff +0 -0
- package/fonts/source-sans-pro-latin/source-sans-pro-latin.svg +2642 -0
- package/fonts/source-sans-pro-latin/source-sans-pro-latin.ttf +0 -0
- package/fonts/source-sans-pro-latin/source-sans-pro-latin.woff +0 -0
- package/fonts/source-sans-pro-latin-ext/source-sans-pro-latin-ext.svg +1572 -0
- package/fonts/source-sans-pro-latin-ext/source-sans-pro-latin-ext.ttf +0 -0
- package/fonts/source-sans-pro-latin-ext/source-sans-pro-latin-ext.woff +0 -0
- package/fonts/source-sans-pro-vietnamese/source-sans-pro-vietnamese.svg +428 -0
- package/fonts/source-sans-pro-vietnamese/source-sans-pro-vietnamese.ttf +0 -0
- package/fonts/source-sans-pro-vietnamese/source-sans-pro-vietnamese.woff +0 -0
- package/htmldialogs/ChartContextMenu.html +3 -0
- package/htmldialogs/ChartTypeSettingsDialog.html +231 -0
- package/htmldialogs/CheckboxIndicatorParameterControl.html +9 -0
- package/htmldialogs/CompareInstrumentSettings.html +61 -0
- package/htmldialogs/ComparingContextMenu.html +8 -0
- package/htmldialogs/ConfirmDialog.html +28 -0
- package/htmldialogs/DemoModePopup.html +24 -0
- package/htmldialogs/FillPlotStyleControl.html +28 -0
- package/htmldialogs/HotkeysSettings.html +28 -0
- package/htmldialogs/IndicatorContextMenu.html +18 -0
- package/htmldialogs/IndicatorSettingsDialog.html +38 -0
- package/htmldialogs/IndicatorsDialog.html +39 -0
- package/htmldialogs/IndicatorsOverview_en.html +1694 -0
- package/htmldialogs/IndicatorsOverview_ua.html +9 -0
- package/htmldialogs/InstrumentSearchDialog.html +22 -0
- package/htmldialogs/LinePlotStyleControl.html +33 -0
- package/htmldialogs/MainSettings.html +292 -0
- package/htmldialogs/MarketEventPopup.html +27 -0
- package/htmldialogs/MarketEventsSettingsDialog.html +22 -0
- package/htmldialogs/NumericIndicatorParameter.html +8 -0
- package/htmldialogs/OpenChart.html +6 -0
- package/htmldialogs/PatternSettingsControl.html +26 -0
- package/htmldialogs/PatternsIndicatorSettingsDialog.html +30 -0
- package/htmldialogs/PatternsSettingsParameterControl.html +12 -0
- package/htmldialogs/PositionShapeContextMenu.html +9 -0
- package/htmldialogs/QuantityPopup.html +7 -0
- package/htmldialogs/Scrollbar.html +6 -0
- package/htmldialogs/SelectableIndicatorParameter.html +9 -0
- package/htmldialogs/ShapeContextMenu.html +7 -0
- package/htmldialogs/ShapeFibonacciSettingsDialog.html +261 -0
- package/htmldialogs/ShapePositionSettingsDialog.html +351 -0
- package/htmldialogs/ShapeSettingsDialog.html +521 -0
- package/htmldialogs/TimeFrameChangePopup.html +11 -0
- package/htmldialogs/TimeIndicatorParameterControl.html +89 -0
- package/htmldialogs/Toolbar.html +1710 -0
- package/htmldialogs/TooltipView.html +151 -0
- package/htmldialogs/TradingContextMenu.html +2 -0
- package/img/ContextMenuCheckbox.png +0 -0
- package/img/cross-hairs.cur +0 -0
- package/img/eu.png +0 -0
- package/img/favicon/favicon.ico +0 -0
- package/img/fist.cur +0 -0
- package/img/point.cur +0 -0
- package/img/svg-icons/Illustration-License-b.svg +1 -0
- package/img/svg-icons/Illustration-License-w.svg +1 -0
- package/img/svg-icons/abcd-label-pattern.svg +1 -0
- package/img/svg-icons/abcd-pattern.svg +1 -0
- package/img/svg-icons/add.svg +1 -0
- package/img/svg-icons/adjust-OHLC.svg +1 -0
- package/img/svg-icons/adjust-all.svg +1 -0
- package/img/svg-icons/andrews-pitchfork.svg +1 -0
- package/img/svg-icons/arrow-down.svg +1 -0
- package/img/svg-icons/arrow-left.svg +3 -0
- package/img/svg-icons/arrow-right.svg +3 -0
- package/img/svg-icons/arrow-type-type.svg +3 -0
- package/img/svg-icons/arrow-up.svg +1 -0
- package/img/svg-icons/arrow.svg +1 -0
- package/img/svg-icons/balloon.svg +1 -0
- package/img/svg-icons/brand-x.svg +1 -0
- package/img/svg-icons/calculator.svg +15 -0
- package/img/svg-icons/chartType-area.svg +1 -0
- package/img/svg-icons/chartType-bars.svg +1 -0
- package/img/svg-icons/chartType-candles-volume.svg +1 -0
- package/img/svg-icons/chartType-candles.svg +1 -0
- package/img/svg-icons/chartType-colored-bars.svg +1 -0
- package/img/svg-icons/chartType-equi-volume-shadow.svg +1 -0
- package/img/svg-icons/chartType-equi-volume.svg +1 -0
- package/img/svg-icons/chartType-heikin-ashi.svg +1 -0
- package/img/svg-icons/chartType-hollow-candles.svg +1 -0
- package/img/svg-icons/chartType-kagi.svg +1 -0
- package/img/svg-icons/chartType-line-break.svg +1 -0
- package/img/svg-icons/chartType-line.svg +1 -0
- package/img/svg-icons/chartType-point-figure.svg +1 -0
- package/img/svg-icons/chartType-range-bars.svg +1 -0
- package/img/svg-icons/chartType-renko.svg +1 -0
- package/img/svg-icons/chevron-right-double.svg +3 -0
- package/img/svg-icons/chevron.svg +3 -0
- package/img/svg-icons/circle.svg +1 -0
- package/img/svg-icons/close-floating-toolbar.svg +1 -0
- package/img/svg-icons/close-pane.svg +1 -0
- package/img/svg-icons/close-rect.svg +4 -0
- package/img/svg-icons/close-windows.svg +1 -0
- package/img/svg-icons/close.svg +4 -0
- package/img/svg-icons/compare.svg +1 -0
- package/img/svg-icons/copy.svg +1 -0
- package/img/svg-icons/cursorType-arrow-with-labels.svg +1 -0
- package/img/svg-icons/cursorType-arrow.svg +3 -0
- package/img/svg-icons/cursorType-crosshairs.svg +1 -0
- package/img/svg-icons/cursorType-point.svg +1 -0
- package/img/svg-icons/cyclic-lines.svg +1 -0
- package/img/svg-icons/default-screen.svg +11 -0
- package/img/svg-icons/demo-popup-bg.svg +1 -0
- package/img/svg-icons/diamond.svg +1 -0
- package/img/svg-icons/dot.svg +1 -0
- package/img/svg-icons/drag.svg +1 -0
- package/img/svg-icons/elliott-wave-pattern.svg +1 -0
- package/img/svg-icons/ellipse.svg +1 -0
- package/img/svg-icons/error-channel.svg +1 -0
- package/img/svg-icons/export.svg +1 -0
- package/img/svg-icons/extended-line.svg +3 -0
- package/img/svg-icons/fibonacci-arcs.svg +1 -0
- package/img/svg-icons/fibonacci-ellipses.svg +1 -0
- package/img/svg-icons/fibonacci-extensions.svg +1 -0
- package/img/svg-icons/fibonacci-fan.svg +1 -0
- package/img/svg-icons/fibonacci-retracements.svg +1 -0
- package/img/svg-icons/fibonacci-time-zones.svg +1 -0
- package/img/svg-icons/fintatech.svg +1 -0
- package/img/svg-icons/free-hand.svg +1 -0
- package/img/svg-icons/full-screen.svg +11 -0
- package/img/svg-icons/full-windows.svg +12 -0
- package/img/svg-icons/gann-fan.svg +1 -0
- package/img/svg-icons/general-delete.svg +3 -0
- package/img/svg-icons/head-shoulders-pattern.svg +1 -0
- package/img/svg-icons/horizontal-line.svg +1 -0
- package/img/svg-icons/horizontal-ray.svg +3 -0
- package/img/svg-icons/html-code.svg +1 -0
- package/img/svg-icons/image.svg +5 -0
- package/img/svg-icons/images.svg +1 -0
- package/img/svg-icons/in-shape-mode.svg +1 -0
- package/img/svg-icons/insert-indicator.svg +1 -0
- package/img/svg-icons/kings-crown-pattern.svg +1 -0
- package/img/svg-icons/latest-position.svg +1 -0
- package/img/svg-icons/line-segment.svg +1 -0
- package/img/svg-icons/link.svg +5 -0
- package/img/svg-icons/lock.svg +3 -0
- package/img/svg-icons/magnet-mode.svg +1 -0
- package/img/svg-icons/measure.svg +1 -0
- package/img/svg-icons/multiply-link.svg +5 -0
- package/img/svg-icons/note.svg +1 -0
- package/img/svg-icons/number-label-pattern.svg +1 -0
- package/img/svg-icons/open-OHLC-pane.svg +1 -0
- package/img/svg-icons/options.svg +1 -0
- package/img/svg-icons/period.svg +1 -0
- package/img/svg-icons/polygon.svg +1 -0
- package/img/svg-icons/polyline.svg +1 -0
- package/img/svg-icons/position-long.svg +90 -0
- package/img/svg-icons/position-long_og.svg +81 -0
- package/img/svg-icons/position-short.svg +90 -0
- package/img/svg-icons/position-short_og.svg +89 -0
- package/img/svg-icons/quadrant-lines.svg +1 -0
- package/img/svg-icons/raff-regression.svg +1 -0
- package/img/svg-icons/ray.svg +3 -0
- package/img/svg-icons/rectangle.svg +1 -0
- package/img/svg-icons/redo-new.svg +3 -0
- package/img/svg-icons/redo.svg +1 -0
- package/img/svg-icons/remove-all-indicators.svg +1 -0
- package/img/svg-icons/remove-all-shapes.svg +1 -0
- package/img/svg-icons/replay-jump.svg +1 -0
- package/img/svg-icons/replay-pause.svg +1 -0
- package/img/svg-icons/replay-play.svg +1 -0
- package/img/svg-icons/replay-skip-end.svg +1 -0
- package/img/svg-icons/replay-skip-one.svg +1 -0
- package/img/svg-icons/save-as-image.svg +1 -0
- package/img/svg-icons/screenshot.svg +5 -0
- package/img/svg-icons/scroll-bottom.svg +1 -0
- package/img/svg-icons/scroll-left.svg +1 -0
- package/img/svg-icons/scroll-right.svg +1 -0
- package/img/svg-icons/scroll-top.svg +1 -0
- package/img/svg-icons/search.svg +1 -0
- package/img/svg-icons/speed-lines.svg +1 -0
- package/img/svg-icons/square.svg +1 -0
- package/img/svg-icons/star.svg +4 -0
- package/img/svg-icons/stash.svg +4 -0
- package/img/svg-icons/stick-to-bar.svg +1 -0
- package/img/svg-icons/stick-to-close.svg +1 -0
- package/img/svg-icons/stick-to-high.svg +1 -0
- package/img/svg-icons/stick-to-low.svg +1 -0
- package/img/svg-icons/stick-to-open.svg +1 -0
- package/img/svg-icons/sticky-mode-off.svg +1 -0
- package/img/svg-icons/tcdPane-alert-indicator.svg +1 -0
- package/img/svg-icons/tcdPane-close.svg +1 -0
- package/img/svg-icons/tcdPane-down.svg +1 -0
- package/img/svg-icons/tcdPane-expand-closed.svg +1 -0
- package/img/svg-icons/tcdPane-expand.svg +1 -0
- package/img/svg-icons/tcdPane-maximize.svg +1 -0
- package/img/svg-icons/tcdPane-options.svg +1 -0
- package/img/svg-icons/tcdPane-remove-indicator.svg +1 -0
- package/img/svg-icons/tcdPane-restore.svg +1 -0
- package/img/svg-icons/tcdPane-toggle.svg +1 -0
- package/img/svg-icons/tcdPane-up.svg +1 -0
- package/img/svg-icons/template-delete.svg +1 -0
- package/img/svg-icons/template-edit.svg +1 -0
- package/img/svg-icons/template-ok.svg +1 -0
- package/img/svg-icons/template.svg +1 -0
- package/img/svg-icons/text-editor-b.svg +1 -0
- package/img/svg-icons/text-editor-i.svg +1 -0
- package/img/svg-icons/text-editor-u.svg +1 -0
- package/img/svg-icons/text.svg +1 -0
- package/img/svg-icons/tirone-levels.svg +1 -0
- package/img/svg-icons/toggle-shapes.svg +1 -0
- package/img/svg-icons/trade-manager.svg +1 -0
- package/img/svg-icons/trend-angle.svg +1 -0
- package/img/svg-icons/trend-channel.svg +1 -0
- package/img/svg-icons/triangle-pattern.svg +1 -0
- package/img/svg-icons/triangle.svg +1 -0
- package/img/svg-icons/undo-new.svg +3 -0
- package/img/svg-icons/undo.svg +1 -0
- package/img/svg-icons/unlock.svg +3 -0
- package/img/svg-icons/vertical-line.svg +1 -0
- package/img/svg-icons/visibleProfile.svg +1 -0
- package/img/svg-icons/web-link.svg +1 -0
- package/img/svg-icons/x.svg +3 -0
- package/img/svg-icons/xabcd-pattern.svg +1 -0
- package/img/svg-icons/zoom-by-area.svg +1 -0
- package/img/svg-icons/zoom.svg +1 -0
- package/img/usa.png +0 -0
- package/index-dark.html +132 -0
- package/index.html +229 -0
- package/localization/en.json +1646 -0
- package/localization/uk.json +1597 -0
- package/multiple-charts.html +162 -0
- package/package.json +62 -0
- package/scripts/FintaChart.min.js +70 -0
- package/scripts/frameworks/Intl.min.js +4 -0
- package/scripts/frameworks/bootstrap.v3.datetimepicker.min.js +2605 -0
- package/scripts/frameworks/detectizr.min.js +1 -0
- package/scripts/frameworks/dom-to-image-more.min.js +3 -0
- package/scripts/frameworks/i18nextXHRBackend.min.js +1 -0
- package/scripts/frameworks/jquery-i18next.min.js +1 -0
- package/scripts/frameworks/jquery-ui.min.js +8 -0
- package/scripts/frameworks/jquery.min.js +3 -0
- package/scripts/frameworks/jquery.ui.touch-punch.min.js +1 -0
- package/scripts/frameworks/moment.min.js +1216 -0
- package/scripts/frameworks-modified/bootstrap-select.js +1024 -0
- package/scripts/frameworks-modified/i18next.js +2075 -0
- package/scripts/frameworks-modified/jquery.autocolumnlist.js +48 -0
- package/scripts/frameworks-modified/jquery.resizable.js +229 -0
- package/scripts/frameworks-modified/spectrum.js +2279 -0
- package/scripts/frameworks-modified/switchery.js +1957 -0
- package/scripts/frameworks-modified/toastr.js +414 -0
- package/scripts/jsdataadapters/fileDataAdapter.js +129 -0
- package/scripts/jsdataadapters/restDataAdapter.js +149 -0
- package/scripts/jsdataadapters/webSocketDataAdapter.js +114 -0
- package/scripts/miscs/templateFileDataAdapter.js +17 -0
- package/scripts/themes/beetTheme.js +2999 -0
- package/scripts/themes/darkTheme.js +3004 -0
- package/scripts/themes/defaultTheme.js +3095 -0
- package/scripts/themes/fintatechDarkTheme.js +3005 -0
- package/scripts/themes/grayTheme.js +3004 -0
- package/scripts/themes/oliveTheme.js +3004 -0
- package/scripts/themes/orangeTheme.js +3004 -0
- package/scripts/themes/purpleTheme.js +3004 -0
- package/scripts/themes/skyTheme.js +3009 -0
- package/scripts/themes/tealTheme.js +3004 -0
|
@@ -0,0 +1,485 @@
|
|
|
1
|
+
/* */
|
|
2
|
+
|
|
3
|
+
// Type definitions for Moment.js 2.8.0
|
|
4
|
+
// Project: https://github.com/timrwood/moment
|
|
5
|
+
// Definitions by: Michael Lakerveld <https://github.com/Lakerfield>, Aaron King <https://github.com/kingdango>, Hiroki Horiuchi <https://github.com/horiuchi>, Dick van den Brink <https://github.com/DickvdBrink>, Adi Dahiya <https://github.com/adidahiya>
|
|
6
|
+
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
|
7
|
+
|
|
8
|
+
declare module moment {
|
|
9
|
+
|
|
10
|
+
interface MomentInput {
|
|
11
|
+
|
|
12
|
+
years?: number;
|
|
13
|
+
y?: number;
|
|
14
|
+
|
|
15
|
+
months?: number;
|
|
16
|
+
M?: number;
|
|
17
|
+
|
|
18
|
+
weeks?: number;
|
|
19
|
+
w?: number;
|
|
20
|
+
|
|
21
|
+
days?: number;
|
|
22
|
+
d?: number;
|
|
23
|
+
|
|
24
|
+
hours?: number;
|
|
25
|
+
h?: number;
|
|
26
|
+
|
|
27
|
+
minutes?: number;
|
|
28
|
+
m?: number;
|
|
29
|
+
|
|
30
|
+
seconds?: number;
|
|
31
|
+
s?: number;
|
|
32
|
+
|
|
33
|
+
milliseconds?: number;
|
|
34
|
+
ms?: number;
|
|
35
|
+
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
interface Duration {
|
|
39
|
+
|
|
40
|
+
humanize(withSuffix?: boolean): string;
|
|
41
|
+
|
|
42
|
+
as(units: string): number;
|
|
43
|
+
|
|
44
|
+
milliseconds(): number;
|
|
45
|
+
asMilliseconds(): number;
|
|
46
|
+
|
|
47
|
+
seconds(): number;
|
|
48
|
+
asSeconds(): number;
|
|
49
|
+
|
|
50
|
+
minutes(): number;
|
|
51
|
+
asMinutes(): number;
|
|
52
|
+
|
|
53
|
+
hours(): number;
|
|
54
|
+
asHours(): number;
|
|
55
|
+
|
|
56
|
+
days(): number;
|
|
57
|
+
asDays(): number;
|
|
58
|
+
|
|
59
|
+
months(): number;
|
|
60
|
+
asMonths(): number;
|
|
61
|
+
|
|
62
|
+
years(): number;
|
|
63
|
+
asYears(): number;
|
|
64
|
+
|
|
65
|
+
add(n: number, p: string): Duration;
|
|
66
|
+
add(n: number): Duration;
|
|
67
|
+
add(d: Duration): Duration;
|
|
68
|
+
|
|
69
|
+
subtract(n: number, p: string): Duration;
|
|
70
|
+
subtract(n: number): Duration;
|
|
71
|
+
subtract(d: Duration): Duration;
|
|
72
|
+
|
|
73
|
+
toISOString(): string;
|
|
74
|
+
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
interface Moment {
|
|
78
|
+
|
|
79
|
+
format(format: string): string;
|
|
80
|
+
format(): string;
|
|
81
|
+
|
|
82
|
+
fromNow(withoutSuffix?: boolean): string;
|
|
83
|
+
|
|
84
|
+
startOf(unitOfTime: string): Moment;
|
|
85
|
+
endOf(unitOfTime: string): Moment;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Mutates the original moment by adding time. (deprecated in 2.8.0)
|
|
89
|
+
*
|
|
90
|
+
* @param unitOfTime the unit of time you want to add (eg "years" / "hours" etc)
|
|
91
|
+
* @param amount the amount you want to add
|
|
92
|
+
*/
|
|
93
|
+
add(unitOfTime: string, amount: number): Moment;
|
|
94
|
+
/**
|
|
95
|
+
* Mutates the original moment by adding time.
|
|
96
|
+
*
|
|
97
|
+
* @param amount the amount you want to add
|
|
98
|
+
* @param unitOfTime the unit of time you want to add (eg "years" / "hours" etc)
|
|
99
|
+
*/
|
|
100
|
+
add(amount: number, unitOfTime: string): Moment;
|
|
101
|
+
/**
|
|
102
|
+
* Mutates the original moment by adding time. Note that the order of arguments can be flipped.
|
|
103
|
+
*
|
|
104
|
+
* @param amount the amount you want to add
|
|
105
|
+
* @param unitOfTime the unit of time you want to add (eg "years" / "hours" etc)
|
|
106
|
+
*/
|
|
107
|
+
add(amount: string, unitOfTime: string): Moment;
|
|
108
|
+
/**
|
|
109
|
+
* Mutates the original moment by adding time.
|
|
110
|
+
*
|
|
111
|
+
* @param objectLiteral an object literal that describes multiple time units {days:7,months:1}
|
|
112
|
+
*/
|
|
113
|
+
add(objectLiteral: MomentInput): Moment;
|
|
114
|
+
/**
|
|
115
|
+
* Mutates the original moment by adding time.
|
|
116
|
+
*
|
|
117
|
+
* @param duration a length of time
|
|
118
|
+
*/
|
|
119
|
+
add(duration: Duration): Moment;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Mutates the original moment by subtracting time. (deprecated in 2.8.0)
|
|
123
|
+
*
|
|
124
|
+
* @param unitOfTime the unit of time you want to subtract (eg "years" / "hours" etc)
|
|
125
|
+
* @param amount the amount you want to subtract
|
|
126
|
+
*/
|
|
127
|
+
subtract(unitOfTime: string, amount: number): Moment;
|
|
128
|
+
/**
|
|
129
|
+
* Mutates the original moment by subtracting time.
|
|
130
|
+
*
|
|
131
|
+
* @param unitOfTime the unit of time you want to subtract (eg "years" / "hours" etc)
|
|
132
|
+
* @param amount the amount you want to subtract
|
|
133
|
+
*/
|
|
134
|
+
subtract(amount: number, unitOfTime: string): Moment;
|
|
135
|
+
/**
|
|
136
|
+
* Mutates the original moment by subtracting time. Note that the order of arguments can be flipped.
|
|
137
|
+
*
|
|
138
|
+
* @param amount the amount you want to add
|
|
139
|
+
* @param unitOfTime the unit of time you want to subtract (eg "years" / "hours" etc)
|
|
140
|
+
*/
|
|
141
|
+
subtract(amount: string, unitOfTime: string): Moment;
|
|
142
|
+
/**
|
|
143
|
+
* Mutates the original moment by subtracting time.
|
|
144
|
+
*
|
|
145
|
+
* @param objectLiteral an object literal that describes multiple time units {days:7,months:1}
|
|
146
|
+
*/
|
|
147
|
+
subtract(objectLiteral: MomentInput): Moment;
|
|
148
|
+
/**
|
|
149
|
+
* Mutates the original moment by subtracting time.
|
|
150
|
+
*
|
|
151
|
+
* @param duration a length of time
|
|
152
|
+
*/
|
|
153
|
+
subtract(duration: Duration): Moment;
|
|
154
|
+
|
|
155
|
+
calendar(): string;
|
|
156
|
+
calendar(start: Moment): string;
|
|
157
|
+
|
|
158
|
+
clone(): Moment;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* @return Unix timestamp, or milliseconds since the epoch.
|
|
162
|
+
*/
|
|
163
|
+
valueOf(): number;
|
|
164
|
+
|
|
165
|
+
local(): Moment; // current date/time in local mode
|
|
166
|
+
|
|
167
|
+
utc(): Moment; // current date/time in UTC mode
|
|
168
|
+
|
|
169
|
+
isValid(): boolean;
|
|
170
|
+
|
|
171
|
+
year(y: number): Moment;
|
|
172
|
+
year(): number;
|
|
173
|
+
quarter(): number;
|
|
174
|
+
quarter(q: number): Moment;
|
|
175
|
+
month(M: number): Moment;
|
|
176
|
+
month(M: string): Moment;
|
|
177
|
+
month(): number;
|
|
178
|
+
day(d: number): Moment;
|
|
179
|
+
day(d: string): Moment;
|
|
180
|
+
day(): number;
|
|
181
|
+
date(d: number): Moment;
|
|
182
|
+
date(): number;
|
|
183
|
+
hour(h: number): Moment;
|
|
184
|
+
hour(): number;
|
|
185
|
+
hours(h: number): Moment;
|
|
186
|
+
hours(): number;
|
|
187
|
+
minute(m: number): Moment;
|
|
188
|
+
minute(): number;
|
|
189
|
+
minutes(m: number): Moment;
|
|
190
|
+
minutes(): number;
|
|
191
|
+
second(s: number): Moment;
|
|
192
|
+
second(): number;
|
|
193
|
+
seconds(s: number): Moment;
|
|
194
|
+
seconds(): number;
|
|
195
|
+
millisecond(ms: number): Moment;
|
|
196
|
+
millisecond(): number;
|
|
197
|
+
milliseconds(ms: number): Moment;
|
|
198
|
+
milliseconds(): number;
|
|
199
|
+
weekday(): number;
|
|
200
|
+
weekday(d: number): Moment;
|
|
201
|
+
isoWeekday(): number;
|
|
202
|
+
isoWeekday(d: number): Moment;
|
|
203
|
+
weekYear(): number;
|
|
204
|
+
weekYear(d: number): Moment;
|
|
205
|
+
isoWeekYear(): number;
|
|
206
|
+
isoWeekYear(d: number): Moment;
|
|
207
|
+
week(): number;
|
|
208
|
+
week(d: number): Moment;
|
|
209
|
+
weeks(): number;
|
|
210
|
+
weeks(d: number): Moment;
|
|
211
|
+
isoWeek(): number;
|
|
212
|
+
isoWeek(d: number): Moment;
|
|
213
|
+
isoWeeks(): number;
|
|
214
|
+
isoWeeks(d: number): Moment;
|
|
215
|
+
weeksInYear(): number;
|
|
216
|
+
isoWeeksInYear(): number;
|
|
217
|
+
dayOfYear(): number;
|
|
218
|
+
dayOfYear(d: number): Moment;
|
|
219
|
+
|
|
220
|
+
from(f: Moment): string;
|
|
221
|
+
from(f: Moment, suffix: boolean): string;
|
|
222
|
+
from(d: Date): string;
|
|
223
|
+
from(s: string): string;
|
|
224
|
+
from(date: number[]): string;
|
|
225
|
+
|
|
226
|
+
diff(b: Moment): number;
|
|
227
|
+
diff(b: Moment, unitOfTime: string): number;
|
|
228
|
+
diff(b: Moment, unitOfTime: string, round: boolean): number;
|
|
229
|
+
|
|
230
|
+
toArray(): number[];
|
|
231
|
+
toDate(): Date;
|
|
232
|
+
toISOString(): string;
|
|
233
|
+
toJSON(): string;
|
|
234
|
+
unix(): number;
|
|
235
|
+
|
|
236
|
+
isLeapYear(): boolean;
|
|
237
|
+
zone(): number;
|
|
238
|
+
zone(b: number): Moment;
|
|
239
|
+
zone(b: string): Moment;
|
|
240
|
+
utcOffset(): number;
|
|
241
|
+
utcOffset(b: number): Moment;
|
|
242
|
+
utcOffset(b: string): Moment;
|
|
243
|
+
daysInMonth(): number;
|
|
244
|
+
isDST(): boolean;
|
|
245
|
+
|
|
246
|
+
isBefore(): boolean;
|
|
247
|
+
isBefore(b: Moment): boolean;
|
|
248
|
+
isBefore(b: string): boolean;
|
|
249
|
+
isBefore(b: Number): boolean;
|
|
250
|
+
isBefore(b: Date): boolean;
|
|
251
|
+
isBefore(b: number[]): boolean;
|
|
252
|
+
isBefore(b: Moment, granularity: string): boolean;
|
|
253
|
+
isBefore(b: String, granularity: string): boolean;
|
|
254
|
+
isBefore(b: Number, granularity: string): boolean;
|
|
255
|
+
isBefore(b: Date, granularity: string): boolean;
|
|
256
|
+
isBefore(b: number[], granularity: string): boolean;
|
|
257
|
+
|
|
258
|
+
isAfter(): boolean;
|
|
259
|
+
isAfter(b: Moment): boolean;
|
|
260
|
+
isAfter(b: string): boolean;
|
|
261
|
+
isAfter(b: Number): boolean;
|
|
262
|
+
isAfter(b: Date): boolean;
|
|
263
|
+
isAfter(b: number[]): boolean;
|
|
264
|
+
isAfter(b: Moment, granularity: string): boolean;
|
|
265
|
+
isAfter(b: String, granularity: string): boolean;
|
|
266
|
+
isAfter(b: Number, granularity: string): boolean;
|
|
267
|
+
isAfter(b: Date, granularity: string): boolean;
|
|
268
|
+
isAfter(b: number[], granularity: string): boolean;
|
|
269
|
+
|
|
270
|
+
isSame(b: Moment): boolean;
|
|
271
|
+
isSame(b: string): boolean;
|
|
272
|
+
isSame(b: Number): boolean;
|
|
273
|
+
isSame(b: Date): boolean;
|
|
274
|
+
isSame(b: number[]): boolean;
|
|
275
|
+
isSame(b: Moment, granularity: string): boolean;
|
|
276
|
+
isSame(b: String, granularity: string): boolean;
|
|
277
|
+
isSame(b: Number, granularity: string): boolean;
|
|
278
|
+
isSame(b: Date, granularity: string): boolean;
|
|
279
|
+
isSame(b: number[], granularity: string): boolean;
|
|
280
|
+
|
|
281
|
+
// Deprecated as of 2.8.0.
|
|
282
|
+
lang(language: string): Moment;
|
|
283
|
+
lang(reset: boolean): Moment;
|
|
284
|
+
lang(): MomentLanguage;
|
|
285
|
+
|
|
286
|
+
locale(language: string): Moment;
|
|
287
|
+
locale(reset: boolean): Moment;
|
|
288
|
+
locale(): string;
|
|
289
|
+
|
|
290
|
+
localeData(language: string): Moment;
|
|
291
|
+
localeData(reset: boolean): Moment;
|
|
292
|
+
localeData(): MomentLanguage;
|
|
293
|
+
|
|
294
|
+
// Deprecated as of 2.7.0.
|
|
295
|
+
max(date: Date): Moment;
|
|
296
|
+
max(date: number): Moment;
|
|
297
|
+
max(date: any[]): Moment;
|
|
298
|
+
max(date: string): Moment;
|
|
299
|
+
max(date: string, format: string): Moment;
|
|
300
|
+
max(clone: Moment): Moment;
|
|
301
|
+
|
|
302
|
+
// Deprecated as of 2.7.0.
|
|
303
|
+
min(date: Date): Moment;
|
|
304
|
+
min(date: number): Moment;
|
|
305
|
+
min(date: any[]): Moment;
|
|
306
|
+
min(date: string): Moment;
|
|
307
|
+
min(date: string, format: string): Moment;
|
|
308
|
+
min(clone: Moment): Moment;
|
|
309
|
+
|
|
310
|
+
get(unit: string): number;
|
|
311
|
+
set(unit: string, value: number): Moment;
|
|
312
|
+
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
interface MomentCalendar {
|
|
316
|
+
|
|
317
|
+
lastDay: any;
|
|
318
|
+
sameDay: any;
|
|
319
|
+
nextDay: any;
|
|
320
|
+
lastWeek: any;
|
|
321
|
+
nextWeek: any;
|
|
322
|
+
sameElse: any;
|
|
323
|
+
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
interface BaseMomentLanguage {
|
|
327
|
+
months ?: any;
|
|
328
|
+
monthsShort ?: any;
|
|
329
|
+
weekdays ?: any;
|
|
330
|
+
weekdaysShort ?: any;
|
|
331
|
+
weekdaysMin ?: any;
|
|
332
|
+
relativeTime ?: MomentRelativeTime;
|
|
333
|
+
meridiem ?: (hour: number, minute: number, isLowercase: boolean) => string;
|
|
334
|
+
calendar ?: MomentCalendar;
|
|
335
|
+
ordinal ?: (num: number) => string;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
interface MomentLanguage extends BaseMomentLanguage {
|
|
339
|
+
longDateFormat?: MomentLongDateFormat;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
interface MomentLanguageData extends BaseMomentLanguage {
|
|
343
|
+
/**
|
|
344
|
+
* @param formatType should be L, LL, LLL, LLLL.
|
|
345
|
+
*/
|
|
346
|
+
longDateFormat(formatType: string): string;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
interface MomentLongDateFormat {
|
|
350
|
+
|
|
351
|
+
L: string;
|
|
352
|
+
LL: string;
|
|
353
|
+
LLL: string;
|
|
354
|
+
LLLL: string;
|
|
355
|
+
LT: string;
|
|
356
|
+
l?: string;
|
|
357
|
+
ll?: string;
|
|
358
|
+
lll?: string;
|
|
359
|
+
llll?: string;
|
|
360
|
+
lt?: string;
|
|
361
|
+
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
interface MomentRelativeTime {
|
|
365
|
+
|
|
366
|
+
future: any;
|
|
367
|
+
past: any;
|
|
368
|
+
s: any;
|
|
369
|
+
m: any;
|
|
370
|
+
mm: any;
|
|
371
|
+
h: any;
|
|
372
|
+
hh: any;
|
|
373
|
+
d: any;
|
|
374
|
+
dd: any;
|
|
375
|
+
M: any;
|
|
376
|
+
MM: any;
|
|
377
|
+
y: any;
|
|
378
|
+
yy: any;
|
|
379
|
+
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
interface MomentStatic {
|
|
383
|
+
|
|
384
|
+
version: string;
|
|
385
|
+
|
|
386
|
+
(): Moment;
|
|
387
|
+
(date: number): Moment;
|
|
388
|
+
(date: number[]): Moment;
|
|
389
|
+
(date: string, format?: string, strict?: boolean): Moment;
|
|
390
|
+
(date: string, format?: string, language?: string, strict?: boolean): Moment;
|
|
391
|
+
(date: string, formats: string[], strict?: boolean): Moment;
|
|
392
|
+
(date: string, formats: string[], language?: string, strict?: boolean): Moment;
|
|
393
|
+
(date: string, specialFormat: () => void, strict?: boolean): Moment;
|
|
394
|
+
(date: string, specialFormat: () => void, language?: string, strict?: boolean): Moment;
|
|
395
|
+
(date: string, formatsIncludingSpecial: any[], strict?: boolean): Moment;
|
|
396
|
+
(date: string, formatsIncludingSpecial: any[], language?: string, strict?: boolean): Moment;
|
|
397
|
+
(date: Date): Moment;
|
|
398
|
+
(date: Moment): Moment;
|
|
399
|
+
(date: Object): Moment;
|
|
400
|
+
|
|
401
|
+
utc(): Moment;
|
|
402
|
+
utc(date: number): Moment;
|
|
403
|
+
utc(date: number[]): Moment;
|
|
404
|
+
utc(date: string, format?: string, strict?: boolean): Moment;
|
|
405
|
+
utc(date: string, format?: string, language?: string, strict?: boolean): Moment;
|
|
406
|
+
utc(date: string, formats: string[], strict?: boolean): Moment;
|
|
407
|
+
utc(date: string, formats: string[], language?: string, strict?: boolean): Moment;
|
|
408
|
+
utc(date: Date): Moment;
|
|
409
|
+
utc(date: Moment): Moment;
|
|
410
|
+
utc(date: Object): Moment;
|
|
411
|
+
|
|
412
|
+
unix(timestamp: number): Moment;
|
|
413
|
+
|
|
414
|
+
invalid(parsingFlags?: Object): Moment;
|
|
415
|
+
isMoment(): boolean;
|
|
416
|
+
isMoment(m: any): boolean;
|
|
417
|
+
isDuration(): boolean;
|
|
418
|
+
isDuration(d: any): boolean;
|
|
419
|
+
|
|
420
|
+
// Deprecated in 2.8.0.
|
|
421
|
+
lang(language?: string): string;
|
|
422
|
+
lang(language?: string, definition?: MomentLanguage): string;
|
|
423
|
+
|
|
424
|
+
locale(language?: string): string;
|
|
425
|
+
locale(language?: string[]): string;
|
|
426
|
+
locale(language?: string, definition?: MomentLanguage): string;
|
|
427
|
+
|
|
428
|
+
localeData(language?: string): MomentLanguageData;
|
|
429
|
+
|
|
430
|
+
longDateFormat: any;
|
|
431
|
+
relativeTime: any;
|
|
432
|
+
meridiem: (hour: number, minute: number, isLowercase: boolean) => string;
|
|
433
|
+
calendar: any;
|
|
434
|
+
ordinal: (num: number) => string;
|
|
435
|
+
|
|
436
|
+
duration(milliseconds: Number): Duration;
|
|
437
|
+
duration(num: Number, unitOfTime: string): Duration;
|
|
438
|
+
duration(input: MomentInput): Duration;
|
|
439
|
+
duration(object: any): Duration;
|
|
440
|
+
duration(): Duration;
|
|
441
|
+
|
|
442
|
+
parseZone(date: string): Moment;
|
|
443
|
+
|
|
444
|
+
months(): string[];
|
|
445
|
+
months(index: number): string;
|
|
446
|
+
months(format: string): string[];
|
|
447
|
+
months(format: string, index: number): string;
|
|
448
|
+
monthsShort(): string[];
|
|
449
|
+
monthsShort(index: number): string;
|
|
450
|
+
monthsShort(format: string): string[];
|
|
451
|
+
monthsShort(format: string, index: number): string;
|
|
452
|
+
|
|
453
|
+
weekdays(): string[];
|
|
454
|
+
weekdays(index: number): string;
|
|
455
|
+
weekdays(format: string): string[];
|
|
456
|
+
weekdays(format: string, index: number): string;
|
|
457
|
+
weekdaysShort(): string[];
|
|
458
|
+
weekdaysShort(index: number): string;
|
|
459
|
+
weekdaysShort(format: string): string[];
|
|
460
|
+
weekdaysShort(format: string, index: number): string;
|
|
461
|
+
weekdaysMin(): string[];
|
|
462
|
+
weekdaysMin(index: number): string;
|
|
463
|
+
weekdaysMin(format: string): string[];
|
|
464
|
+
weekdaysMin(format: string, index: number): string;
|
|
465
|
+
|
|
466
|
+
min(moments: Moment[]): Moment;
|
|
467
|
+
max(moments: Moment[]): Moment;
|
|
468
|
+
|
|
469
|
+
normalizeUnits(unit: string): string;
|
|
470
|
+
relativeTimeThreshold(threshold: string): number|boolean;
|
|
471
|
+
relativeTimeThreshold(threshold: string, limit:number): boolean;
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* Constant used to enable explicit ISO_8601 format parsing.
|
|
475
|
+
*/
|
|
476
|
+
ISO_8601(): void;
|
|
477
|
+
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
declare module 'moment' {
|
|
483
|
+
var moment: moment.MomentStatic;
|
|
484
|
+
export = moment;
|
|
485
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* */
|
|
2
|
+
|
|
3
|
+
// Type definitions for Moment.js 2.8.0
|
|
4
|
+
// Project: https://github.com/timrwood/moment
|
|
5
|
+
// Definitions by: Michael Lakerveld <https://github.com/Lakerfield>, Aaron King <https://github.com/kingdango>, Hiroki Horiuchi <https://github.com/horiuchi>, Dick van den Brink <https://github.com/DickvdBrink>, Adi Dahiya <https://github.com/adidahiya>
|
|
6
|
+
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
|
7
|
+
|
|
8
|
+
/// <reference path="moment-node.d.ts" />
|
|
9
|
+
|
|
10
|
+
declare var moment: moment.MomentStatic;
|