@amcharts/amcharts5 5.1.4 → 5.1.7
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/.internal/charts/flow/Chord.d.ts.map +1 -1
- package/.internal/charts/flow/Chord.js +7 -0
- package/.internal/charts/flow/Chord.js.map +1 -1
- package/.internal/charts/flow/Flow.d.ts +11 -0
- package/.internal/charts/flow/Flow.d.ts.map +1 -1
- package/.internal/charts/flow/Flow.js +17 -5
- package/.internal/charts/flow/Flow.js.map +1 -1
- package/.internal/charts/flow/SankeyLink.d.ts +2 -0
- package/.internal/charts/flow/SankeyLink.d.ts.map +1 -1
- package/.internal/charts/flow/SankeyLink.js +8 -0
- package/.internal/charts/flow/SankeyLink.js.map +1 -1
- package/.internal/charts/hierarchy/ForceDirected.d.ts.map +1 -1
- package/.internal/charts/hierarchy/ForceDirected.js +1 -2
- package/.internal/charts/hierarchy/ForceDirected.js.map +1 -1
- package/.internal/charts/map/MapSeries.d.ts.map +1 -1
- package/.internal/charts/map/MapSeries.js +7 -1
- package/.internal/charts/map/MapSeries.js.map +1 -1
- package/.internal/charts/radar/RadarCursor.d.ts.map +1 -1
- package/.internal/charts/radar/RadarCursor.js +6 -0
- package/.internal/charts/radar/RadarCursor.js.map +1 -1
- package/.internal/charts/xy/XYChart.d.ts +2 -2
- package/.internal/charts/xy/XYChart.d.ts.map +1 -1
- package/.internal/charts/xy/XYChart.js +29 -24
- package/.internal/charts/xy/XYChart.js.map +1 -1
- package/.internal/charts/xy/XYCursor.d.ts +7 -1
- package/.internal/charts/xy/XYCursor.d.ts.map +1 -1
- package/.internal/charts/xy/XYCursor.js +7 -1
- package/.internal/charts/xy/XYCursor.js.map +1 -1
- package/.internal/charts/xy/axes/Axis.d.ts +3 -1
- package/.internal/charts/xy/axes/Axis.d.ts.map +1 -1
- package/.internal/charts/xy/axes/Axis.js +27 -6
- package/.internal/charts/xy/axes/Axis.js.map +1 -1
- package/.internal/charts/xy/axes/DateAxis.d.ts +1 -1
- package/.internal/charts/xy/axes/DateAxis.d.ts.map +1 -1
- package/.internal/charts/xy/axes/DateAxis.js +19 -13
- package/.internal/charts/xy/axes/DateAxis.js.map +1 -1
- package/.internal/charts/xy/axes/GaplessDateAxis.d.ts +1 -0
- package/.internal/charts/xy/axes/GaplessDateAxis.d.ts.map +1 -1
- package/.internal/charts/xy/axes/GaplessDateAxis.js +21 -39
- package/.internal/charts/xy/axes/GaplessDateAxis.js.map +1 -1
- package/.internal/charts/xy/series/XYSeries.d.ts.map +1 -1
- package/.internal/charts/xy/series/XYSeries.js +1 -0
- package/.internal/charts/xy/series/XYSeries.js.map +1 -1
- package/.internal/core/render/Scrollbar.d.ts +2 -0
- package/.internal/core/render/Scrollbar.d.ts.map +1 -1
- package/.internal/core/render/Scrollbar.js +10 -1
- package/.internal/core/render/Scrollbar.js.map +1 -1
- package/.internal/core/render/Sprite.d.ts.map +1 -1
- package/.internal/core/render/Sprite.js +2 -1
- package/.internal/core/render/Sprite.js.map +1 -1
- package/.internal/core/render/Tooltip.d.ts.map +1 -1
- package/.internal/core/render/Tooltip.js +14 -4
- package/.internal/core/render/Tooltip.js.map +1 -1
- package/.internal/core/util/DateFormatter.js +1 -1
- package/.internal/core/util/DateFormatter.js.map +1 -1
- package/.internal/core/util/Modal.d.ts.map +1 -1
- package/.internal/core/util/Modal.js +5 -3
- package/.internal/core/util/Modal.js.map +1 -1
- package/CHANGELOG.md +51 -11
- package/LICENSE +1 -1
- package/examples/javascript/flow-chord/package.json +1 -1
- package/examples/javascript/flow-chord-directed/package.json +1 -1
- package/examples/javascript/flow-chord-non-ribbon/package.json +1 -1
- package/examples/javascript/flow-sankey/package.json +1 -1
- package/examples/javascript/gauge/package.json +1 -1
- package/examples/javascript/gauge-bands/package.json +1 -1
- package/examples/javascript/hierarchy-force-directed/package.json +1 -1
- package/examples/javascript/hierarchy-pack/package.json +1 -1
- package/examples/javascript/hierarchy-partition/package.json +1 -1
- package/examples/javascript/hierarchy-sunburst/package.json +1 -1
- package/examples/javascript/hierarchy-tree/package.json +1 -1
- package/examples/javascript/hierarchy-treemap/package.json +1 -1
- package/examples/javascript/map-animating-along-lines/package.json +1 -1
- package/examples/javascript/map-day-and-night/package.json +1 -1
- package/examples/javascript/map-globe-rotate-to-country/package.json +1 -1
- package/examples/javascript/map-globe-with-projected-circles/package.json +1 -1
- package/examples/javascript/map-with-bubbles/package.json +1 -1
- package/examples/javascript/map-zoom-to-country/package.json +1 -1
- package/examples/javascript/misc-40-charts/package.json +1 -1
- package/examples/javascript/misc-microchart-grid/package.json +1 -1
- package/examples/javascript/pie-chart/package.json +1 -1
- package/examples/javascript/pie-donut-chart/package.json +1 -1
- package/examples/javascript/pie-variable-radius/package.json +1 -1
- package/examples/javascript/radar-column-iwatch-style/package.json +1 -1
- package/examples/javascript/radar-heat-map/package.json +1 -1
- package/examples/javascript/radar-line/package.json +1 -1
- package/examples/javascript/radar-time-line/package.json +1 -1
- package/examples/javascript/sliced-funnel/package.json +1 -1
- package/examples/javascript/sliced-pictorial-stacked/package.json +1 -1
- package/examples/javascript/sliced-pyramid/package.json +1 -1
- package/examples/javascript/venn-diagram/package.json +1 -1
- package/examples/javascript/wordcloud-with-data/package.json +1 -1
- package/examples/javascript/wordcloud-with-text/package.json +1 -1
- package/examples/javascript/xy-100-percent-stacked-column/package.json +1 -1
- package/examples/javascript/xy-animated-bullet-at-the-end-of-the-series/package.json +1 -1
- package/examples/javascript/xy-bubble/package.json +1 -1
- package/examples/javascript/xy-candlestick/package.json +1 -1
- package/examples/javascript/xy-clustered-column/package.json +1 -1
- package/examples/javascript/xy-column/package.json +1 -1
- package/examples/javascript/xy-comparing-series-google-analytics-style/package.json +1 -1
- package/examples/javascript/xy-data-grouping/package.json +1 -1
- package/examples/javascript/xy-draggable-range/package.json +1 -1
- package/examples/javascript/xy-drawing-series-with-mouse-or-touch/package.json +1 -1
- package/examples/javascript/xy-dumbbell plot/package.json +1 -1
- package/examples/javascript/xy-evenly-spaced-date-axis/package.json +1 -1
- package/examples/javascript/xy-line/package.json +1 -1
- package/examples/javascript/xy-line-highlight-on-legend-hover/package.json +1 -1
- package/examples/javascript/xy-live-data/package.json +1 -1
- package/examples/javascript/xy-multiple-synced-value-axes/package.json +1 -1
- package/examples/javascript/xy-ohlc/package.json +1 -1
- package/examples/javascript/xy-real-time-data-sorting/package.json +1 -1
- package/examples/javascript/xy-smoothed-line/package.json +1 -1
- package/examples/javascript/xy-stacked-and-clustered-column/package.json +1 -1
- package/examples/javascript/xy-stacked-column/package.json +1 -1
- package/examples/javascript/xy-stacked-step/package.json +1 -1
- package/examples/javascript/xy-stock/index.js +1 -1
- package/examples/javascript/xy-stock/package.json +1 -1
- package/examples/javascript/xy-stock-comparing/index.js +1 -1
- package/examples/javascript/xy-stock-comparing/package.json +1 -1
- package/examples/typescript/flow-chord/package.json +1 -1
- package/examples/typescript/flow-chord-directed/package.json +1 -1
- package/examples/typescript/flow-chord-non-ribbon/package.json +1 -1
- package/examples/typescript/flow-sankey/package.json +1 -1
- package/examples/typescript/gauge/package.json +1 -1
- package/examples/typescript/gauge-bands/package.json +1 -1
- package/examples/typescript/hierarchy-force-directed/package.json +1 -1
- package/examples/typescript/hierarchy-pack/package.json +1 -1
- package/examples/typescript/hierarchy-partition/package.json +1 -1
- package/examples/typescript/hierarchy-sunburst/package.json +1 -1
- package/examples/typescript/hierarchy-tree/package.json +1 -1
- package/examples/typescript/hierarchy-treemap/package.json +1 -1
- package/examples/typescript/map-animating-along-lines/package.json +1 -1
- package/examples/typescript/map-day-and-night/package.json +1 -1
- package/examples/typescript/map-globe-rotate-to-country/package.json +1 -1
- package/examples/typescript/map-globe-with-projected-circles/package.json +1 -1
- package/examples/typescript/map-with-bubbles/package.json +1 -1
- package/examples/typescript/map-zoom-to-country/package.json +1 -1
- package/examples/typescript/misc-40-charts/package.json +1 -1
- package/examples/typescript/misc-microchart-grid/package.json +1 -1
- package/examples/typescript/pie-chart/package.json +1 -1
- package/examples/typescript/pie-donut-chart/package.json +1 -1
- package/examples/typescript/pie-variable-radius/package.json +1 -1
- package/examples/typescript/radar-column-iwatch-style/package.json +1 -1
- package/examples/typescript/radar-heat-map/package.json +1 -1
- package/examples/typescript/radar-line/package.json +1 -1
- package/examples/typescript/radar-time-line/package.json +1 -1
- package/examples/typescript/sliced-funnel/package.json +1 -1
- package/examples/typescript/sliced-pictorial-stacked/package.json +1 -1
- package/examples/typescript/sliced-pyramid/package.json +1 -1
- package/examples/typescript/venn-diagram/package.json +1 -1
- package/examples/typescript/wordcloud-with-data/package.json +1 -1
- package/examples/typescript/wordcloud-with-text/package.json +1 -1
- package/examples/typescript/xy-100-percent-stacked-column/package.json +1 -1
- package/examples/typescript/xy-animated-bullet-at-the-end-of-the-series/package.json +1 -1
- package/examples/typescript/xy-bubble/package.json +1 -1
- package/examples/typescript/xy-candlestick/package.json +1 -1
- package/examples/typescript/xy-clustered-column/package.json +1 -1
- package/examples/typescript/xy-column/package.json +1 -1
- package/examples/typescript/xy-comparing-series-google-analytics-style/package.json +1 -1
- package/examples/typescript/xy-data-grouping/package.json +1 -1
- package/examples/typescript/xy-draggable-range/package.json +1 -1
- package/examples/typescript/xy-drawing-series-with-mouse-or-touch/package.json +1 -1
- package/examples/typescript/xy-dumbbell plot/package.json +1 -1
- package/examples/typescript/xy-evenly-spaced-date-axis/package.json +1 -1
- package/examples/typescript/xy-line/package.json +1 -1
- package/examples/typescript/xy-line-highlight-on-legend-hover/package.json +1 -1
- package/examples/typescript/xy-live-data/package.json +1 -1
- package/examples/typescript/xy-multiple-synced-value-axes/package.json +1 -1
- package/examples/typescript/xy-ohlc/package.json +1 -1
- package/examples/typescript/xy-real-time-data-sorting/package.json +1 -1
- package/examples/typescript/xy-smoothed-line/package.json +1 -1
- package/examples/typescript/xy-stacked-and-clustered-column/package.json +1 -1
- package/examples/typescript/xy-stacked-column/package.json +1 -1
- package/examples/typescript/xy-stacked-step/package.json +1 -1
- package/examples/typescript/xy-stock/index.ts +1 -1
- package/examples/typescript/xy-stock/package.json +1 -1
- package/examples/typescript/xy-stock-comparing/index.ts +1 -1
- package/examples/typescript/xy-stock-comparing/package.json +1 -1
- package/locales/nb_NO.js +6 -6
- package/locales/nb_NO.js.map +1 -1
- package/package.json +1 -1
|
@@ -282,8 +282,12 @@ var Tooltip = /** @class */ (function (_super) {
|
|
|
282
282
|
var pointerOrientation = this.get("pointerOrientation");
|
|
283
283
|
var background = this.get("background");
|
|
284
284
|
var pointerLength = 0;
|
|
285
|
+
var bgStrokeSizeY = 0;
|
|
286
|
+
var bgStrokeSizeX = 0;
|
|
285
287
|
if (background instanceof PointedRectangle) {
|
|
286
288
|
pointerLength = background.get("pointerLength", 0);
|
|
289
|
+
bgStrokeSizeY = background.get("strokeWidth", 0) / 2;
|
|
290
|
+
bgStrokeSizeX = bgStrokeSizeY;
|
|
287
291
|
}
|
|
288
292
|
var pointerX = 0;
|
|
289
293
|
var pointerY = 0;
|
|
@@ -291,9 +295,11 @@ var Tooltip = /** @class */ (function (_super) {
|
|
|
291
295
|
var boundsH = bounds.bottom - bounds.top;
|
|
292
296
|
// horizontal
|
|
293
297
|
if (pointerOrientation == "horizontal" || pointerOrientation == "left" || pointerOrientation == "right") {
|
|
298
|
+
bgStrokeSizeY = 0;
|
|
294
299
|
if (pointerOrientation == "horizontal") {
|
|
295
300
|
if (x > bounds.left + boundsW / 2) {
|
|
296
301
|
x -= (w * (1 - cw) + pointerLength);
|
|
302
|
+
bgStrokeSizeX *= -1;
|
|
297
303
|
}
|
|
298
304
|
else {
|
|
299
305
|
x += (w * cw + pointerLength);
|
|
@@ -304,16 +310,19 @@ var Tooltip = /** @class */ (function (_super) {
|
|
|
304
310
|
}
|
|
305
311
|
else {
|
|
306
312
|
x -= (w * cw + pointerLength);
|
|
313
|
+
bgStrokeSizeX *= -1;
|
|
307
314
|
}
|
|
308
315
|
}
|
|
309
316
|
// vertical pointer
|
|
310
317
|
else {
|
|
318
|
+
bgStrokeSizeX = 0;
|
|
311
319
|
if (pointerOrientation == "vertical") {
|
|
312
320
|
if (y > bounds.top + h / 2 + pointerLength) {
|
|
313
321
|
y -= (h * (1 - ch) + pointerLength);
|
|
314
322
|
}
|
|
315
323
|
else {
|
|
316
324
|
y += (h * ch + pointerLength);
|
|
325
|
+
bgStrokeSizeY *= -1;
|
|
317
326
|
}
|
|
318
327
|
}
|
|
319
328
|
else if (pointerOrientation == "down") {
|
|
@@ -321,12 +330,13 @@ var Tooltip = /** @class */ (function (_super) {
|
|
|
321
330
|
}
|
|
322
331
|
else {
|
|
323
332
|
y += (h * ch + pointerLength);
|
|
333
|
+
bgStrokeSizeY *= -1;
|
|
324
334
|
}
|
|
325
335
|
}
|
|
326
|
-
x = $math.fitToRange(x, bounds.left + w * cw, bounds.left + boundsW - w * (1 - cw));
|
|
327
|
-
y = $math.fitToRange(y, bounds.top + h * ch, bounds.top + boundsH - h * (1 - ch));
|
|
328
|
-
pointerX = pointTo.x - x + w * cw;
|
|
329
|
-
pointerY = pointTo.y - y + h * ch;
|
|
336
|
+
x = $math.fitToRange(x, bounds.left + w * cw, bounds.left + boundsW - w * (1 - cw)) + bgStrokeSizeX;
|
|
337
|
+
y = $math.fitToRange(y, bounds.top + h * ch, bounds.top + boundsH - h * (1 - ch)) - bgStrokeSizeY;
|
|
338
|
+
pointerX = pointTo.x - x + w * cw + bgStrokeSizeX;
|
|
339
|
+
pointerY = pointTo.y - y + h * ch - bgStrokeSizeY;
|
|
330
340
|
this._fx = x;
|
|
331
341
|
this._fy = y;
|
|
332
342
|
var animationDuration = this.get("animationDuration", 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.js","sourceRoot":"","sources":["../../../../../src/.internal/core/render/Tooltip.ts"],"names":[],"mappings":";AAOA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAyC,MAAM,aAA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U,EAAE,QAAQ,CAAC,CAAC;iBACrC;gBAED,IAAI,CAAC,GAAG,CAAC,EAAE;oBACV,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;iBACZ;gBACD,IAAI,CAAC,GAAG,CAAC,EAAE;oBACV,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;iBACZ;aACD;QACF,CAAC;;IA7SD;;;;eAAkC,SAAS;OAAC;IAC5C;;;;eAA0C,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;OAAC;IA6S5F,cAAC;CAAA,AAzTD,CAA6B,SAAS,GAyTrC;SAzTY,OAAO","sourcesContent":["import type { IBounds } from \"../util/IBounds\";\nimport type { IPoint } from \"../util/IPoint\";\nimport type { Pattern } from \"../render/patterns/Pattern\";\nimport type { Time } from \"../util/Animation\";\nimport type { Sprite } from \"../render/Sprite\";\nimport type { MultiDisposer, IDisposer } from \"../util/Disposer\";\n\nimport { Label } from \"../render/Label\";\nimport { PointedRectangle } from \"../render/PointedRectangle\";\nimport { Container, IContainerPrivate, IContainerSettings } from \"./Container\";\nimport { Percent } from \"../util/Percent\";\nimport { Color } from \"../util/Color\";\n\nimport * as $math from \"../util/Math\";\nimport * as $array from \"../util/Array\";\nimport * as $utils from \"../util/Utils\";\n//import * as $utils from \"../util/Utils\";\nimport type { DataItem, IComponentDataItem } from \"./Component\";\n\n\nexport interface ITooltipSettings extends IContainerSettings {\n\n\t/**\n\t * Text to use for tooltip's label.\n\t */\n\tlabelText?: string\n\n\t/**\n\t * A direction of the tooltip pointer.\n\t *\n\t * https://www.amcharts.com/docs/v5/concepts/common-elements/tooltips/#Orientation\n\t */\n\tpointerOrientation?: \"left\" | \"right\" | \"up\" | \"down\" | \"vertical\" | \"horizontal\";\n\n\t/**\n\t * If set to `true` will use the same `fill` color for its background as\n\t * its `tooltipTarget`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/tooltips/#Colors} for more info\n\t * @defaul false\n\t */\n\tgetFillFromSprite?: boolean;\n\n\t/**\n\t * If set to `true` will use the same `fill` color as its `tooltipTarget`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/tooltips/#Colors} for more info\n\t * @defaul false\n\t */\n\tgetLabelFillFromSprite?: boolean;\n\n\t/**\n\t * If set to `true` will use the same `stroke` color as its `tooltipTarget`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/tooltips/#Colors} for more info\n\t * @default false\n\t */\n\tgetStrokeFromSprite?: boolean;\n\n\t/**\n\t * Scree bounds to constring tooltip within.\n\t */\n\tbounds?: IBounds;\n\n\t/**\n\t * If set to `true` tooltip will adjust its text color for better visibility\n\t * on its background.\n\t *\n\t * @default true\n\t */\n\tautoTextColor?: boolean;\n\n\t/**\n\t * Screen coordinates the tooltip show point to.\n\t */\n\tpointTo?: IPoint;\n\n\t/**\n\t * Duration in milliseconds for tooltip position change, e.g. when tooltip\n\t * is jumping from one target to another.\n\t */\n\tanimationDuration?: number;\n\n\t/**\n\t * Easing function for tooltip animation.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/animations/#Easing_functions} for more info\n\t */\n\tanimationEasing?: (t: Time) => Time;\n\n\t/**\n\t * A target element tooltip is shown fow.\n\t */\n\ttooltipTarget?: Sprite;\n\n}\n\nexport interface ITooltipPrivate extends IContainerPrivate {\n}\n\n/**\n * Creates a tooltip.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/tooltips/} for more info\n * @important\n */\nexport class Tooltip extends Container {\n\n\tprotected _arrangeDisposer: MultiDisposer | undefined;\n\n\tpublic _fx: number = 0;\n\tpublic _fy: number = 0;\n\n\tdeclare public _settings: ITooltipSettings;\n\tdeclare public _privateSettings: ITooltipPrivate;\n\n\tprotected _label!: Label;\n\tpublic static className: string = \"Tooltip\";\n\tpublic static classNames: Array<string> = Container.classNames.concat([Tooltip.className]);\n\n\tprotected _fillDp: IDisposer | undefined;\n\tprotected _strokeDp: IDisposer | undefined;\n\tprotected _labelDp: IDisposer | undefined;\n\n\tprotected _w: number = 0;\n\tprotected _h: number = 0;\n\n\tprotected _afterNew() {\n\t\tthis._settings.themeTags = $utils.mergeTags(this._settings.themeTags, [\"tooltip\"]);\n\n\t\tsuper._afterNew();\n\n\t\tthis.set(\"background\", PointedRectangle.new(this._root, {\n\t\t\tthemeTags: [\"tooltip\", \"background\"]\n\t\t}));\n\n\t\tthis._label = this.children.push(Label.new(this._root, {}));\n\n\t\tthis._disposers.push(this._label.events.on(\"boundschanged\", () => {\n\t\t\tthis._updateBackground();\n\t\t}))\n\n\t\tthis.on(\"bounds\", () => {\n\t\t\tthis._updateBackground();\n\t\t})\n\n\t\tthis._updateTextColor();\n\n\t\tthis._root.tooltipContainer.children.push(this);\n\t\tthis.hide(0);\n\n\t\tthis._root._tooltips.push(this);\n\t}\n\n\t/**\n\t * A [[Label]] element for the tooltip.\n\t *\n\t * @readonly\n\t * @return Label\n\t */\n\tpublic get label(): Label {\n\t\treturn this._label;\n\t}\n\n\t/**\n\t * Permanently disposes the tooltip.\n\t */\n\tpublic dispose() {\n\t\tsuper.dispose();\n\t\t$array.remove(this._root._tooltips, this);\n\t}\n\n\tpublic _updateChildren() {\n\t\tsuper._updateChildren();\n\t\tconst labelText = this.get(\"labelText\");\n\t\tif (labelText != null) {\n\t\t\tthis.label.set(\"text\", this.get(\"labelText\"));\n\t\t}\n\t}\n\n\tpublic _changed() {\n\t\tsuper._changed();\n\n\t\tif (this.isDirty(\"pointTo\")) {\n\t\t\t// can't compare to previous, as sometimes pointTo is set twice (when pointer moves, so the position won't be udpated)\n\t\t\tthis._updateBackground();\n\t\t}\n\n\t\tif (this.isDirty(\"tooltipTarget\")) {\n\t\t\tthis.updateBackgroundColor();\n\t\t}\n\t}\n\n\tprotected _onShow() {\n\t\tsuper._onShow();\n\t\tthis.updateBackgroundColor();\n\t}\n\n\n\tpublic updateBackgroundColor() {\n\t\tlet tooltipTarget = this.get(\"tooltipTarget\");\n\t\tconst background = this.get(\"background\");\n\t\tlet fill: Color | undefined;\n\t\tlet stroke: Color | undefined;\n\n\n\t\tif (tooltipTarget && background) {\n\n\t\t\tfill = tooltipTarget.get(\"fill\" as any);\n\t\t\tstroke = tooltipTarget.get(\"stroke\" as any);\n\n\t\t\tif (fill == null) {\n\t\t\t\tfill = stroke;\n\t\t\t}\n\n\t\t\tif (this.get(\"getFillFromSprite\")) {\n\n\t\t\t\tif (this._fillDp) {\n\t\t\t\t\tthis._fillDp.dispose();\n\t\t\t\t}\n\n\t\t\t\tif (fill != null) {\n\t\t\t\t\tbackground.set(\"fill\", fill as any);\n\t\t\t\t}\n\n\t\t\t\tthis._fillDp = tooltipTarget.on(\"fill\" as any, (fill) => {\n\t\t\t\t\tif (fill != null) {\n\t\t\t\t\t\tbackground.set(\"fill\", fill as any);\n\t\t\t\t\t\tthis._updateTextColor(fill);\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tif (this.get(\"getStrokeFromSprite\")) {\n\n\t\t\t\tif (this._strokeDp) {\n\t\t\t\t\tthis._strokeDp.dispose();\n\t\t\t\t}\n\n\t\t\t\tif (fill != null) {\n\t\t\t\t\tbackground.set(\"stroke\", fill as any);\n\t\t\t\t}\n\n\t\t\t\tthis._strokeDp = tooltipTarget.on(\"fill\" as any, (fill) => {\n\t\t\t\t\tif (fill != null) {\n\t\t\t\t\t\tbackground.set(\"stroke\", fill as any);\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tif (this.get(\"getLabelFillFromSprite\")) {\n\n\t\t\t\tif (this._labelDp) {\n\t\t\t\t\tthis._labelDp.dispose();\n\t\t\t\t}\n\n\t\t\t\tif (fill != null) {\n\t\t\t\t\tthis.label.set(\"fill\", fill as any);\n\t\t\t\t}\n\n\t\t\t\tthis._labelDp = tooltipTarget.on(\"fill\" as any, (fill) => {\n\t\t\t\t\tif (fill != null) {\n\t\t\t\t\t\tthis.label.set(\"fill\", fill as any);\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\n\t\tthis._updateTextColor(fill);\n\t}\n\n\n\tprotected _updateTextColor(fill?: Color | Pattern) {\n\t\tif (this.get(\"autoTextColor\")) {\n\t\t\tif (fill == null) {\n\t\t\t\tfill = this.get(\"background\")!.get(\"fill\") as Color;\n\t\t\t}\n\n\t\t\tif (fill == null) {\n\t\t\t\tfill = this._root.interfaceColors.get(\"background\");\n\t\t\t}\n\n\t\t\tif (fill instanceof Color) {\n\t\t\t\tthis.label.set(\"fill\", Color.alternative(fill, this._root.interfaceColors.get(\"alternativeText\"), this._root.interfaceColors.get(\"text\")));\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _setDataItem(dataItem?: DataItem<IComponentDataItem>): void {\n\t\tsuper._setDataItem(dataItem);\n\t\tthis.label._setDataItem(dataItem);\n\t}\t\n\n\n\tprotected _updateBackground() {\n\t\tsuper.updateBackground();\n\t\tconst parent = this._root.container;\n\n\t\tif (parent) {\n\n\t\t\tlet cw = 0.5;\n\t\t\tlet ch = 0.5;\n\n\t\t\tlet centerX = this.get(\"centerX\");\n\t\t\tif (centerX instanceof Percent) {\n\t\t\t\tcw = centerX.value;\n\t\t\t}\n\n\t\t\tlet centerY = this.get(\"centerY\");\n\t\t\tif (centerY instanceof Percent) {\n\t\t\t\tch = centerY.value;\n\t\t\t}\n\n\t\t\tlet parentW = parent.width();\n\t\t\tlet parentH = parent.height();\n\n\t\t\tconst bounds = this.get(\"bounds\", { left: 0, top: 0, right: parentW, bottom: parentH });\n\n\t\t\tthis._updateBounds();\n\n\t\t\tlet w = this.width();\n\t\t\tlet h = this.height();\n\n\t\t\t// use old w and h,as when tooltip is hidden, these are 0 and unneeded animation happens\n\t\t\tif (w === 0) {\n\t\t\t\tw = this._w;\n\t\t\t}\n\n\t\t\tif (h === 0) {\n\t\t\t\th = this._h;\n\t\t\t}\n\n\t\t\tlet pointTo = this.get(\"pointTo\", { x: parentW / 2, y: parentH / 2 });\n\t\t\tlet x = pointTo.x;\n\t\t\tlet y = pointTo.y;\n\n\t\t\tlet pointerOrientation = this.get(\"pointerOrientation\");\n\n\t\t\tlet background = this.get(\"background\");\n\t\t\tlet pointerLength = 0;\n\t\t\tif (background instanceof PointedRectangle) {\n\t\t\t\tpointerLength = background.get(\"pointerLength\", 0);\n\t\t\t}\n\n\t\t\tlet pointerX = 0;\n\t\t\tlet pointerY = 0;\n\n\t\t\tlet boundsW = bounds.right - bounds.left;\n\t\t\tlet boundsH = bounds.bottom - bounds.top;\n\n\t\t\t// horizontal\n\t\t\tif (pointerOrientation == \"horizontal\" || pointerOrientation == \"left\" || pointerOrientation == \"right\") {\n\t\t\t\tif (pointerOrientation == \"horizontal\") {\n\t\t\t\t\tif (x > bounds.left + boundsW / 2) {\n\t\t\t\t\t\tx -= (w * (1 - cw) + pointerLength);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tx += (w * cw + pointerLength);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (pointerOrientation == \"left\") {\n\t\t\t\t\tx += (w * (1 - cw) + pointerLength);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tx -= (w * cw + pointerLength);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// vertical pointer\n\t\t\telse {\n\t\t\t\tif (pointerOrientation == \"vertical\") {\n\t\t\t\t\tif (y > bounds.top + h / 2 + pointerLength) {\n\t\t\t\t\t\ty -= (h * (1 - ch) + pointerLength);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\ty += (h * ch + pointerLength);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (pointerOrientation == \"down\") {\n\t\t\t\t\ty -= (h * (1 - ch) + pointerLength);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ty += (h * ch + pointerLength);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tx = $math.fitToRange(x, bounds.left + w * cw, bounds.left + boundsW - w * (1 - cw));\n\t\t\ty = $math.fitToRange(y, bounds.top + h * ch, bounds.top + boundsH - h * (1 - ch));\n\n\t\t\tpointerX = pointTo.x - x + w * cw;\n\t\t\tpointerY = pointTo.y - y + h * ch;\n\n\t\t\tthis._fx = x;\n\t\t\tthis._fy = y;\n\n\t\t\tconst animationDuration = this.get(\"animationDuration\", 0);\n\n\t\t\tif (animationDuration > 0 && this.get(\"visible\") && this.get(\"opacity\") > 0.1) {\n\t\t\t\tconst animationEasing = this.get(\"animationEasing\");\n\t\t\t\tthis.animate({ key: \"x\", to: x, duration: animationDuration, easing: animationEasing });\n\t\t\t\tthis.animate({ key: \"y\", to: y, duration: animationDuration, easing: animationEasing });\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.set(\"x\", x);\n\t\t\t\tthis.set(\"y\", y);\n\t\t\t}\n\n\t\t\tif (background instanceof PointedRectangle) {\n\t\t\t\tbackground.set(\"pointerX\", pointerX);\n\t\t\t\tbackground.set(\"pointerY\", pointerY);\n\t\t\t}\n\n\t\t\tif (w > 0) {\n\t\t\t\tthis._w = w;\n\t\t\t}\n\t\t\tif (h > 0) {\n\t\t\t\tthis._h = h;\n\t\t\t}\n\t\t}\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Tooltip.js","sourceRoot":"","sources":["../../../../../src/.internal/core/render/Tooltip.ts"],"names":[],"mappings":";AAOA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAyC,MAAM,aAAa,CAAC;AAC/E,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAA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,EAAE,CAAC,CAAC,CAAC;oBACjB,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;iBACjB;gBAED,IAAI,UAAU,YAAY,gBAAgB,EAAE;oBAC3C,UAAU,CAAC,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;oBACrC,UAAU,CAAC,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;iBACrC;gBAED,IAAI,CAAC,GAAG,CAAC,EAAE;oBACV,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;iBACZ;gBACD,IAAI,CAAC,GAAG,CAAC,EAAE;oBACV,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;iBACZ;aACD;QACF,CAAC;;IA1TD;;;;eAAkC,SAAS;OAAC;IAC5C;;;;eAA0C,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;OAAC;IA0T5F,cAAC;CAAA,AAtUD,CAA6B,SAAS,GAsUrC;SAtUY,OAAO","sourcesContent":["import type { IBounds } from \"../util/IBounds\";\nimport type { IPoint } from \"../util/IPoint\";\nimport type { Pattern } from \"../render/patterns/Pattern\";\nimport type { Time } from \"../util/Animation\";\nimport type { Sprite } from \"../render/Sprite\";\nimport type { MultiDisposer, IDisposer } from \"../util/Disposer\";\n\nimport { Label } from \"../render/Label\";\nimport { PointedRectangle } from \"../render/PointedRectangle\";\nimport { Container, IContainerPrivate, IContainerSettings } from \"./Container\";\nimport { Percent } from \"../util/Percent\";\nimport { Color } from \"../util/Color\";\n\nimport * as $math from \"../util/Math\";\nimport * as $array from \"../util/Array\";\nimport * as $utils from \"../util/Utils\";\n//import * as $utils from \"../util/Utils\";\nimport type { DataItem, IComponentDataItem } from \"./Component\";\n\n\nexport interface ITooltipSettings extends IContainerSettings {\n\n\t/**\n\t * Text to use for tooltip's label.\n\t */\n\tlabelText?: string\n\n\t/**\n\t * A direction of the tooltip pointer.\n\t *\n\t * https://www.amcharts.com/docs/v5/concepts/common-elements/tooltips/#Orientation\n\t */\n\tpointerOrientation?: \"left\" | \"right\" | \"up\" | \"down\" | \"vertical\" | \"horizontal\";\n\n\t/**\n\t * If set to `true` will use the same `fill` color for its background as\n\t * its `tooltipTarget`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/tooltips/#Colors} for more info\n\t * @defaul false\n\t */\n\tgetFillFromSprite?: boolean;\n\n\t/**\n\t * If set to `true` will use the same `fill` color as its `tooltipTarget`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/tooltips/#Colors} for more info\n\t * @defaul false\n\t */\n\tgetLabelFillFromSprite?: boolean;\n\n\t/**\n\t * If set to `true` will use the same `stroke` color as its `tooltipTarget`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/tooltips/#Colors} for more info\n\t * @default false\n\t */\n\tgetStrokeFromSprite?: boolean;\n\n\t/**\n\t * Scree bounds to constring tooltip within.\n\t */\n\tbounds?: IBounds;\n\n\t/**\n\t * If set to `true` tooltip will adjust its text color for better visibility\n\t * on its background.\n\t *\n\t * @default true\n\t */\n\tautoTextColor?: boolean;\n\n\t/**\n\t * Screen coordinates the tooltip show point to.\n\t */\n\tpointTo?: IPoint;\n\n\t/**\n\t * Duration in milliseconds for tooltip position change, e.g. when tooltip\n\t * is jumping from one target to another.\n\t */\n\tanimationDuration?: number;\n\n\t/**\n\t * Easing function for tooltip animation.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/animations/#Easing_functions} for more info\n\t */\n\tanimationEasing?: (t: Time) => Time;\n\n\t/**\n\t * A target element tooltip is shown fow.\n\t */\n\ttooltipTarget?: Sprite;\n\n}\n\nexport interface ITooltipPrivate extends IContainerPrivate {\n}\n\n/**\n * Creates a tooltip.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/tooltips/} for more info\n * @important\n */\nexport class Tooltip extends Container {\n\n\tprotected _arrangeDisposer: MultiDisposer | undefined;\n\n\tpublic _fx: number = 0;\n\tpublic _fy: number = 0;\n\n\tdeclare public _settings: ITooltipSettings;\n\tdeclare public _privateSettings: ITooltipPrivate;\n\n\tprotected _label!: Label;\n\tpublic static className: string = \"Tooltip\";\n\tpublic static classNames: Array<string> = Container.classNames.concat([Tooltip.className]);\n\n\tprotected _fillDp: IDisposer | undefined;\n\tprotected _strokeDp: IDisposer | undefined;\n\tprotected _labelDp: IDisposer | undefined;\n\n\tprotected _w: number = 0;\n\tprotected _h: number = 0;\n\n\tprotected _afterNew() {\n\t\tthis._settings.themeTags = $utils.mergeTags(this._settings.themeTags, [\"tooltip\"]);\n\n\t\tsuper._afterNew();\n\n\t\tthis.set(\"background\", PointedRectangle.new(this._root, {\n\t\t\tthemeTags: [\"tooltip\", \"background\"]\n\t\t}));\n\n\t\tthis._label = this.children.push(Label.new(this._root, {}));\n\n\t\tthis._disposers.push(this._label.events.on(\"boundschanged\", () => {\n\t\t\tthis._updateBackground();\n\t\t}))\n\n\t\tthis.on(\"bounds\", () => {\n\t\t\tthis._updateBackground();\n\t\t})\n\n\t\tthis._updateTextColor();\n\n\t\tthis._root.tooltipContainer.children.push(this);\n\t\tthis.hide(0);\n\n\t\tthis._root._tooltips.push(this);\n\t}\n\n\t/**\n\t * A [[Label]] element for the tooltip.\n\t *\n\t * @readonly\n\t * @return Label\n\t */\n\tpublic get label(): Label {\n\t\treturn this._label;\n\t}\n\n\t/**\n\t * Permanently disposes the tooltip.\n\t */\n\tpublic dispose() {\n\t\tsuper.dispose();\n\t\t$array.remove(this._root._tooltips, this);\n\t}\n\n\tpublic _updateChildren() {\n\t\tsuper._updateChildren();\n\t\tconst labelText = this.get(\"labelText\");\n\t\tif (labelText != null) {\n\t\t\tthis.label.set(\"text\", this.get(\"labelText\"));\n\t\t}\n\t}\n\n\tpublic _changed() {\n\t\tsuper._changed();\n\n\t\tif (this.isDirty(\"pointTo\")) {\n\t\t\t// can't compare to previous, as sometimes pointTo is set twice (when pointer moves, so the position won't be udpated)\n\t\t\tthis._updateBackground();\n\t\t}\n\n\t\tif (this.isDirty(\"tooltipTarget\")) {\n\t\t\tthis.updateBackgroundColor();\n\t\t}\n\t}\n\n\tprotected _onShow() {\n\t\tsuper._onShow();\n\t\tthis.updateBackgroundColor();\n\t}\n\n\n\tpublic updateBackgroundColor() {\n\t\tlet tooltipTarget = this.get(\"tooltipTarget\");\n\t\tconst background = this.get(\"background\");\n\t\tlet fill: Color | undefined;\n\t\tlet stroke: Color | undefined;\n\n\n\t\tif (tooltipTarget && background) {\n\n\t\t\tfill = tooltipTarget.get(\"fill\" as any);\n\t\t\tstroke = tooltipTarget.get(\"stroke\" as any);\n\n\t\t\tif (fill == null) {\n\t\t\t\tfill = stroke;\n\t\t\t}\n\n\t\t\tif (this.get(\"getFillFromSprite\")) {\n\n\t\t\t\tif (this._fillDp) {\n\t\t\t\t\tthis._fillDp.dispose();\n\t\t\t\t}\n\n\t\t\t\tif (fill != null) {\n\t\t\t\t\tbackground.set(\"fill\", fill as any);\n\t\t\t\t}\n\n\t\t\t\tthis._fillDp = tooltipTarget.on(\"fill\" as any, (fill) => {\n\t\t\t\t\tif (fill != null) {\n\t\t\t\t\t\tbackground.set(\"fill\", fill as any);\n\t\t\t\t\t\tthis._updateTextColor(fill);\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tif (this.get(\"getStrokeFromSprite\")) {\n\n\t\t\t\tif (this._strokeDp) {\n\t\t\t\t\tthis._strokeDp.dispose();\n\t\t\t\t}\n\n\t\t\t\tif (fill != null) {\n\t\t\t\t\tbackground.set(\"stroke\", fill as any);\n\t\t\t\t}\n\n\t\t\t\tthis._strokeDp = tooltipTarget.on(\"fill\" as any, (fill) => {\n\t\t\t\t\tif (fill != null) {\n\t\t\t\t\t\tbackground.set(\"stroke\", fill as any);\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tif (this.get(\"getLabelFillFromSprite\")) {\n\n\t\t\t\tif (this._labelDp) {\n\t\t\t\t\tthis._labelDp.dispose();\n\t\t\t\t}\n\n\t\t\t\tif (fill != null) {\n\t\t\t\t\tthis.label.set(\"fill\", fill as any);\n\t\t\t\t}\n\n\t\t\t\tthis._labelDp = tooltipTarget.on(\"fill\" as any, (fill) => {\n\t\t\t\t\tif (fill != null) {\n\t\t\t\t\t\tthis.label.set(\"fill\", fill as any);\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\n\t\tthis._updateTextColor(fill);\n\t}\n\n\n\tprotected _updateTextColor(fill?: Color | Pattern) {\n\t\tif (this.get(\"autoTextColor\")) {\n\t\t\tif (fill == null) {\n\t\t\t\tfill = this.get(\"background\")!.get(\"fill\") as Color;\n\t\t\t}\n\n\t\t\tif (fill == null) {\n\t\t\t\tfill = this._root.interfaceColors.get(\"background\");\n\t\t\t}\n\n\t\t\tif (fill instanceof Color) {\n\t\t\t\tthis.label.set(\"fill\", Color.alternative(fill, this._root.interfaceColors.get(\"alternativeText\"), this._root.interfaceColors.get(\"text\")));\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _setDataItem(dataItem?: DataItem<IComponentDataItem>): void {\n\t\tsuper._setDataItem(dataItem);\n\t\tthis.label._setDataItem(dataItem);\n\t}\t\n\n\n\tprotected _updateBackground() {\n\t\tsuper.updateBackground();\n\t\tconst parent = this._root.container;\n\n\t\tif (parent) {\n\n\t\t\tlet cw = 0.5;\n\t\t\tlet ch = 0.5;\n\n\t\t\tlet centerX = this.get(\"centerX\");\n\t\t\tif (centerX instanceof Percent) {\n\t\t\t\tcw = centerX.value;\n\t\t\t}\n\n\t\t\tlet centerY = this.get(\"centerY\");\n\t\t\tif (centerY instanceof Percent) {\n\t\t\t\tch = centerY.value;\n\t\t\t}\n\n\t\t\tlet parentW = parent.width();\n\t\t\tlet parentH = parent.height();\n\n\t\t\tconst bounds = this.get(\"bounds\", { left: 0, top: 0, right: parentW, bottom: parentH });\n\n\t\t\tthis._updateBounds();\n\n\t\t\tlet w = this.width();\n\t\t\tlet h = this.height();\n\n\t\t\t// use old w and h,as when tooltip is hidden, these are 0 and unneeded animation happens\n\t\t\tif (w === 0) {\n\t\t\t\tw = this._w;\n\t\t\t}\n\n\t\t\tif (h === 0) {\n\t\t\t\th = this._h;\n\t\t\t}\n\n\t\t\tlet pointTo = this.get(\"pointTo\", { x: parentW / 2, y: parentH / 2 });\n\t\t\tlet x = pointTo.x;\n\t\t\tlet y = pointTo.y;\n\n\t\t\tlet pointerOrientation = this.get(\"pointerOrientation\");\n\n\t\t\tlet background = this.get(\"background\");\n\t\t\tlet pointerLength = 0;\n\t\t\tlet bgStrokeSizeY = 0;\n\t\t\tlet bgStrokeSizeX = 0;\n\n\t\t\tif (background instanceof PointedRectangle) {\n\t\t\t\tpointerLength = background.get(\"pointerLength\", 0);\n\t\t\t\tbgStrokeSizeY = background.get(\"strokeWidth\", 0) / 2;\n\t\t\t\tbgStrokeSizeX = bgStrokeSizeY;\n\t\t\t}\n\n\t\t\tlet pointerX = 0;\n\t\t\tlet pointerY = 0;\n\n\t\t\tlet boundsW = bounds.right - bounds.left;\n\t\t\tlet boundsH = bounds.bottom - bounds.top;\n\n\n\n\t\t\t// horizontal\n\t\t\tif (pointerOrientation == \"horizontal\" || pointerOrientation == \"left\" || pointerOrientation == \"right\") {\n\t\t\t\tbgStrokeSizeY = 0;\n\t\t\t\tif (pointerOrientation == \"horizontal\") {\n\t\t\t\t\tif (x > bounds.left + boundsW / 2) {\n\t\t\t\t\t\tx -= (w * (1 - cw) + pointerLength);\n\t\t\t\t\t\tbgStrokeSizeX *= -1;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tx += (w * cw + pointerLength);\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (pointerOrientation == \"left\") {\n\t\t\t\t\tx += (w * (1 - cw) + pointerLength);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tx -= (w * cw + pointerLength);\n\t\t\t\t\tbgStrokeSizeX *= -1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// vertical pointer\n\t\t\telse {\n\t\t\t\tbgStrokeSizeX = 0;\n\t\t\t\tif (pointerOrientation == \"vertical\") {\n\t\t\t\t\tif (y > bounds.top + h / 2 + pointerLength) {\n\t\t\t\t\t\ty -= (h * (1 - ch) + pointerLength);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\ty += (h * ch + pointerLength);\n\t\t\t\t\t\tbgStrokeSizeY *= -1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (pointerOrientation == \"down\") {\n\t\t\t\t\ty -= (h * (1 - ch) + pointerLength);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ty += (h * ch + pointerLength);\n\t\t\t\t\tbgStrokeSizeY *= -1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tx = $math.fitToRange(x, bounds.left + w * cw, bounds.left + boundsW - w * (1 - cw)) + bgStrokeSizeX;\n\t\t\ty = $math.fitToRange(y, bounds.top + h * ch, bounds.top + boundsH - h * (1 - ch)) - bgStrokeSizeY;\n\n\t\t\tpointerX = pointTo.x - x + w * cw + bgStrokeSizeX;\n\t\t\tpointerY = pointTo.y - y + h * ch - bgStrokeSizeY;\n\n\t\t\tthis._fx = x;\n\t\t\tthis._fy = y;\n\n\t\t\tconst animationDuration = this.get(\"animationDuration\", 0);\n\n\t\t\tif (animationDuration > 0 && this.get(\"visible\") && this.get(\"opacity\") > 0.1) {\n\t\t\t\tconst animationEasing = this.get(\"animationEasing\");\n\t\t\t\tthis.animate({ key: \"x\", to: x, duration: animationDuration, easing: animationEasing });\n\t\t\t\tthis.animate({ key: \"y\", to: y, duration: animationDuration, easing: animationEasing });\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.set(\"x\", x);\n\t\t\t\tthis.set(\"y\", y);\n\t\t\t}\n\n\t\t\tif (background instanceof PointedRectangle) {\n\t\t\t\tbackground.set(\"pointerX\", pointerX);\n\t\t\t\tbackground.set(\"pointerY\", pointerY);\n\t\t\t}\n\n\t\t\tif (w > 0) {\n\t\t\t\tthis._w = w;\n\t\t\t}\n\t\t\tif (h > 0) {\n\t\t\t\tthis._h = h;\n\t\t\t}\n\t\t}\n\t}\n}\n"]}
|
|
@@ -660,7 +660,7 @@ var DateFormatter = /** @class */ (function (_super) {
|
|
|
660
660
|
parsedIndexes.zone = index;
|
|
661
661
|
break;
|
|
662
662
|
case "i":
|
|
663
|
-
reg += "([0-9]{4})-?([0-9]{2})-?([0-9]{2})T?([0-9]{2}):?([0-9]{2}):?([0-9]{2})
|
|
663
|
+
reg += "([0-9]{4})-?([0-9]{2})-?([0-9]{2})T?([0-9]{2}):?([0-9]{2}):?([0-9]{2})\\.?([0-9]{0,3})([zZ]|[+\\-][0-9]{2}:?[0-9]{2}|$)";
|
|
664
664
|
parsedIndexes.iso = index;
|
|
665
665
|
indexAdjust += 7;
|
|
666
666
|
break;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateFormatter.js","sourceRoot":"","sources":["../../../../../src/.internal/core/util/DateFormatter.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAmC,MAAM,UAAU,CAAA;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C,OAAO,KAAK,KAAK,MAAM,QAAQ,CAAA;AAC/B,OAAO,KAAK,MAAM,MAAM,SAAS,CAAC;AAmDlC;IAAmC,iCAAM;IAAzC;;IAwkCA,CAAC;;;;;eApkCA;YACC,WAAW;YACX,IAAI,CAAC,WAAW,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;YACrC,IAAI,CAAC,WAAW,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;YAE7C,iBAAM,YAAY,WAAE,CAAC;QACtB,CAAC;;;;;;eAED;YACC,iBAAM,cAAc,WAAE,CAAC;QACxB,CAAC;;;;;;eAED,UAAc,MAAW,EAAE,MAA4C;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AI,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,SAAS,EAAE,EAAE;gBAC5D,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;gBAC7E,IAAI,KAAK,GAAG,CAAC,CAAC,EAAE;oBACf,OAAO,KAAK,CAAA;iBACZ;aACD;YAED,OAAO,CAAC,CAAC;QACV,CAAC;;IAED;;;;;;OAMG;;;;;eACH,UAAe,KAAa;YAC3B,IAAI,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;YACnD,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QAC/C,CAAC;;IAED;;;;;OAKG;;;;;eACH,UAAwB,IAAkC;YACzD,IAAI,GAAG,GAAa,EAAE,CAAC;YACvB,KAAK,IAAI,CAAC,GAAW,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBAC7C,aAAa;gBACb,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;oBACxB,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;iBACjD;qBACI;oBACJ,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;iBACxC;aACD;YACD,OAAO,GAAG,CAAC;QACZ,CAAC;;IAEF,oBAAC;AAAD,CAAC,AAxkCD,CAAmC,MAAM,GAwkCxC","sourcesContent":["import type { ILocaleSettings } from \"./Language\"\n\nimport { Entity, IEntitySettings, IEntityPrivate } from \"./Entity\"\nimport { TextFormatter } from \"./TextFormatter\"\n\nimport * as $type from \"./Type\"\nimport * as $utils from \"./Utils\";\n\n/**\n * Interface describing parsed date format definition.\n *\n * @ignore\n */\nexport interface DateFormatInfo {\n\t\"template\": string;\n\t\"parts\": any[];\n}\n\nexport interface IDateFormatterSettings extends IEntitySettings {\n\n\t/**\n\t * Should the first letter of the formatted date be capitalized?\n\t *\n\t * @default true\n\t */\n\tcapitalize?: boolean;\n\n\t/**\n\t * A date format to be used when formatting dates.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/formatters/formatting-dates/} for more info\n\t */\n\tdateFormat?: string | Intl.DateTimeFormatOptions;\n\n\t/**\n\t * An array of data fields that hold date values and should be formatted\n\t * with a [[DateFormatter]].\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/formatters/data-placeholders/#Formatting_placeholders} for more info\n\t */\n\tdateFields?: string[];\n\n\t/**\n\t * Locales to use when formatting using `Intl.DateFormatter`.\n\t */\n\tintlLocales?: string;\n\n}\n\nexport interface IDateFormatterPrivate extends IEntityPrivate {\n}\n\ntype Months = \"January\" | \"February\" | \"March\" | \"April\" | \"May\" | \"June\" | \"July\" | \"August\" | \"September\" | \"October\" | \"November\" | \"December\";\ntype ShortMonths = \"Jan\" | \"Feb\" | \"Mar\" | \"Apr\" | \"May(short)\" | \"Jun\" | \"Jul\" | \"Aug\" | \"Sep\" | \"Oct\" | \"Nov\" | \"Dec\";\ntype Weekdays = \"Sunday\" | \"Monday\" | \"Tuesday\" | \"Wednesday\" | \"Thursday\" | \"Friday\" | \"Saturday\";\ntype ShortWeekdays = \"Sun\" | \"Mon\" | \"Tue\" | \"Wed\" | \"Thu\" | \"Fri\" | \"Sat\";\n\nexport class DateFormatter extends Entity {\n\tdeclare public _settings: IDateFormatterSettings;\n\tdeclare public _privateSettings: IDateFormatterPrivate;\n\n\tprotected _setDefaults() {\n\t\t// Defaults\n\t\tthis._setDefault(\"capitalize\", true);\n\t\tthis._setDefault(\"dateFormat\", \"yyyy-MM-dd\");\n\n\t\tsuper._setDefaults();\n\t}\n\n\tpublic _beforeChanged() {\n\t\tsuper._beforeChanged();\n\t}\n\n\tpublic format(source: any, format?: string | Intl.DateTimeFormatOptions): string {\n\n\t\t// Locale?\n\t\t// TODO\n\n\t\t// No format passed in or it's empty\n\t\tif (typeof format === \"undefined\" || format === \"\") {\n\t\t\tformat = this.get(\"dateFormat\", \"yyyy-MM-dd\");\n\t\t}\n\n\t\t// Init return value\n\t\tlet formatted;\n\n\t\t// Cast?\n\t\t// TODO: decide if we need to cast\n\t\tlet date: Date = source;\n\n\t\t// Is it a built-in format or Intl.DateTimeFormat\n\t\tif ($type.isObject(format)) {\n\n\t\t\ttry {\n\t\t\t\tconst locales = this.get(\"intlLocales\");\n\t\t\t\tif (locales) {\n\t\t\t\t\treturn new Intl.DateTimeFormat(locales, <Intl.DateTimeFormatOptions>format).format(date);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn new Intl.DateTimeFormat(undefined, <Intl.DateTimeFormatOptions>format).format(date);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (e) {\n\t\t\t\treturn \"Invalid\";\n\t\t\t}\n\n\t\t}\n\n\t\t// get format info (it will also deal with parser caching)\n\t\tlet info = this.parseFormat(format);\n\n\t\t// Should we apply custom time zone?\n\t\tconst timezone = this._root.timezone;\n\t\tif (timezone && !this._root.utc) {\n\t\t\tdate = timezone.convertLocal(date);\n\t\t}\n\n\n\t\t// Check if it's a valid date\n\t\tif (!$type.isNumber(date.getTime())) {\n\t\t\t// TODO translation\n\t\t\t//return this._t(\"Invalid date\");\n\t\t\treturn \"Invalid date\";\n\t\t}\n\n\t\t// Apply format\n\t\tformatted = this.applyFormat(date, info);\n\n\t\t// Capitalize\n\t\tif (this.get(\"capitalize\")) {\n\t\t\tformatted = formatted.replace(\n\t\t\t\t/^.{1}/, formatted.substr(0, 1).toUpperCase()\n\t\t\t);\n\t\t}\n\n\t\t// We're done\n\t\treturn formatted;\n\t}\n\n\t/**\n\t * Applies format to Date.\n\t *\n\t * @param date Date object\n\t * @param info Parsed format information\n\t * @return Formatted date string\n\t */\n\tprotected applyFormat(date: Date, info: DateFormatInfo): string {\n\n\t\t// Init return value\n\t\tlet res = info.template;\n\n\t\t// Get values\n\t\tlet fullYear: number,\n\t\t\tmonth: number,\n\t\t\tweekday: number,\n\t\t\tday: number,\n\t\t\thours: number,\n\t\t\tminutes: number,\n\t\t\tseconds: number,\n\t\t\tmilliseconds: number,\n\t\t\toffset: number = date.getTimezoneOffset(),\n\t\t\ttimestamp: number = date.getTime();\n\t\tif (this._root.utc) {\n\t\t\tfullYear = date.getUTCFullYear();\n\t\t\tmonth = date.getUTCMonth();\n\t\t\tweekday = date.getUTCDay();\n\t\t\tday = date.getUTCDate();\n\t\t\thours = date.getUTCHours();\n\t\t\tminutes = date.getUTCMinutes();\n\t\t\tseconds = date.getUTCSeconds();\n\t\t\tmilliseconds = date.getUTCMilliseconds();\n\t\t}\n\t\telse {\n\t\t\tfullYear = date.getFullYear();\n\t\t\tmonth = date.getMonth();\n\t\t\tweekday = date.getDay();\n\t\t\tday = date.getDate();\n\t\t\thours = date.getHours();\n\t\t\tminutes = date.getMinutes();\n\t\t\tseconds = date.getSeconds();\n\t\t\tmilliseconds = date.getMilliseconds();\n\t\t}\n\n\t\t// Go through each part and format/replace it in template\n\t\tfor (let i = 0, len = info.parts.length; i < len; i++) {\n\t\t\tlet value: string = \"\";\n\t\t\tswitch (info.parts[i]) {\n\n\t\t\t\tcase \"G\":\n\t\t\t\t\tvalue = this._t(\n\t\t\t\t\t\tfullYear < 0\n\t\t\t\t\t\t\t? \"_era_bc\"\n\t\t\t\t\t\t\t: \"_era_ad\"\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"yyyy\":\n\t\t\t\t\tvalue = Math.abs(fullYear).toString();\n\t\t\t\t\tif (fullYear < 0) {\n\t\t\t\t\t\tvalue += this._t(\"_era_bc\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"yyy\":\n\t\t\t\tcase \"yy\":\n\t\t\t\tcase \"y\":\n\t\t\t\t\tvalue = Math.abs(fullYear).toString().substr(-info.parts[i].length);\n\t\t\t\t\tif (fullYear < 0) {\n\t\t\t\t\t\tvalue += this._t(\"_era_bc\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"YYYY\":\n\t\t\t\tcase \"YYY\":\n\t\t\t\tcase \"YY\":\n\t\t\t\tcase \"Y\":\n\t\t\t\t\tlet week = $utils.getWeek(date);\n\t\t\t\t\tlet year = fullYear;\n\t\t\t\t\tif (week == 1 && (weekday > 4)) {\n\t\t\t\t\t\tyear--;\n\t\t\t\t\t}\n\t\t\t\t\tif (info.parts[i] == \"YYYY\") {\n\t\t\t\t\t\tvalue = Math.abs(year).toString();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tvalue = Math.abs(year).toString().substr(-info.parts[i].length);\n\t\t\t\t\t}\n\t\t\t\t\tif (year < 0) {\n\t\t\t\t\t\tvalue += this._t(\"_era_bc\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"u\":\n\t\t\t\t\t// @todo\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"q\":\n\t\t\t\t\tvalue = \"\" + Math.ceil((date.getMonth() + 1) / 3);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"MMMMM\":\n\t\t\t\t\tvalue = this._t(this._getMonth(month)).substr(0, 1);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"MMMM\":\n\t\t\t\t\tvalue = this._t(this._getMonth(month));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"MMM\":\n\t\t\t\t\tvalue = this._t(this._getShortMonth(month));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"MM\":\n\t\t\t\t\tvalue = $utils.padString(month + 1, 2, \"0\");\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"M\":\n\t\t\t\t\tvalue = (month + 1).toString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"ww\":\n\t\t\t\t\tvalue = $utils.padString($utils.getWeek(date, this._root.utc), 2, \"0\");\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"w\":\n\t\t\t\t\tvalue = $utils.getWeek(date, this._root.utc).toString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"W\":\n\t\t\t\t\tvalue = $utils.getMonthWeek(date, this._root.utc).toString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"dd\":\n\t\t\t\t\tvalue = $utils.padString(day, 2, \"0\");\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"d\":\n\t\t\t\t\tvalue = day.toString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"DD\":\n\t\t\t\tcase \"DDD\":\n\t\t\t\t\tvalue = $utils.padString($utils.getYearDay(date, this._root.utc).toString(), info.parts[i].length, \"0\");\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"D\":\n\t\t\t\t\tvalue = $utils.getYearDay(date, this._root.utc).toString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"F\":\n\t\t\t\t\t// @todo\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"g\":\n\t\t\t\t\t// @todo\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"t\":\n\t\t\t\t\tvalue = this._root.language.translateFunc(\"_dateOrd\").call(this, day);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"E\":\n\t\t\t\t\tvalue = (weekday || 7).toString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"EE\":\n\t\t\t\t\tvalue = $utils.padString((weekday || 7).toString(), 2, \"0\");\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"EEE\":\n\t\t\t\tcase \"eee\":\n\t\t\t\t\tvalue = this._t(this._getShortWeekday(weekday));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"EEEE\":\n\t\t\t\tcase \"eeee\":\n\t\t\t\t\tvalue = this._t(this._getShortWeekday(weekday));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"EEEEE\":\n\t\t\t\tcase \"eeeee\":\n\t\t\t\t\tvalue = this._t(this._getShortWeekday(weekday)).substr(0, 1);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"e\":\n\t\t\t\tcase \"ee\":\n\t\t\t\t\tvalue = (weekday - (this._root.locale.firstDayOfWeek || 1) + 1).toString();\n\t\t\t\t\tif (info.parts[i] == \"ee\") {\n\t\t\t\t\t\tvalue = $utils.padString(value, 2, \"0\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"a\":\n\t\t\t\t\tif (hours >= 12) {\n\t\t\t\t\t\tvalue = this._t(\"PM\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tvalue = this._t(\"AM\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"aa\":\n\t\t\t\t\tif (hours >= 12) {\n\t\t\t\t\t\tvalue = this._t(\"P.M.\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tvalue = this._t(\"A.M.\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"aaa\":\n\t\t\t\t\tif (hours >= 12) {\n\t\t\t\t\t\tvalue = this._t(\"P\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tvalue = this._t(\"A\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"h\":\n\t\t\t\t\tvalue = $utils.get12Hours(hours).toString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"hh\":\n\t\t\t\t\tvalue = $utils.padString($utils.get12Hours(hours), 2, \"0\");\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"H\":\n\t\t\t\t\tvalue = hours.toString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"HH\":\n\t\t\t\t\tvalue = $utils.padString(hours, 2, \"0\");\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"K\":\n\t\t\t\t\tvalue = $utils.get12Hours(hours, 0).toString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"KK\":\n\t\t\t\t\tvalue = $utils.padString($utils.get12Hours(hours, 0), 2, \"0\");\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"k\":\n\t\t\t\t\tvalue = (hours + 1).toString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"kk\":\n\t\t\t\t\tvalue = $utils.padString(hours + 1, 2, \"0\");\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"m\":\n\t\t\t\t\tvalue = minutes.toString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"mm\":\n\t\t\t\t\tvalue = $utils.padString(minutes, 2, \"0\");\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"s\":\n\t\t\t\t\tvalue = seconds.toString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"ss\":\n\t\t\t\t\tvalue = $utils.padString(seconds, 2, \"0\");\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"S\":\n\t\t\t\tcase \"SS\":\n\t\t\t\tcase \"SSS\":\n\t\t\t\t\tvalue = Math.round((milliseconds / 1000) * Math.pow(10, info.parts[i].length)).toString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"x\":\n\t\t\t\t\tvalue = timestamp.toString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"n\":\n\t\t\t\tcase \"nn\":\n\t\t\t\tcase \"nnn\":\n\t\t\t\t\tvalue = $utils.padString(milliseconds, info.parts[i].length, \"0\");\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"z\":\n\t\t\t\t\tvalue = $utils.getTimeZone(date, false, false, this._root.utc);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"zz\":\n\t\t\t\t\tvalue = $utils.getTimeZone(date, true, false, this._root.utc);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"zzz\":\n\t\t\t\t\tvalue = $utils.getTimeZone(date, false, true, this._root.utc);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"zzzz\":\n\t\t\t\t\tvalue = $utils.getTimeZone(date, true, true, this._root.utc);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"Z\":\n\t\t\t\tcase \"ZZ\":\n\t\t\t\t\tlet tz = Math.abs(offset) / 60;\n\t\t\t\t\tlet tzh = Math.floor(tz);\n\t\t\t\t\tlet tzm = tz * 60 - tzh * 60;\n\n\t\t\t\t\tif (this._root.utc) {\n\t\t\t\t\t\ttzh = 0;\n\t\t\t\t\t\ttzm = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (info.parts[i] == \"Z\") {\n\t\t\t\t\t\tvalue = \"GMT\";\n\t\t\t\t\t\tvalue += offset > 0 ? \"-\" : \"+\";\n\t\t\t\t\t\tvalue += $utils.padString(tzh, 2) + \":\" + $utils.padString(tzm, 2);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tvalue = offset > 0 ? \"-\" : \"+\";\n\t\t\t\t\t\tvalue += $utils.padString(tzh, 2) + $utils.padString(tzm, 2);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"i\":\n\t\t\t\t\tvalue = date.toISOString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"I\":\n\t\t\t\t\tvalue = date.toUTCString();\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\t\t\tres = res.replace($type.PLACEHOLDER, value);\n\t\t}\n\n\t\treturn res;\n\t}\n\n\t/**\n\t * Parses format into structured infromation.\n\t *\n\t * @param format Format template\n\t */\n\tprotected parseFormat(format: string): DateFormatInfo {\n\n\t\t// Check cache\n\t\t// TODO: implement caching of the parsed format\n\n\t\t// Init format parse info holder\n\t\tlet info: DateFormatInfo = {\n\t\t\t\"template\": \"\",\n\t\t\t\"parts\": <any>[]\n\t\t};\n\n\t\t// Let TextFormatter split into chunks\n\t\tlet chunks = TextFormatter.chunk(format, true);\n\t\tfor (let i: number = 0; i < chunks.length; i++) {\n\t\t\tlet chunk = chunks[i];\n\n\t\t\tif (chunk.type === \"value\") {\n\n\t\t\t\t// Just \"Date\"?\n\t\t\t\tif (chunk.text.match(/^date$/i)) {\n\t\t\t\t\tlet dateFormat = this.get(\"dateFormat\", \"yyyy-MM-dd\");\n\t\t\t\t\tif (!$type.isString(dateFormat)) {\n\t\t\t\t\t\tdateFormat = \"yyyy-MM-dd\";\n\t\t\t\t\t}\n\t\t\t\t\tchunk.text = dateFormat;\n\t\t\t\t}\n\n\t\t\t\t// Find all possible parts\n\t\t\t\tlet matches = chunk.text.match(/G|yyyy|yyy|yy|y|YYYY|YYY|YY|Y|u|q|MMMMM|MMMM|MMM|MM|M|ww|w|W|dd|d|DDD|DD|D|F|g|EEEEE|EEEE|EEE|EE|E|eeeee|eeee|eee|ee|e|aaa|aa|a|hh|h|HH|H|KK|K|kk|k|mm|m|ss|s|SSS|SS|S|A|zzzz|zzz|zz|z|ZZ|Z|t|x|nnn|nn|n|i|I/g);\n\n\t\t\t\t// Found?\n\t\t\t\tif (matches) {\n\n\t\t\t\t\t// Populate template\n\t\t\t\t\tfor (let x = 0; x < matches.length; x++) {\n\t\t\t\t\t\tinfo.parts.push(matches[x]);\n\t\t\t\t\t\tchunk.text = chunk.text.replace(matches[x], $type.PLACEHOLDER);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// Apply to template\n\t\t\tinfo.template += chunk.text;\n\t\t}\n\n\t\t// Save cache\n\t\t// TODO\n\n\t\treturn info;\n\t}\n\n\tprotected _months(): Months[] {\n\t\treturn [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"];\n\t}\n\n\tprotected _getMonth(index: number): Months {\n\t\treturn this._months()[index];\n\t}\n\n\tprotected _shortMonths(): ShortMonths[] {\n\t\treturn [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May(short)\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\n\t}\n\n\tprotected _getShortMonth(index: number): ShortMonths {\n\t\treturn this._shortMonths()[index];\n\t}\n\n\tprotected _weekdays(): Weekdays[] {\n\t\treturn [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"];\n\t}\n\n\tprotected _getWeekday(index: number): Weekdays {\n\t\treturn this._weekdays()[index];\n\t}\n\n\tprotected _shortWeekdays(): ShortWeekdays[] {\n\t\treturn [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"];\n\t}\n\n\tprotected _getShortWeekday(index: number): ShortWeekdays {\n\t\treturn this._shortWeekdays()[index];\n\t}\n\n\tpublic parse(source: any, format: string): Date {\n\n\t\t// Is it already a Date\n\t\tif (source instanceof Date) {\n\t\t\treturn source;\n\t\t}\n\n\t\t// Is it a numeric timestamp\n\t\tif ($type.isNumber(source)) {\n\t\t\treturn new Date(source);\n\t\t}\n\n\t\t// No? Let's check if it's string, and try converting to it if nec\n\t\tif (!$type.isString(source)) {\n\t\t\tsource = source.toString();\n\t\t}\n\n\t\t// Init return value\n\t\tlet res: Date;\n\n\t\t// Init RegEx for parsing\n\t\tlet reg: string = \"\";\n\n\t\t// Clean format\n\t\tformat = $utils.cleanFormat(format);\n\n\t\t// Clip format to length of the source string\n\t\tformat = format.substr(0, source.length);\n\n\t\t// Parse format\n\t\tlet info = this.parseFormat(format);\n\n\t\t// Init parsed items holder\n\t\tlet parsedIndexes = {\n\t\t\t\"year\": -1,\n\t\t\t\"year3\": -1,\n\t\t\t\"year2\": -1,\n\t\t\t\"year1\": -1,\n\t\t\t\"month\": -1,\n\t\t\t\"monthShort\": -1,\n\t\t\t\"monthLong\": -1,\n\t\t\t\"weekdayShort\": -1,\n\t\t\t\"weekdayLong\": -1,\n\t\t\t\"day\": -1,\n\t\t\t\"yearDay\": -1,\n\t\t\t\"week\": -1,\n\t\t\t\"hourBase0\": -1,\n\t\t\t\"hour12Base0\": -1,\n\t\t\t\"hourBase1\": -1,\n\t\t\t\"hour12Base1\": -1,\n\t\t\t\"minute\": -1,\n\t\t\t\"second\": -1,\n\t\t\t\"millisecond\": -1,\n\t\t\t\"millisecondDigits\": -1,\n\t\t\t\"am\": -1,\n\t\t\t\"zone\": -1,\n\t\t\t\"timestamp\": -1,\n\t\t\t\"iso\": -1\n\t\t};\n\n\t\t// Init values\n\t\tlet resValues = {\n\t\t\t\"year\": 1970,\n\t\t\t\"month\": 0,\n\t\t\t\"day\": 1,\n\t\t\t\"hour\": 0,\n\t\t\t\"minute\": 0,\n\t\t\t\"second\": 0,\n\t\t\t\"millisecond\": 0,\n\t\t\t\"timestamp\": <any>null,\n\t\t\t\"offset\": 0,\n\t\t\t\"utc\": this._root.utc\n\t\t}\n\n\t\t// Index adjuster\n\t\tlet indexAdjust: number = 0;\n\t\tlet index: number = 0;\n\n\t\t// Iterate through all of the parts\n\t\tfor (let i: number = 0; i < info.parts.length; i++) {\n\n\t\t\t// Set current match index\n\t\t\tindex = i + indexAdjust + 1;\n\n\t\t\tswitch (info.parts[i]) {\n\n\t\t\t\tcase \"yyyy\":\n\t\t\t\tcase \"YYYY\":\n\t\t\t\t\treg += \"([0-9]{4})\";\n\t\t\t\t\tparsedIndexes.year = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"yyy\":\n\t\t\t\tcase \"YYY\":\n\t\t\t\t\treg += \"([0-9]{3})\";\n\t\t\t\t\tparsedIndexes.year3 = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"yy\":\n\t\t\t\tcase \"YY\":\n\t\t\t\t\treg += \"([0-9]{2})\";\n\t\t\t\t\tparsedIndexes.year2 = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"y\":\n\t\t\t\tcase \"Y\":\n\t\t\t\t\treg += \"([0-9]{1})\";\n\t\t\t\t\tparsedIndexes.year1 = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"MMMM\":\n\t\t\t\t\treg += \"(\" + this.getStringList(this._months()).join(\"|\") + \")\";\n\t\t\t\t\tparsedIndexes.monthLong = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"MMM\":\n\t\t\t\t\treg += \"(\" + this.getStringList(this._shortMonths()).join(\"|\") + \")\";\n\t\t\t\t\tparsedIndexes.monthShort = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"MM\":\n\t\t\t\tcase \"M\":\n\t\t\t\t\treg += \"([0-9]{2}|[0-9]{1})\";\n\t\t\t\t\tparsedIndexes.month = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"ww\":\n\t\t\t\tcase \"w\":\n\t\t\t\t\treg += \"([0-9]{2}|[0-9]{1})\";\n\t\t\t\t\tparsedIndexes.week = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"dd\":\n\t\t\t\tcase \"d\":\n\t\t\t\t\treg += \"([0-9]{2}|[0-9]{1})\";\n\t\t\t\t\tparsedIndexes.day = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"DDD\":\n\t\t\t\tcase \"DD\":\n\t\t\t\tcase \"D\":\n\t\t\t\t\treg += \"([0-9]{3}|[0-9]{2}|[0-9]{1})\";\n\t\t\t\t\tparsedIndexes.yearDay = index;\n\t\t\t\t\tbreak;\n\n\n\t\t\t\tcase \"dddd\":\n\t\t\t\t\treg += \"(\" + this.getStringList(this._weekdays()).join(\"|\") + \")\";\n\t\t\t\t\tparsedIndexes.weekdayLong = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"ddd\":\n\t\t\t\t\treg += \"(\" + this.getStringList(this._shortWeekdays()).join(\"|\") + \")\";\n\t\t\t\t\tparsedIndexes.weekdayShort = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"aaa\":\n\t\t\t\tcase \"aa\":\n\t\t\t\tcase \"a\":\n\t\t\t\t\t// TODO: fix (escape regex)\n\t\t\t\t\treg += \"(\" + this.getStringList([\"AM\", \"PM\", \"A\\.M\\.\", \"P\\.M\\.\", \"A\", \"P\"]).join(\"|\") + \")\";\n\t\t\t\t\tparsedIndexes.am = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"hh\":\n\t\t\t\tcase \"h\":\n\t\t\t\t\treg += \"([0-9]{2}|[0-9]{1})\";\n\t\t\t\t\tparsedIndexes.hour12Base1 = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"HH\":\n\t\t\t\tcase \"H\":\n\t\t\t\t\treg += \"([0-9]{2}|[0-9]{1})\";\n\t\t\t\t\tparsedIndexes.hourBase0 = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"KK\":\n\t\t\t\tcase \"K\":\n\t\t\t\t\treg += \"([0-9]{2}|[0-9]{1})\";\n\t\t\t\t\tparsedIndexes.hour12Base0 = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"kk\":\n\t\t\t\tcase \"k\":\n\t\t\t\t\treg += \"([0-9]{2}|[0-9]{1})\";\n\t\t\t\t\tparsedIndexes.hourBase1 = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"mm\":\n\t\t\t\tcase \"m\":\n\t\t\t\t\treg += \"([0-9]{2}|[0-9]{1})\";\n\t\t\t\t\tparsedIndexes.minute = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"ss\":\n\t\t\t\tcase \"s\":\n\t\t\t\t\treg += \"([0-9]{2}|[0-9]{1})\";\n\t\t\t\t\tparsedIndexes.second = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"SSS\":\n\t\t\t\tcase \"SS\":\n\t\t\t\tcase \"S\":\n\t\t\t\t\treg += \"([0-9]{3}|[0-9]{2}|[0-9]{1})\";\n\t\t\t\t\tparsedIndexes.millisecond = index;\n\t\t\t\t\tparsedIndexes.millisecondDigits = info.parts[i].length;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"nnn\":\n\t\t\t\tcase \"nn\":\n\t\t\t\tcase \"n\":\n\t\t\t\t\treg += \"([0-9]{3}|[0-9]{2}|[0-9]{1})\";\n\t\t\t\t\tparsedIndexes.millisecond = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"x\":\n\t\t\t\t\treg += \"([0-9]{1,})\";\n\t\t\t\t\tparsedIndexes.timestamp = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"Z\":\n\t\t\t\t\treg += \"GMT([-+]+[0-9]{2}:[0-9]{2})\";\n\t\t\t\t\tparsedIndexes.zone = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"ZZ\":\n\t\t\t\t\treg += \"([\\\\-+]+[0-9]{2}[0-9]{2})\";\n\t\t\t\t\tparsedIndexes.zone = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"i\":\n\t\t\t\t\treg += \"([0-9]{4})-?([0-9]{2})-?([0-9]{2})T?([0-9]{2}):?([0-9]{2}):?([0-9]{2})\\.?([0-9]{0,3})([zZ]|[+\\-][0-9]{2}:?[0-9]{2}|$)\";\n\t\t\t\t\tparsedIndexes.iso = index;\n\t\t\t\t\tindexAdjust += 7;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"G\":\n\t\t\t\tcase \"YYYY\":\n\t\t\t\tcase \"YYY\":\n\t\t\t\tcase \"YY\":\n\t\t\t\tcase \"Y\":\n\t\t\t\tcase \"MMMMM\":\n\t\t\t\tcase \"W\":\n\t\t\t\tcase \"EEEEE\":\n\t\t\t\tcase \"EEEE\":\n\t\t\t\tcase \"EEE\":\n\t\t\t\tcase \"EE\":\n\t\t\t\tcase \"E\":\n\t\t\t\tcase \"eeeee\":\n\t\t\t\tcase \"eeee\":\n\t\t\t\tcase \"eee\":\n\t\t\t\tcase \"ee\":\n\t\t\t\tcase \"e\":\n\t\t\t\tcase \"zzzz\":\n\t\t\t\tcase \"zzz\":\n\t\t\t\tcase \"zz\":\n\t\t\t\tcase \"z\":\n\t\t\t\tcase \"t\":\n\t\t\t\t\t// Ignore\n\t\t\t\t\tindexAdjust--;\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\treg += \"[^0-9]*\";\n\t\t}\n\n\t\t// Try matching\n\t\tlet regex = new RegExp(reg);\n\t\tlet matches: RegExpMatchArray = source.match(regex);\n\n\t\tif (matches) {\n\t\t\t// Populate the date object\n\n\t\t\t// Full year\n\t\t\tif (parsedIndexes.year > -1) {\n\t\t\t\tresValues.year = parseInt(matches[parsedIndexes.year]);\n\t\t\t}\n\n\t\t\t// 3-digit year\n\t\t\tif (parsedIndexes.year3 > -1) {\n\t\t\t\tlet val = parseInt(matches[parsedIndexes.year3]);\n\t\t\t\tval += 1000;\n\t\t\t\tresValues.year = val;\n\t\t\t}\n\n\t\t\t// 2-digit year\n\t\t\tif (parsedIndexes.year2 > -1) {\n\t\t\t\tlet val = parseInt(matches[parsedIndexes.year2]);\n\t\t\t\tif (val > 50) {\n\t\t\t\t\tval += 1000;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tval += 2000;\n\t\t\t\t}\n\t\t\t\tresValues.year = val;\n\t\t\t}\n\n\t\t\t// 1-digit year\n\t\t\tif (parsedIndexes.year1 > -1) {\n\t\t\t\tlet val = parseInt(matches[parsedIndexes.year1]);\n\t\t\t\tval = Math.floor((new Date().getFullYear()) / 10) * 10 + val;\n\t\t\t\tresValues.year = val;\n\t\t\t}\n\n\t\t\t// Full month\n\t\t\tif (parsedIndexes.monthLong > -1) {\n\t\t\t\tresValues.month = this.resolveMonth(<any>matches[parsedIndexes.monthLong]);\n\t\t\t}\n\n\t\t\t// Short month\n\t\t\tif (parsedIndexes.monthShort > -1) {\n\t\t\t\tresValues.month = this.resolveShortMonth(<any>matches[parsedIndexes.monthShort]);\n\t\t\t}\n\n\t\t\t// Numeric month\n\t\t\tif (parsedIndexes.month > -1) {\n\t\t\t\tresValues.month = parseInt(matches[parsedIndexes.month]) - 1;\n\t\t\t}\n\n\t\t\t// Weekday\n\t\t\t// @todo\n\n\t\t\t// Week\n\t\t\tif ((parsedIndexes.week > -1) && (parsedIndexes.day === -1)) {\n\t\t\t\t// We parse weeks ONLY if day is not explicitly set\n\t\t\t\t// TODO: this needs work\n\t\t\t\t// (but maybe later - I can hardly imagine anyone passing their dates in weeks)\n\t\t\t\tresValues.month = 0;\n\t\t\t\tresValues.day = $utils.getDayFromWeek(\n\t\t\t\t\tparseInt(matches[parsedIndexes.week]),\n\t\t\t\t\tresValues.year,\n\t\t\t\t\t1,\n\t\t\t\t\tthis._root.utc\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Day\n\t\t\tif (parsedIndexes.day > -1) {\n\t\t\t\tresValues.day = parseInt(matches[parsedIndexes.day]);\n\t\t\t}\n\n\t\t\t// Year day\n\t\t\tif (parsedIndexes.yearDay > -1) {\n\t\t\t\tresValues.month = 0;\n\t\t\t\tresValues.day = parseInt(matches[parsedIndexes.yearDay]);\n\t\t\t}\n\n\t\t\t// 24 Hour (0-23)\n\t\t\tif (parsedIndexes.hourBase0 > -1) {\n\t\t\t\tresValues.hour = parseInt(matches[parsedIndexes.hourBase0]);\n\t\t\t}\n\n\t\t\t// 24 Hour (1-24)\n\t\t\tif (parsedIndexes.hourBase1 > -1) {\n\t\t\t\tresValues.hour = parseInt(matches[parsedIndexes.hourBase1]) - 1;\n\t\t\t}\n\n\t\t\t// 12 Hour (0-11)\n\t\t\tif (parsedIndexes.hour12Base0 > -1) {\n\t\t\t\tlet val = parseInt(matches[parsedIndexes.hour12Base0]);\n\t\t\t\tif (val == 11) {\n\t\t\t\t\tval = 0;\n\t\t\t\t}\n\t\t\t\tif ((parsedIndexes.am > -1) && !this.isAm(matches[parsedIndexes.am])) {\n\t\t\t\t\tval += 12;\n\t\t\t\t}\n\t\t\t\tresValues.hour = val;\n\t\t\t}\n\n\t\t\t// 12 Hour (1-12)\n\t\t\tif (parsedIndexes.hour12Base1 > -1) {\n\t\t\t\tlet val = parseInt(matches[parsedIndexes.hour12Base1]);\n\t\t\t\tif (val == 12) {\n\t\t\t\t\tval = 0;\n\t\t\t\t}\n\t\t\t\tif ((parsedIndexes.am > -1) && !this.isAm(matches[parsedIndexes.am])) {\n\t\t\t\t\tval += 12;\n\t\t\t\t}\n\t\t\t\tresValues.hour = val;\n\t\t\t}\n\n\t\t\t// Minute\n\t\t\tif (parsedIndexes.minute > -1) {\n\t\t\t\tresValues.minute = parseInt(matches[parsedIndexes.minute]);\n\t\t\t}\n\n\t\t\t// Second\n\t\t\tif (parsedIndexes.second > -1) {\n\t\t\t\tresValues.second = parseInt(matches[parsedIndexes.second]);\n\t\t\t}\n\n\t\t\t// Millisecond\n\t\t\tif (parsedIndexes.millisecond > -1) {\n\t\t\t\tlet val = parseInt(matches[parsedIndexes.millisecond]);\n\t\t\t\tif (parsedIndexes.millisecondDigits == 2) {\n\t\t\t\t\tval *= 10;\n\t\t\t\t}\n\t\t\t\telse if (parsedIndexes.millisecondDigits == 1) {\n\t\t\t\t\tval *= 100;\n\t\t\t\t}\n\t\t\t\tresValues.millisecond = val;\n\t\t\t}\n\n\t\t\t// Timestamp\n\t\t\tif (parsedIndexes.timestamp > -1) {\n\t\t\t\tresValues.timestamp = parseInt(matches[parsedIndexes.timestamp]);\n\n\t\t\t\tconst ts = new Date(resValues.timestamp);\n\t\t\t\tresValues.year = ts.getUTCFullYear();\n\t\t\t\tresValues.month = ts.getUTCMonth();\n\t\t\t\tresValues.day = ts.getUTCDate();\n\t\t\t\tresValues.hour = ts.getUTCHours();\n\t\t\t\tresValues.minute = ts.getUTCMinutes();\n\t\t\t\tresValues.second = ts.getUTCSeconds();\n\t\t\t\tresValues.millisecond = ts.getUTCMilliseconds();\n\t\t\t}\n\n\t\t\t// Adjust time zone\n\t\t\tif (parsedIndexes.zone > -1) {\n\t\t\t\tresValues.offset = this.resolveTimezoneOffset(new Date(resValues.year, resValues.month, resValues.day), matches[parsedIndexes.zone]);\n\t\t\t}\n\n\t\t\t// ISO\n\t\t\tif (parsedIndexes.iso > -1) {\n\n\t\t\t\tresValues.year = $type.toNumber(matches[parsedIndexes.iso + 0]);\n\t\t\t\tresValues.month = $type.toNumber(matches[parsedIndexes.iso + 1]) - 1;\n\t\t\t\tresValues.day = $type.toNumber(matches[parsedIndexes.iso + 2]);\n\t\t\t\tresValues.hour = $type.toNumber(matches[parsedIndexes.iso + 3]);\n\t\t\t\tresValues.minute = $type.toNumber(matches[parsedIndexes.iso + 4]);\n\t\t\t\tresValues.second = $type.toNumber(matches[parsedIndexes.iso + 5]);\n\t\t\t\tresValues.millisecond = $type.toNumber(matches[parsedIndexes.iso + 6]);\n\n\t\t\t\tif (matches[parsedIndexes.iso + 7] == \"Z\" || matches[parsedIndexes.iso + 7] == \"z\") {\n\t\t\t\t\tresValues.utc = true;\n\t\t\t\t}\n\t\t\t\telse if (matches[parsedIndexes.iso + 7] != \"\") {\n\t\t\t\t\tresValues.offset = this.resolveTimezoneOffset(new Date(resValues.year, resValues.month, resValues.day), matches[parsedIndexes.iso + 7]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Create Date object\n\t\t\tif (resValues.utc) {\n\t\t\t\tres = new Date(Date.UTC(\n\t\t\t\t\tresValues.year,\n\t\t\t\t\tresValues.month,\n\t\t\t\t\tresValues.day,\n\t\t\t\t\tresValues.hour,\n\t\t\t\t\tresValues.minute,\n\t\t\t\t\tresValues.second,\n\t\t\t\t\tresValues.millisecond\n\t\t\t\t));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tres = new Date(\n\t\t\t\t\tresValues.year,\n\t\t\t\t\tresValues.month,\n\t\t\t\t\tresValues.day,\n\t\t\t\t\tresValues.hour,\n\t\t\t\t\tresValues.minute + resValues.offset,\n\t\t\t\t\tresValues.second,\n\t\t\t\t\tresValues.millisecond\n\t\t\t\t);\n\t\t\t}\n\n\t\t}\n\t\telse {\n\t\t\t// Didn't match anything\n\t\t\t// Let's try dropping it into Date constructor and hope for the best\n\t\t\tres = new Date(source);\n\t\t}\n\n\t\treturn res;\n\t}\n\n\tprotected resolveTimezoneOffset(date: Date, zone: string): number {\n\t\tlet value = zone.match(/([+\\-]?)([0-9]{2}):?([0-9]{2})/);\n\t\tif (value) {\n\t\t\tlet match = zone.match(/([+\\-]?)([0-9]{2}):?([0-9]{2})/)!;\n\t\t\tlet dir = match[1];\n\t\t\tlet hour = match[2];\n\t\t\tlet minute = match[3];\n\t\t\tlet offset = parseInt(hour) * 60 + parseInt(minute);\n\n\t\t\t// Adjust offset\n\t\t\t// Making it negative does not seem to make sense, but it's right\n\t\t\t// because of how JavaScript calculates GMT offsets\n\t\t\tif (dir == \"+\") {\n\t\t\t\toffset *= -1;\n\t\t\t}\n\n\t\t\t// Check the difference in offset\n\t\t\tlet originalOffset = (date || new Date()).getTimezoneOffset();\n\t\t\tlet diff = offset - originalOffset;\n\t\t\treturn diff;\n\t\t}\n\t\treturn 0;\n\t}\n\n\t/**\n\t * Resolves month name (i.e. \"December\") into a month number (11).\n\t *\n\t * @param value Month name\n\t * @return Month number\n\t */\n\tprotected resolveMonth(value: Months): number {\n\n\t\t// Let's try English first\n\t\tlet month: number = this._months().indexOf(value);\n\t\tif (month > -1) {\n\t\t\treturn month;\n\t\t}\n\n\t\t// Try the translation\n\t\tif (!this._root.language.isDefault()) {\n\t\t\tmonth = this._root.language.translateAll(this._months()).indexOf(value);\n\t\t\tif (month > -1) {\n\t\t\t\treturn month\n\t\t\t}\n\t\t}\n\n\t\treturn 0;\n\t}\n\n\t/**\n\t * Resolves short month name (i.e. \"Dec\") into a month number.\n\t *\n\t * @param value Short month name\n\t * @return Month number\n\t */\n\tprotected resolveShortMonth(value: ShortMonths): number {\n\n\t\t// Let's try English first\n\t\tlet month: number = this._shortMonths().indexOf(value);\n\t\tif (month > -1) {\n\t\t\treturn month;\n\t\t}\n\n\t\t// Maybe long month (workaround for May)\n\t\tmonth = this._months().indexOf(<any>value);\n\t\tif (month > -1) {\n\t\t\treturn month;\n\t\t}\n\n\t\t// Try the translation\n\t\tif (this._root.language && !this._root.language.isDefault()) {\n\t\t\tmonth = this._root.language.translateAll(this._shortMonths()).indexOf(value);\n\t\t\tif (month > -1) {\n\t\t\t\treturn month\n\t\t\t}\n\t\t}\n\n\t\treturn 0;\n\t}\n\n\t/**\n\t * Checks if passed in string represents AM/PM notation in many of its\n\t * versions.\n\t *\n\t * @param value Source string\n\t * @return Is it AM/PM?\n\t */\n\tprotected isAm(value: string): boolean {\n\t\tlet list = this.getStringList([\"AM\", \"A.M.\", \"A\"]);\n\t\treturn list.indexOf(value.toUpperCase()) > -1;\n\t}\n\n\t/**\n\t * Translates list of strings.\n\t *\n\t * @param list Source strings\n\t * @return Translated strings\n\t */\n\tprotected getStringList(list: Array<keyof ILocaleSettings>): Array<string> {\n\t\tlet res: string[] = [];\n\t\tfor (let i: number = 0; i < list.length; i++) {\n\t\t\t// translate?\n\t\t\tif (this._root.language) {\n\t\t\t\tres.push($utils.escapeForRgex(this._t(list[i])));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tres.push($utils.escapeForRgex(list[i]));\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}\n\n}\n"]}
|
|
1
|
+
{"version":3,"file":"DateFormatter.js","sourceRoot":"","sources":["../../../../../src/.internal/core/util/DateFormatter.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAmC,MAAM,UAAU,CAAA;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C,OAAO,KAAK,KAAK,MAAM,QAAQ,CAAA;AAC/B,OAAO,KAAK,MAAM,MAAM,SAAS,CAAC;AAmDlC;IAAmC,iCAAM;IAAzC;;IAwkCA,CAAC;;;;;eApkCA;YACC,WAAW;YACX,IAAI,CAAC,WAAW,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;YACrC,IAAI,CAAC,WAAW,CAAC,YAAY,EAAE,YAAY,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EF,oBAAC;AAAD,CAAC,AAxkCD,CAAmC,MAAM,GAwkCxC","sourcesContent":["import type { ILocaleSettings } from \"./Language\"\n\nimport { Entity, IEntitySettings, IEntityPrivate } from \"./Entity\"\nimport { TextFormatter } from \"./TextFormatter\"\n\nimport * as $type from \"./Type\"\nimport * as $utils from \"./Utils\";\n\n/**\n * Interface describing parsed date format definition.\n *\n * @ignore\n */\nexport interface DateFormatInfo {\n\t\"template\": string;\n\t\"parts\": any[];\n}\n\nexport interface IDateFormatterSettings extends IEntitySettings {\n\n\t/**\n\t * Should the first letter of the formatted date be capitalized?\n\t *\n\t * @default true\n\t */\n\tcapitalize?: boolean;\n\n\t/**\n\t * A date format to be used when formatting dates.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/formatters/formatting-dates/} for more info\n\t */\n\tdateFormat?: string | Intl.DateTimeFormatOptions;\n\n\t/**\n\t * An array of data fields that hold date values and should be formatted\n\t * with a [[DateFormatter]].\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/formatters/data-placeholders/#Formatting_placeholders} for more info\n\t */\n\tdateFields?: string[];\n\n\t/**\n\t * Locales to use when formatting using `Intl.DateFormatter`.\n\t */\n\tintlLocales?: string;\n\n}\n\nexport interface IDateFormatterPrivate extends IEntityPrivate {\n}\n\ntype Months = \"January\" | \"February\" | \"March\" | \"April\" | \"May\" | \"June\" | \"July\" | \"August\" | \"September\" | \"October\" | \"November\" | \"December\";\ntype ShortMonths = \"Jan\" | \"Feb\" | \"Mar\" | \"Apr\" | \"May(short)\" | \"Jun\" | \"Jul\" | \"Aug\" | \"Sep\" | \"Oct\" | \"Nov\" | \"Dec\";\ntype Weekdays = \"Sunday\" | \"Monday\" | \"Tuesday\" | \"Wednesday\" | \"Thursday\" | \"Friday\" | \"Saturday\";\ntype ShortWeekdays = \"Sun\" | \"Mon\" | \"Tue\" | \"Wed\" | \"Thu\" | \"Fri\" | \"Sat\";\n\nexport class DateFormatter extends Entity {\n\tdeclare public _settings: IDateFormatterSettings;\n\tdeclare public _privateSettings: IDateFormatterPrivate;\n\n\tprotected _setDefaults() {\n\t\t// Defaults\n\t\tthis._setDefault(\"capitalize\", true);\n\t\tthis._setDefault(\"dateFormat\", \"yyyy-MM-dd\");\n\n\t\tsuper._setDefaults();\n\t}\n\n\tpublic _beforeChanged() {\n\t\tsuper._beforeChanged();\n\t}\n\n\tpublic format(source: any, format?: string | Intl.DateTimeFormatOptions): string {\n\n\t\t// Locale?\n\t\t// TODO\n\n\t\t// No format passed in or it's empty\n\t\tif (typeof format === \"undefined\" || format === \"\") {\n\t\t\tformat = this.get(\"dateFormat\", \"yyyy-MM-dd\");\n\t\t}\n\n\t\t// Init return value\n\t\tlet formatted;\n\n\t\t// Cast?\n\t\t// TODO: decide if we need to cast\n\t\tlet date: Date = source;\n\n\t\t// Is it a built-in format or Intl.DateTimeFormat\n\t\tif ($type.isObject(format)) {\n\n\t\t\ttry {\n\t\t\t\tconst locales = this.get(\"intlLocales\");\n\t\t\t\tif (locales) {\n\t\t\t\t\treturn new Intl.DateTimeFormat(locales, <Intl.DateTimeFormatOptions>format).format(date);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn new Intl.DateTimeFormat(undefined, <Intl.DateTimeFormatOptions>format).format(date);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (e) {\n\t\t\t\treturn \"Invalid\";\n\t\t\t}\n\n\t\t}\n\n\t\t// get format info (it will also deal with parser caching)\n\t\tlet info = this.parseFormat(format);\n\n\t\t// Should we apply custom time zone?\n\t\tconst timezone = this._root.timezone;\n\t\tif (timezone && !this._root.utc) {\n\t\t\tdate = timezone.convertLocal(date);\n\t\t}\n\n\n\t\t// Check if it's a valid date\n\t\tif (!$type.isNumber(date.getTime())) {\n\t\t\t// TODO translation\n\t\t\t//return this._t(\"Invalid date\");\n\t\t\treturn \"Invalid date\";\n\t\t}\n\n\t\t// Apply format\n\t\tformatted = this.applyFormat(date, info);\n\n\t\t// Capitalize\n\t\tif (this.get(\"capitalize\")) {\n\t\t\tformatted = formatted.replace(\n\t\t\t\t/^.{1}/, formatted.substr(0, 1).toUpperCase()\n\t\t\t);\n\t\t}\n\n\t\t// We're done\n\t\treturn formatted;\n\t}\n\n\t/**\n\t * Applies format to Date.\n\t *\n\t * @param date Date object\n\t * @param info Parsed format information\n\t * @return Formatted date string\n\t */\n\tprotected applyFormat(date: Date, info: DateFormatInfo): string {\n\n\t\t// Init return value\n\t\tlet res = info.template;\n\n\t\t// Get values\n\t\tlet fullYear: number,\n\t\t\tmonth: number,\n\t\t\tweekday: number,\n\t\t\tday: number,\n\t\t\thours: number,\n\t\t\tminutes: number,\n\t\t\tseconds: number,\n\t\t\tmilliseconds: number,\n\t\t\toffset: number = date.getTimezoneOffset(),\n\t\t\ttimestamp: number = date.getTime();\n\t\tif (this._root.utc) {\n\t\t\tfullYear = date.getUTCFullYear();\n\t\t\tmonth = date.getUTCMonth();\n\t\t\tweekday = date.getUTCDay();\n\t\t\tday = date.getUTCDate();\n\t\t\thours = date.getUTCHours();\n\t\t\tminutes = date.getUTCMinutes();\n\t\t\tseconds = date.getUTCSeconds();\n\t\t\tmilliseconds = date.getUTCMilliseconds();\n\t\t}\n\t\telse {\n\t\t\tfullYear = date.getFullYear();\n\t\t\tmonth = date.getMonth();\n\t\t\tweekday = date.getDay();\n\t\t\tday = date.getDate();\n\t\t\thours = date.getHours();\n\t\t\tminutes = date.getMinutes();\n\t\t\tseconds = date.getSeconds();\n\t\t\tmilliseconds = date.getMilliseconds();\n\t\t}\n\n\t\t// Go through each part and format/replace it in template\n\t\tfor (let i = 0, len = info.parts.length; i < len; i++) {\n\t\t\tlet value: string = \"\";\n\t\t\tswitch (info.parts[i]) {\n\n\t\t\t\tcase \"G\":\n\t\t\t\t\tvalue = this._t(\n\t\t\t\t\t\tfullYear < 0\n\t\t\t\t\t\t\t? \"_era_bc\"\n\t\t\t\t\t\t\t: \"_era_ad\"\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"yyyy\":\n\t\t\t\t\tvalue = Math.abs(fullYear).toString();\n\t\t\t\t\tif (fullYear < 0) {\n\t\t\t\t\t\tvalue += this._t(\"_era_bc\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"yyy\":\n\t\t\t\tcase \"yy\":\n\t\t\t\tcase \"y\":\n\t\t\t\t\tvalue = Math.abs(fullYear).toString().substr(-info.parts[i].length);\n\t\t\t\t\tif (fullYear < 0) {\n\t\t\t\t\t\tvalue += this._t(\"_era_bc\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"YYYY\":\n\t\t\t\tcase \"YYY\":\n\t\t\t\tcase \"YY\":\n\t\t\t\tcase \"Y\":\n\t\t\t\t\tlet week = $utils.getWeek(date);\n\t\t\t\t\tlet year = fullYear;\n\t\t\t\t\tif (week == 1 && (weekday > 4)) {\n\t\t\t\t\t\tyear--;\n\t\t\t\t\t}\n\t\t\t\t\tif (info.parts[i] == \"YYYY\") {\n\t\t\t\t\t\tvalue = Math.abs(year).toString();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tvalue = Math.abs(year).toString().substr(-info.parts[i].length);\n\t\t\t\t\t}\n\t\t\t\t\tif (year < 0) {\n\t\t\t\t\t\tvalue += this._t(\"_era_bc\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"u\":\n\t\t\t\t\t// @todo\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"q\":\n\t\t\t\t\tvalue = \"\" + Math.ceil((date.getMonth() + 1) / 3);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"MMMMM\":\n\t\t\t\t\tvalue = this._t(this._getMonth(month)).substr(0, 1);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"MMMM\":\n\t\t\t\t\tvalue = this._t(this._getMonth(month));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"MMM\":\n\t\t\t\t\tvalue = this._t(this._getShortMonth(month));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"MM\":\n\t\t\t\t\tvalue = $utils.padString(month + 1, 2, \"0\");\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"M\":\n\t\t\t\t\tvalue = (month + 1).toString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"ww\":\n\t\t\t\t\tvalue = $utils.padString($utils.getWeek(date, this._root.utc), 2, \"0\");\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"w\":\n\t\t\t\t\tvalue = $utils.getWeek(date, this._root.utc).toString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"W\":\n\t\t\t\t\tvalue = $utils.getMonthWeek(date, this._root.utc).toString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"dd\":\n\t\t\t\t\tvalue = $utils.padString(day, 2, \"0\");\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"d\":\n\t\t\t\t\tvalue = day.toString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"DD\":\n\t\t\t\tcase \"DDD\":\n\t\t\t\t\tvalue = $utils.padString($utils.getYearDay(date, this._root.utc).toString(), info.parts[i].length, \"0\");\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"D\":\n\t\t\t\t\tvalue = $utils.getYearDay(date, this._root.utc).toString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"F\":\n\t\t\t\t\t// @todo\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"g\":\n\t\t\t\t\t// @todo\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"t\":\n\t\t\t\t\tvalue = this._root.language.translateFunc(\"_dateOrd\").call(this, day);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"E\":\n\t\t\t\t\tvalue = (weekday || 7).toString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"EE\":\n\t\t\t\t\tvalue = $utils.padString((weekday || 7).toString(), 2, \"0\");\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"EEE\":\n\t\t\t\tcase \"eee\":\n\t\t\t\t\tvalue = this._t(this._getShortWeekday(weekday));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"EEEE\":\n\t\t\t\tcase \"eeee\":\n\t\t\t\t\tvalue = this._t(this._getShortWeekday(weekday));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"EEEEE\":\n\t\t\t\tcase \"eeeee\":\n\t\t\t\t\tvalue = this._t(this._getShortWeekday(weekday)).substr(0, 1);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"e\":\n\t\t\t\tcase \"ee\":\n\t\t\t\t\tvalue = (weekday - (this._root.locale.firstDayOfWeek || 1) + 1).toString();\n\t\t\t\t\tif (info.parts[i] == \"ee\") {\n\t\t\t\t\t\tvalue = $utils.padString(value, 2, \"0\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"a\":\n\t\t\t\t\tif (hours >= 12) {\n\t\t\t\t\t\tvalue = this._t(\"PM\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tvalue = this._t(\"AM\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"aa\":\n\t\t\t\t\tif (hours >= 12) {\n\t\t\t\t\t\tvalue = this._t(\"P.M.\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tvalue = this._t(\"A.M.\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"aaa\":\n\t\t\t\t\tif (hours >= 12) {\n\t\t\t\t\t\tvalue = this._t(\"P\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tvalue = this._t(\"A\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"h\":\n\t\t\t\t\tvalue = $utils.get12Hours(hours).toString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"hh\":\n\t\t\t\t\tvalue = $utils.padString($utils.get12Hours(hours), 2, \"0\");\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"H\":\n\t\t\t\t\tvalue = hours.toString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"HH\":\n\t\t\t\t\tvalue = $utils.padString(hours, 2, \"0\");\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"K\":\n\t\t\t\t\tvalue = $utils.get12Hours(hours, 0).toString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"KK\":\n\t\t\t\t\tvalue = $utils.padString($utils.get12Hours(hours, 0), 2, \"0\");\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"k\":\n\t\t\t\t\tvalue = (hours + 1).toString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"kk\":\n\t\t\t\t\tvalue = $utils.padString(hours + 1, 2, \"0\");\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"m\":\n\t\t\t\t\tvalue = minutes.toString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"mm\":\n\t\t\t\t\tvalue = $utils.padString(minutes, 2, \"0\");\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"s\":\n\t\t\t\t\tvalue = seconds.toString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"ss\":\n\t\t\t\t\tvalue = $utils.padString(seconds, 2, \"0\");\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"S\":\n\t\t\t\tcase \"SS\":\n\t\t\t\tcase \"SSS\":\n\t\t\t\t\tvalue = Math.round((milliseconds / 1000) * Math.pow(10, info.parts[i].length)).toString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"x\":\n\t\t\t\t\tvalue = timestamp.toString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"n\":\n\t\t\t\tcase \"nn\":\n\t\t\t\tcase \"nnn\":\n\t\t\t\t\tvalue = $utils.padString(milliseconds, info.parts[i].length, \"0\");\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"z\":\n\t\t\t\t\tvalue = $utils.getTimeZone(date, false, false, this._root.utc);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"zz\":\n\t\t\t\t\tvalue = $utils.getTimeZone(date, true, false, this._root.utc);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"zzz\":\n\t\t\t\t\tvalue = $utils.getTimeZone(date, false, true, this._root.utc);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"zzzz\":\n\t\t\t\t\tvalue = $utils.getTimeZone(date, true, true, this._root.utc);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"Z\":\n\t\t\t\tcase \"ZZ\":\n\t\t\t\t\tlet tz = Math.abs(offset) / 60;\n\t\t\t\t\tlet tzh = Math.floor(tz);\n\t\t\t\t\tlet tzm = tz * 60 - tzh * 60;\n\n\t\t\t\t\tif (this._root.utc) {\n\t\t\t\t\t\ttzh = 0;\n\t\t\t\t\t\ttzm = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (info.parts[i] == \"Z\") {\n\t\t\t\t\t\tvalue = \"GMT\";\n\t\t\t\t\t\tvalue += offset > 0 ? \"-\" : \"+\";\n\t\t\t\t\t\tvalue += $utils.padString(tzh, 2) + \":\" + $utils.padString(tzm, 2);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tvalue = offset > 0 ? \"-\" : \"+\";\n\t\t\t\t\t\tvalue += $utils.padString(tzh, 2) + $utils.padString(tzm, 2);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"i\":\n\t\t\t\t\tvalue = date.toISOString();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"I\":\n\t\t\t\t\tvalue = date.toUTCString();\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\t\t\tres = res.replace($type.PLACEHOLDER, value);\n\t\t}\n\n\t\treturn res;\n\t}\n\n\t/**\n\t * Parses format into structured infromation.\n\t *\n\t * @param format Format template\n\t */\n\tprotected parseFormat(format: string): DateFormatInfo {\n\n\t\t// Check cache\n\t\t// TODO: implement caching of the parsed format\n\n\t\t// Init format parse info holder\n\t\tlet info: DateFormatInfo = {\n\t\t\t\"template\": \"\",\n\t\t\t\"parts\": <any>[]\n\t\t};\n\n\t\t// Let TextFormatter split into chunks\n\t\tlet chunks = TextFormatter.chunk(format, true);\n\t\tfor (let i: number = 0; i < chunks.length; i++) {\n\t\t\tlet chunk = chunks[i];\n\n\t\t\tif (chunk.type === \"value\") {\n\n\t\t\t\t// Just \"Date\"?\n\t\t\t\tif (chunk.text.match(/^date$/i)) {\n\t\t\t\t\tlet dateFormat = this.get(\"dateFormat\", \"yyyy-MM-dd\");\n\t\t\t\t\tif (!$type.isString(dateFormat)) {\n\t\t\t\t\t\tdateFormat = \"yyyy-MM-dd\";\n\t\t\t\t\t}\n\t\t\t\t\tchunk.text = dateFormat;\n\t\t\t\t}\n\n\t\t\t\t// Find all possible parts\n\t\t\t\tlet matches = chunk.text.match(/G|yyyy|yyy|yy|y|YYYY|YYY|YY|Y|u|q|MMMMM|MMMM|MMM|MM|M|ww|w|W|dd|d|DDD|DD|D|F|g|EEEEE|EEEE|EEE|EE|E|eeeee|eeee|eee|ee|e|aaa|aa|a|hh|h|HH|H|KK|K|kk|k|mm|m|ss|s|SSS|SS|S|A|zzzz|zzz|zz|z|ZZ|Z|t|x|nnn|nn|n|i|I/g);\n\n\t\t\t\t// Found?\n\t\t\t\tif (matches) {\n\n\t\t\t\t\t// Populate template\n\t\t\t\t\tfor (let x = 0; x < matches.length; x++) {\n\t\t\t\t\t\tinfo.parts.push(matches[x]);\n\t\t\t\t\t\tchunk.text = chunk.text.replace(matches[x], $type.PLACEHOLDER);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// Apply to template\n\t\t\tinfo.template += chunk.text;\n\t\t}\n\n\t\t// Save cache\n\t\t// TODO\n\n\t\treturn info;\n\t}\n\n\tprotected _months(): Months[] {\n\t\treturn [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"];\n\t}\n\n\tprotected _getMonth(index: number): Months {\n\t\treturn this._months()[index];\n\t}\n\n\tprotected _shortMonths(): ShortMonths[] {\n\t\treturn [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May(short)\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\n\t}\n\n\tprotected _getShortMonth(index: number): ShortMonths {\n\t\treturn this._shortMonths()[index];\n\t}\n\n\tprotected _weekdays(): Weekdays[] {\n\t\treturn [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"];\n\t}\n\n\tprotected _getWeekday(index: number): Weekdays {\n\t\treturn this._weekdays()[index];\n\t}\n\n\tprotected _shortWeekdays(): ShortWeekdays[] {\n\t\treturn [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"];\n\t}\n\n\tprotected _getShortWeekday(index: number): ShortWeekdays {\n\t\treturn this._shortWeekdays()[index];\n\t}\n\n\tpublic parse(source: any, format: string): Date {\n\n\t\t// Is it already a Date\n\t\tif (source instanceof Date) {\n\t\t\treturn source;\n\t\t}\n\n\t\t// Is it a numeric timestamp\n\t\tif ($type.isNumber(source)) {\n\t\t\treturn new Date(source);\n\t\t}\n\n\t\t// No? Let's check if it's string, and try converting to it if nec\n\t\tif (!$type.isString(source)) {\n\t\t\tsource = source.toString();\n\t\t}\n\n\t\t// Init return value\n\t\tlet res: Date;\n\n\t\t// Init RegEx for parsing\n\t\tlet reg: string = \"\";\n\n\t\t// Clean format\n\t\tformat = $utils.cleanFormat(format);\n\n\t\t// Clip format to length of the source string\n\t\tformat = format.substr(0, source.length);\n\n\t\t// Parse format\n\t\tlet info = this.parseFormat(format);\n\n\t\t// Init parsed items holder\n\t\tlet parsedIndexes = {\n\t\t\t\"year\": -1,\n\t\t\t\"year3\": -1,\n\t\t\t\"year2\": -1,\n\t\t\t\"year1\": -1,\n\t\t\t\"month\": -1,\n\t\t\t\"monthShort\": -1,\n\t\t\t\"monthLong\": -1,\n\t\t\t\"weekdayShort\": -1,\n\t\t\t\"weekdayLong\": -1,\n\t\t\t\"day\": -1,\n\t\t\t\"yearDay\": -1,\n\t\t\t\"week\": -1,\n\t\t\t\"hourBase0\": -1,\n\t\t\t\"hour12Base0\": -1,\n\t\t\t\"hourBase1\": -1,\n\t\t\t\"hour12Base1\": -1,\n\t\t\t\"minute\": -1,\n\t\t\t\"second\": -1,\n\t\t\t\"millisecond\": -1,\n\t\t\t\"millisecondDigits\": -1,\n\t\t\t\"am\": -1,\n\t\t\t\"zone\": -1,\n\t\t\t\"timestamp\": -1,\n\t\t\t\"iso\": -1\n\t\t};\n\n\t\t// Init values\n\t\tlet resValues = {\n\t\t\t\"year\": 1970,\n\t\t\t\"month\": 0,\n\t\t\t\"day\": 1,\n\t\t\t\"hour\": 0,\n\t\t\t\"minute\": 0,\n\t\t\t\"second\": 0,\n\t\t\t\"millisecond\": 0,\n\t\t\t\"timestamp\": <any>null,\n\t\t\t\"offset\": 0,\n\t\t\t\"utc\": this._root.utc\n\t\t}\n\n\t\t// Index adjuster\n\t\tlet indexAdjust: number = 0;\n\t\tlet index: number = 0;\n\n\t\t// Iterate through all of the parts\n\t\tfor (let i: number = 0; i < info.parts.length; i++) {\n\n\t\t\t// Set current match index\n\t\t\tindex = i + indexAdjust + 1;\n\n\t\t\tswitch (info.parts[i]) {\n\n\t\t\t\tcase \"yyyy\":\n\t\t\t\tcase \"YYYY\":\n\t\t\t\t\treg += \"([0-9]{4})\";\n\t\t\t\t\tparsedIndexes.year = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"yyy\":\n\t\t\t\tcase \"YYY\":\n\t\t\t\t\treg += \"([0-9]{3})\";\n\t\t\t\t\tparsedIndexes.year3 = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"yy\":\n\t\t\t\tcase \"YY\":\n\t\t\t\t\treg += \"([0-9]{2})\";\n\t\t\t\t\tparsedIndexes.year2 = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"y\":\n\t\t\t\tcase \"Y\":\n\t\t\t\t\treg += \"([0-9]{1})\";\n\t\t\t\t\tparsedIndexes.year1 = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"MMMM\":\n\t\t\t\t\treg += \"(\" + this.getStringList(this._months()).join(\"|\") + \")\";\n\t\t\t\t\tparsedIndexes.monthLong = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"MMM\":\n\t\t\t\t\treg += \"(\" + this.getStringList(this._shortMonths()).join(\"|\") + \")\";\n\t\t\t\t\tparsedIndexes.monthShort = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"MM\":\n\t\t\t\tcase \"M\":\n\t\t\t\t\treg += \"([0-9]{2}|[0-9]{1})\";\n\t\t\t\t\tparsedIndexes.month = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"ww\":\n\t\t\t\tcase \"w\":\n\t\t\t\t\treg += \"([0-9]{2}|[0-9]{1})\";\n\t\t\t\t\tparsedIndexes.week = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"dd\":\n\t\t\t\tcase \"d\":\n\t\t\t\t\treg += \"([0-9]{2}|[0-9]{1})\";\n\t\t\t\t\tparsedIndexes.day = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"DDD\":\n\t\t\t\tcase \"DD\":\n\t\t\t\tcase \"D\":\n\t\t\t\t\treg += \"([0-9]{3}|[0-9]{2}|[0-9]{1})\";\n\t\t\t\t\tparsedIndexes.yearDay = index;\n\t\t\t\t\tbreak;\n\n\n\t\t\t\tcase \"dddd\":\n\t\t\t\t\treg += \"(\" + this.getStringList(this._weekdays()).join(\"|\") + \")\";\n\t\t\t\t\tparsedIndexes.weekdayLong = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"ddd\":\n\t\t\t\t\treg += \"(\" + this.getStringList(this._shortWeekdays()).join(\"|\") + \")\";\n\t\t\t\t\tparsedIndexes.weekdayShort = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"aaa\":\n\t\t\t\tcase \"aa\":\n\t\t\t\tcase \"a\":\n\t\t\t\t\t// TODO: fix (escape regex)\n\t\t\t\t\treg += \"(\" + this.getStringList([\"AM\", \"PM\", \"A\\.M\\.\", \"P\\.M\\.\", \"A\", \"P\"]).join(\"|\") + \")\";\n\t\t\t\t\tparsedIndexes.am = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"hh\":\n\t\t\t\tcase \"h\":\n\t\t\t\t\treg += \"([0-9]{2}|[0-9]{1})\";\n\t\t\t\t\tparsedIndexes.hour12Base1 = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"HH\":\n\t\t\t\tcase \"H\":\n\t\t\t\t\treg += \"([0-9]{2}|[0-9]{1})\";\n\t\t\t\t\tparsedIndexes.hourBase0 = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"KK\":\n\t\t\t\tcase \"K\":\n\t\t\t\t\treg += \"([0-9]{2}|[0-9]{1})\";\n\t\t\t\t\tparsedIndexes.hour12Base0 = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"kk\":\n\t\t\t\tcase \"k\":\n\t\t\t\t\treg += \"([0-9]{2}|[0-9]{1})\";\n\t\t\t\t\tparsedIndexes.hourBase1 = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"mm\":\n\t\t\t\tcase \"m\":\n\t\t\t\t\treg += \"([0-9]{2}|[0-9]{1})\";\n\t\t\t\t\tparsedIndexes.minute = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"ss\":\n\t\t\t\tcase \"s\":\n\t\t\t\t\treg += \"([0-9]{2}|[0-9]{1})\";\n\t\t\t\t\tparsedIndexes.second = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"SSS\":\n\t\t\t\tcase \"SS\":\n\t\t\t\tcase \"S\":\n\t\t\t\t\treg += \"([0-9]{3}|[0-9]{2}|[0-9]{1})\";\n\t\t\t\t\tparsedIndexes.millisecond = index;\n\t\t\t\t\tparsedIndexes.millisecondDigits = info.parts[i].length;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"nnn\":\n\t\t\t\tcase \"nn\":\n\t\t\t\tcase \"n\":\n\t\t\t\t\treg += \"([0-9]{3}|[0-9]{2}|[0-9]{1})\";\n\t\t\t\t\tparsedIndexes.millisecond = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"x\":\n\t\t\t\t\treg += \"([0-9]{1,})\";\n\t\t\t\t\tparsedIndexes.timestamp = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"Z\":\n\t\t\t\t\treg += \"GMT([-+]+[0-9]{2}:[0-9]{2})\";\n\t\t\t\t\tparsedIndexes.zone = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"ZZ\":\n\t\t\t\t\treg += \"([\\\\-+]+[0-9]{2}[0-9]{2})\";\n\t\t\t\t\tparsedIndexes.zone = index;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"i\":\n\t\t\t\t\treg += \"([0-9]{4})-?([0-9]{2})-?([0-9]{2})T?([0-9]{2}):?([0-9]{2}):?([0-9]{2})\\\\.?([0-9]{0,3})([zZ]|[+\\\\-][0-9]{2}:?[0-9]{2}|$)\";\n\t\t\t\t\tparsedIndexes.iso = index;\n\t\t\t\t\tindexAdjust += 7;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"G\":\n\t\t\t\tcase \"YYYY\":\n\t\t\t\tcase \"YYY\":\n\t\t\t\tcase \"YY\":\n\t\t\t\tcase \"Y\":\n\t\t\t\tcase \"MMMMM\":\n\t\t\t\tcase \"W\":\n\t\t\t\tcase \"EEEEE\":\n\t\t\t\tcase \"EEEE\":\n\t\t\t\tcase \"EEE\":\n\t\t\t\tcase \"EE\":\n\t\t\t\tcase \"E\":\n\t\t\t\tcase \"eeeee\":\n\t\t\t\tcase \"eeee\":\n\t\t\t\tcase \"eee\":\n\t\t\t\tcase \"ee\":\n\t\t\t\tcase \"e\":\n\t\t\t\tcase \"zzzz\":\n\t\t\t\tcase \"zzz\":\n\t\t\t\tcase \"zz\":\n\t\t\t\tcase \"z\":\n\t\t\t\tcase \"t\":\n\t\t\t\t\t// Ignore\n\t\t\t\t\tindexAdjust--;\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\treg += \"[^0-9]*\";\n\t\t}\n\n\t\t// Try matching\n\t\tlet regex = new RegExp(reg);\n\t\tlet matches: RegExpMatchArray = source.match(regex);\n\n\t\tif (matches) {\n\t\t\t// Populate the date object\n\n\t\t\t// Full year\n\t\t\tif (parsedIndexes.year > -1) {\n\t\t\t\tresValues.year = parseInt(matches[parsedIndexes.year]);\n\t\t\t}\n\n\t\t\t// 3-digit year\n\t\t\tif (parsedIndexes.year3 > -1) {\n\t\t\t\tlet val = parseInt(matches[parsedIndexes.year3]);\n\t\t\t\tval += 1000;\n\t\t\t\tresValues.year = val;\n\t\t\t}\n\n\t\t\t// 2-digit year\n\t\t\tif (parsedIndexes.year2 > -1) {\n\t\t\t\tlet val = parseInt(matches[parsedIndexes.year2]);\n\t\t\t\tif (val > 50) {\n\t\t\t\t\tval += 1000;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tval += 2000;\n\t\t\t\t}\n\t\t\t\tresValues.year = val;\n\t\t\t}\n\n\t\t\t// 1-digit year\n\t\t\tif (parsedIndexes.year1 > -1) {\n\t\t\t\tlet val = parseInt(matches[parsedIndexes.year1]);\n\t\t\t\tval = Math.floor((new Date().getFullYear()) / 10) * 10 + val;\n\t\t\t\tresValues.year = val;\n\t\t\t}\n\n\t\t\t// Full month\n\t\t\tif (parsedIndexes.monthLong > -1) {\n\t\t\t\tresValues.month = this.resolveMonth(<any>matches[parsedIndexes.monthLong]);\n\t\t\t}\n\n\t\t\t// Short month\n\t\t\tif (parsedIndexes.monthShort > -1) {\n\t\t\t\tresValues.month = this.resolveShortMonth(<any>matches[parsedIndexes.monthShort]);\n\t\t\t}\n\n\t\t\t// Numeric month\n\t\t\tif (parsedIndexes.month > -1) {\n\t\t\t\tresValues.month = parseInt(matches[parsedIndexes.month]) - 1;\n\t\t\t}\n\n\t\t\t// Weekday\n\t\t\t// @todo\n\n\t\t\t// Week\n\t\t\tif ((parsedIndexes.week > -1) && (parsedIndexes.day === -1)) {\n\t\t\t\t// We parse weeks ONLY if day is not explicitly set\n\t\t\t\t// TODO: this needs work\n\t\t\t\t// (but maybe later - I can hardly imagine anyone passing their dates in weeks)\n\t\t\t\tresValues.month = 0;\n\t\t\t\tresValues.day = $utils.getDayFromWeek(\n\t\t\t\t\tparseInt(matches[parsedIndexes.week]),\n\t\t\t\t\tresValues.year,\n\t\t\t\t\t1,\n\t\t\t\t\tthis._root.utc\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Day\n\t\t\tif (parsedIndexes.day > -1) {\n\t\t\t\tresValues.day = parseInt(matches[parsedIndexes.day]);\n\t\t\t}\n\n\t\t\t// Year day\n\t\t\tif (parsedIndexes.yearDay > -1) {\n\t\t\t\tresValues.month = 0;\n\t\t\t\tresValues.day = parseInt(matches[parsedIndexes.yearDay]);\n\t\t\t}\n\n\t\t\t// 24 Hour (0-23)\n\t\t\tif (parsedIndexes.hourBase0 > -1) {\n\t\t\t\tresValues.hour = parseInt(matches[parsedIndexes.hourBase0]);\n\t\t\t}\n\n\t\t\t// 24 Hour (1-24)\n\t\t\tif (parsedIndexes.hourBase1 > -1) {\n\t\t\t\tresValues.hour = parseInt(matches[parsedIndexes.hourBase1]) - 1;\n\t\t\t}\n\n\t\t\t// 12 Hour (0-11)\n\t\t\tif (parsedIndexes.hour12Base0 > -1) {\n\t\t\t\tlet val = parseInt(matches[parsedIndexes.hour12Base0]);\n\t\t\t\tif (val == 11) {\n\t\t\t\t\tval = 0;\n\t\t\t\t}\n\t\t\t\tif ((parsedIndexes.am > -1) && !this.isAm(matches[parsedIndexes.am])) {\n\t\t\t\t\tval += 12;\n\t\t\t\t}\n\t\t\t\tresValues.hour = val;\n\t\t\t}\n\n\t\t\t// 12 Hour (1-12)\n\t\t\tif (parsedIndexes.hour12Base1 > -1) {\n\t\t\t\tlet val = parseInt(matches[parsedIndexes.hour12Base1]);\n\t\t\t\tif (val == 12) {\n\t\t\t\t\tval = 0;\n\t\t\t\t}\n\t\t\t\tif ((parsedIndexes.am > -1) && !this.isAm(matches[parsedIndexes.am])) {\n\t\t\t\t\tval += 12;\n\t\t\t\t}\n\t\t\t\tresValues.hour = val;\n\t\t\t}\n\n\t\t\t// Minute\n\t\t\tif (parsedIndexes.minute > -1) {\n\t\t\t\tresValues.minute = parseInt(matches[parsedIndexes.minute]);\n\t\t\t}\n\n\t\t\t// Second\n\t\t\tif (parsedIndexes.second > -1) {\n\t\t\t\tresValues.second = parseInt(matches[parsedIndexes.second]);\n\t\t\t}\n\n\t\t\t// Millisecond\n\t\t\tif (parsedIndexes.millisecond > -1) {\n\t\t\t\tlet val = parseInt(matches[parsedIndexes.millisecond]);\n\t\t\t\tif (parsedIndexes.millisecondDigits == 2) {\n\t\t\t\t\tval *= 10;\n\t\t\t\t}\n\t\t\t\telse if (parsedIndexes.millisecondDigits == 1) {\n\t\t\t\t\tval *= 100;\n\t\t\t\t}\n\t\t\t\tresValues.millisecond = val;\n\t\t\t}\n\n\t\t\t// Timestamp\n\t\t\tif (parsedIndexes.timestamp > -1) {\n\t\t\t\tresValues.timestamp = parseInt(matches[parsedIndexes.timestamp]);\n\n\t\t\t\tconst ts = new Date(resValues.timestamp);\n\t\t\t\tresValues.year = ts.getUTCFullYear();\n\t\t\t\tresValues.month = ts.getUTCMonth();\n\t\t\t\tresValues.day = ts.getUTCDate();\n\t\t\t\tresValues.hour = ts.getUTCHours();\n\t\t\t\tresValues.minute = ts.getUTCMinutes();\n\t\t\t\tresValues.second = ts.getUTCSeconds();\n\t\t\t\tresValues.millisecond = ts.getUTCMilliseconds();\n\t\t\t}\n\n\t\t\t// Adjust time zone\n\t\t\tif (parsedIndexes.zone > -1) {\n\t\t\t\tresValues.offset = this.resolveTimezoneOffset(new Date(resValues.year, resValues.month, resValues.day), matches[parsedIndexes.zone]);\n\t\t\t}\n\n\t\t\t// ISO\n\t\t\tif (parsedIndexes.iso > -1) {\n\n\t\t\t\tresValues.year = $type.toNumber(matches[parsedIndexes.iso + 0]);\n\t\t\t\tresValues.month = $type.toNumber(matches[parsedIndexes.iso + 1]) - 1;\n\t\t\t\tresValues.day = $type.toNumber(matches[parsedIndexes.iso + 2]);\n\t\t\t\tresValues.hour = $type.toNumber(matches[parsedIndexes.iso + 3]);\n\t\t\t\tresValues.minute = $type.toNumber(matches[parsedIndexes.iso + 4]);\n\t\t\t\tresValues.second = $type.toNumber(matches[parsedIndexes.iso + 5]);\n\t\t\t\tresValues.millisecond = $type.toNumber(matches[parsedIndexes.iso + 6]);\n\n\t\t\t\tif (matches[parsedIndexes.iso + 7] == \"Z\" || matches[parsedIndexes.iso + 7] == \"z\") {\n\t\t\t\t\tresValues.utc = true;\n\t\t\t\t}\n\t\t\t\telse if (matches[parsedIndexes.iso + 7] != \"\") {\n\t\t\t\t\tresValues.offset = this.resolveTimezoneOffset(new Date(resValues.year, resValues.month, resValues.day), matches[parsedIndexes.iso + 7]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Create Date object\n\t\t\tif (resValues.utc) {\n\t\t\t\tres = new Date(Date.UTC(\n\t\t\t\t\tresValues.year,\n\t\t\t\t\tresValues.month,\n\t\t\t\t\tresValues.day,\n\t\t\t\t\tresValues.hour,\n\t\t\t\t\tresValues.minute,\n\t\t\t\t\tresValues.second,\n\t\t\t\t\tresValues.millisecond\n\t\t\t\t));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tres = new Date(\n\t\t\t\t\tresValues.year,\n\t\t\t\t\tresValues.month,\n\t\t\t\t\tresValues.day,\n\t\t\t\t\tresValues.hour,\n\t\t\t\t\tresValues.minute + resValues.offset,\n\t\t\t\t\tresValues.second,\n\t\t\t\t\tresValues.millisecond\n\t\t\t\t);\n\t\t\t}\n\n\t\t}\n\t\telse {\n\t\t\t// Didn't match anything\n\t\t\t// Let's try dropping it into Date constructor and hope for the best\n\t\t\tres = new Date(source);\n\t\t}\n\n\t\treturn res;\n\t}\n\n\tprotected resolveTimezoneOffset(date: Date, zone: string): number {\n\t\tlet value = zone.match(/([+\\-]?)([0-9]{2}):?([0-9]{2})/);\n\t\tif (value) {\n\t\t\tlet match = zone.match(/([+\\-]?)([0-9]{2}):?([0-9]{2})/)!;\n\t\t\tlet dir = match[1];\n\t\t\tlet hour = match[2];\n\t\t\tlet minute = match[3];\n\t\t\tlet offset = parseInt(hour) * 60 + parseInt(minute);\n\n\t\t\t// Adjust offset\n\t\t\t// Making it negative does not seem to make sense, but it's right\n\t\t\t// because of how JavaScript calculates GMT offsets\n\t\t\tif (dir == \"+\") {\n\t\t\t\toffset *= -1;\n\t\t\t}\n\n\t\t\t// Check the difference in offset\n\t\t\tlet originalOffset = (date || new Date()).getTimezoneOffset();\n\t\t\tlet diff = offset - originalOffset;\n\t\t\treturn diff;\n\t\t}\n\t\treturn 0;\n\t}\n\n\t/**\n\t * Resolves month name (i.e. \"December\") into a month number (11).\n\t *\n\t * @param value Month name\n\t * @return Month number\n\t */\n\tprotected resolveMonth(value: Months): number {\n\n\t\t// Let's try English first\n\t\tlet month: number = this._months().indexOf(value);\n\t\tif (month > -1) {\n\t\t\treturn month;\n\t\t}\n\n\t\t// Try the translation\n\t\tif (!this._root.language.isDefault()) {\n\t\t\tmonth = this._root.language.translateAll(this._months()).indexOf(value);\n\t\t\tif (month > -1) {\n\t\t\t\treturn month\n\t\t\t}\n\t\t}\n\n\t\treturn 0;\n\t}\n\n\t/**\n\t * Resolves short month name (i.e. \"Dec\") into a month number.\n\t *\n\t * @param value Short month name\n\t * @return Month number\n\t */\n\tprotected resolveShortMonth(value: ShortMonths): number {\n\n\t\t// Let's try English first\n\t\tlet month: number = this._shortMonths().indexOf(value);\n\t\tif (month > -1) {\n\t\t\treturn month;\n\t\t}\n\n\t\t// Maybe long month (workaround for May)\n\t\tmonth = this._months().indexOf(<any>value);\n\t\tif (month > -1) {\n\t\t\treturn month;\n\t\t}\n\n\t\t// Try the translation\n\t\tif (this._root.language && !this._root.language.isDefault()) {\n\t\t\tmonth = this._root.language.translateAll(this._shortMonths()).indexOf(value);\n\t\t\tif (month > -1) {\n\t\t\t\treturn month\n\t\t\t}\n\t\t}\n\n\t\treturn 0;\n\t}\n\n\t/**\n\t * Checks if passed in string represents AM/PM notation in many of its\n\t * versions.\n\t *\n\t * @param value Source string\n\t * @return Is it AM/PM?\n\t */\n\tprotected isAm(value: string): boolean {\n\t\tlet list = this.getStringList([\"AM\", \"A.M.\", \"A\"]);\n\t\treturn list.indexOf(value.toUpperCase()) > -1;\n\t}\n\n\t/**\n\t * Translates list of strings.\n\t *\n\t * @param list Source strings\n\t * @return Translated strings\n\t */\n\tprotected getStringList(list: Array<keyof ILocaleSettings>): Array<string> {\n\t\tlet res: string[] = [];\n\t\tfor (let i: number = 0; i < list.length; i++) {\n\t\t\t// translate?\n\t\t\tif (this._root.language) {\n\t\t\t\tres.push($utils.escapeForRgex(this._t(list[i])));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tres.push($utils.escapeForRgex(list[i]));\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}\n\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../../../src/.internal/core/util/Modal.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../../../src/.internal/core/util/Modal.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAgFlF,MAAM,WAAW,cAAe,SAAQ,eAAe;IACtD,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,aAAc,SAAQ,cAAc;IACpD,SAAS,EAAE,cAAc,CAAC;IAC1B,OAAO,EAAE,cAAc,CAAC;IACxB,OAAO,EAAE,cAAc,CAAC;IACxB,OAAO,EAAE,cAAc,CAAC;CACxB;AAED,MAAM,WAAW,YAAa,SAAQ,aAAa;IAClD,QAAQ,EAAE,EAAE,CAAA;IACZ,QAAQ,EAAE,EAAE,CAAA;IACZ,WAAW,EAAE,EAAE,CAAA;CACf;AAED;;GAEG;AACH,qBAAa,KAAM,SAAQ,MAAM;IAChC,OAAc,SAAS,EAAE,MAAM,CAAW;IAC1C,OAAc,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAA+C;IAEvE,SAAS,EAAE,cAAc,CAAC;IAC1B,gBAAgB,EAAE,aAAa,CAAC;IAChC,OAAO,EAAE,YAAY,CAAC;IAIrC,SAAS,CAAC,SAAS;IAgDZ,cAAc;IAQrB;;;;OAIG;IACI,MAAM,IAAI,OAAO;IAIxB;;OAEG;IACI,IAAI,IAAI,IAAI;IAQnB;;OAEG;IACI,KAAK,IAAI,IAAI;IAQpB;;OAEG;IACI,MAAM,IAAI,IAAI;IAQrB;;OAEG;IACI,OAAO;CAKd"}
|
|
@@ -17,8 +17,10 @@ function modalCSS(element, root, _prefix) {
|
|
|
17
17
|
new StyleRule(element, ".am5-modal", {
|
|
18
18
|
"width": "100%",
|
|
19
19
|
"height": "100%",
|
|
20
|
-
"position": "
|
|
21
|
-
"z-index": "
|
|
20
|
+
"position": "absolute",
|
|
21
|
+
"z-index": "100000",
|
|
22
|
+
"top": "0",
|
|
23
|
+
"left": "0"
|
|
22
24
|
}),
|
|
23
25
|
new StyleRule(element, ".am5-modal-curtain", {
|
|
24
26
|
"top": "0",
|
|
@@ -85,7 +87,7 @@ var Modal = /** @class */ (function (_super) {
|
|
|
85
87
|
var container = document.createElement("div");
|
|
86
88
|
container.className = "am5-modal";
|
|
87
89
|
container.style.display = "none";
|
|
88
|
-
this.root.
|
|
90
|
+
this.root._inner.appendChild(container);
|
|
89
91
|
this.setPrivate("container", container);
|
|
90
92
|
var curtain = document.createElement("div");
|
|
91
93
|
curtain.className = "am5-modal-curtain";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.js","sourceRoot":"","sources":["../../../../../src/.internal/core/util/Modal.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAkD,MAAM,UAAU,CAAC;AAClF,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AACnC,OAAO,EAAE,aAAa,EAAa,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAErF,OAAO,KAAK,MAAM,MAAM,SAAS,CAAA;AAGjC;;GAEG;AACH,IAAI,KAAkC,CAAC;AAEvC;;GAEG;AACH,SAAS,QAAQ,CAAC,OAA0B,EAAE,IAAU,EAAE,OAAgB;IACzE,IAAM,EAAE,GAAG,IAAI,CAAC,eAAe,CAAC;IAEhC,IAAI,CAAC,KAAK,EAAE;QACX,IAAM,UAAQ,GAAG,IAAI,aAAa,CAAC;YAElC,IAAI,SAAS,CAAC,OAAO,EAAE,YAAY,EAAE;gBACpC,OAAO,EAAE,MAAM;gBACf,QAAQ,EAAE,MAAM;gBAChB,UAAU,EAAE,UAAU;gBACtB,SAAS,EAAE,MAAM;aACjB,CAAC;YAEF,IAAI,SAAS,CAAC,OAAO,EAAE,oBAAoB,EAAE;gBAC5C,KAAK,EAAE,GAAG;gBACV,MAAM,EAAE,GAAG;gBACX,OAAO,EAAE,MAAM;gBACf,QAAQ,EAAE,MAAM;gBAChB,UAAU,EAAE,UAAU;gBACtB,YAAY,EAAE,EAAE,CAAC,GAAG,CAAC,YAAY,CAAE,CAAC,KAAK,CAAC,GAAG,CAAC;gBAC9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AAC,QAAQ,EAAE;gBAC9B,IAAI,EAAE,QAAQ;gBACd,MAAM,EAAE,IAAI;aACZ,CAAC,CAAC;QACJ,CAAC;;IAED;;OAEG;;;;;eACH;YACC,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;YACpD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE;gBACjC,IAAI,EAAE,WAAW;gBACjB,MAAM,EAAE,IAAI;aACZ,CAAC,CAAC;QACJ,CAAC;;IAED;;OAEG;;;;;eACH;YACC,iBAAM,OAAO,WAAE,CAAC;YAChB,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC;QACzD,CAAC;;IAjHD;;;;eAAkC,OAAO;OAAC;IAC1C;;;;eAA0C,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;OAAC;IAkHvF,YAAC;CAAA,AApHD,CAA2B,MAAM,GAoHhC;SApHY,KAAK","sourcesContent":["import type { Root } from \"../Root\"\n\nimport { Entity, IEntitySettings, IEntityPrivate, IEntityEvents } from \"./Entity\";\nimport { StyleRule } from \"./Utils\"\nimport { MultiDisposer, IDisposer, CounterDisposer } from \"../../core/util/Disposer\";\n\nimport * as $utils from \"./Utils\"\n\n\n/**\n * @ignore\n */\nlet rules: CounterDisposer | undefined;\n\n/**\n * @ignore\n */\nfunction modalCSS(element: ShadowRoot | null, root: Root, _prefix?: string): IDisposer {\n\tconst ic = root.interfaceColors;\n\n\tif (!rules) {\n\t\tconst disposer = new MultiDisposer([\n\n\t\t\tnew StyleRule(element, \".am5-modal\", {\n\t\t\t\t\"width\": \"100%\",\n\t\t\t\t\"height\": \"100%\",\n\t\t\t\t\"position\": \"relative\",\n\t\t\t\t\"z-index\": \"1000\"\n\t\t\t}),\n\n\t\t\tnew StyleRule(element, \".am5-modal-curtain\", {\n\t\t\t\t\"top\": \"0\",\n\t\t\t\t\"left\": \"0\",\n\t\t\t\t\"width\": \"100%\",\n\t\t\t\t\"height\": \"100%\",\n\t\t\t\t\"position\": \"absolute\",\n\t\t\t\t\"background\": ic.get(\"background\")!.toCSS(0.5),\n\t\t\t\t\"z-index\": \"100\"\n\t\t\t}),\n\n\t\t\tnew StyleRule(element, \".am5-modal-wrapper\", {\n\t\t\t\t\"top\": \"0\",\n\t\t\t\t\"left\": \"0\",\n\t\t\t\t\"width\": \"100%\",\n\t\t\t\t\"height\": \"100%\",\n\t\t\t\t\"position\": \"absolute\",\n\t\t\t\t\"text-align\": \"center\",\n\t\t\t\t\"white-space\": \"nowrap\",\n\t\t\t\t\"background\": ic.get(\"background\")!.toCSS(0.5),\n\t\t\t\t\"z-index\": \"101\"\n\t\t\t}),\n\n\t\t\tnew StyleRule(element, \".am5-modal-wrapper:before\", {\n\t\t\t\t\"content\": \"''\",\n\t\t\t\t\"display\": \"inline-block\",\n\t\t\t\t\"height\": \"100%\",\n\t\t\t\t\"vertical-align\": \"middle\",\n\t\t\t\t\"margin-right\": \"-0.25em\"\n\t\t\t}),\n\n\t\t\tnew StyleRule(element, \".am5-modal-content\", {\n\t\t\t\t\"display\": \"inline-block\",\n\t\t\t\t\"padding\": \"1em\",\n\t\t\t\t\"vertical-align\": \"middle\",\n\t\t\t\t\"background\": ic.get(\"background\")!.toCSS(),\n\t\t\t\t\"border\": \"1px solid \" + ic.get(\"alternativeBackground\")!.toCSS()\n\t\t\t}),\n\n\t\t]);\n\n\t\trules = new CounterDisposer(() => {\n\t\t\trules = undefined;\n\t\t\tdisposer.dispose();\n\t\t});\n\t}\n\n\treturn rules.increment();\n}\n\n\nexport interface IModalSettings extends IEntitySettings {\n\tcontent?: string;\n}\n\nexport interface IModalPrivate extends IEntityPrivate {\n\tcontainer: HTMLDivElement;\n\tcurtain: HTMLDivElement;\n\twrapper: HTMLDivElement;\n\tcontent: HTMLDivElement;\n}\n\nexport interface IModalEvents extends IEntityEvents {\n\t\"opened\": {}\n\t\"closed\": {}\n\t\"cancelled\": {}\n}\n\n/**\n * Used to display a modal dialog with HTML content.\n */\nexport class Modal extends Entity {\n\tpublic static className: string = \"Modal\";\n\tpublic static classNames: Array<string> = Entity.classNames.concat([Modal.className]);\n\n\tdeclare public _settings: IModalSettings;\n\tdeclare public _privateSettings: IModalPrivate;\n\tdeclare public _events: IModalEvents;\n\n\t//protected _currentPass: number = 0;\n\n\tprotected _afterNew() {\n\t\t// Applying themes because this will not have parents\n\t\tsuper._afterNewApplyThemes();\n\n\t\t// Load CSS\n\t\tmodalCSS($utils.getShadowRoot(this._root.dom), this._root);\n\n\t\t// Create elements\n\t\tconst container = document.createElement(\"div\");\n\t\tcontainer.className = \"am5-modal\";\n\t\tcontainer.style.display = \"none\";\n\t\tthis.root.dom.appendChild(container);\n\t\tthis.setPrivate(\"container\", container);\n\n\t\tconst curtain = document.createElement(\"div\");\n\t\tcurtain.className = \"am5-modal-curtain\";\n\t\tcontainer.appendChild(curtain);\n\t\tthis.setPrivate(\"curtain\", curtain);\n\n\t\t$utils.addEventListener(curtain, \"click\", () => {\n\t\t\tthis.cancel();\n\t\t});\n\n\t\tconst wrapper = document.createElement(\"div\");\n\t\twrapper.className = \"am5-modal-wrapper\";\n\t\tcontainer.appendChild(wrapper);\n\t\tthis.setPrivate(\"wrapper\", wrapper);\n\n\t\tconst content = document.createElement(\"div\");\n\t\tcontent.className = \"am5-modal-content\";\n\t\twrapper.appendChild(content);\n\t\tthis.setPrivate(\"content\", content);\n\n\t\tconst html = this.get(\"content\");\n\t\tif (html) {\n\t\t\tcontent.innerHTML = html;\n\t\t}\n\n\t\t// Close on ESC\n\t\tif ($utils.supports(\"keyboardevents\")) {\n\t\t\tthis._disposers.push($utils.addEventListener(document, \"keydown\", (ev: KeyboardEvent) => {\n\t\t\t\tif (this.isOpen() && ev.keyCode == 27) {\n\t\t\t\t\tthis.cancel();\n\t\t\t\t}\n\t\t\t}));\n\t\t}\n\t}\n\n\tpublic _beforeChanged() {\n\t\tsuper._beforeChanged();\n\n\t\tif (this.isDirty(\"content\")) {\n\t\t\tthis.getPrivate(\"content\").innerHTML = this.get(\"content\", \"\");\n\t\t}\n\t}\n\n\t/**\n\t * Returns `true` if modal is currently open.\n\t * \n\t * @return Modal open?\n\t */\n\tpublic isOpen(): boolean {\n\t\treturn this.getPrivate(\"container\").style.display != \"none\";\n\t}\n\n\t/**\n\t * Opens modal.\n\t */\n\tpublic open(): void {\n\t\tthis.getPrivate(\"container\").style.display = \"block\";\n\t\tthis.events.dispatch(\"opened\", {\n\t\t\ttype: \"opened\",\n\t\t\ttarget: this\n\t\t});\n\t}\n\n\t/**\n\t * Closes modal.\n\t */\n\tpublic close(): void {\n\t\tthis.getPrivate(\"container\").style.display = \"none\";\n\t\tthis.events.dispatch(\"closed\", {\n\t\t\ttype: \"closed\",\n\t\t\ttarget: this\n\t\t});\n\t}\n\n\t/**\n\t * Closes modal and invokes `cancelled` event.\n\t */\n\tpublic cancel(): void {\n\t\tthis.getPrivate(\"container\").style.display = \"none\";\n\t\tthis.events.dispatch(\"cancelled\", {\n\t\t\ttype: \"cancelled\",\n\t\t\ttarget: this\n\t\t});\n\t}\n\n\t/**\n\t * Disposes modal.\n\t */\n\tpublic dispose() {\n\t\tsuper.dispose();\n\t\tthis.root.dom.removeChild(this.getPrivate(\"container\"));\n\t}\n\n}"]}
|
|
1
|
+
{"version":3,"file":"Modal.js","sourceRoot":"","sources":["../../../../../src/.internal/core/util/Modal.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAkD,MAAM,UAAU,CAAC;AAClF,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AACnC,OAAO,EAAE,aAAa,EAAa,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAErF,OAAO,KAAK,MAAM,MAAM,SAAS,CAAA;AAGjC;;GAEG;AACH,IAAI,KAAkC,CAAC;AAEvC;;GAEG;AACH,S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MAAM,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;OAAC;IAkHvF,YAAC;CAAA,AApHD,CAA2B,MAAM,GAoHhC;SApHY,KAAK","sourcesContent":["import type { Root } from \"../Root\"\n\nimport { Entity, IEntitySettings, IEntityPrivate, IEntityEvents } from \"./Entity\";\nimport { StyleRule } from \"./Utils\"\nimport { MultiDisposer, IDisposer, CounterDisposer } from \"../../core/util/Disposer\";\n\nimport * as $utils from \"./Utils\"\n\n\n/**\n * @ignore\n */\nlet rules: CounterDisposer | undefined;\n\n/**\n * @ignore\n */\nfunction modalCSS(element: ShadowRoot | null, root: Root, _prefix?: string): IDisposer {\n\tconst ic = root.interfaceColors;\n\n\tif (!rules) {\n\t\tconst disposer = new MultiDisposer([\n\n\t\t\tnew StyleRule(element, \".am5-modal\", {\n\t\t\t\t\"width\": \"100%\",\n\t\t\t\t\"height\": \"100%\",\n\t\t\t\t\"position\": \"absolute\",\n\t\t\t\t\"z-index\": \"100000\",\n\t\t\t\t\"top\": \"0\",\n\t\t\t\t\"left\": \"0\"\n\t\t\t}),\n\n\t\t\tnew StyleRule(element, \".am5-modal-curtain\", {\n\t\t\t\t\"top\": \"0\",\n\t\t\t\t\"left\": \"0\",\n\t\t\t\t\"width\": \"100%\",\n\t\t\t\t\"height\": \"100%\",\n\t\t\t\t\"position\": \"absolute\",\n\t\t\t\t\"background\": ic.get(\"background\")!.toCSS(0.5),\n\t\t\t\t\"z-index\": \"100\"\n\t\t\t}),\n\n\t\t\tnew StyleRule(element, \".am5-modal-wrapper\", {\n\t\t\t\t\"top\": \"0\",\n\t\t\t\t\"left\": \"0\",\n\t\t\t\t\"width\": \"100%\",\n\t\t\t\t\"height\": \"100%\",\n\t\t\t\t\"position\": \"absolute\",\n\t\t\t\t\"text-align\": \"center\",\n\t\t\t\t\"white-space\": \"nowrap\",\n\t\t\t\t\"background\": ic.get(\"background\")!.toCSS(0.5),\n\t\t\t\t\"z-index\": \"101\"\n\t\t\t}),\n\n\t\t\tnew StyleRule(element, \".am5-modal-wrapper:before\", {\n\t\t\t\t\"content\": \"''\",\n\t\t\t\t\"display\": \"inline-block\",\n\t\t\t\t\"height\": \"100%\",\n\t\t\t\t\"vertical-align\": \"middle\",\n\t\t\t\t\"margin-right\": \"-0.25em\"\n\t\t\t}),\n\n\t\t\tnew StyleRule(element, \".am5-modal-content\", {\n\t\t\t\t\"display\": \"inline-block\",\n\t\t\t\t\"padding\": \"1em\",\n\t\t\t\t\"vertical-align\": \"middle\",\n\t\t\t\t\"background\": ic.get(\"background\")!.toCSS(),\n\t\t\t\t\"border\": \"1px solid \" + ic.get(\"alternativeBackground\")!.toCSS()\n\t\t\t}),\n\n\t\t]);\n\n\t\trules = new CounterDisposer(() => {\n\t\t\trules = undefined;\n\t\t\tdisposer.dispose();\n\t\t});\n\t}\n\n\treturn rules.increment();\n}\n\n\nexport interface IModalSettings extends IEntitySettings {\n\tcontent?: string;\n}\n\nexport interface IModalPrivate extends IEntityPrivate {\n\tcontainer: HTMLDivElement;\n\tcurtain: HTMLDivElement;\n\twrapper: HTMLDivElement;\n\tcontent: HTMLDivElement;\n}\n\nexport interface IModalEvents extends IEntityEvents {\n\t\"opened\": {}\n\t\"closed\": {}\n\t\"cancelled\": {}\n}\n\n/**\n * Used to display a modal dialog with HTML content.\n */\nexport class Modal extends Entity {\n\tpublic static className: string = \"Modal\";\n\tpublic static classNames: Array<string> = Entity.classNames.concat([Modal.className]);\n\n\tdeclare public _settings: IModalSettings;\n\tdeclare public _privateSettings: IModalPrivate;\n\tdeclare public _events: IModalEvents;\n\n\t//protected _currentPass: number = 0;\n\n\tprotected _afterNew() {\n\t\t// Applying themes because this will not have parents\n\t\tsuper._afterNewApplyThemes();\n\n\t\t// Load CSS\n\t\tmodalCSS($utils.getShadowRoot(this._root.dom), this._root);\n\n\t\t// Create elements\n\t\tconst container = document.createElement(\"div\");\n\t\tcontainer.className = \"am5-modal\";\n\t\tcontainer.style.display = \"none\";\n\t\tthis.root._inner.appendChild(container);\n\t\tthis.setPrivate(\"container\", container);\n\n\t\tconst curtain = document.createElement(\"div\");\n\t\tcurtain.className = \"am5-modal-curtain\";\n\t\tcontainer.appendChild(curtain);\n\t\tthis.setPrivate(\"curtain\", curtain);\n\n\t\t$utils.addEventListener(curtain, \"click\", () => {\n\t\t\tthis.cancel();\n\t\t});\n\n\t\tconst wrapper = document.createElement(\"div\");\n\t\twrapper.className = \"am5-modal-wrapper\";\n\t\tcontainer.appendChild(wrapper);\n\t\tthis.setPrivate(\"wrapper\", wrapper);\n\n\t\tconst content = document.createElement(\"div\");\n\t\tcontent.className = \"am5-modal-content\";\n\t\twrapper.appendChild(content);\n\t\tthis.setPrivate(\"content\", content);\n\n\t\tconst html = this.get(\"content\");\n\t\tif (html) {\n\t\t\tcontent.innerHTML = html;\n\t\t}\n\n\t\t// Close on ESC\n\t\tif ($utils.supports(\"keyboardevents\")) {\n\t\t\tthis._disposers.push($utils.addEventListener(document, \"keydown\", (ev: KeyboardEvent) => {\n\t\t\t\tif (this.isOpen() && ev.keyCode == 27) {\n\t\t\t\t\tthis.cancel();\n\t\t\t\t}\n\t\t\t}));\n\t\t}\n\t}\n\n\tpublic _beforeChanged() {\n\t\tsuper._beforeChanged();\n\n\t\tif (this.isDirty(\"content\")) {\n\t\t\tthis.getPrivate(\"content\").innerHTML = this.get(\"content\", \"\");\n\t\t}\n\t}\n\n\t/**\n\t * Returns `true` if modal is currently open.\n\t * \n\t * @return Modal open?\n\t */\n\tpublic isOpen(): boolean {\n\t\treturn this.getPrivate(\"container\").style.display != \"none\";\n\t}\n\n\t/**\n\t * Opens modal.\n\t */\n\tpublic open(): void {\n\t\tthis.getPrivate(\"container\").style.display = \"block\";\n\t\tthis.events.dispatch(\"opened\", {\n\t\t\ttype: \"opened\",\n\t\t\ttarget: this\n\t\t});\n\t}\n\n\t/**\n\t * Closes modal.\n\t */\n\tpublic close(): void {\n\t\tthis.getPrivate(\"container\").style.display = \"none\";\n\t\tthis.events.dispatch(\"closed\", {\n\t\t\ttype: \"closed\",\n\t\t\ttarget: this\n\t\t});\n\t}\n\n\t/**\n\t * Closes modal and invokes `cancelled` event.\n\t */\n\tpublic cancel(): void {\n\t\tthis.getPrivate(\"container\").style.display = \"none\";\n\t\tthis.events.dispatch(\"cancelled\", {\n\t\t\ttype: \"cancelled\",\n\t\t\ttarget: this\n\t\t});\n\t}\n\n\t/**\n\t * Disposes modal.\n\t */\n\tpublic dispose() {\n\t\tsuper.dispose();\n\t\tthis.root.dom.removeChild(this.getPrivate(\"container\"));\n\t}\n\n}"]}
|