@amcharts/amcharts5 5.0.21 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.internal/charts/xy/XYChartDefaultTheme.d.ts.map +1 -1
- package/.internal/charts/xy/XYChartDefaultTheme.js +15 -1
- package/.internal/charts/xy/XYChartDefaultTheme.js.map +1 -1
- package/.internal/charts/xy/axes/Axis.d.ts +1 -0
- package/.internal/charts/xy/axes/Axis.d.ts.map +1 -1
- package/.internal/charts/xy/axes/Axis.js +10 -3
- package/.internal/charts/xy/axes/Axis.js.map +1 -1
- package/.internal/charts/xy/axes/CategoryDateAxis.js +1 -1
- package/.internal/charts/xy/axes/CategoryDateAxis.js.map +1 -1
- package/.internal/charts/xy/axes/DateAxis.d.ts +3 -0
- package/.internal/charts/xy/axes/DateAxis.d.ts.map +1 -1
- package/.internal/charts/xy/axes/DateAxis.js +74 -20
- package/.internal/charts/xy/axes/DateAxis.js.map +1 -1
- package/.internal/charts/xy/axes/GaplessDateAxis.d.ts +48 -0
- package/.internal/charts/xy/axes/GaplessDateAxis.d.ts.map +1 -0
- package/.internal/charts/xy/axes/GaplessDateAxis.js +309 -0
- package/.internal/charts/xy/axes/GaplessDateAxis.js.map +1 -0
- package/.internal/charts/xy/axes/ValueAxis.d.ts.map +1 -1
- package/.internal/charts/xy/axes/ValueAxis.js +1 -1
- package/.internal/charts/xy/axes/ValueAxis.js.map +1 -1
- package/.internal/charts/xy/series/XYSeries.d.ts +1 -1
- package/.internal/charts/xy/series/XYSeries.d.ts.map +1 -1
- package/.internal/charts/xy/series/XYSeries.js +3 -1
- package/.internal/charts/xy/series/XYSeries.js.map +1 -1
- package/.internal/core/Classes.d.ts +2 -0
- package/.internal/core/Classes.d.ts.map +1 -1
- package/.internal/core/Classes.js.map +1 -1
- package/.internal/core/Root.d.ts +8 -3
- package/.internal/core/Root.d.ts.map +1 -1
- package/.internal/core/Root.js +10 -4
- package/.internal/core/Root.js.map +1 -1
- package/.internal/core/render/Container.d.ts.map +1 -1
- package/.internal/core/render/Container.js +1 -9
- package/.internal/core/render/Container.js.map +1 -1
- package/.internal/core/render/Slice.d.ts.map +1 -1
- package/.internal/core/render/Slice.js +4 -0
- package/.internal/core/render/Slice.js.map +1 -1
- package/.internal/core/render/Slider.d.ts +0 -2
- package/.internal/core/render/Slider.d.ts.map +1 -1
- package/.internal/core/render/Slider.js +0 -2
- package/.internal/core/render/Slider.js.map +1 -1
- package/.internal/core/util/Array.d.ts.map +1 -1
- package/.internal/core/util/Array.js +13 -23
- package/.internal/core/util/Array.js.map +1 -1
- package/.internal/core/util/DateFormatter.d.ts.map +1 -1
- package/.internal/core/util/DateFormatter.js +4 -7
- package/.internal/core/util/DateFormatter.js.map +1 -1
- package/.internal/core/util/Entity.d.ts +4 -0
- package/.internal/core/util/Entity.d.ts.map +1 -1
- package/.internal/core/util/Entity.js +52 -5
- package/.internal/core/util/Entity.js.map +1 -1
- package/.internal/core/util/Template.js +1 -1
- package/.internal/core/util/Template.js.map +1 -1
- package/.internal/core/util/Time.d.ts +9 -13
- package/.internal/core/util/Time.d.ts.map +1 -1
- package/.internal/core/util/Time.js +202 -116
- package/.internal/core/util/Time.js.map +1 -1
- package/.internal/core/util/Timezone.d.ts +28 -0
- package/.internal/core/util/Timezone.d.ts.map +1 -0
- package/.internal/core/util/Timezone.js +138 -0
- package/.internal/core/util/Timezone.js.map +1 -0
- package/.internal/core/util/Utils.d.ts +1 -1
- package/.internal/core/util/Utils.js +1 -1
- package/.internal/core/util/Utils.js.map +1 -1
- package/.internal/plugins/exporting/Exporting.d.ts +10 -1
- package/.internal/plugins/exporting/Exporting.d.ts.map +1 -1
- package/.internal/plugins/exporting/Exporting.js +11 -3
- package/.internal/plugins/exporting/Exporting.js.map +1 -1
- package/CHANGELOG.md +19 -0
- 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/package.json +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/package.json +1 -1
- package/examples/typescript/xy-stock-comparing/package.json +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/xy.d.ts +1 -0
- package/xy.d.ts.map +1 -1
- package/xy.js +1 -0
- package/xy.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Container.js","sourceRoot":"","sources":["../../../../../src/.internal/core/render/Container.ts"],"names":[],"mappings":";AAMA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAkD,MAAM,UAAU,CAAC;AAClF,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAkFtC;;;;;;;;;GASG;AACH;IAA+B,6BAAM;IAArC;QAAA,qEAkiBC;QA5hBA;;;;mBAA8B,KAAI,CAAC,KAAK,CAAC,SAAS,CAAC,aAAa,EAAE;WAAC;QAEnE;;;;mBAAsC,KAAI,CAAC,KAAK,CAAC,SAAS,CAAC,aAAa,EAAE;WAAC;QAE3E;;WAEG;QACH;;;;mBAAoC,IAAI,QAAQ,CAAC,KAAI,CAAC;WAAC;QAEvD;;;;mBAAgD,EAAE;WAAC;QACnD;;;;mBAAoD,EAAE;WAAC;QAKvD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CAAC;iBACtB;gBACD,CAAC,CAAC,KAAK,CAAC,CAAC;YACV,CAAC,CAAC,CAAC;QACJ,CAAC;;;;;;eAED,UAAoB,CAA0B;YAC7C,IAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;YAC1C,IAAI,UAAU,EAAE;gBACf,CAAC,CAAC,UAAU,CAAC,CAAC;aACd;YAED,IAAM,iBAAiB,GAAG,IAAI,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;YACxD,IAAI,iBAAiB,EAAE;gBACtB,CAAC,CAAC,iBAAiB,CAAC,CAAC;aACrB;YAED,IAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YAC9B,IAAI,IAAI,EAAE;gBACT,CAAC,CAAC,IAAI,CAAC,CAAC;aACR;YAED,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,UAAC,KAAK;gBAClC,CAAC,CAAC,KAAK,CAAC,CAAC;YACV,CAAC,CAAC,CAAC;QACJ,CAAC;;;;;;eAED;YACC,IAAM,MAAM,GAAkB,EAAE,CAAC;YAEjC,IAAI,CAAC,YAAY,CAAC,UAAC,CAAC;gBACnB,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAChB,CAAC,CAAC,CAAC;YAEH,OAAO,MAAM,CAAC;QACf,CAAC;;IA/gBD;;;;eAAkC,WAAW;OAAC;IAC9C;;;;eAA0C,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;OAAC;IA+gB3F,gBAAC;CAAA,AAliBD,CAA+B,MAAM,GAkiBpC;SAliBY,SAAS","sourcesContent":["import type { Graphics } from \"./Graphics\";\nimport type { Layout } from \"./Layout\";\nimport type { IContainer } from \"./backend/Renderer\";\nimport type { IBounds } from \"../util/IBounds\";\nimport type { Scrollbar } from \"./Scrollbar\";\n\nimport { Children } from \"../util/Children\";\nimport { Percent } from \"../util/Percent\";\nimport { Sprite, ISpriteSettings, ISpritePrivate, ISpriteEvents } from \"./Sprite\";\nimport { Rectangle } from \"./Rectangle\";\nimport { HorizontalLayout } from \"./HorizontalLayout\";\nimport { VerticalLayout } from \"./VerticalLayout\";\nimport { GridLayout } from \"./GridLayout\";\n\nimport * as $array from \"../util/Array\";\nimport * as $type from \"../util/Type\";\n\nexport interface IContainerSettings extends ISpriteSettings {\n\n\t/**\n\t * Left padding in pixels.\n\t */\n\tpaddingLeft?: number;\n\n\t/**\n\t * Right padding in pixels.\n\t */\n\tpaddingRight?: number;\n\n\t/**\n\t * Top padding in pixels.\n\t */\n\tpaddingTop?: number;\n\n\t/**\n\t * Bottom padding in pixels.\n\t */\n\tpaddingBottom?: number;\n\n\t/**\n\t * Background element.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/containers/#Background} for more info\n\t */\n\tbackground?: Graphics;\n\n\t/**\n\t * A method to layout\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/containers/#Layout} for more info\n\t */\n\tlayout?: Layout | null;\n\n\t/**\n\t * An element to use as a container's mask (clipping region).\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/containers/#Masks} for more info\n\t */\n\tmask?: Graphics | null;\n\n\t/**\n\t * If set to `true` all content going outside the bounds of the container\n\t * will be clipped.\n\t */\n\tmaskContent?: boolean;\n\n\t/**\n\t * If set to `true` all descendants - not just direct children, but every\n\t * element in it - will become \"interactive\".\n\t */\n\tinteractiveChildren?: boolean;\n\n\t/**\n\t * If set to `true`, applying a state on a container will also apply the same\n\t * state on its children.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/containers/#States} for more info\n\t */\n\tsetStateOnChildren?: boolean;\n\n\t/**\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/containers/#Scrollbar} for more info\n\t */\n\tverticalScrollbar?: Scrollbar;\n\n}\n\nexport interface IContainerEvents extends ISpriteEvents {\n}\n\nexport interface IContainerPrivate extends ISpritePrivate {\n}\n\nexport interface IContainerEvents extends ISpriteEvents {\n}\n\n/**\n * A basic element that can have child elements, maintain their layout, and\n * have a background.\n *\n * It can have any [[Sprite]] element as a child, from very basic shapes, to\n * full-fledged charts.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/containers/} for more info\n * @important\n */\nexport class Container extends Sprite {\n\n\tdeclare public _settings: IContainerSettings;\n\tdeclare public _privateSettings: IContainerPrivate;\n\tdeclare public _events: IContainerEvents;\n\n\tpublic _display: IContainer = this._root._renderer.makeContainer();\n\n\tpublic _childrenDisplay: IContainer = this._root._renderer.makeContainer();\n\n\t/**\n\t * List of Container's child elements.\n\t */\n\tpublic children: Children<Sprite> = new Children(this);\n\n\tpublic _percentageSizeChildren: Array<Sprite> = [];\n\tpublic _percentagePositionChildren: Array<Sprite> = [];\n\n\tpublic static className: string = \"Container\";\n\tpublic static classNames: Array<string> = Sprite.classNames.concat([Container.className]);\n\n\tpublic _prevWidth: number = 0;\n\tpublic _prevHeight: number = 0;\n\n\tprotected _contentWidth: number = 0;\n\tprotected _contentHeight: number = 0;\n\n\tprotected _contentMask: Rectangle | undefined;\n\n\tprotected _afterNew() {\n\t\tsuper._afterNew();\n\t\tthis._display.addChild(this._childrenDisplay);\n\t}\n\n\tprotected _dispose() {\n\t\t$array.each(this.allChildren(), (child) => {\n\t\t\tchild.dispose();\n\t\t});\n\n\t\tconst mask = this.get(\"mask\");\n\t\tif (mask) {\n\t\t\tmask.dispose();\n\t\t}\n\n\t\tconst background = this.get(\"background\");\n\t\tif (background) {\n\t\t\tbackground.dispose();\n\t\t}\n\n\t\tsuper._dispose();\n\t}\n\n\tpublic _changed() {\n\t\tsuper._changed();\n\n\t\tif (this.isDirty(\"interactiveChildren\")) {\n\t\t\tthis._display.interactiveChildren = this.get(\"interactiveChildren\", false);\n\t\t}\n\n\t\tif (this.isDirty(\"layout\")) {\n\t\t\tthis._prevWidth = 0;\n\t\t\tthis._prevHeight = 0;\n\t\t\tthis.markDirtyBounds();\n\t\t\tif (this._prevSettings.layout) {\n\t\t\t\tthis.children.each((child) => {\n\t\t\t\t\tchild.removePrivate(\"x\");\n\t\t\t\t\tchild.removePrivate(\"y\");\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"paddingTop\") || this.isDirty(\"paddingBottom\") || this.isDirty(\"paddingLeft\") || this.isDirty(\"paddingRight\")) {\n\t\t\tthis.children.each((child) => {\n\t\t\t\tchild.markDirtyPosition();\n\t\t\t})\n\t\t}\n\n\t\tif (this.isDirty(\"maskContent\")) {\n\n\t\t\tconst childrenDisplay = this._childrenDisplay;\n\n\t\t\tlet contentMask = this._contentMask;\n\t\t\tif (this.get(\"maskContent\")) {\n\t\t\t\tif (!contentMask) {\n\t\t\t\t\tcontentMask = Rectangle.new(this._root, {\n\t\t\t\t\t\twidth: this.width(),\n\t\t\t\t\t\theight: this.height()\n\t\t\t\t\t});\n\t\t\t\t\tthis._contentMask = contentMask;\n\t\t\t\t\tchildrenDisplay.addChildAt(contentMask._display, 0);\n\t\t\t\t\tchildrenDisplay.mask = contentMask._display;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (contentMask) {\n\t\t\t\t\tchildrenDisplay.removeChild(contentMask._display);\n\t\t\t\t\tchildrenDisplay.mask = null;\n\t\t\t\t\tcontentMask.dispose();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _updateSize() {\n\t\tsuper._updateSize();\n\n\t\t$array.each(this._percentageSizeChildren, (child) => {\n\t\t\tchild._updateSize();\n\t\t});\n\n\t\t$array.each(this._percentagePositionChildren, (child) => {\n\t\t\tchild.markDirtyPosition();\n\t\t\tchild._updateSize();\n\t\t});\n\n\t\tthis.updateBackground();\n\t}\n\n\tprotected updateBackground() {\n\t\tconst background = this.get(\"background\");\n\t\tlet bounds = this._localBounds;\n\n\t\tif (bounds && !this.isHidden()) {\n\t\t\tlet x = bounds.left;\n\t\t\tlet y = bounds.top;\n\t\t\tlet w = bounds.right - x;\n\t\t\tlet h = bounds.bottom - y;\n\n\t\t\tlet width = this.width();\n\t\t\tlet height = this.height();\n\n\t\t\tif (background) {\n\t\t\t\tbackground.setAll({ width: w, height: h, x: x, y: y });\n\t\t\t\tif (this._display.interactive) {\n\t\t\t\t\tbackground._display.interactive = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst contentMask = this._contentMask;\n\t\t\tif (contentMask) {\n\t\t\t\tcontentMask.setAll({ width, height });\n\t\t\t}\n\n\t\t\tconst verticalScrollbar = this.get(\"verticalScrollbar\")!;\n\t\t\tif (verticalScrollbar) {\n\t\t\t\tverticalScrollbar.set(\"height\", height);\n\t\t\t\tverticalScrollbar.set(\"x\", width - verticalScrollbar.width() - verticalScrollbar.get(\"marginRight\", 0));\n\t\t\t\tverticalScrollbar.set(\"end\", verticalScrollbar.get(\"start\", 0) + height / this._contentHeight);\n\n\t\t\t\tconst bg = verticalScrollbar.get(\"background\");\n\t\t\t\tif (bg) {\n\t\t\t\t\tbg.setAll({ width: verticalScrollbar.width(), height: height })\n\t\t\t\t}\n\n\t\t\t\tlet visible = true;\n\t\t\t\tif(this._contentHeight <= height){\n\t\t\t\t\tvisible = false;\n\t\t\t\t}\t\t\t\t\n\t\t\t\tverticalScrollbar.setPrivate(\"visible\", visible);\t\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _applyThemes(): boolean {\n\t\tif (super._applyThemes()) {\n\t\t\tthis.eachChildren((child) => {\n\t\t\t\tchild._applyThemes();\n\t\t\t});\n\n\t\t\treturn true;\n\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tpublic _applyState(name: string): void {\n\t\tsuper._applyState(name);\n\n\t\tif (this.get(\"setStateOnChildren\")) {\n\t\t\tthis.eachChildren((child) => {\n\t\t\t\tchild.states.apply(name);\n\t\t\t});\n\t\t}\n\t}\n\n\tpublic _applyStateAnimated(name: string, duration?: number): void {\n\t\tsuper._applyStateAnimated(name, duration);\n\n\t\tif (this.get(\"setStateOnChildren\")) {\n\t\t\tthis.eachChildren((child) => {\n\t\t\t\tchild.states.applyAnimate(name, duration);\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Returns container's inner width (width without padding) in pixels.\n\t *\n\t * @return Inner width (px)\n\t */\n\tpublic innerWidth(): number {\n\t\treturn this.width() - this.get(\"paddingRight\", 0) - this.get(\"paddingLeft\", 0);\n\t}\n\n\t/**\n\t * Returns container's inner height (height without padding) in pixels.\n\t *\n\t * @return Inner height (px)\n\t */\n\tpublic innerHeight(): number {\n\t\treturn this.height() - this.get(\"paddingTop\", 0) - this.get(\"paddingBottom\", 0);\n\t}\n\n\tprotected _getBounds() {\n\n\t\tlet width = this.get(\"width\");\n\t\tlet height = this.get(\"height\");\n\t\tlet pWidth = this.getPrivate(\"width\");\n\t\tlet pHeight = this.getPrivate(\"height\");\n\n\t\tlet bounds: IBounds = {\n\t\t\tleft: 0,\n\t\t\ttop: 0,\n\t\t\tright: this.width(),\n\t\t\tbottom: this.height(),\n\t\t};\n\n\t\tlet layout = this.get(\"layout\");\n\t\tlet horizontal = false;\n\t\tlet vertical = false;\n\t\tif (layout instanceof HorizontalLayout || layout instanceof GridLayout) {\n\t\t\thorizontal = true;\n\t\t}\n\n\t\tif (layout instanceof VerticalLayout) {\n\t\t\tvertical = true;\n\t\t}\n\n\t\tif ((width != null || pWidth != null) && (height != null || pHeight != null) && !this.get(\"verticalScrollbar\")) {\n\t\t\t// void\n\t\t}\n\t\telse {\n\t\t\tlet m = Number.MAX_VALUE;\n\n\t\t\tlet l = m;\n\t\t\tlet r = -m;\n\t\t\tlet t = m;\n\t\t\tlet b = -m;\n\n\t\t\tconst paddingLeft = this.get(\"paddingLeft\", 0);\n\t\t\tconst paddingTop = this.get(\"paddingTop\", 0);\n\t\t\tconst paddingRight = this.get(\"paddingRight\", 0);\n\t\t\tconst paddingBottom = this.get(\"paddingBottom\", 0);\n\n\t\t\tthis.children.each((child) => {\n\t\t\t\tif (child.get(\"position\") != \"absolute\" && child.get(\"isMeasured\")) {\n\t\t\t\t\tlet childBounds = child.adjustedLocalBounds();\n\t\t\t\t\tlet childX = child.x();\n\t\t\t\t\tlet childY = child.y();\n\t\t\t\t\tlet cl = childX + childBounds.left;\n\t\t\t\t\tlet cr = childX + childBounds.right;\n\t\t\t\t\tlet ct = childY + childBounds.top;\n\t\t\t\t\tlet cb = childY + childBounds.bottom;\n\n\t\t\t\t\tif (horizontal) {\n\t\t\t\t\t\tcl -= child.get(\"marginLeft\", 0);\n\t\t\t\t\t\tcr += child.get(\"marginRight\", 0);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (vertical) {\n\t\t\t\t\t\tct -= child.get(\"marginTop\", 0);\n\t\t\t\t\t\tcb += child.get(\"marginBottom\", 0);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (cl < l) {\n\t\t\t\t\t\tl = cl;\n\t\t\t\t\t}\n\t\t\t\t\tif (cr > r) {\n\t\t\t\t\t\tr = cr;\n\t\t\t\t\t}\n\t\t\t\t\tif (ct < t) {\n\t\t\t\t\t\tt = ct;\n\t\t\t\t\t}\n\t\t\t\t\tif (cb > b) {\n\t\t\t\t\t\tb = cb;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tif (l == m) {\n\t\t\t\tl = 0;\n\t\t\t}\n\n\t\t\tif (r == -m) {\n\t\t\t\tr = 0;\n\t\t\t}\n\n\t\t\tif (t == m) {\n\t\t\t\tt = 0;\n\t\t\t}\n\n\t\t\tif (b == -m) {\n\t\t\t\tb = 0;\n\t\t\t}\n\n\t\t\tbounds.left = l - paddingLeft;\n\t\t\tbounds.top = t - paddingTop;\n\t\t\tbounds.right = r + paddingRight;\n\t\t\tbounds.bottom = b + paddingBottom;\n\t\t}\n\n\t\tthis._contentWidth = bounds.right - bounds.left;\n\t\tthis._contentHeight = bounds.bottom - bounds.top;\n\n\t\tif ($type.isNumber(width)) {\n\t\t\tbounds.left = 0;\n\t\t\tbounds.right = width;\n\t\t}\n\n\t\tif ($type.isNumber(pWidth)) {\n\t\t\tbounds.left = 0;\n\t\t\tbounds.right = pWidth;\n\t\t}\n\n\t\tif ($type.isNumber(height)) {\n\t\t\tbounds.top = 0;\n\t\t\tbounds.bottom = height;\n\t\t}\n\n\t\tif ($type.isNumber(pHeight)) {\n\t\t\tbounds.top = 0;\n\t\t\tbounds.bottom = pHeight;\n\t\t}\n\n\t\tthis._localBounds = bounds;\n\t}\n\n\tpublic _updateBounds() {\n\t\tconst layout = this.get(\"layout\");\n\n\t\tif (layout) {\n\t\t\tlayout.updateContainer(this);\n\t\t}\n\n\t\tsuper._updateBounds();\n\n\t\tthis.updateBackground();\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic markDirty(): void {\n\t\tsuper.markDirty();\n\t\tthis._root._addDirtyParent(this);\n\t}\n\n\tpublic _prepareChildren() {\n\t\tconst innerWidth = this.innerWidth();\n\t\tconst innerHeight = this.innerHeight();\n\n\t\tif (innerWidth != this._prevWidth || innerHeight != this._prevHeight) {\n\t\t\tlet layout = this.get(\"layout\");\n\t\t\tlet horizontal = false;\n\t\t\tlet vertical = false;\n\t\t\tif (layout) {\n\t\t\t\tif (layout instanceof HorizontalLayout || layout instanceof GridLayout) {\n\t\t\t\t\thorizontal = true;\n\t\t\t\t}\n\t\t\t\tif (layout instanceof VerticalLayout) {\n\t\t\t\t\tvertical = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$array.each(this._percentageSizeChildren, (child) => {\n\t\t\t\tif (!horizontal) {\n\t\t\t\t\tlet width = child.get(\"width\");\n\t\t\t\t\tif (width instanceof Percent) {\n\t\t\t\t\t\tchild.setPrivate(\"width\", width.value * innerWidth);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!vertical) {\n\t\t\t\t\tlet height = child.get(\"height\");\n\t\t\t\t\tif (height instanceof Percent) {\n\t\t\t\t\t\tchild.setPrivate(\"height\", height.value * innerHeight);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\n\t\t\t$array.each(this._percentagePositionChildren, (child) => {\n\t\t\t\tchild.markDirtyPosition();\n\t\t\t\tchild.markDirtyBounds();\n\t\t\t})\n\n\t\t\tthis._prevWidth = innerWidth;\n\t\t\tthis._prevHeight = innerHeight;\n\n\t\t\tthis._sizeDirty = true;\n\t\t\tthis.updateBackground();\n\t\t}\n\n\t\tthis._handleStates();\n\t}\n\n\tpublic _updateChildren() {\n\n\t\tif (this.isDirty(\"verticalScrollbar\")) {\n\t\t\tconst verticalScrollbar = this.get(\"verticalScrollbar\")!;\n\t\t\tif (verticalScrollbar) {\n\t\t\t\tverticalScrollbar._setParent(this);\n\t\t\t\tverticalScrollbar.children.removeValue(verticalScrollbar.startGrip);\n\t\t\t\tverticalScrollbar.children.removeValue(verticalScrollbar.endGrip);\n\n\t\t\t\tthis.set(\"maskContent\", true);\n\t\t\t\tthis.set(\"paddingRight\", verticalScrollbar.width() + verticalScrollbar.get(\"marginRight\", 0) + verticalScrollbar.get(\"marginLeft\", 0));\n\n\t\t\t\tlet background = this.get(\"background\");\n\n\t\t\t\tif (!background) {\n\t\t\t\t\tbackground = this.set(\"background\", Rectangle.new(this._root, {\n\t\t\t\t\t\tthemeTags: [\"background\"],\n\t\t\t\t\t\tfillOpacity: 0,\n\t\t\t\t\t\tfill: this._root.interfaceColors.get(\"alternativeBackground\")\n\t\t\t\t\t}));\n\t\t\t\t}\n\n\t\t\t\tthis._disposers.push(this.events.on(\"wheel\", (event) => {\n\t\t\t\t\tconst wheelEvent = event.originalEvent;\n\t\t\t\t\twheelEvent.preventDefault();\n\t\t\t\t\tconst shiftY = wheelEvent.deltaY / 5000;\n\t\t\t\t\tconst start = verticalScrollbar.get(\"start\", 0);\n\t\t\t\t\tconst end = verticalScrollbar.get(\"end\", 1);\n\t\t\t\t\tif (start + shiftY > 0 && end + shiftY < 1) {\n\t\t\t\t\t\tverticalScrollbar.set(\"start\", start + shiftY);\n\t\t\t\t\t\tverticalScrollbar.set(\"end\", end + shiftY);\n\t\t\t\t\t}\n\t\t\t\t}))\n\n\t\t\t\tthis._disposers.push(verticalScrollbar.events.on(\"rangechanged\", () => {\n\t\t\t\t\tlet h = this._contentHeight;\n\t\t\t\t\tconst childrenDisplay = this._childrenDisplay;\n\t\t\t\t\tconst contentMask = this._contentMask;\n\n\t\t\t\t\tchildrenDisplay.y = -verticalScrollbar.get(\"start\") * h;\n\t\t\t\t\tchildrenDisplay.markDirtyLayer();\n\n\t\t\t\t\tif (contentMask) {\n\t\t\t\t\t\tcontentMask._display.y = -childrenDisplay.y;\n\t\t\t\t\t\tchildrenDisplay.mask = contentMask._display;\n\t\t\t\t\t}\n\t\t\t\t}))\n\n\t\t\t\tthis._display.addChild(verticalScrollbar._display);\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"background\")) {\n\t\t\t// TODO maybe this should dispose ?\n\t\t\tconst previous = this._prevSettings[\"background\"];\n\t\t\tif (previous) {\n\t\t\t\tthis._display.removeChild(previous._display);\n\t\t\t}\n\n\t\t\tconst background = this.get(\"background\");\n\t\t\tif (background instanceof Sprite) {\n\t\t\t\tbackground.set(\"isMeasured\", false);\n\t\t\t\tbackground._setParent(this);\n\t\t\t\tthis._display.addChildAt(background._display, 0);\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"mask\")) {\n\n\t\t\tconst mask = this.get(\"mask\");\n\n\t\t\tconst previous = this._prevSettings[\"mask\"];\n\t\t\tif (previous) {\n\t\t\t\tthis._display.removeChild(previous._display);\n\t\t\t\tif (previous != mask) {\n\t\t\t\t\tprevious.dispose();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (mask) {\n\t\t\t\tvar parent = mask.parent;\n\t\t\t\tif (parent) {\n\t\t\t\t\tparent.children.removeValue(mask);\n\t\t\t\t}\n\n\t\t\t\tmask._setParent(this);\n\t\t\t\tthis._display.addChildAt(mask._display, 0);\n\t\t\t\tthis._childrenDisplay.mask = mask._display;\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _processTemplateField(): void {\n\t\tsuper._processTemplateField();\n\t\tthis.children.each((child) => {\n\t\t\tchild._processTemplateField();\n\t\t})\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic walkChildren(f: (child: Sprite) => void): void {\n\t\tthis.children.each((child) => {\n\t\t\tif (child instanceof Container) {\n\t\t\t\tchild.walkChildren(f);\n\t\t\t}\n\t\t\tf(child);\n\t\t});\n\t}\n\n\tpublic eachChildren(f: (child: Sprite) => void): void {\n\t\tconst background = this.get(\"background\");\n\t\tif (background) {\n\t\t\tf(background);\n\t\t}\n\n\t\tconst verticalScrollbar = this.get(\"verticalScrollbar\");\n\t\tif (verticalScrollbar) {\n\t\t\tf(verticalScrollbar);\n\t\t}\n\n\t\tconst mask = this.get(\"mask\");\n\t\tif (mask) {\n\t\t\tf(mask);\n\t\t}\n\n\t\tthis.children.values.forEach((child) => {\n\t\t\tf(child);\n\t\t});\n\t}\n\n\tpublic allChildren(): Array<Sprite> {\n\t\tconst output: Array<Sprite> = [];\n\n\t\tthis.eachChildren((x) => {\n\t\t\toutput.push(x);\n\t\t});\n\n\t\treturn output;\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Container.js","sourceRoot":"","sources":["../../../../../src/.internal/core/render/Container.ts"],"names":[],"mappings":";AAMA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAkD,MAAM,UAAU,CAAC;AAClF,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,K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,CAAC,IAAI,CAAC,UAAC,KAAK;gBACxB,IAAI,KAAK,YAAY,SAAS,EAAE;oBAC/B,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;iBACtB;gBACD,CAAC,CAAC,KAAK,CAAC,CAAC;YACV,CAAC,CAAC,CAAC;QACJ,CAAC;;;;;;eAED,UAAoB,CAA0B;YAC7C,IAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;YAC1C,IAAI,UAAU,EAAE;gBACf,CAAC,CAAC,UAAU,CAAC,CAAC;aACd;YAED,IAAM,iBAAiB,GAAG,IAAI,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;YACxD,IAAI,iBAAiB,EAAE;gBACtB,CAAC,CAAC,iBAAiB,CAAC,CAAC;aACrB;YAED,IAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YAC9B,IAAI,IAAI,EAAE;gBACT,CAAC,CAAC,IAAI,CAAC,CAAC;aACR;YAED,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,UAAC,KAAK;gBAClC,CAAC,CAAC,KAAK,CAAC,CAAC;YACV,CAAC,CAAC,CAAC;QACJ,CAAC;;;;;;eAED;YACC,IAAM,MAAM,GAAkB,EAAE,CAAC;YAEjC,IAAI,CAAC,YAAY,CAAC,UAAC,CAAC;gBACnB,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAChB,CAAC,CAAC,CAAC;YAEH,OAAO,MAAM,CAAC;QACf,CAAC;;IArgBD;;;;eAAkC,WAAW;OAAC;IAC9C;;;;eAA0C,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;OAAC;IAqgB3F,gBAAC;CAAA,AAxhBD,CAA+B,MAAM,GAwhBpC;SAxhBY,SAAS","sourcesContent":["import type { Graphics } from \"./Graphics\";\nimport type { Layout } from \"./Layout\";\nimport type { IContainer } from \"./backend/Renderer\";\nimport type { IBounds } from \"../util/IBounds\";\nimport type { Scrollbar } from \"./Scrollbar\";\n\nimport { Children } from \"../util/Children\";\nimport { Percent } from \"../util/Percent\";\nimport { Sprite, ISpriteSettings, ISpritePrivate, ISpriteEvents } from \"./Sprite\";\nimport { Rectangle } from \"./Rectangle\";\nimport { HorizontalLayout } from \"./HorizontalLayout\";\nimport { VerticalLayout } from \"./VerticalLayout\";\nimport { GridLayout } from \"./GridLayout\";\n\nimport * as $array from \"../util/Array\";\nimport * as $type from \"../util/Type\";\n\nexport interface IContainerSettings extends ISpriteSettings {\n\n\t/**\n\t * Left padding in pixels.\n\t */\n\tpaddingLeft?: number;\n\n\t/**\n\t * Right padding in pixels.\n\t */\n\tpaddingRight?: number;\n\n\t/**\n\t * Top padding in pixels.\n\t */\n\tpaddingTop?: number;\n\n\t/**\n\t * Bottom padding in pixels.\n\t */\n\tpaddingBottom?: number;\n\n\t/**\n\t * Background element.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/containers/#Background} for more info\n\t */\n\tbackground?: Graphics;\n\n\t/**\n\t * A method to layout\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/containers/#Layout} for more info\n\t */\n\tlayout?: Layout | null;\n\n\t/**\n\t * An element to use as a container's mask (clipping region).\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/containers/#Masks} for more info\n\t */\n\tmask?: Graphics | null;\n\n\t/**\n\t * If set to `true` all content going outside the bounds of the container\n\t * will be clipped.\n\t */\n\tmaskContent?: boolean;\n\n\t/**\n\t * If set to `true` all descendants - not just direct children, but every\n\t * element in it - will become \"interactive\".\n\t */\n\tinteractiveChildren?: boolean;\n\n\t/**\n\t * If set to `true`, applying a state on a container will also apply the same\n\t * state on its children.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/containers/#States} for more info\n\t */\n\tsetStateOnChildren?: boolean;\n\n\t/**\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/containers/#Scrollbar} for more info\n\t */\n\tverticalScrollbar?: Scrollbar;\n\n}\n\nexport interface IContainerEvents extends ISpriteEvents {\n}\n\nexport interface IContainerPrivate extends ISpritePrivate {\n}\n\nexport interface IContainerEvents extends ISpriteEvents {\n}\n\n/**\n * A basic element that can have child elements, maintain their layout, and\n * have a background.\n *\n * It can have any [[Sprite]] element as a child, from very basic shapes, to\n * full-fledged charts.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/containers/} for more info\n * @important\n */\nexport class Container extends Sprite {\n\n\tdeclare public _settings: IContainerSettings;\n\tdeclare public _privateSettings: IContainerPrivate;\n\tdeclare public _events: IContainerEvents;\n\n\tpublic _display: IContainer = this._root._renderer.makeContainer();\n\n\tpublic _childrenDisplay: IContainer = this._root._renderer.makeContainer();\n\n\t/**\n\t * List of Container's child elements.\n\t */\n\tpublic children: Children<Sprite> = new Children(this);\n\n\tpublic _percentageSizeChildren: Array<Sprite> = [];\n\tpublic _percentagePositionChildren: Array<Sprite> = [];\n\n\tpublic static className: string = \"Container\";\n\tpublic static classNames: Array<string> = Sprite.classNames.concat([Container.className]);\n\n\tpublic _prevWidth: number = 0;\n\tpublic _prevHeight: number = 0;\n\n\tprotected _contentWidth: number = 0;\n\tprotected _contentHeight: number = 0;\n\n\tprotected _contentMask: Rectangle | undefined;\n\n\tprotected _afterNew() {\n\t\tsuper._afterNew();\n\t\tthis._display.addChild(this._childrenDisplay);\n\t}\n\n\tprotected _dispose() {\n\t\t$array.eachReverse(this.allChildren(), (child) => {\n\t\t\tchild.dispose();\n\t\t});\n\n\t\tsuper._dispose();\n\t}\n\n\tpublic _changed() {\n\t\tsuper._changed();\n\n\t\tif (this.isDirty(\"interactiveChildren\")) {\n\t\t\tthis._display.interactiveChildren = this.get(\"interactiveChildren\", false);\n\t\t}\n\n\t\tif (this.isDirty(\"layout\")) {\n\t\t\tthis._prevWidth = 0;\n\t\t\tthis._prevHeight = 0;\n\t\t\tthis.markDirtyBounds();\n\t\t\tif (this._prevSettings.layout) {\n\t\t\t\tthis.children.each((child) => {\n\t\t\t\t\tchild.removePrivate(\"x\");\n\t\t\t\t\tchild.removePrivate(\"y\");\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"paddingTop\") || this.isDirty(\"paddingBottom\") || this.isDirty(\"paddingLeft\") || this.isDirty(\"paddingRight\")) {\n\t\t\tthis.children.each((child) => {\n\t\t\t\tchild.markDirtyPosition();\n\t\t\t})\n\t\t}\n\n\t\tif (this.isDirty(\"maskContent\")) {\n\n\t\t\tconst childrenDisplay = this._childrenDisplay;\n\n\t\t\tlet contentMask = this._contentMask;\n\t\t\tif (this.get(\"maskContent\")) {\n\t\t\t\tif (!contentMask) {\n\t\t\t\t\tcontentMask = Rectangle.new(this._root, {\n\t\t\t\t\t\twidth: this.width(),\n\t\t\t\t\t\theight: this.height()\n\t\t\t\t\t});\n\t\t\t\t\tthis._contentMask = contentMask;\n\t\t\t\t\tchildrenDisplay.addChildAt(contentMask._display, 0);\n\t\t\t\t\tchildrenDisplay.mask = contentMask._display;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (contentMask) {\n\t\t\t\t\tchildrenDisplay.removeChild(contentMask._display);\n\t\t\t\t\tchildrenDisplay.mask = null;\n\t\t\t\t\tcontentMask.dispose();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _updateSize() {\n\t\tsuper._updateSize();\n\n\t\t$array.each(this._percentageSizeChildren, (child) => {\n\t\t\tchild._updateSize();\n\t\t});\n\n\t\t$array.each(this._percentagePositionChildren, (child) => {\n\t\t\tchild.markDirtyPosition();\n\t\t\tchild._updateSize();\n\t\t});\n\n\t\tthis.updateBackground();\n\t}\n\n\tprotected updateBackground() {\n\t\tconst background = this.get(\"background\");\n\t\tlet bounds = this._localBounds;\n\n\t\tif (bounds && !this.isHidden()) {\n\t\t\tlet x = bounds.left;\n\t\t\tlet y = bounds.top;\n\t\t\tlet w = bounds.right - x;\n\t\t\tlet h = bounds.bottom - y;\n\n\t\t\tlet width = this.width();\n\t\t\tlet height = this.height();\n\n\t\t\tif (background) {\n\t\t\t\tbackground.setAll({ width: w, height: h, x: x, y: y });\n\t\t\t\tif (this._display.interactive) {\n\t\t\t\t\tbackground._display.interactive = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst contentMask = this._contentMask;\n\t\t\tif (contentMask) {\n\t\t\t\tcontentMask.setAll({ width, height });\n\t\t\t}\n\n\t\t\tconst verticalScrollbar = this.get(\"verticalScrollbar\")!;\n\t\t\tif (verticalScrollbar) {\n\t\t\t\tverticalScrollbar.set(\"height\", height);\n\t\t\t\tverticalScrollbar.set(\"x\", width - verticalScrollbar.width() - verticalScrollbar.get(\"marginRight\", 0));\n\t\t\t\tverticalScrollbar.set(\"end\", verticalScrollbar.get(\"start\", 0) + height / this._contentHeight);\n\n\t\t\t\tconst bg = verticalScrollbar.get(\"background\");\n\t\t\t\tif (bg) {\n\t\t\t\t\tbg.setAll({ width: verticalScrollbar.width(), height: height })\n\t\t\t\t}\n\n\t\t\t\tlet visible = true;\n\t\t\t\tif(this._contentHeight <= height){\n\t\t\t\t\tvisible = false;\n\t\t\t\t}\n\t\t\t\tverticalScrollbar.setPrivate(\"visible\", visible);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _applyThemes(): boolean {\n\t\tif (super._applyThemes()) {\n\t\t\tthis.eachChildren((child) => {\n\t\t\t\tchild._applyThemes();\n\t\t\t});\n\n\t\t\treturn true;\n\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tpublic _applyState(name: string): void {\n\t\tsuper._applyState(name);\n\n\t\tif (this.get(\"setStateOnChildren\")) {\n\t\t\tthis.eachChildren((child) => {\n\t\t\t\tchild.states.apply(name);\n\t\t\t});\n\t\t}\n\t}\n\n\tpublic _applyStateAnimated(name: string, duration?: number): void {\n\t\tsuper._applyStateAnimated(name, duration);\n\n\t\tif (this.get(\"setStateOnChildren\")) {\n\t\t\tthis.eachChildren((child) => {\n\t\t\t\tchild.states.applyAnimate(name, duration);\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Returns container's inner width (width without padding) in pixels.\n\t *\n\t * @return Inner width (px)\n\t */\n\tpublic innerWidth(): number {\n\t\treturn this.width() - this.get(\"paddingRight\", 0) - this.get(\"paddingLeft\", 0);\n\t}\n\n\t/**\n\t * Returns container's inner height (height without padding) in pixels.\n\t *\n\t * @return Inner height (px)\n\t */\n\tpublic innerHeight(): number {\n\t\treturn this.height() - this.get(\"paddingTop\", 0) - this.get(\"paddingBottom\", 0);\n\t}\n\n\tprotected _getBounds() {\n\n\t\tlet width = this.get(\"width\");\n\t\tlet height = this.get(\"height\");\n\t\tlet pWidth = this.getPrivate(\"width\");\n\t\tlet pHeight = this.getPrivate(\"height\");\n\n\t\tlet bounds: IBounds = {\n\t\t\tleft: 0,\n\t\t\ttop: 0,\n\t\t\tright: this.width(),\n\t\t\tbottom: this.height(),\n\t\t};\n\n\t\tlet layout = this.get(\"layout\");\n\t\tlet horizontal = false;\n\t\tlet vertical = false;\n\t\tif (layout instanceof HorizontalLayout || layout instanceof GridLayout) {\n\t\t\thorizontal = true;\n\t\t}\n\n\t\tif (layout instanceof VerticalLayout) {\n\t\t\tvertical = true;\n\t\t}\n\n\t\tif ((width != null || pWidth != null) && (height != null || pHeight != null) && !this.get(\"verticalScrollbar\")) {\n\t\t\t// void\n\t\t}\n\t\telse {\n\t\t\tlet m = Number.MAX_VALUE;\n\n\t\t\tlet l = m;\n\t\t\tlet r = -m;\n\t\t\tlet t = m;\n\t\t\tlet b = -m;\n\n\t\t\tconst paddingLeft = this.get(\"paddingLeft\", 0);\n\t\t\tconst paddingTop = this.get(\"paddingTop\", 0);\n\t\t\tconst paddingRight = this.get(\"paddingRight\", 0);\n\t\t\tconst paddingBottom = this.get(\"paddingBottom\", 0);\n\n\t\t\tthis.children.each((child) => {\n\t\t\t\tif (child.get(\"position\") != \"absolute\" && child.get(\"isMeasured\")) {\n\t\t\t\t\tlet childBounds = child.adjustedLocalBounds();\n\t\t\t\t\tlet childX = child.x();\n\t\t\t\t\tlet childY = child.y();\n\t\t\t\t\tlet cl = childX + childBounds.left;\n\t\t\t\t\tlet cr = childX + childBounds.right;\n\t\t\t\t\tlet ct = childY + childBounds.top;\n\t\t\t\t\tlet cb = childY + childBounds.bottom;\n\n\t\t\t\t\tif (horizontal) {\n\t\t\t\t\t\tcl -= child.get(\"marginLeft\", 0);\n\t\t\t\t\t\tcr += child.get(\"marginRight\", 0);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (vertical) {\n\t\t\t\t\t\tct -= child.get(\"marginTop\", 0);\n\t\t\t\t\t\tcb += child.get(\"marginBottom\", 0);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (cl < l) {\n\t\t\t\t\t\tl = cl;\n\t\t\t\t\t}\n\t\t\t\t\tif (cr > r) {\n\t\t\t\t\t\tr = cr;\n\t\t\t\t\t}\n\t\t\t\t\tif (ct < t) {\n\t\t\t\t\t\tt = ct;\n\t\t\t\t\t}\n\t\t\t\t\tif (cb > b) {\n\t\t\t\t\t\tb = cb;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tif (l == m) {\n\t\t\t\tl = 0;\n\t\t\t}\n\n\t\t\tif (r == -m) {\n\t\t\t\tr = 0;\n\t\t\t}\n\n\t\t\tif (t == m) {\n\t\t\t\tt = 0;\n\t\t\t}\n\n\t\t\tif (b == -m) {\n\t\t\t\tb = 0;\n\t\t\t}\n\n\t\t\tbounds.left = l - paddingLeft;\n\t\t\tbounds.top = t - paddingTop;\n\t\t\tbounds.right = r + paddingRight;\n\t\t\tbounds.bottom = b + paddingBottom;\n\t\t}\n\n\t\tthis._contentWidth = bounds.right - bounds.left;\n\t\tthis._contentHeight = bounds.bottom - bounds.top;\n\n\t\tif ($type.isNumber(width)) {\n\t\t\tbounds.left = 0;\n\t\t\tbounds.right = width;\n\t\t}\n\n\t\tif ($type.isNumber(pWidth)) {\n\t\t\tbounds.left = 0;\n\t\t\tbounds.right = pWidth;\n\t\t}\n\n\t\tif ($type.isNumber(height)) {\n\t\t\tbounds.top = 0;\n\t\t\tbounds.bottom = height;\n\t\t}\n\n\t\tif ($type.isNumber(pHeight)) {\n\t\t\tbounds.top = 0;\n\t\t\tbounds.bottom = pHeight;\n\t\t}\n\n\t\tthis._localBounds = bounds;\n\t}\n\n\tpublic _updateBounds() {\n\t\tconst layout = this.get(\"layout\");\n\n\t\tif (layout) {\n\t\t\tlayout.updateContainer(this);\n\t\t}\n\n\t\tsuper._updateBounds();\n\n\t\tthis.updateBackground();\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic markDirty(): void {\n\t\tsuper.markDirty();\n\t\tthis._root._addDirtyParent(this);\n\t}\n\n\tpublic _prepareChildren() {\n\t\tconst innerWidth = this.innerWidth();\n\t\tconst innerHeight = this.innerHeight();\n\n\t\tif (innerWidth != this._prevWidth || innerHeight != this._prevHeight) {\n\t\t\tlet layout = this.get(\"layout\");\n\t\t\tlet horizontal = false;\n\t\t\tlet vertical = false;\n\t\t\tif (layout) {\n\t\t\t\tif (layout instanceof HorizontalLayout || layout instanceof GridLayout) {\n\t\t\t\t\thorizontal = true;\n\t\t\t\t}\n\t\t\t\tif (layout instanceof VerticalLayout) {\n\t\t\t\t\tvertical = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$array.each(this._percentageSizeChildren, (child) => {\n\t\t\t\tif (!horizontal) {\n\t\t\t\t\tlet width = child.get(\"width\");\n\t\t\t\t\tif (width instanceof Percent) {\n\t\t\t\t\t\tchild.setPrivate(\"width\", width.value * innerWidth);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!vertical) {\n\t\t\t\t\tlet height = child.get(\"height\");\n\t\t\t\t\tif (height instanceof Percent) {\n\t\t\t\t\t\tchild.setPrivate(\"height\", height.value * innerHeight);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\n\t\t\t$array.each(this._percentagePositionChildren, (child) => {\n\t\t\t\tchild.markDirtyPosition();\n\t\t\t\tchild.markDirtyBounds();\n\t\t\t})\n\n\t\t\tthis._prevWidth = innerWidth;\n\t\t\tthis._prevHeight = innerHeight;\n\n\t\t\tthis._sizeDirty = true;\n\t\t\tthis.updateBackground();\n\t\t}\n\n\t\tthis._handleStates();\n\t}\n\n\tpublic _updateChildren() {\n\n\t\tif (this.isDirty(\"verticalScrollbar\")) {\n\t\t\tconst verticalScrollbar = this.get(\"verticalScrollbar\")!;\n\t\t\tif (verticalScrollbar) {\n\t\t\t\tverticalScrollbar._setParent(this);\n\t\t\t\tverticalScrollbar.children.removeValue(verticalScrollbar.startGrip);\n\t\t\t\tverticalScrollbar.children.removeValue(verticalScrollbar.endGrip);\n\n\t\t\t\tthis.set(\"maskContent\", true);\n\t\t\t\tthis.set(\"paddingRight\", verticalScrollbar.width() + verticalScrollbar.get(\"marginRight\", 0) + verticalScrollbar.get(\"marginLeft\", 0));\n\n\t\t\t\tlet background = this.get(\"background\");\n\n\t\t\t\tif (!background) {\n\t\t\t\t\tbackground = this.set(\"background\", Rectangle.new(this._root, {\n\t\t\t\t\t\tthemeTags: [\"background\"],\n\t\t\t\t\t\tfillOpacity: 0,\n\t\t\t\t\t\tfill: this._root.interfaceColors.get(\"alternativeBackground\")\n\t\t\t\t\t}));\n\t\t\t\t}\n\n\t\t\t\tthis._disposers.push(this.events.on(\"wheel\", (event) => {\n\t\t\t\t\tconst wheelEvent = event.originalEvent;\n\t\t\t\t\twheelEvent.preventDefault();\n\t\t\t\t\tconst shiftY = wheelEvent.deltaY / 5000;\n\t\t\t\t\tconst start = verticalScrollbar.get(\"start\", 0);\n\t\t\t\t\tconst end = verticalScrollbar.get(\"end\", 1);\n\t\t\t\t\tif (start + shiftY > 0 && end + shiftY < 1) {\n\t\t\t\t\t\tverticalScrollbar.set(\"start\", start + shiftY);\n\t\t\t\t\t\tverticalScrollbar.set(\"end\", end + shiftY);\n\t\t\t\t\t}\n\t\t\t\t}))\n\n\t\t\t\tthis._disposers.push(verticalScrollbar.events.on(\"rangechanged\", () => {\n\t\t\t\t\tlet h = this._contentHeight;\n\t\t\t\t\tconst childrenDisplay = this._childrenDisplay;\n\t\t\t\t\tconst contentMask = this._contentMask;\n\n\t\t\t\t\tchildrenDisplay.y = -verticalScrollbar.get(\"start\") * h;\n\t\t\t\t\tchildrenDisplay.markDirtyLayer();\n\n\t\t\t\t\tif (contentMask) {\n\t\t\t\t\t\tcontentMask._display.y = -childrenDisplay.y;\n\t\t\t\t\t\tchildrenDisplay.mask = contentMask._display;\n\t\t\t\t\t}\n\t\t\t\t}))\n\n\t\t\t\tthis._display.addChild(verticalScrollbar._display);\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"background\")) {\n\t\t\t// TODO maybe this should dispose ?\n\t\t\tconst previous = this._prevSettings[\"background\"];\n\t\t\tif (previous) {\n\t\t\t\tthis._display.removeChild(previous._display);\n\t\t\t}\n\n\t\t\tconst background = this.get(\"background\");\n\t\t\tif (background instanceof Sprite) {\n\t\t\t\tbackground.set(\"isMeasured\", false);\n\t\t\t\tbackground._setParent(this);\n\t\t\t\tthis._display.addChildAt(background._display, 0);\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"mask\")) {\n\n\t\t\tconst mask = this.get(\"mask\");\n\n\t\t\tconst previous = this._prevSettings[\"mask\"];\n\t\t\tif (previous) {\n\t\t\t\tthis._display.removeChild(previous._display);\n\t\t\t\tif (previous != mask) {\n\t\t\t\t\tprevious.dispose();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (mask) {\n\t\t\t\tvar parent = mask.parent;\n\t\t\t\tif (parent) {\n\t\t\t\t\tparent.children.removeValue(mask);\n\t\t\t\t}\n\n\t\t\t\tmask._setParent(this);\n\t\t\t\tthis._display.addChildAt(mask._display, 0);\n\t\t\t\tthis._childrenDisplay.mask = mask._display;\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _processTemplateField(): void {\n\t\tsuper._processTemplateField();\n\t\tthis.children.each((child) => {\n\t\t\tchild._processTemplateField();\n\t\t})\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic walkChildren(f: (child: Sprite) => void): void {\n\t\tthis.children.each((child) => {\n\t\t\tif (child instanceof Container) {\n\t\t\t\tchild.walkChildren(f);\n\t\t\t}\n\t\t\tf(child);\n\t\t});\n\t}\n\n\tpublic eachChildren(f: (child: Sprite) => void): void {\n\t\tconst background = this.get(\"background\");\n\t\tif (background) {\n\t\t\tf(background);\n\t\t}\n\n\t\tconst verticalScrollbar = this.get(\"verticalScrollbar\");\n\t\tif (verticalScrollbar) {\n\t\t\tf(verticalScrollbar);\n\t\t}\n\n\t\tconst mask = this.get(\"mask\");\n\t\tif (mask) {\n\t\t\tf(mask);\n\t\t}\n\n\t\tthis.children.values.forEach((child) => {\n\t\t\tf(child);\n\t\t});\n\t}\n\n\tpublic allChildren(): Array<Sprite> {\n\t\tconst output: Array<Sprite> = [];\n\n\t\tthis.eachChildren((x) => {\n\t\t\toutput.push(x);\n\t\t});\n\n\t\treturn output;\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slice.d.ts","sourceRoot":"","sources":["../../../../../src/.internal/core/render/Slice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAG3E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAI7C,MAAM,WAAW,cAAe,SAAQ,iBAAiB;IAExD;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,YAAY,CAAC,EAAE,M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C,EAAE,MAAM,CAAC;CAEtB;AAED,MAAM,WAAW,aAAc,SAAQ,gBAAgB;CACtD;AAED;;;;GAIG;AACH,qBAAa,KAAM,SAAQ,QAAQ;IAEnB,SAAS,EAAE,cAAc,CAAC;IAC1B,gBAAgB,EAAE,aAAa,CAAC;IAE/C,OAAc,SAAS,EAAE,MAAM,CAAW;IAC1C,OAAc,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAiD;IAExF;;OAEG;IACI,EAAE,EAAE,MAAM,CAAK;IAEtB;;OAEG;IACI,EAAE,EAAE,MAAM,CAAK;IAEtB,SAAS,CAAC,UAAU,mEAAS;IAEtB,gBAAgB,IAAI,MAAM;IA4C1B,cAAc;IAQd,QAAQ;CA8Cf"}
|
|
@@ -97,6 +97,10 @@ var Slice = /** @class */ (function (_super) {
|
|
|
97
97
|
var startAngle = this.get("startAngle", 0);
|
|
98
98
|
var arc_1 = this.get("arc", 0);
|
|
99
99
|
var generator = this._generator;
|
|
100
|
+
if (arc_1 < 0) {
|
|
101
|
+
startAngle = startAngle + arc_1;
|
|
102
|
+
arc_1 = arc_1 * -1;
|
|
103
|
+
}
|
|
100
104
|
if (arc_1 > 0.1) { // this fixes bug with full circle when arc is very small
|
|
101
105
|
generator.cornerRadius(this.get("cornerRadius", 0));
|
|
102
106
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slice.js","sourceRoot":"","sources":["../../../../../src/.internal/core/render/Slice.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAuC,MAAM,YAAY,CAAC;AAC3E,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAmDtC;;;;GAIG;AACH;IAA2B,yBAAQ;IAAnC;QAAA,
|
|
1
|
+
{"version":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CAAC,CAAC;gBAE/J,IAAI,WAAW,GAAG,UAAU,GAAG,KAAG,GAAG,CAAC,CAAC;gBAEvC,IAAI,CAAC,EAAE,GAAG,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;gBACjC,IAAI,CAAC,EAAE,GAAG,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;aACjC;YAED,IAAI,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE;gBAChC,IAAM,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC;gBAC/C,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,GAAG,WAAW,CAAC,CAAC;gBACzC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,GAAG,WAAW,CAAC,CAAC;gBACzC,IAAI,CAAC,iBAAiB,EAAE,CAAC;aACzB;QACF,CAAC;;IAhHD;;;;eAAkC,OAAO;OAAC;IAC1C;;;;eAA0C,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;OAAC;IAgHzF,YAAC;CAAA,AAtHD,CAA2B,QAAQ,GAsHlC;SAtHY,KAAK","sourcesContent":["import { Graphics, IGraphicsSettings, IGraphicsPrivate } from \"./Graphics\";\nimport * as $type from \"../util/Type\";\nimport { Percent } from \"../util/Percent\";\nimport type { IPoint } from \"../util/IPoint\";\nimport { arc } from \"d3-shape\";\nimport * as $math from \"../util/Math\";\n\nexport interface ISliceSettings extends IGraphicsSettings {\n\n\t/**\n\t * Radius in pixels.\n\t */\n\tradius?: number;\n\n\t/**\n\t * Slice \"width\" in degrees.\n\t */\n\tarc?: number;\n\n\t/**\n\t * Inner radius of the slice in pixels.\n\t */\n\tinnerRadius?: number;\n\n\t/**\n\t * Start angle in degrees.\n\t */\n\tstartAngle?: number;\n\n\t/**\n\t * Slice corner radius in pixels.\n\t */\n\tcornerRadius?: number;\n\n\t/**\n\t * Slice \"pull out\" radius in pixels.\n\t */\n\tshiftRadius?: number;\n\n\t/**\n\t * Number of pixels to add to whatever slice's `radius` value is. Negative\n\t * numbers can also be used.\n\t */\n\tdRadius?: number;\n\n\t/**\n\t * Number of pixels to add to whatever slice's `innerRadius` value is.\n\t * Negative numbers can also be used.\n\t */\n\tdInnerRadius?: number;\n\n}\n\nexport interface ISlicePrivate extends IGraphicsPrivate {\n}\n\n/**\n * Draws a slice shape.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/graphics/} for more info\n */\nexport class Slice extends Graphics {\n\n\tdeclare public _settings: ISliceSettings;\n\tdeclare public _privateSettings: ISlicePrivate;\n\n\tpublic static className: string = \"Slice\";\n\tpublic static classNames: Array<string> = Graphics.classNames.concat([Slice.className]);\n\n\t/**\n\t * @ignore\n\t */\n\tpublic ix: number = 0;\n\n\t/**\n\t * @ignore\n\t */\n\tpublic iy: number = 0;\n\n\tprotected _generator = arc();\n\n\tpublic _getTooltipPoint(): IPoint {\n\t\tlet tooltipX = this.get(\"tooltipX\");\n\t\tlet tooltipY = this.get(\"tooltipY\");\n\n\t\tlet x = 0;\n\t\tlet y = 0;\n\n\t\tif ($type.isNumber(tooltipX)) {\n\t\t\tx = tooltipX;\n\t\t}\n\n\t\tif ($type.isNumber(tooltipY)) {\n\t\t\ty = tooltipY;\n\t\t}\n\n\t\tlet radius = this.get(\"radius\", 0);\n\t\tlet innerRadius = this.get(\"innerRadius\", 0);\n\n\t\tlet dRadius = this.get(\"dRadius\", 0);\n\t\tlet dInnerRadius = this.get(\"dInnerRadius\", 0);\n\n\t\tradius += dRadius;\n\t\tinnerRadius += dInnerRadius;\n\n\t\tif (innerRadius < 0) {\n\t\t\tinnerRadius = radius + innerRadius;\n\t\t}\n\n\t\tif (tooltipX instanceof Percent) {\n\t\t\tx = this.ix * (innerRadius + (radius - innerRadius) * tooltipX.value)\n\t\t}\n\n\t\tif (tooltipY instanceof Percent) {\n\t\t\ty = this.iy * (innerRadius + (radius - innerRadius) * tooltipY.value)\n\t\t}\n\n\t\tif (this.get(\"arc\") >= 360 && innerRadius == 0) {\n\t\t\tx = 0;\n\t\t\ty = 0;\n\t\t}\n\n\n\t\treturn { x, y };\n\t}\n\tpublic _beforeChanged() {\n\t\tsuper._beforeChanged();\n\n\t\tif (this.isDirty(\"radius\") || this.isDirty(\"arc\") || this.isDirty(\"innerRadius\") || this.isDirty(\"startAngle\") || this.isDirty(\"dRadius\") || this.isDirty(\"dInnerRadius\") || this.isDirty(\"cornerRadius\")) {\n\t\t\tthis._clear = true;\n\t\t}\n\t}\n\n\tpublic _changed() {\n\t\tsuper._changed();\n\n\t\tif (this._clear) {\n\t\t\tlet startAngle = this.get(\"startAngle\", 0);\n\t\t\tlet arc = this.get(\"arc\", 0);\n\t\t\tconst generator = this._generator;\n\n\t\t\tif(arc < 0){\n\t\t\t\tstartAngle = startAngle + arc;\n\t\t\t\tarc = arc * -1;\n\t\t\t}\n\n\t\t\tif(arc > 0.1){ // this fixes bug with full circle when arc is very small\n\t\t\t\tgenerator.cornerRadius(this.get(\"cornerRadius\", 0));\n\t\t\t}\n\t\t\tgenerator.context(this._display as any);\n\n\t\t\tlet radius = this.get(\"radius\", 0);\n\t\t\tlet innerRadius = this.get(\"innerRadius\", 0);\n\n\t\t\tlet dRadius = this.get(\"dRadius\", 0);\n\t\t\tlet dInnerRadius = this.get(\"dInnerRadius\", 0);\n\n\t\t\tradius += dRadius;\n\t\t\tinnerRadius += dInnerRadius;\t\t\t\n\n\t\t\tif (innerRadius < 0) {\n\t\t\t\tinnerRadius = radius + innerRadius;\n\t\t\t}\n\n\t\t\tgenerator({ innerRadius: innerRadius, outerRadius: radius, startAngle: (startAngle + 90) * $math.RADIANS, endAngle: (startAngle + arc + 90) * $math.RADIANS });\n\n\t\t\tlet middleAngle = startAngle + arc / 2;\n\n\t\t\tthis.ix = $math.cos(middleAngle);\n\t\t\tthis.iy = $math.sin(middleAngle);\n\t\t}\n\n\t\tif (this.isDirty(\"shiftRadius\")) {\n\t\t\tconst shiftRadius = this.get(\"shiftRadius\", 0);\n\t\t\tthis.setRaw(\"dx\", this.ix * shiftRadius);\n\t\t\tthis.setRaw(\"dy\", this.iy * shiftRadius);\n\t\t\tthis.markDirtyPosition();\n\t\t}\n\t}\n}\n"]}
|
|
@@ -8,8 +8,6 @@ export interface ISliderEvents extends IScrollbarEvents {
|
|
|
8
8
|
/**
|
|
9
9
|
* A control that allows zooming chart's axes, or other uses requiring range
|
|
10
10
|
* selection.
|
|
11
|
-
*
|
|
12
|
-
* @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/Sliders/} for more info
|
|
13
11
|
*/
|
|
14
12
|
export declare class Slider extends Scrollbar {
|
|
15
13
|
_settings: ISliderSettings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.d.ts","sourceRoot":"","sources":["../../../../../src/.internal/core/render/Slider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEjG,MAAM,WAAW,eAAgB,SAAQ,kBAAkB;CAC1D;AAED,MAAM,WAAW,cAAe,SAAQ,iBAAiB;CACxD;AAED,MAAM,WAAW,aAAc,SAAQ,gBAAgB;CACtD;AAED
|
|
1
|
+
{"version":3,"file":"Slider.d.ts","sourceRoot":"","sources":["../../../../../src/.internal/core/render/Slider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEjG,MAAM,WAAW,eAAgB,SAAQ,kBAAkB;CAC1D;AAED,MAAM,WAAW,cAAe,SAAQ,iBAAiB;CACxD;AAED,MAAM,WAAW,aAAc,SAAQ,gBAAgB;CACtD;AAED;;;GAGG;AACH,qBAAa,MAAO,SAAQ,SAAS;IAErB,SAAS,EAAE,eAAe,CAAC;IAC3B,gBAAgB,EAAE,cAAc,CAAC;IACjC,OAAO,EAAE,aAAa,CAAC;IAEtC,OAAc,SAAS,EAAE,MAAM,CAAY;IAC3C,OAAc,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAmD;IAG1F,SAAS,CAAC,SAAS;IAQnB;;OAEG;IACI,WAAW;CAMlB"}
|
|
@@ -3,8 +3,6 @@ import { Scrollbar } from "./Scrollbar";
|
|
|
3
3
|
/**
|
|
4
4
|
* A control that allows zooming chart's axes, or other uses requiring range
|
|
5
5
|
* selection.
|
|
6
|
-
*
|
|
7
|
-
* @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/Sliders/} for more info
|
|
8
6
|
*/
|
|
9
7
|
var Slider = /** @class */ (function (_super) {
|
|
10
8
|
__extends(Slider, _super);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.js","sourceRoot":"","sources":["../../../../../src/.internal/core/render/Slider.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAA2D,MAAM,aAAa,CAAC;AAWjG
|
|
1
|
+
{"version":3,"file":"Slider.js","sourceRoot":"","sources":["../../../../../src/.internal/core/render/Slider.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAA2D,MAAM,aAAa,CAAC;AAWjG;;;GAGG;AACH;IAA4B,0BAAS;IAArC;;IA2BA,CAAC;;;;;eAjBA;YACC,IAAI,CAAC,oBAAoB,EAAE,CAAC;YAC5B,iBAAM,SAAS,WAAE,CAAC;YAElB,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;YAC1C,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QACzC,CAAC;;IAED;;OAEG;;;;;eACH;YACC,iBAAM,WAAW,WAAE,CAAC;YACpB,IAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;YACjC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YAC5D,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;QACvC,CAAC;;IApBD;;;;eAAkC,QAAQ;OAAC;IAC3C;;;;eAA0C,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;OAAC;IAoB3F,aAAC;CAAA,AA3BD,CAA4B,SAAS,GA2BpC;SA3BY,MAAM","sourcesContent":["import { Scrollbar, IScrollbarPrivate, IScrollbarSettings, IScrollbarEvents } from \"./Scrollbar\";\r\n\r\nexport interface ISliderSettings extends IScrollbarSettings {\r\n}\r\n\r\nexport interface ISliderPrivate extends IScrollbarPrivate {\r\n}\r\n\r\nexport interface ISliderEvents extends IScrollbarEvents {\r\n}\r\n\r\n/**\r\n * A control that allows zooming chart's axes, or other uses requiring range\r\n * selection.\r\n */\r\nexport class Slider extends Scrollbar {\r\n\r\n\tdeclare public _settings: ISliderSettings;\r\n\tdeclare public _privateSettings: ISliderPrivate;\r\n\tdeclare public _events: ISliderEvents;\r\n\r\n\tpublic static className: string = \"Slider\";\r\n\tpublic static classNames: Array<string> = Scrollbar.classNames.concat([Slider.className]);\r\n\r\n\r\n\tprotected _afterNew() {\r\n\t\tthis._addOrientationClass();\r\n\t\tsuper._afterNew();\r\n\r\n\t\tthis.endGrip.setPrivate(\"visible\", false);\r\n\t\tthis.thumb.setPrivate(\"visible\", false);\r\n\t}\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tpublic updateGrips() {\r\n\t\tsuper.updateGrips();\r\n\t\tconst startGrip = this.startGrip;\r\n\t\tthis.endGrip.setAll({ x: startGrip.x(), y: startGrip.y() });\r\n\t\tthis.setRaw(\"end\", this.get(\"start\"));\r\n\t}\r\n}\r\n"]}
|
|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CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAElC;;;GAGG;AACH,MAAM,WAAW,UAAU;IAC1B,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,MAAM,CAAA;CACb;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,QAAQ,GAAG,UAAU,CA8BlG;AAGD;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,QAAQ,GAAG,UAAU,CA8BvG;AAGD,wBAAgB,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,IAAI,CAU5E"}
|
|
@@ -185,23 +185,17 @@ export function pushAll(array, input) {
|
|
|
185
185
|
*/
|
|
186
186
|
export function remove(array, element) {
|
|
187
187
|
var found = false;
|
|
188
|
-
var index =
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
--length_1;
|
|
198
|
-
}
|
|
199
|
-
else {
|
|
200
|
-
++index;
|
|
201
|
-
}
|
|
188
|
+
var index = 0;
|
|
189
|
+
for (;;) {
|
|
190
|
+
index = array.indexOf(element, index);
|
|
191
|
+
if (index === -1) {
|
|
192
|
+
return found;
|
|
193
|
+
}
|
|
194
|
+
else {
|
|
195
|
+
found = true;
|
|
196
|
+
array.splice(index, 1);
|
|
202
197
|
}
|
|
203
198
|
}
|
|
204
|
-
return found;
|
|
205
199
|
}
|
|
206
200
|
export function removeFirst(array, element) {
|
|
207
201
|
var index = array.indexOf(element);
|
|
@@ -564,15 +558,11 @@ export function getFirstSortedIndex(array, ordering) {
|
|
|
564
558
|
};
|
|
565
559
|
}
|
|
566
560
|
export function keepIf(array, keep) {
|
|
567
|
-
var
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
if (keep(array[i])) {
|
|
571
|
-
++i;
|
|
572
|
-
}
|
|
573
|
-
else {
|
|
561
|
+
var i = array.length;
|
|
562
|
+
while (i > 0) {
|
|
563
|
+
--i;
|
|
564
|
+
if (!keep(array[i])) {
|
|
574
565
|
array.splice(i, 1);
|
|
575
|
-
--length;
|
|
576
566
|
}
|
|
577
567
|
}
|
|
578
568
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Array.js","sourceRoot":"","sources":["../../../../../src/.internal/core/util/Array.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,KAAK,MAAM,QAAQ,CAAC;AAGhC;;;;;GAKG;AAEH;;;;;;;;GAQG;AACH,MAAM,UAAU,OAAO,CAAI,KAAmB,EAAE,KAAQ;IACvD,IAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;IAE5B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,EAAE,CAAC,EAAE;QAChC,kBAAkB;QAClB,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,EAAE;YACvB,OAAO,CAAC,CAAC;SACT;KACD;IAED,OAAO,CAAC,CAAC,CAAC;AACX,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,GAAG,CAAI,KAAmB,EAAE,IAA2B;IACtE,IAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;IAE5B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,EAAE,CAAC,EAAE;QAChC,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;YACnB,OAAO,IAAI,CAAC;SACZ;KACD;IAED,OAAO,KAAK,CAAC;AACd,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AI,CAAC,CAAC;QAEjC,IAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;QAErC,OAAO;QACP,IAAI,KAAK,GAAG,CAAC,EAAE;YACd,KAAK,GAAG,KAAK,GAAG,CAAC,CAAC;YAEnB,QAAQ;SACP;aAAM,IAAI,KAAK,KAAK,CAAC,EAAE;YACvB,KAAK,GAAG,IAAI,CAAC;YACb,GAAG,GAAG,KAAK,CAAC;YAEb,OAAO;SACN;aAAM;YACN,GAAG,GAAG,KAAK,CAAC;SACZ;KACD;IAED,OAAO;QACN,KAAK,EAAE,KAAK;QACZ,KAAK,EAAE,KAAK;KACZ,CAAC;AACH,CAAC;AAGD,MAAM,UAAU,MAAM,CAAI,KAAe,EAAE,IAA2B;IACrE,IAAI,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;IAC1B,IAAI,CAAC,GAAG,CAAC,CAAC;IAEV,OAAO,CAAC,GAAG,MAAM,EAAE;QAClB,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;YACnB,EAAE,CAAC,CAAC;SAEJ;aAAM;YACN,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YACnB,EAAE,MAAM,CAAC;SACT;KACD;AACF,CAAC","sourcesContent":["/**\n * ============================================================================\n * IMPORTS\n * ============================================================================\n * @hidden\n */\nimport type { Optional } from \"./Type\";\nimport * as $type from \"./Type\";\n\n\n/**\n * ============================================================================\n * UTILITY FUNCTIONS\n * ============================================================================\n * @hidden\n */\n\n/**\n * Searches `array` for `value`.\n *\n * Returns -1 if not found.\n *\n * @param array Source array\n * @param value Value to search\n * @returns Index\n */\nexport function indexOf<A>(array: ArrayLike<A>, value: A): number {\n\tconst length = array.length;\n\n\tfor (let i = 0; i < length; ++i) {\n\t\t// TODO handle NaN\n\t\tif (array[i] === value) {\n\t\t\treturn i;\n\t\t}\n\t}\n\n\treturn -1;\n}\n\n/**\n * Calls `test` for each element in `array`.\n *\n * If `test` returns `true` then it immediately returns `true`.\n *\n * If `test` returns `false` for all of the elements in `array` then it returns `false`.\n *\n * @param array Source array\n * @param test Function which is called on each element\n * @returns Whether `test` returned true or not\n */\nexport function any<A>(array: ArrayLike<A>, test: (value: A) => boolean): boolean {\n\tconst length = array.length;\n\n\tfor (let i = 0; i < length; ++i) {\n\t\tif (test(array[i])) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\n\n/**\n * Calls `fn` function for every member of array and returns a new array out\n * of all outputs.\n *\n * @param array Source array\n * @param fn Callback function\n * @returns New array\n */\nexport function map<A, B>(array: ArrayLike<A>, fn: (value: A, index: number) => B): Array<B> {\n\tconst length = array.length;\n\tconst output = new Array(length);\n\n\tfor (let i = 0; i < length; ++i) {\n\t\toutput[i] = fn(array[i], i);\n\t}\n\n\treturn output;\n}\n\n/**\n * Iterates through all items in array and calls `fn` function for each of\n * them.\n *\n * @param array Source array\n * @param fn Callback function\n */\nexport function each<A>(array: ArrayLike<A>, fn: (value: A, index: number) => void): void {\n\tconst length = array.length;\n\n\tfor (let i = 0; i < length; ++i) {\n\t\tfn(array[i], i);\n\t}\n}\n\n/**\n * Iterates through all items in array in reverse order and calls `fn` function for each of\n * them.\n *\n * @param array Source array\n * @param fn Callback function\n */\nexport function eachReverse<A>(array: ArrayLike<A>, fn: (value: A, index: number) => void): void {\n\tlet i = array.length;\n\n\twhile (i > 0) {\n\t\t--i;\n\t\tfn(array[i], i);\n\t}\n}\n\n/**\n * Iterates through all items in array and calls `fn` function for each of\n * them.\n *\n * If `fn` call evaluates to `false`, further iteration is cancelled.\n *\n * @param array Source array\n * @param fn Callback function\n */\nexport function eachContinue<A>(array: ArrayLike<A>, fn: (value: A, index: number) => boolean): void {\n\tconst length = array.length;\n\n\tfor (let i = 0; i < length; ++i) {\n\t\tif (!fn(array[i], i)) {\n\t\t\tbreak;\n\t\t}\n\t}\n}\n\n/**\n * Shifts an item at `index` towards beginning of the array.\n *\n * @param array Source array\n * @param index Target element index\n */\nexport function shiftLeft<A>(array: Array<A>, index: number): void {\n\tconst length = array.length;\n\n\tfor (let i = index; i < length; ++i) {\n\t\tarray[i - index] = array[i];\n\t}\n\n\tarray.length = length - index;\n}\n\n/**\n * Returns the last item of the array.\n *\n * @param array Source array\n * @returns Last item\n */\nexport function last<A>(array: Array<A>): Optional<A> {\n\tconst length = array.length;\n\treturn length ? array[length - 1] : undefined;\n}\n\n/**\n * Returns the first item of the array.\n *\n * @param array Source array\n * @returns Last item\n */\nexport function first<A>(array: Array<A>): Optional<A> {\n\treturn array[0];\n}\n\n/**\n * Inserts `element` into `array` at `index`.\n *\n * Caps `index` to be between `0` and `array.length`\n *\n * @param array Source array\n * @param element Item to insert\n * @param array Index to insert item at\n */\nexport function insert<A>(array: Array<A>, element: A, index: number): void {\n\t//if (array) {\n\tindex = Math.max(0, Math.min(index, array.length));\n\tarray.splice(index, 0, element);\n\t//}\n}\n\n/**\n * Removes all copies of `element` from `array` (if they exist) and then\n * inserts `element` at `index`.\n *\n * @param array Source array\n * @param element Item\n * @param array Index to move item to\n */\nexport function setIndex<A>(array: Array<A>, element: A, index: number): void {\n\tremove(array, element);\n\tinsert(array, element, index);\n}\n\n\n/**\n * Pushes all of the elements from `input` into `array`.\n *\n * @param array Output array\n * @param input Input array\n */\nexport function pushAll<A>(array: Array<A>, input: Array<A>) {\n\tconst length = input.length;\n\n\tfor (let i = 0; i < length; ++i) {\n\t\tarray.push(input[i]);\n\t}\n}\n\n\n/**\n * Removes `element` from `array`.\n *\n * If there are multiple copies of `element`, they are all removed.\n *\n * @param array Source array\n * @param element Item to remove\n */\nexport function remove<A>(array: Array<A>, element: A): boolean {\n\tlet found: boolean = false;\n\tlet index: number = array.indexOf(element);\n\n\tif (index !== -1) {\n\t\tfound = true;\n\t\tarray.splice(index, 1);\n\n\t\tlet length: number = array.length;\n\n\t\twhile (index < length) {\n\t\t\t// TODO handle NaN\n\t\t\tif (array[index] === element) {\n\t\t\t\tarray.splice(index, 1);\n\t\t\t\t--length;\n\n\t\t\t} else {\n\t\t\t\t++index;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn found;\n}\n\nexport function removeFirst<A>(array: Array<A>, element: A): boolean {\n\tlet index: number = array.indexOf(element);\n\n\tif (index !== -1) {\n\t\tarray.splice(index, 1);\n\t\treturn true;\n\n\t} else {\n\t\treturn false;\n\t}\n}\n\n/**\n * Adds an `element` to `array`.\n *\n * If array already contains and item like this, it is removed before adding\n * it again.\n *\n * Optionally `toIndex` can be specified to add element at specific index.\n *\n * @param array Source array\n * @param element Item to add\n * @param array Index to move item to\n */\nexport function move<A>(array: Array<A>, element: A, toIndex?: number): void {\n\t// @todo this implementation must be the same as the List.moveValue method\n\t// @todo don't do anything if the desired index is the same as the current index\n\tlet index = indexOf(array, element);\n\n\t// @todo remove all old values rather than only the first ?\n\tif (index !== -1) {\n\t\tremoveIndex(array, index);\n\t}\n\n\tif (toIndex == null) {\n\t\tarray.push(element);\n\t} else {\n\t\tinsertIndex(array, toIndex, element);\n\t}\n}\n\n\n/**\n * Inserts `element` into `array` at `index`.\n *\n * If `index` is not provided, it will insert `element` at the end of `array`.\n *\n * @param array Source array\n * @param element Item to add\n * @param array Index to add item at\n */\nexport function add<A>(array: Array<A>, element: A, index?: number): void {\n\t// Append to the end if index is not set\n\tif (!$type.isNumber(index)) {\n\t\tarray.push(element);\n\t}\n\n\t// Add to the beginning of array if index is 0\n\telse if (index === 0) {\n\t\tarray.unshift(element);\n\t}\n\t// Add to indicated place if index is set\n\telse {\n\t\tarray.splice(index, 0, element);\n\t}\n}\n\n\n/**\n * Pushes `element` into `array` if it doesn't already exist.\n *\n * @param array Source array\n * @param element Item to add\n */\nexport function pushOne<A>(array: Array<A>, element: A): void {\n\tif (array.indexOf(element) === -1) {\n\t\tarray.push(element);\n\t}\n}\n\n\n/**\n * Removes `element` from `array` (if it exists) and then inserts `element` at\n * `index`.\n *\n * If `index` is not provided, it will insert `element` at the end of `array`.\n *\n * @param array Source array\n * @param element Item to remove\n * @param array Index to move item to\n */\nexport function replace<A>(array: Array<A>, element: A, index?: number): void {\n\t// check if exists\n\tlet ind: number = array.indexOf(element);\n\n\t// remove if exists\n\tif (ind !== -1) {\n\t\tarray.splice(ind, 1);\n\t}\n\n\t// add to end if index is not set\n\tif (!$type.isNumber(index)) {\n\t\tarray.push(element);\n\t}\n\t// add to indicated place if index is set\n\telse {\n\t\tarray.splice(index, 0, element);\n\t}\n}\n\n/**\n * Wraps `input` in an array, if it isn't already an array.\n *\n * @param input Source value\n * @return An array\n */\nexport function toArray<A>(input: Array<A> | A): Array<A> {\n\tif (Array.isArray(input)) {\n\t\treturn input;\n\t}\n\telse {\n\t\treturn [input];\n\t}\n}\n\n/**\n * Returns `true` if `element` exists in `array`.\n *\n * @param array Source array\n * @param element Item to search for\n * @returns Item in array?\n */\nexport function has<A>(array: ArrayLike<A>, element: A): boolean {\n\treturn indexOf(array, element) !== -1;\n}\n\n/**\n * Returns a shallow copy of `array`.\n *\n * @param array Source array\n * @returns Copy of the array\n */\nexport function copy<A>(array: ArrayLike<A>): Array<A> {\n\tconst length = array.length;\n\n\t// It's faster to create the array with a pre-defined length\n\tconst output = new Array(length);\n\n\tfor (let i = 0; i < length; ++i) {\n\t\t// Because the array has a pre-defined length, we have to assign rather than push\n\t\t// This is also faster than pushing\n\t\toutput[i] = array[i];\n\t}\n\n\treturn output;\n}\n\n\n/**\n * Returns a copy of `array` which contains all the elements between `start`\n * and `end`. (including `start` and excluding `end`)\n *\n * If `end` is not provided, it defaults to `array.length`.\n *\n * @param array Source array\n * @param start Start index\n * @param end End index\n * @returns Part of the array\n */\nexport function slice<A>(array: ArrayLike<A>, start: number, end: number = array.length): Array<A> {\n\tconst output = new Array(end - start);\n\n\tfor (let i = start; i < end; ++i) {\n\t\toutput[i - start] = array[i];\n\t}\n\n\treturn output;\n}\n\n/**\n * Inserts a value into array at specific index.\n *\n * @param array Source array\n * @param index Index\n * @param value Value to insert\n */\nexport function insertIndex<A>(array: Array<A>, index: number, value: A): void {\n\tarray.splice(index, 0, value);\n}\n\n/**\n * Removes a value from array at specific index.\n *\n * @param array Source array\n * @param index Index\n */\nexport function removeIndex<A>(array: Array<A>, index: number): void {\n\tarray.splice(index, 1);\n}\n\n/**\n * @ignore Exclude from docs\n * @todo Description\n */\nexport interface SortResult {\n\tfound: boolean;\n\tindex: number\n}\n\n/**\n * Searches the array using custom function and returns index of the item if\n * found.\n *\n * Will call `matches` function on all items of the array. If return value\n * evaluates to `true`, index is returned.\n *\n * Otherwise returns -1.\n *\n * @param array Source array\n * @param matches Search function\n * @returns Index of the item if found\n */\nexport function findIndex<A>(array: ArrayLike<A>, matches: (value: A, index: number) => boolean): number {\n\tconst length = array.length;\n\n\tfor (let i = 0; i < length; ++i) {\n\t\tif (matches(array[i], i)) {\n\t\t\treturn i;\n\t\t}\n\t}\n\n\treturn -1;\n}\n\n/**\n * This is the same as `findIndex` except it searches from right to left.\n *\n * @param array Source array\n * @param matches Search function\n * @returns Index of the item if found\n */\nexport function findIndexReverse<A>(array: ArrayLike<A>, matches: (value: A, index: number) => boolean): number {\n\tlet i = array.length;\n\n\twhile (i > 0) {\n\t\t--i;\n\t\tif (matches(array[i], i)) {\n\t\t\treturn i;\n\t\t}\n\t}\n\n\treturn -1;\n}\n\n/**\n * Searches the array using custom function and returns item if found.\n *\n * Will call `matches` function on all items of the array. If return value\n * evaluates to `true`, index is returned.\n *\n * Otherwise returns `undefined`.\n *\n * @param array Source array\n * @param matches Search function\n * @returns Item if found\n */\nexport function find<A>(array: ArrayLike<A>, matches: (value: A, index: number) => boolean): A | undefined {\n\tconst index = findIndex(array, matches);\n\n\tif (index !== -1) {\n\t\treturn array[index];\n\t}\n}\n\n/**\n * This is the same as `find` except it searches from right to left.\n *\n * @param array Source array\n * @param matches Search function\n * @returns Item if found\n */\nexport function findReverse<A>(array: ArrayLike<A>, matches: (value: A, index: number) => boolean): A | undefined {\n\tconst index = findIndexReverse(array, matches);\n\n\tif (index !== -1) {\n\t\treturn array[index];\n\t}\n}\n\n/**\n * Searches the array using custom function and returns item if found.\n *\n * Will call `matches` function on all items of the array. If value\n * is not `undefined`, it returns it.\n *\n * Otherwise returns `undefined`.\n *\n * @param array Source array\n * @param matches Search function\n * @returns Item if found\n */\nexport function findMap<A, B>(array: ArrayLike<A>, matches: (value: A, index: number) => B | undefined): B | undefined {\n\tconst length = array.length;\n\n\tfor (let i = 0; i < length; ++i) {\n\t\tconst value = matches(array[i], i);\n\n\t\tif (value !== undefined) {\n\t\t\treturn value;\n\t\t}\n\t}\n}\n\n/**\n * Iterates through all items in array and calls `fn` function for each of\n * them.\n *\n * @param array Source array\n * @param fn Callback function\n */\nexport function shuffle<A>(array: Array<A>) {\n\t// https://stackoverflow.com/a/2450976/449477\n\tlet currentIndex = array.length,\n\t\ttemporaryValue,\n\t\trandomIndex;\n\n\t// While there remain elements to shuffle...\n\twhile (0 !== currentIndex) {\n\t\t// Pick a remaining element...\n\t\trandomIndex = Math.floor(Math.random() * currentIndex);\n\t\tcurrentIndex -= 1;\n\n\t\t// And swap it with the current element.\n\t\ttemporaryValue = array[currentIndex];\n\t\tarray[currentIndex] = array[randomIndex];\n\t\tarray[randomIndex] = temporaryValue;\n\t}\n}\n\n\nexport type Ordering = -1 | 0 | 1;\n\n/**\n * @ignore Exclude from docs\n * @todo Description\n */\nexport interface SortResult {\n\tfound: boolean;\n\tindex: number\n}\n\n/**\n * Orders an array using specific `ordering` function and returns right-most index of\n * the `value`.\n *\n * @ignore Exclude from docs\n * @param array Source array\n * @param ordering An ordering function\n * @returns Result of the search\n */\nexport function getSortedIndex<A>(array: ArrayLike<A>, ordering: (left: A) => Ordering): SortResult {\n\tlet start = 0;\n\tlet end = array.length;\n\tlet found = false;\n\n\twhile (start < end) {\n\t\t// TODO is this faster/slower than using Math.floor ?\n\t\tconst pivot = (start + end) >> 1;\n\n\t\tconst order = ordering(array[pivot]);\n\n\t\t// less\n\t\tif (order < 0) {\n\t\t\tstart = pivot + 1;\n\n\t\t// equal\n\t\t} else if (order === 0) {\n\t\t\tfound = true;\n\t\t\tstart = pivot + 1;\n\n\t\t// more\n\t\t} else {\n\t\t\tend = pivot;\n\t\t}\n\t}\n\n\treturn {\n\t\tfound: found,\n\t\tindex: (found ? start - 1 : start)\n\t};\n}\n\n\n/**\n * Orders an array using specific `ordering` function and returns left-most index of\n * the `value`.\n *\n * @ignore Exclude from docs\n * @param array Source array\n * @param ordering An ordering function\n * @returns Result of the search\n */\nexport function getFirstSortedIndex<A>(array: ArrayLike<A>, ordering: (left: A) => Ordering): SortResult {\n\tlet start = 0;\n\tlet end = array.length;\n\tlet found = false;\n\n\twhile (start < end) {\n\t\t// TODO is this faster/slower than using Math.floor ?\n\t\tconst pivot = (start + end) >> 1;\n\n\t\tconst order = ordering(array[pivot]);\n\n\t\t// less\n\t\tif (order < 0) {\n\t\t\tstart = pivot + 1;\n\n\t\t// equal\n\t\t} else if (order === 0) {\n\t\t\tfound = true;\n\t\t\tend = pivot;\n\n\t\t// more\n\t\t} else {\n\t\t\tend = pivot;\n\t\t}\n\t}\n\n\treturn {\n\t\tfound: found,\n\t\tindex: start\n\t};\n}\n\n\nexport function keepIf<A>(array: Array<A>, keep: (value: A) => boolean): void {\n\tlet length = array.length;\n\tlet i = 0;\n\n\twhile (i < length) {\n\t\tif (keep(array[i])) {\n\t\t\t++i;\n\n\t\t} else {\n\t\t\tarray.splice(i, 1);\n\t\t\t--length;\n\t\t}\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Array.js","sourceRoot":"","sources":["../../../../../src/.internal/core/util/Array.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,KAAK,MAAM,QAAQ,CAAC;AAGhC;;;;;GAKG;AAEH;;;;;;;;GAQG;AACH,MAAM,UAAU,OAAO,CAAI,KAAmB,EAAE,KAAQ;IACvD,IAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;IAE5B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,C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;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CAAI,KAAmB,EAAE,QAA+B;IAC1F,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,IAAI,GAAG,GAAK,KAAK,CAAC,MAAM,CAAC;IACzB,IAAI,KAAK,GAAG,KAAK,CAAC;IAElB,OAAO,KAAK,GAAG,GAAG,EAAE;QACnB,qDAAqD;QACrD,IAAM,KAAK,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC;QAEjC,IAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;QAErC,OAAO;QACP,IAAI,KAAK,GAAG,CAAC,EAAE;YACd,KAAK,GAAG,KAAK,GAAG,CAAC,CAAC;YAEnB,QAAQ;SACP;aAAM,IAAI,KAAK,KAAK,CAAC,EAAE;YACvB,KAAK,GAAG,IAAI,CAAC;YACb,GAAG,GAAG,KAAK,CAAC;YAEb,OAAO;SACN;aAAM;YACN,GAAG,GAAG,KAAK,CAAC;SACZ;KACD;IAED,OAAO;QACN,KAAK,EAAE,KAAK;QACZ,KAAK,EAAE,KAAK;KACZ,CAAC;AACH,CAAC;AAGD,MAAM,UAAU,MAAM,CAAI,KAAe,EAAE,IAA2B;IACrE,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC;IAErB,OAAO,CAAC,GAAG,CAAC,EAAE;QACb,EAAE,CAAC,CAAC;QAEJ,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;YACpB,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;SACnB;KACD;AACF,CAAC","sourcesContent":["/**\n * ============================================================================\n * IMPORTS\n * ============================================================================\n * @hidden\n */\nimport type { Optional } from \"./Type\";\nimport * as $type from \"./Type\";\n\n\n/**\n * ============================================================================\n * UTILITY FUNCTIONS\n * ============================================================================\n * @hidden\n */\n\n/**\n * Searches `array` for `value`.\n *\n * Returns -1 if not found.\n *\n * @param array Source array\n * @param value Value to search\n * @returns Index\n */\nexport function indexOf<A>(array: ArrayLike<A>, value: A): number {\n\tconst length = array.length;\n\n\tfor (let i = 0; i < length; ++i) {\n\t\t// TODO handle NaN\n\t\tif (array[i] === value) {\n\t\t\treturn i;\n\t\t}\n\t}\n\n\treturn -1;\n}\n\n/**\n * Calls `test` for each element in `array`.\n *\n * If `test` returns `true` then it immediately returns `true`.\n *\n * If `test` returns `false` for all of the elements in `array` then it returns `false`.\n *\n * @param array Source array\n * @param test Function which is called on each element\n * @returns Whether `test` returned true or not\n */\nexport function any<A>(array: ArrayLike<A>, test: (value: A) => boolean): boolean {\n\tconst length = array.length;\n\n\tfor (let i = 0; i < length; ++i) {\n\t\tif (test(array[i])) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\n\n/**\n * Calls `fn` function for every member of array and returns a new array out\n * of all outputs.\n *\n * @param array Source array\n * @param fn Callback function\n * @returns New array\n */\nexport function map<A, B>(array: ArrayLike<A>, fn: (value: A, index: number) => B): Array<B> {\n\tconst length = array.length;\n\tconst output = new Array(length);\n\n\tfor (let i = 0; i < length; ++i) {\n\t\toutput[i] = fn(array[i], i);\n\t}\n\n\treturn output;\n}\n\n/**\n * Iterates through all items in array and calls `fn` function for each of\n * them.\n *\n * @param array Source array\n * @param fn Callback function\n */\nexport function each<A>(array: ArrayLike<A>, fn: (value: A, index: number) => void): void {\n\tconst length = array.length;\n\n\tfor (let i = 0; i < length; ++i) {\n\t\tfn(array[i], i);\n\t}\n}\n\n/**\n * Iterates through all items in array in reverse order and calls `fn` function for each of\n * them.\n *\n * @param array Source array\n * @param fn Callback function\n */\nexport function eachReverse<A>(array: ArrayLike<A>, fn: (value: A, index: number) => void): void {\n\tlet i = array.length;\n\n\twhile (i > 0) {\n\t\t--i;\n\t\tfn(array[i], i);\n\t}\n}\n\n/**\n * Iterates through all items in array and calls `fn` function for each of\n * them.\n *\n * If `fn` call evaluates to `false`, further iteration is cancelled.\n *\n * @param array Source array\n * @param fn Callback function\n */\nexport function eachContinue<A>(array: ArrayLike<A>, fn: (value: A, index: number) => boolean): void {\n\tconst length = array.length;\n\n\tfor (let i = 0; i < length; ++i) {\n\t\tif (!fn(array[i], i)) {\n\t\t\tbreak;\n\t\t}\n\t}\n}\n\n/**\n * Shifts an item at `index` towards beginning of the array.\n *\n * @param array Source array\n * @param index Target element index\n */\nexport function shiftLeft<A>(array: Array<A>, index: number): void {\n\tconst length = array.length;\n\n\tfor (let i = index; i < length; ++i) {\n\t\tarray[i - index] = array[i];\n\t}\n\n\tarray.length = length - index;\n}\n\n/**\n * Returns the last item of the array.\n *\n * @param array Source array\n * @returns Last item\n */\nexport function last<A>(array: Array<A>): Optional<A> {\n\tconst length = array.length;\n\treturn length ? array[length - 1] : undefined;\n}\n\n/**\n * Returns the first item of the array.\n *\n * @param array Source array\n * @returns Last item\n */\nexport function first<A>(array: Array<A>): Optional<A> {\n\treturn array[0];\n}\n\n/**\n * Inserts `element` into `array` at `index`.\n *\n * Caps `index` to be between `0` and `array.length`\n *\n * @param array Source array\n * @param element Item to insert\n * @param array Index to insert item at\n */\nexport function insert<A>(array: Array<A>, element: A, index: number): void {\n\t//if (array) {\n\tindex = Math.max(0, Math.min(index, array.length));\n\tarray.splice(index, 0, element);\n\t//}\n}\n\n/**\n * Removes all copies of `element` from `array` (if they exist) and then\n * inserts `element` at `index`.\n *\n * @param array Source array\n * @param element Item\n * @param array Index to move item to\n */\nexport function setIndex<A>(array: Array<A>, element: A, index: number): void {\n\tremove(array, element);\n\tinsert(array, element, index);\n}\n\n\n/**\n * Pushes all of the elements from `input` into `array`.\n *\n * @param array Output array\n * @param input Input array\n */\nexport function pushAll<A>(array: Array<A>, input: Array<A>) {\n\tconst length = input.length;\n\n\tfor (let i = 0; i < length; ++i) {\n\t\tarray.push(input[i]);\n\t}\n}\n\n\n/**\n * Removes `element` from `array`.\n *\n * If there are multiple copies of `element`, they are all removed.\n *\n * @param array Source array\n * @param element Item to remove\n */\nexport function remove<A>(array: Array<A>, element: A): boolean {\n\tlet found: boolean = false;\n\tlet index: number = 0;\n\n\tfor (;;) {\n\t\tindex = array.indexOf(element, index);\n\n\t\tif (index === -1) {\n\t\t\treturn found;\n\n\t\t} else {\n\t\t\tfound = true;\n\t\t\tarray.splice(index, 1);\n\t\t}\n\t}\n}\n\nexport function removeFirst<A>(array: Array<A>, element: A): boolean {\n\tlet index: number = array.indexOf(element);\n\n\tif (index !== -1) {\n\t\tarray.splice(index, 1);\n\t\treturn true;\n\n\t} else {\n\t\treturn false;\n\t}\n}\n\n/**\n * Adds an `element` to `array`.\n *\n * If array already contains and item like this, it is removed before adding\n * it again.\n *\n * Optionally `toIndex` can be specified to add element at specific index.\n *\n * @param array Source array\n * @param element Item to add\n * @param array Index to move item to\n */\nexport function move<A>(array: Array<A>, element: A, toIndex?: number): void {\n\t// @todo this implementation must be the same as the List.moveValue method\n\t// @todo don't do anything if the desired index is the same as the current index\n\tlet index = indexOf(array, element);\n\n\t// @todo remove all old values rather than only the first ?\n\tif (index !== -1) {\n\t\tremoveIndex(array, index);\n\t}\n\n\tif (toIndex == null) {\n\t\tarray.push(element);\n\t} else {\n\t\tinsertIndex(array, toIndex, element);\n\t}\n}\n\n\n/**\n * Inserts `element` into `array` at `index`.\n *\n * If `index` is not provided, it will insert `element` at the end of `array`.\n *\n * @param array Source array\n * @param element Item to add\n * @param array Index to add item at\n */\nexport function add<A>(array: Array<A>, element: A, index?: number): void {\n\t// Append to the end if index is not set\n\tif (!$type.isNumber(index)) {\n\t\tarray.push(element);\n\t}\n\n\t// Add to the beginning of array if index is 0\n\telse if (index === 0) {\n\t\tarray.unshift(element);\n\t}\n\t// Add to indicated place if index is set\n\telse {\n\t\tarray.splice(index, 0, element);\n\t}\n}\n\n\n/**\n * Pushes `element` into `array` if it doesn't already exist.\n *\n * @param array Source array\n * @param element Item to add\n */\nexport function pushOne<A>(array: Array<A>, element: A): void {\n\tif (array.indexOf(element) === -1) {\n\t\tarray.push(element);\n\t}\n}\n\n\n/**\n * Removes `element` from `array` (if it exists) and then inserts `element` at\n * `index`.\n *\n * If `index` is not provided, it will insert `element` at the end of `array`.\n *\n * @param array Source array\n * @param element Item to remove\n * @param array Index to move item to\n */\nexport function replace<A>(array: Array<A>, element: A, index?: number): void {\n\t// check if exists\n\tlet ind: number = array.indexOf(element);\n\n\t// remove if exists\n\tif (ind !== -1) {\n\t\tarray.splice(ind, 1);\n\t}\n\n\t// add to end if index is not set\n\tif (!$type.isNumber(index)) {\n\t\tarray.push(element);\n\t}\n\t// add to indicated place if index is set\n\telse {\n\t\tarray.splice(index, 0, element);\n\t}\n}\n\n/**\n * Wraps `input` in an array, if it isn't already an array.\n *\n * @param input Source value\n * @return An array\n */\nexport function toArray<A>(input: Array<A> | A): Array<A> {\n\tif (Array.isArray(input)) {\n\t\treturn input;\n\t}\n\telse {\n\t\treturn [input];\n\t}\n}\n\n/**\n * Returns `true` if `element` exists in `array`.\n *\n * @param array Source array\n * @param element Item to search for\n * @returns Item in array?\n */\nexport function has<A>(array: ArrayLike<A>, element: A): boolean {\n\treturn indexOf(array, element) !== -1;\n}\n\n/**\n * Returns a shallow copy of `array`.\n *\n * @param array Source array\n * @returns Copy of the array\n */\nexport function copy<A>(array: ArrayLike<A>): Array<A> {\n\tconst length = array.length;\n\n\t// It's faster to create the array with a pre-defined length\n\tconst output = new Array(length);\n\n\tfor (let i = 0; i < length; ++i) {\n\t\t// Because the array has a pre-defined length, we have to assign rather than push\n\t\t// This is also faster than pushing\n\t\toutput[i] = array[i];\n\t}\n\n\treturn output;\n}\n\n\n/**\n * Returns a copy of `array` which contains all the elements between `start`\n * and `end`. (including `start` and excluding `end`)\n *\n * If `end` is not provided, it defaults to `array.length`.\n *\n * @param array Source array\n * @param start Start index\n * @param end End index\n * @returns Part of the array\n */\nexport function slice<A>(array: ArrayLike<A>, start: number, end: number = array.length): Array<A> {\n\tconst output = new Array(end - start);\n\n\tfor (let i = start; i < end; ++i) {\n\t\toutput[i - start] = array[i];\n\t}\n\n\treturn output;\n}\n\n/**\n * Inserts a value into array at specific index.\n *\n * @param array Source array\n * @param index Index\n * @param value Value to insert\n */\nexport function insertIndex<A>(array: Array<A>, index: number, value: A): void {\n\tarray.splice(index, 0, value);\n}\n\n/**\n * Removes a value from array at specific index.\n *\n * @param array Source array\n * @param index Index\n */\nexport function removeIndex<A>(array: Array<A>, index: number): void {\n\tarray.splice(index, 1);\n}\n\n/**\n * @ignore Exclude from docs\n * @todo Description\n */\nexport interface SortResult {\n\tfound: boolean;\n\tindex: number\n}\n\n/**\n * Searches the array using custom function and returns index of the item if\n * found.\n *\n * Will call `matches` function on all items of the array. If return value\n * evaluates to `true`, index is returned.\n *\n * Otherwise returns -1.\n *\n * @param array Source array\n * @param matches Search function\n * @returns Index of the item if found\n */\nexport function findIndex<A>(array: ArrayLike<A>, matches: (value: A, index: number) => boolean): number {\n\tconst length = array.length;\n\n\tfor (let i = 0; i < length; ++i) {\n\t\tif (matches(array[i], i)) {\n\t\t\treturn i;\n\t\t}\n\t}\n\n\treturn -1;\n}\n\n/**\n * This is the same as `findIndex` except it searches from right to left.\n *\n * @param array Source array\n * @param matches Search function\n * @returns Index of the item if found\n */\nexport function findIndexReverse<A>(array: ArrayLike<A>, matches: (value: A, index: number) => boolean): number {\n\tlet i = array.length;\n\n\twhile (i > 0) {\n\t\t--i;\n\t\tif (matches(array[i], i)) {\n\t\t\treturn i;\n\t\t}\n\t}\n\n\treturn -1;\n}\n\n/**\n * Searches the array using custom function and returns item if found.\n *\n * Will call `matches` function on all items of the array. If return value\n * evaluates to `true`, index is returned.\n *\n * Otherwise returns `undefined`.\n *\n * @param array Source array\n * @param matches Search function\n * @returns Item if found\n */\nexport function find<A>(array: ArrayLike<A>, matches: (value: A, index: number) => boolean): A | undefined {\n\tconst index = findIndex(array, matches);\n\n\tif (index !== -1) {\n\t\treturn array[index];\n\t}\n}\n\n/**\n * This is the same as `find` except it searches from right to left.\n *\n * @param array Source array\n * @param matches Search function\n * @returns Item if found\n */\nexport function findReverse<A>(array: ArrayLike<A>, matches: (value: A, index: number) => boolean): A | undefined {\n\tconst index = findIndexReverse(array, matches);\n\n\tif (index !== -1) {\n\t\treturn array[index];\n\t}\n}\n\n/**\n * Searches the array using custom function and returns item if found.\n *\n * Will call `matches` function on all items of the array. If value\n * is not `undefined`, it returns it.\n *\n * Otherwise returns `undefined`.\n *\n * @param array Source array\n * @param matches Search function\n * @returns Item if found\n */\nexport function findMap<A, B>(array: ArrayLike<A>, matches: (value: A, index: number) => B | undefined): B | undefined {\n\tconst length = array.length;\n\n\tfor (let i = 0; i < length; ++i) {\n\t\tconst value = matches(array[i], i);\n\n\t\tif (value !== undefined) {\n\t\t\treturn value;\n\t\t}\n\t}\n}\n\n/**\n * Iterates through all items in array and calls `fn` function for each of\n * them.\n *\n * @param array Source array\n * @param fn Callback function\n */\nexport function shuffle<A>(array: Array<A>) {\n\t// https://stackoverflow.com/a/2450976/449477\n\tlet currentIndex = array.length,\n\t\ttemporaryValue,\n\t\trandomIndex;\n\n\t// While there remain elements to shuffle...\n\twhile (0 !== currentIndex) {\n\t\t// Pick a remaining element...\n\t\trandomIndex = Math.floor(Math.random() * currentIndex);\n\t\tcurrentIndex -= 1;\n\n\t\t// And swap it with the current element.\n\t\ttemporaryValue = array[currentIndex];\n\t\tarray[currentIndex] = array[randomIndex];\n\t\tarray[randomIndex] = temporaryValue;\n\t}\n}\n\n\nexport type Ordering = -1 | 0 | 1;\n\n/**\n * @ignore Exclude from docs\n * @todo Description\n */\nexport interface SortResult {\n\tfound: boolean;\n\tindex: number\n}\n\n/**\n * Orders an array using specific `ordering` function and returns right-most index of\n * the `value`.\n *\n * @ignore Exclude from docs\n * @param array Source array\n * @param ordering An ordering function\n * @returns Result of the search\n */\nexport function getSortedIndex<A>(array: ArrayLike<A>, ordering: (left: A) => Ordering): SortResult {\n\tlet start = 0;\n\tlet end = array.length;\n\tlet found = false;\n\n\twhile (start < end) {\n\t\t// TODO is this faster/slower than using Math.floor ?\n\t\tconst pivot = (start + end) >> 1;\n\n\t\tconst order = ordering(array[pivot]);\n\n\t\t// less\n\t\tif (order < 0) {\n\t\t\tstart = pivot + 1;\n\n\t\t// equal\n\t\t} else if (order === 0) {\n\t\t\tfound = true;\n\t\t\tstart = pivot + 1;\n\n\t\t// more\n\t\t} else {\n\t\t\tend = pivot;\n\t\t}\n\t}\n\n\treturn {\n\t\tfound: found,\n\t\tindex: (found ? start - 1 : start)\n\t};\n}\n\n\n/**\n * Orders an array using specific `ordering` function and returns left-most index of\n * the `value`.\n *\n * @ignore Exclude from docs\n * @param array Source array\n * @param ordering An ordering function\n * @returns Result of the search\n */\nexport function getFirstSortedIndex<A>(array: ArrayLike<A>, ordering: (left: A) => Ordering): SortResult {\n\tlet start = 0;\n\tlet end = array.length;\n\tlet found = false;\n\n\twhile (start < end) {\n\t\t// TODO is this faster/slower than using Math.floor ?\n\t\tconst pivot = (start + end) >> 1;\n\n\t\tconst order = ordering(array[pivot]);\n\n\t\t// less\n\t\tif (order < 0) {\n\t\t\tstart = pivot + 1;\n\n\t\t// equal\n\t\t} else if (order === 0) {\n\t\t\tfound = true;\n\t\t\tend = pivot;\n\n\t\t// more\n\t\t} else {\n\t\t\tend = pivot;\n\t\t}\n\t}\n\n\treturn {\n\t\tfound: found,\n\t\tindex: start\n\t};\n}\n\n\nexport function keepIf<A>(array: Array<A>, keep: (value: A) => boolean): void {\n\tlet i = array.length;\n\n\twhile (i > 0) {\n\t\t--i;\n\n\t\tif (!keep(array[i])) {\n\t\t\tarray.splice(i, 1);\n\t\t}\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateFormatter.d.ts","sourceRoot":"","sources":["../../../../../src/.internal/core/util/DateFormatter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAEjD,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,cAAc,EAAE,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CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAKtC;;;;;OAKG;IACH,SAAS,CAAC,aAAa,CAAC,IAAI,EAAE,KAAK,CAAC,MAAM,eAAe,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC;CAc1E"}
|
|
@@ -61,13 +61,10 @@ var DateFormatter = /** @class */ (function (_super) {
|
|
|
61
61
|
// get format info (it will also deal with parser caching)
|
|
62
62
|
var info = this.parseFormat(format);
|
|
63
63
|
// Should we apply custom time zone?
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
// else if (this.timezone != null) {
|
|
69
|
-
// date = $time.setTimezone(date, this.timezone);
|
|
70
|
-
// }
|
|
64
|
+
var timezone = this._root.timezone;
|
|
65
|
+
if (timezone && !this._root.utc) {
|
|
66
|
+
date = timezone.convertLocal(date);
|
|
67
|
+
}
|
|
71
68
|
// Check if it's a valid date
|
|
72
69
|
if (!$type.isNumber(date.getTime())) {
|
|
73
70
|
// TODO translation
|