@amcharts/amcharts5 5.2.17 → 5.2.18

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.
Files changed (185) hide show
  1. package/.internal/charts/stock/toolbar/DropdownList.d.ts +1 -0
  2. package/.internal/charts/stock/toolbar/DropdownList.d.ts.map +1 -1
  3. package/.internal/charts/stock/toolbar/DropdownList.js +13 -8
  4. package/.internal/charts/stock/toolbar/DropdownList.js.map +1 -1
  5. package/.internal/charts/stock/toolbar/IndicatorControl.d.ts +1 -1
  6. package/.internal/charts/stock/toolbar/IndicatorControl.d.ts.map +1 -1
  7. package/.internal/charts/stock/toolbar/IndicatorControl.js +7 -1
  8. package/.internal/charts/stock/toolbar/IndicatorControl.js.map +1 -1
  9. package/.internal/charts/stock/toolbar/StockToolbarCSS.d.ts.map +1 -1
  10. package/.internal/charts/stock/toolbar/StockToolbarCSS.js +5 -0
  11. package/.internal/charts/stock/toolbar/StockToolbarCSS.js.map +1 -1
  12. package/.internal/charts/xy/axes/Axis.d.ts.map +1 -1
  13. package/.internal/charts/xy/axes/Axis.js +1 -0
  14. package/.internal/charts/xy/axes/Axis.js.map +1 -1
  15. package/.internal/charts/xy/series/XYSeries.d.ts.map +1 -1
  16. package/.internal/charts/xy/series/XYSeries.js +2 -0
  17. package/.internal/charts/xy/series/XYSeries.js.map +1 -1
  18. package/.internal/core/render/Container.d.ts.map +1 -1
  19. package/.internal/core/render/Container.js +12 -0
  20. package/.internal/core/render/Container.js.map +1 -1
  21. package/.internal/core/render/HorizontalLayout.d.ts.map +1 -1
  22. package/.internal/core/render/HorizontalLayout.js +10 -2
  23. package/.internal/core/render/HorizontalLayout.js.map +1 -1
  24. package/.internal/core/render/VerticalLayout.d.ts.map +1 -1
  25. package/.internal/core/render/VerticalLayout.js +10 -2
  26. package/.internal/core/render/VerticalLayout.js.map +1 -1
  27. package/.internal/core/util/Color.d.ts +1 -1
  28. package/.internal/core/util/Color.js +1 -1
  29. package/.internal/core/util/Color.js.map +1 -1
  30. package/CHANGELOG.md +13 -0
  31. package/examples/javascript/flow-chord/package.json +1 -1
  32. package/examples/javascript/flow-chord-directed/package.json +1 -1
  33. package/examples/javascript/flow-chord-non-ribbon/package.json +1 -1
  34. package/examples/javascript/flow-sankey/package.json +1 -1
  35. package/examples/javascript/gauge/package.json +1 -1
  36. package/examples/javascript/gauge-bands/package.json +1 -1
  37. package/examples/javascript/hierarchy-force-directed/package.json +1 -1
  38. package/examples/javascript/hierarchy-pack/package.json +1 -1
  39. package/examples/javascript/hierarchy-partition/package.json +1 -1
  40. package/examples/javascript/hierarchy-sunburst/package.json +1 -1
  41. package/examples/javascript/hierarchy-tree/package.json +1 -1
  42. package/examples/javascript/hierarchy-treemap/package.json +1 -1
  43. package/examples/javascript/jest/README.md +6 -0
  44. package/examples/javascript/jest/babel.config.js +6 -0
  45. package/examples/javascript/jest/index.css +11 -0
  46. package/examples/javascript/jest/index.html +12 -0
  47. package/examples/javascript/jest/index.js +3 -0
  48. package/examples/javascript/jest/package.json +30 -0
  49. package/examples/javascript/jest/src/chart.js +118 -0
  50. package/examples/javascript/jest/src/chart.test.js +16 -0
  51. package/examples/javascript/jest/webpack.config.js +38 -0
  52. package/examples/javascript/json/package.json +1 -1
  53. package/examples/javascript/map-animating-along-lines/package.json +1 -1
  54. package/examples/javascript/map-day-and-night/package.json +1 -1
  55. package/examples/javascript/map-globe-rotate-to-country/package.json +1 -1
  56. package/examples/javascript/map-globe-with-projected-circles/package.json +1 -1
  57. package/examples/javascript/map-with-bubbles/package.json +1 -1
  58. package/examples/javascript/map-zoom-to-country/package.json +1 -1
  59. package/examples/javascript/misc-40-charts/package.json +1 -1
  60. package/examples/javascript/misc-microchart-grid/package.json +1 -1
  61. package/examples/javascript/pie-chart/package.json +1 -1
  62. package/examples/javascript/pie-donut-chart/package.json +1 -1
  63. package/examples/javascript/pie-variable-radius/package.json +1 -1
  64. package/examples/javascript/radar-column-iwatch-style/package.json +1 -1
  65. package/examples/javascript/radar-heat-map/package.json +1 -1
  66. package/examples/javascript/radar-line/package.json +1 -1
  67. package/examples/javascript/radar-time-line/package.json +1 -1
  68. package/examples/javascript/sliced-funnel/package.json +1 -1
  69. package/examples/javascript/sliced-pictorial-stacked/package.json +1 -1
  70. package/examples/javascript/sliced-pyramid/package.json +1 -1
  71. package/examples/javascript/stock-chart/package.json +1 -1
  72. package/examples/javascript/stock-chart-comparing-stocks/index.js +24 -4
  73. package/examples/javascript/stock-chart-comparing-stocks/package.json +1 -1
  74. package/examples/javascript/stock-chart-data-granularity/package.json +1 -1
  75. package/examples/javascript/stock-chart-data-grouping/package.json +1 -1
  76. package/examples/javascript/stock-chart-intraday/package.json +1 -1
  77. package/examples/javascript/stock-chart-live/package.json +1 -1
  78. package/examples/javascript/stock-chart-volume-separate-panel/package.json +1 -1
  79. package/examples/javascript/venn-diagram/package.json +1 -1
  80. package/examples/javascript/wordcloud-with-data/package.json +1 -1
  81. package/examples/javascript/wordcloud-with-text/package.json +1 -1
  82. package/examples/javascript/xy-100-percent-stacked-column/package.json +1 -1
  83. package/examples/javascript/xy-animated-bullet-at-the-end-of-the-series/package.json +1 -1
  84. package/examples/javascript/xy-bubble/package.json +1 -1
  85. package/examples/javascript/xy-candlestick/package.json +1 -1
  86. package/examples/javascript/xy-clustered-column/package.json +1 -1
  87. package/examples/javascript/xy-column/package.json +1 -1
  88. package/examples/javascript/xy-comparing-series-google-analytics-style/package.json +1 -1
  89. package/examples/javascript/xy-data-grouping/package.json +1 -1
  90. package/examples/javascript/xy-draggable-range/package.json +1 -1
  91. package/examples/javascript/xy-drawing-series-with-mouse-or-touch/package.json +1 -1
  92. package/examples/javascript/xy-dumbbell plot/package.json +1 -1
  93. package/examples/javascript/xy-evenly-spaced-date-axis/package.json +1 -1
  94. package/examples/javascript/xy-line/package.json +1 -1
  95. package/examples/javascript/xy-line-highlight-on-legend-hover/package.json +1 -1
  96. package/examples/javascript/xy-live-data/package.json +1 -1
  97. package/examples/javascript/xy-multiple-synced-value-axes/package.json +1 -1
  98. package/examples/javascript/xy-ohlc/package.json +1 -1
  99. package/examples/javascript/xy-real-time-data-sorting/package.json +1 -1
  100. package/examples/javascript/xy-smoothed-line/package.json +1 -1
  101. package/examples/javascript/xy-stacked-and-clustered-column/package.json +1 -1
  102. package/examples/javascript/xy-stacked-column/package.json +1 -1
  103. package/examples/javascript/xy-stacked-step/package.json +1 -1
  104. package/examples/javascript/xy-stock/package.json +1 -1
  105. package/examples/javascript/xy-stock-comparing/package.json +1 -1
  106. package/examples/typescript/flow-chord/package.json +1 -1
  107. package/examples/typescript/flow-chord-directed/package.json +1 -1
  108. package/examples/typescript/flow-chord-non-ribbon/package.json +1 -1
  109. package/examples/typescript/flow-sankey/package.json +1 -1
  110. package/examples/typescript/gauge/package.json +1 -1
  111. package/examples/typescript/gauge-bands/package.json +1 -1
  112. package/examples/typescript/hierarchy-force-directed/package.json +1 -1
  113. package/examples/typescript/hierarchy-pack/package.json +1 -1
  114. package/examples/typescript/hierarchy-partition/package.json +1 -1
  115. package/examples/typescript/hierarchy-sunburst/package.json +1 -1
  116. package/examples/typescript/hierarchy-tree/package.json +1 -1
  117. package/examples/typescript/hierarchy-treemap/package.json +1 -1
  118. package/examples/typescript/jest/README.md +6 -0
  119. package/examples/typescript/jest/babel.config.js +6 -0
  120. package/examples/typescript/jest/index.css +11 -0
  121. package/examples/typescript/jest/index.html +12 -0
  122. package/examples/typescript/jest/index.ts +3 -0
  123. package/examples/typescript/jest/package.json +32 -0
  124. package/examples/typescript/jest/src/chart.test.js +16 -0
  125. package/examples/typescript/jest/src/chart.ts +118 -0
  126. package/examples/typescript/jest/tsconfig.json +12 -0
  127. package/examples/typescript/jest/webpack.config.js +45 -0
  128. package/examples/typescript/json/package.json +1 -1
  129. package/examples/typescript/map-animating-along-lines/package.json +1 -1
  130. package/examples/typescript/map-day-and-night/package.json +1 -1
  131. package/examples/typescript/map-globe-rotate-to-country/package.json +1 -1
  132. package/examples/typescript/map-globe-with-projected-circles/package.json +1 -1
  133. package/examples/typescript/map-with-bubbles/package.json +1 -1
  134. package/examples/typescript/map-zoom-to-country/package.json +1 -1
  135. package/examples/typescript/misc-40-charts/package.json +1 -1
  136. package/examples/typescript/misc-microchart-grid/package.json +1 -1
  137. package/examples/typescript/pie-chart/package.json +1 -1
  138. package/examples/typescript/pie-donut-chart/package.json +1 -1
  139. package/examples/typescript/pie-variable-radius/package.json +1 -1
  140. package/examples/typescript/radar-column-iwatch-style/package.json +1 -1
  141. package/examples/typescript/radar-heat-map/package.json +1 -1
  142. package/examples/typescript/radar-line/package.json +1 -1
  143. package/examples/typescript/radar-time-line/package.json +1 -1
  144. package/examples/typescript/sliced-funnel/package.json +1 -1
  145. package/examples/typescript/sliced-pictorial-stacked/package.json +1 -1
  146. package/examples/typescript/sliced-pyramid/package.json +1 -1
  147. package/examples/typescript/stock-chart/package.json +1 -1
  148. package/examples/typescript/stock-chart-comparing-stocks/index.ts +24 -4
  149. package/examples/typescript/stock-chart-comparing-stocks/package.json +1 -1
  150. package/examples/typescript/stock-chart-data-granularity/package.json +1 -1
  151. package/examples/typescript/stock-chart-data-grouping/package.json +1 -1
  152. package/examples/typescript/stock-chart-intraday/package.json +1 -1
  153. package/examples/typescript/stock-chart-live/package.json +1 -1
  154. package/examples/typescript/stock-chart-volume-separate-panel/package.json +1 -1
  155. package/examples/typescript/venn-diagram/package.json +1 -1
  156. package/examples/typescript/wordcloud-with-data/package.json +1 -1
  157. package/examples/typescript/wordcloud-with-text/package.json +1 -1
  158. package/examples/typescript/xy-100-percent-stacked-column/package.json +1 -1
  159. package/examples/typescript/xy-animated-bullet-at-the-end-of-the-series/package.json +1 -1
  160. package/examples/typescript/xy-bubble/package.json +1 -1
  161. package/examples/typescript/xy-candlestick/package.json +1 -1
  162. package/examples/typescript/xy-clustered-column/package.json +1 -1
  163. package/examples/typescript/xy-column/package.json +1 -1
  164. package/examples/typescript/xy-comparing-series-google-analytics-style/package.json +1 -1
  165. package/examples/typescript/xy-data-grouping/package.json +1 -1
  166. package/examples/typescript/xy-draggable-range/package.json +1 -1
  167. package/examples/typescript/xy-drawing-series-with-mouse-or-touch/package.json +1 -1
  168. package/examples/typescript/xy-dumbbell plot/package.json +1 -1
  169. package/examples/typescript/xy-evenly-spaced-date-axis/package.json +1 -1
  170. package/examples/typescript/xy-line/package.json +1 -1
  171. package/examples/typescript/xy-line-highlight-on-legend-hover/package.json +1 -1
  172. package/examples/typescript/xy-live-data/package.json +1 -1
  173. package/examples/typescript/xy-multiple-synced-value-axes/package.json +1 -1
  174. package/examples/typescript/xy-ohlc/package.json +1 -1
  175. package/examples/typescript/xy-real-time-data-sorting/package.json +1 -1
  176. package/examples/typescript/xy-smoothed-line/package.json +1 -1
  177. package/examples/typescript/xy-stacked-and-clustered-column/package.json +1 -1
  178. package/examples/typescript/xy-stacked-column/package.json +1 -1
  179. package/examples/typescript/xy-stacked-step/package.json +1 -1
  180. package/examples/typescript/xy-stock/package.json +1 -1
  181. package/examples/typescript/xy-stock-comparing/package.json +1 -1
  182. package/index.d.ts +1 -1
  183. package/index.d.ts.map +1 -1
  184. package/index.js.map +1 -1
  185. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Container.js","sourceRoot":"","sources":["../../../../../src/.internal/core/render/Container.ts"],"names":[],"mappings":";AAOA,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;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAGxD,OAAO,K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B,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;;;;;;eAED,UAAoB,QAAuC;YAC1D,IAAM,OAAO,GAAG,CAAC,QAAQ,KAAK,IAAI,CAAC,SAAS,CAAC,CAAC;YAC9C,iBAAM,YAAY,YAAC,QAAQ,CAAC,CAAC;YAC7B,IAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;YAClC,IAAI,IAAI,IAAI,IAAI,KAAK,EAAE,IAAI,OAAO,EAAE;gBACnC,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,IAAI,EAAE,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;aAC7D;QACF,CAAC;;IAhkBD;;;;eAAkC,WAAW;OAAC;IAC9C;;;;eAA0C,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;OAAC;IAgkB3F,gBAAC;CAAA,AAnlBD,CAA+B,MAAM,GAmlBpC;SAnlBY,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\";\nimport type { DataItem, IComponentDataItem } from \"./Component\";\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\";\nimport { populateString } from \"../util/PopulateString\";\nimport type { IDisposer } from \"../util/Disposer\";\n\nimport * as $array from \"../util/Array\";\nimport * as $type from \"../util/Type\";\nimport * as $utils from \"../util/Utils\";\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 * Setting this to an instance of [[Scrollbar]] will enable vertical\n\t * scrolling of content if it does not fit into the Container.\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\t/**\n\t * If set to `true` its children will be laid out in opposite order.\n\t *\n\t * @since 5.1.1\n\t */\n\treverseChildren?: boolean;\n\n\t/**\n\t * HTML content of the container.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/html-content/} for more info\n\t * @since 5.2.11\n\t */\n\thtml?: string;\n\n}\n\nexport interface IContainerEvents extends ISpriteEvents {\n}\n\nexport interface IContainerPrivate extends ISpritePrivate {\n\n\t/**\n\t * A `<div>` element used for HTML content of the `Container`.\n\t */\n\thtmlElement?: HTMLDivElement;\n\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 _vsbd0: IDisposer | undefined;\n\tprotected _vsbd1: IDisposer | 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\tif (this.getPrivate(\"htmlElement\")) {\n\t\t\tthis._root._removeHTMLContent(this);\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;\t\t\t\t\t\n\t\t\t\t\tcontentMask.dispose();\n\t\t\t\t\tthis._contentMask = undefined;\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(\"html\")){\n\t\t\tconst html = this.get(\"html\");\n\t\t\tif (html && html !== \"\") {\n\t\t\t\tthis._root._setHTMLContent(this, populateString(this, this.get(\"html\", \"\")));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._root._removeHTMLContent(this);\n\t\t\t}\n\t\t\tthis._root._positionHTMLElement(this);\n\t\t}\t\t\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._vsbd0 = this.events.on(\"wheel\", (event) => {\n\t\t\t\t\tconst wheelEvent = event.originalEvent;\n\n\t\t\t\t\t// Ignore wheel event if it is happening on a non-chart element, e.g. if\n\t\t\t\t\t// some page element is over the chart.\n\t\t\t\t\tif ($utils.isLocalEvent(wheelEvent, this)) {\n\t\t\t\t\t\twheelEvent.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\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(this._vsbd0);\n\n\t\t\t\tthis._vsbd1 = 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._disposers.push(this._vsbd1);\n\n\t\t\t\tthis._display.addChild(verticalScrollbar._display);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tconst previous = this._prevSettings.verticalScrollbar\n\t\t\t\tif (previous) {\n\t\t\t\t\tthis._display.removeChild(previous._display);\n\t\t\t\t\tif (this._vsbd0) {\n\t\t\t\t\t\tthis._vsbd0.dispose();\n\t\t\t\t\t}\n\t\t\t\t\tif (this._vsbd1) {\n\t\t\t\t\t\tthis._vsbd1.dispose();\n\t\t\t\t\t}\n\t\t\t\t\tconst childrenDisplay = this._childrenDisplay;\n\t\t\t\t\tchildrenDisplay.y = 0;\n\n\t\t\t\t\tthis.setPrivate(\"height\", undefined);\n\t\t\t\t\tthis.set(\"maskContent\", false);\n\t\t\t\t\tthis.set(\"paddingRight\", undefined);\n\t\t\t\t}\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\tpublic _setDataItem(dataItem?: DataItem<IComponentDataItem>): void {\n\t\tconst updated = (dataItem !== this._dataItem);\n\t\tsuper._setDataItem(dataItem);\n\t\tconst html = this.get(\"html\", \"\");\n\t\tif (html && html !== \"\" && updated) {\n\t\t\tthis._root._setHTMLContent(this, populateString(this, html));\n\t\t}\n\t}\n}"]}
1
+ {"version":3,"file":"Container.js","sourceRoot":"","sources":["../../../../../src/.internal/core/render/Container.ts"],"names":[],"mappings":";AAOA,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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mBpC;SAlmBY,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\";\nimport type { DataItem, IComponentDataItem } from \"./Component\";\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\";\nimport { populateString } from \"../util/PopulateString\";\nimport type { IDisposer } from \"../util/Disposer\";\n\nimport * as $array from \"../util/Array\";\nimport * as $type from \"../util/Type\";\nimport * as $utils from \"../util/Utils\";\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 * Setting this to an instance of [[Scrollbar]] will enable vertical\n\t * scrolling of content if it does not fit into the Container.\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\t/**\n\t * If set to `true` its children will be laid out in opposite order.\n\t *\n\t * @since 5.1.1\n\t */\n\treverseChildren?: boolean;\n\n\t/**\n\t * HTML content of the container.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/html-content/} for more info\n\t * @since 5.2.11\n\t */\n\thtml?: string;\n\n}\n\nexport interface IContainerEvents extends ISpriteEvents {\n}\n\nexport interface IContainerPrivate extends ISpritePrivate {\n\n\t/**\n\t * A `<div>` element used for HTML content of the `Container`.\n\t */\n\thtmlElement?: HTMLDivElement;\n\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 _vsbd0: IDisposer | undefined;\n\tprotected _vsbd1: IDisposer | 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\tif (this.getPrivate(\"htmlElement\")) {\n\t\t\tthis._root._removeHTMLContent(this);\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;\t\t\t\t\t\n\t\t\t\t\tcontentMask.dispose();\n\t\t\t\t\tthis._contentMask = undefined;\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 maxWidth = this.get(\"maxWidth\");\n\t\t\tlet maxHeight = this.get(\"maxHeight\");\n\n\t\t\tif (maxHeight) {\n\t\t\t\tif (h > maxHeight) {\n\t\t\t\t\th = maxHeight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (maxWidth) {\n\t\t\t\tif (w > maxWidth) {\n\t\t\t\t\tw = maxWidth;\n\t\t\t\t}\n\t\t\t}\t\t\t\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(\"html\")){\n\t\t\tconst html = this.get(\"html\");\n\t\t\tif (html && html !== \"\") {\n\t\t\t\tthis._root._setHTMLContent(this, populateString(this, this.get(\"html\", \"\")));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._root._removeHTMLContent(this);\n\t\t\t}\n\t\t\tthis._root._positionHTMLElement(this);\n\t\t}\t\t\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._vsbd0 = this.events.on(\"wheel\", (event) => {\n\t\t\t\t\tconst wheelEvent = event.originalEvent;\n\n\t\t\t\t\t// Ignore wheel event if it is happening on a non-chart element, e.g. if\n\t\t\t\t\t// some page element is over the chart.\n\t\t\t\t\tif ($utils.isLocalEvent(wheelEvent, this)) {\n\t\t\t\t\t\twheelEvent.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\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(this._vsbd0);\n\n\t\t\t\tthis._vsbd1 = 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._disposers.push(this._vsbd1);\n\n\t\t\t\tthis._display.addChild(verticalScrollbar._display);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tconst previous = this._prevSettings.verticalScrollbar\n\t\t\t\tif (previous) {\n\t\t\t\t\tthis._display.removeChild(previous._display);\n\t\t\t\t\tif (this._vsbd0) {\n\t\t\t\t\t\tthis._vsbd0.dispose();\n\t\t\t\t\t}\n\t\t\t\t\tif (this._vsbd1) {\n\t\t\t\t\t\tthis._vsbd1.dispose();\n\t\t\t\t\t}\n\t\t\t\t\tconst childrenDisplay = this._childrenDisplay;\n\t\t\t\t\tchildrenDisplay.y = 0;\n\n\t\t\t\t\tthis.setPrivate(\"height\", undefined);\n\t\t\t\t\tthis.set(\"maskContent\", false);\n\t\t\t\t\tthis.set(\"paddingRight\", undefined);\n\t\t\t\t}\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\tpublic _setDataItem(dataItem?: DataItem<IComponentDataItem>): void {\n\t\tconst updated = (dataItem !== this._dataItem);\n\t\tsuper._setDataItem(dataItem);\n\t\tconst html = this.get(\"html\", \"\");\n\t\tif (html && html !== \"\" && updated) {\n\t\t\tthis._root._setHTMLContent(this, populateString(this, html));\n\t\t}\n\t}\n}"]}
@@ -1 +1 @@
1
- {"version":3,"file":"HorizontalLayout.d.ts","sourceRoot":"","sources":["../../../../../src/.internal/core/render/HorizontalLayout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAgB,MAAM,UAAU,CAAC;AAGhD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;;;GAIG;AACH,qBAAa,gBAAiB,SAAQ,MAAM;IAE3C,OAAc,SAAS,EAAE,MAAM,CAAsB;IACrD,OAAc,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAA0D;IAEjG;;OAEG;IACI,eAAe,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI;CA+ElD"}
1
+ {"version":3,"file":"HorizontalLayout.d.ts","sourceRoot":"","sources":["../../../../../src/.internal/core/render/HorizontalLayout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAgB,MAAM,UAAU,CAAC;AAGhD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;;;GAIG;AACH,qBAAa,gBAAiB,SAAQ,MAAM;IAE3C,OAAc,SAAS,EAAE,MAAM,CAAsB;IACrD,OAAc,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAA0D;IAEjG;;OAEG;IACI,eAAe,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI;CAyFlD"}
@@ -76,9 +76,17 @@ var HorizontalLayout = /** @class */ (function (_super) {
76
76
  var bounds = child.adjustedLocalBounds();
77
77
  var marginLeft = child.get("marginLeft", 0);
78
78
  var marginRight = child.get("marginRight", 0);
79
- var x = prevX + marginLeft - bounds.left;
79
+ var maxWidth = child.get("maxWidth");
80
+ var left = bounds.left;
81
+ var right = bounds.right;
82
+ if (maxWidth) {
83
+ if (right - left > maxWidth) {
84
+ right = left + maxWidth;
85
+ }
86
+ }
87
+ var x = prevX + marginLeft - left;
80
88
  child.setPrivate("x", x);
81
- prevX = x + bounds.right + marginRight;
89
+ prevX = x + right + marginRight;
82
90
  }
83
91
  else {
84
92
  child.setPrivate("x", undefined);
@@ -1 +1 @@
1
- {"version":3,"file":"HorizontalLayout.js","sourceRoot":"","sources":["../../../../../src/.internal/core/render/HorizontalLayout.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAG1C;;;;GAIG;AACH;IAAsC,oCAAM;IAA5C;;IAuFA,CAAC;IAlFA;;OAEG;;;;;eACH,UAAuB,SAAoB;YAE1C,IAAI,WAAW,GAAG,SAAS,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC;YAElD,IAAI,cAAc,GAAG,SAAS,CAAC,UAAU,EAAE,CAAC;YAE5C,IAAI,YAAY,GAAG,CAAC,CAAC;YAErB,YAAY,CAAC,SAAS,EAAE,UAAC,KAAK;gBAC7B,IAAI,KAAK,CAAC,SAAS,EAAE,EAAE;oBACtB,IAAI,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,UAAU,EAAE;wBACxC,IAAI,UAAU,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;wBACpC,IAAI,UAAU,YAAY,OAAO,EAAE;4BAClC,YA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AAC,CAAC;wBACzB,KAAK,GAAG,CAAC,GAAG,MAAM,CAAC,KAAK,GAAG,WAAW,CAAC;qBACvC;yBACG;wBACH,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;qBACjC;iBACD;YACF,CAAC,CAAC,CAAC;QACJ,CAAC;;IApFD;;;;eAAkC,kBAAkB;OAAC;IACrD;;;;eAA0C,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC;OAAC;IAoFlG,uBAAC;CAAA,AAvFD,CAAsC,MAAM,GAuF3C;SAvFY,gBAAgB","sourcesContent":["import { Layout, eachChildren } from \"./Layout\";\nimport * as $type from \"../util/Type\";\nimport { Percent } from \"../util/Percent\";\nimport type { Container } from \"./Container\";\n\n/**\n * A horizontal children layout for [[Container]].\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/containers/#Layout} for more info\n */\nexport class HorizontalLayout extends Layout {\n\n\tpublic static className: string = \"HorizontalLayout\";\n\tpublic static classNames: Array<string> = Layout.classNames.concat([HorizontalLayout.className]);\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateContainer(container: Container): void {\n\n\t\tlet paddingLeft = container.get(\"paddingLeft\", 0);\n\n\t\tlet availableWidth = container.innerWidth();\n\n\t\tlet totalPercent = 0;\n\n\t\teachChildren(container, (child) => {\n\t\t\tif (child.isVisible()) {\n\t\t\t\tif (child.get(\"position\") == \"relative\") {\n\t\t\t\t\tlet childWidth = child.get(\"width\");\n\t\t\t\t\tif (childWidth instanceof Percent) {\n\t\t\t\t\t\ttotalPercent += childWidth.value;\n\n\t\t\t\t\t\tlet w = availableWidth * childWidth.value;\n\t\t\t\t\t\tlet minWidth = child.get(\"minWidth\", child.getPrivate(\"minWidth\", -Infinity));\n\t\t\t\t\t\tif (minWidth > w) {\n\t\t\t\t\t\t\tavailableWidth -= minWidth;\n\t\t\t\t\t\t\ttotalPercent -= childWidth.value;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlet maxWidth = child.get(\"maxWidth\", child.getPrivate(\"maxWidth\", Infinity));\n\t\t\t\t\t\tif (w > maxWidth) {\n\t\t\t\t\t\t\tavailableWidth -= maxWidth;\n\t\t\t\t\t\t\ttotalPercent -= childWidth.value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (!$type.isNumber(childWidth)) {\n\t\t\t\t\t\t\tchildWidth = child.width();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tavailableWidth -= childWidth + child.get(\"marginLeft\", 0) + child.get(\"marginRight\", 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tif(availableWidth < 0){\n\t\t\tavailableWidth = 0.01;\n\t\t}\n\n\t\t//if (availableWidth > 0) {\n\t\t\teachChildren(container, (child) => {\n\t\t\t\tif (child.isVisible()) {\n\t\t\t\t\tif (child.get(\"position\") == \"relative\") {\n\t\t\t\t\t\tlet childWidth = child.get(\"width\");\n\t\t\t\t\t\tif (childWidth instanceof Percent) {\n\t\t\t\t\t\t\tlet privateWidth = availableWidth * childWidth.value / totalPercent - child.get(\"marginLeft\", 0) - child.get(\"marginRight\", 0);\n\t\t\t\t\t\t\tlet minWidth = child.get(\"minWidth\", child.getPrivate(\"minWidth\", -Infinity));\n\t\t\t\t\t\t\tlet maxWidth = child.get(\"maxWidth\", child.getPrivate(\"maxWidth\", Infinity));\n\t\t\t\t\t\t\tprivateWidth = Math.min(Math.max(minWidth, privateWidth), maxWidth);\n\n\t\t\t\t\t\t\tchild.setPrivate(\"width\", privateWidth);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t//}\n\n\t\tlet prevX = paddingLeft;\n\n\t\teachChildren(container, (child) => {\n\n\t\t\tif (child.get(\"position\") == \"relative\") {\n\t\t\t\tif (child.isVisible()) {\n\t\t\t\t\tlet bounds = child.adjustedLocalBounds();\n\t\t\t\t\tlet marginLeft = child.get(\"marginLeft\", 0);\n\t\t\t\t\tlet marginRight = child.get(\"marginRight\", 0);\n\n\t\t\t\t\tlet x = prevX + marginLeft - bounds.left;\n\t\t\t\t\tchild.setPrivate(\"x\", x);\n\t\t\t\t\tprevX = x + bounds.right + marginRight;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tchild.setPrivate(\"x\", undefined);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n"]}
1
+ {"version":3,"file":"HorizontalLayout.js","sourceRoot":"","sources":["../../../../../src/.internal/core/render/HorizontalLayout.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAG1C;;;;GAIG;AACH;IAAsC,oCAAM;IAA5C;;IAiGA,CAAC;IA5FA;;OAEG;;;;;eACH,UAAuB,SAAoB;YAE1C,IAAI,WAAW,GAAG,SAAS,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC;YAElD,IAAI,cAAc,GAAG,SAAS,CAAC,UAAU,EAAE,CAAC;YAE5C,IAAI,YAAY,GAAG,CAAC,CAAC;YAErB,YAAY,CAAC,SAAS,EAAE,UAAC,KAAK;gBAC7B,IAAI,KAAK,CAAC,SAAS,EAAE,EAAE;oBACtB,IAAI,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,UAAU,EAAE;wBACxC,IAAI,UAAU,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;wBACpC,IAAI,UAAU,YAAY,OAAO,EAAE;4BAClC,YAAY,IAAI,UAAU,CAAC,KAAK,CAAC;4BAEjC,IAAI,CAAC,GAAG,cAAc,GAAG,UAAU,CAAC,KAAK,CAAC;4BAC1C,IAAI,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,UA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QAAQ,CAAA;6BACvB;yBACD;wBAED,IAAI,CAAC,GAAG,KAAK,GAAG,UAAU,GAAG,IAAI,CAAC;wBAClC,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;wBACzB,KAAK,GAAG,CAAC,GAAG,KAAK,GAAG,WAAW,CAAC;qBAChC;yBACI;wBACJ,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;qBACjC;iBACD;YACF,CAAC,CAAC,CAAC;QACJ,CAAC;;IA9FD;;;;eAAkC,kBAAkB;OAAC;IACrD;;;;eAA0C,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC;OAAC;IA8FlG,uBAAC;CAAA,AAjGD,CAAsC,MAAM,GAiG3C;SAjGY,gBAAgB","sourcesContent":["import { Layout, eachChildren } from \"./Layout\";\nimport * as $type from \"../util/Type\";\nimport { Percent } from \"../util/Percent\";\nimport type { Container } from \"./Container\";\n\n/**\n * A horizontal children layout for [[Container]].\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/containers/#Layout} for more info\n */\nexport class HorizontalLayout extends Layout {\n\n\tpublic static className: string = \"HorizontalLayout\";\n\tpublic static classNames: Array<string> = Layout.classNames.concat([HorizontalLayout.className]);\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateContainer(container: Container): void {\n\n\t\tlet paddingLeft = container.get(\"paddingLeft\", 0);\n\n\t\tlet availableWidth = container.innerWidth();\n\n\t\tlet totalPercent = 0;\n\n\t\teachChildren(container, (child) => {\n\t\t\tif (child.isVisible()) {\n\t\t\t\tif (child.get(\"position\") == \"relative\") {\n\t\t\t\t\tlet childWidth = child.get(\"width\");\n\t\t\t\t\tif (childWidth instanceof Percent) {\n\t\t\t\t\t\ttotalPercent += childWidth.value;\n\n\t\t\t\t\t\tlet w = availableWidth * childWidth.value;\n\t\t\t\t\t\tlet minWidth = child.get(\"minWidth\", child.getPrivate(\"minWidth\", -Infinity));\n\t\t\t\t\t\tif (minWidth > w) {\n\t\t\t\t\t\t\tavailableWidth -= minWidth;\n\t\t\t\t\t\t\ttotalPercent -= childWidth.value;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlet maxWidth = child.get(\"maxWidth\", child.getPrivate(\"maxWidth\", Infinity));\n\t\t\t\t\t\tif (w > maxWidth) {\n\t\t\t\t\t\t\tavailableWidth -= maxWidth;\n\t\t\t\t\t\t\ttotalPercent -= childWidth.value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (!$type.isNumber(childWidth)) {\n\t\t\t\t\t\t\tchildWidth = child.width();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tavailableWidth -= childWidth + child.get(\"marginLeft\", 0) + child.get(\"marginRight\", 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tif (availableWidth < 0) {\n\t\t\tavailableWidth = 0.01;\n\t\t}\n\n\t\t//if (availableWidth > 0) {\n\t\teachChildren(container, (child) => {\n\t\t\tif (child.isVisible()) {\n\t\t\t\tif (child.get(\"position\") == \"relative\") {\n\t\t\t\t\tlet childWidth = child.get(\"width\");\n\t\t\t\t\tif (childWidth instanceof Percent) {\n\t\t\t\t\t\tlet privateWidth = availableWidth * childWidth.value / totalPercent - child.get(\"marginLeft\", 0) - child.get(\"marginRight\", 0);\n\t\t\t\t\t\tlet minWidth = child.get(\"minWidth\", child.getPrivate(\"minWidth\", -Infinity));\n\t\t\t\t\t\tlet maxWidth = child.get(\"maxWidth\", child.getPrivate(\"maxWidth\", Infinity));\n\t\t\t\t\t\tprivateWidth = Math.min(Math.max(minWidth, privateWidth), maxWidth);\n\n\t\t\t\t\t\tchild.setPrivate(\"width\", privateWidth);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t//}\n\n\t\tlet prevX = paddingLeft;\n\n\t\teachChildren(container, (child) => {\n\n\t\t\tif (child.get(\"position\") == \"relative\") {\n\t\t\t\tif (child.isVisible()) {\n\t\t\t\t\tlet bounds = child.adjustedLocalBounds();\n\t\t\t\t\tlet marginLeft = child.get(\"marginLeft\", 0);\n\t\t\t\t\tlet marginRight = child.get(\"marginRight\", 0);\n\n\t\t\t\t\tlet maxWidth = child.get(\"maxWidth\");\n\n\t\t\t\t\tlet left = bounds.left;\n\t\t\t\t\tlet right = bounds.right;\n\t\t\t\t\tif (maxWidth) {\n\t\t\t\t\t\tif (right - left > maxWidth) {\n\t\t\t\t\t\t\tright = left + maxWidth\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tlet x = prevX + marginLeft - left;\n\t\t\t\t\tchild.setPrivate(\"x\", x);\n\t\t\t\t\tprevX = x + right + marginRight;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tchild.setPrivate(\"x\", undefined);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"VerticalLayout.d.ts","sourceRoot":"","sources":["../../../../../src/.internal/core/render/VerticalLayout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAgB,MAAM,UAAU,CAAC;AAGhD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAG7C;;;;GAIG;AACH,qBAAa,cAAe,SAAQ,MAAM;IAEzC,OAAc,SAAS,EAAE,MAAM,CAAoB;IACnD,OAAc,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAwD;IAE/F;;OAEG;IACI,eAAe,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI;CA8ElD"}
1
+ {"version":3,"file":"VerticalLayout.d.ts","sourceRoot":"","sources":["../../../../../src/.internal/core/render/VerticalLayout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAgB,MAAM,UAAU,CAAC;AAGhD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAG7C;;;;GAIG;AACH,qBAAa,cAAe,SAAQ,MAAM;IAEzC,OAAc,SAAS,EAAE,MAAM,CAAoB;IACnD,OAAc,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAwD;IAE/F;;OAEG;IACI,eAAe,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI;CAyFlD"}
@@ -75,10 +75,18 @@ var VerticalLayout = /** @class */ (function (_super) {
75
75
  if (child.isVisible()) {
76
76
  var bounds = child.adjustedLocalBounds();
77
77
  var marginTop = child.get("marginTop", 0);
78
+ var top_1 = bounds.top;
79
+ var bottom = bounds.bottom;
80
+ var maxHeight = child.get("maxHeight");
81
+ if (maxHeight) {
82
+ if (bottom - top_1 > maxHeight) {
83
+ bottom = top_1 + maxHeight;
84
+ }
85
+ }
78
86
  var marginBottom = child.get("marginBottom", 0);
79
- var y = prevY + marginTop - bounds.top;
87
+ var y = prevY + marginTop - top_1;
80
88
  child.setPrivate("y", y);
81
- prevY = y + bounds.bottom + marginBottom;
89
+ prevY = y + bottom + marginBottom;
82
90
  }
83
91
  else {
84
92
  child.setPrivate("y", undefined);
@@ -1 +1 @@
1
- {"version":3,"file":"VerticalLayout.js","sourceRoot":"","sources":["../../../../../src/.internal/core/render/VerticalLayout.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAI1C;;;;GAIG;AACH;IAAoC,kCAAM;IAA1C;;IAsFA,CAAC;IAjFA;;OAEG;;;;;eACH,UAAuB,SAAoB;YAC1C,IAAI,UAAU,GAAG,SAAS,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;YAEhD,IAAI,eAAe,GAAG,SAAS,CAAC,WAAW,EAAE,CAAC;YAC9C,IAAI,YAAY,GAAG,CAAC,CAAC;YAErB,YAAY,CAAC,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C,WAAW,EAAE,CAAC,CAAC,CAAC;wBAC1C,IAAI,YAAY,GAAG,KAAK,CAAC,GAAG,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;wBAChD,IAAI,CAAC,GAAG,KAAK,GAAG,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC;wBACvC,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;wBACzB,KAAK,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,GAAG,YAAY,CAAC;qBACzC;yBACI;wBACJ,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;qBACjC;iBACD;YACF,CAAC,CAAC,CAAC;QACJ,CAAC;;IAnFD;;;;eAAkC,gBAAgB;OAAC;IACnD;;;;eAA0C,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;OAAC;IAmFhG,qBAAC;CAAA,AAtFD,CAAoC,MAAM,GAsFzC;SAtFY,cAAc","sourcesContent":["import { Layout, eachChildren } from \"./Layout\";\nimport * as $type from \"../util/Type\";\nimport { Percent } from \"../util/Percent\";\nimport type { Container } from \"./Container\";\n\n\n/**\n * A vertical children layout for [[Container]].\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/containers/#Layout} for more info\n */\nexport class VerticalLayout extends Layout {\n\n\tpublic static className: string = \"VerticalLayout\";\n\tpublic static classNames: Array<string> = Layout.classNames.concat([VerticalLayout.className]);\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateContainer(container: Container): void {\n\t\tlet paddingTop = container.get(\"paddingTop\", 0);\n\n\t\tlet availableHeight = container.innerHeight();\n\t\tlet totalPercent = 0;\n\n\t\teachChildren(container, (child) => {\n\t\t\tif (child.isVisible()) {\n\t\t\t\tif (child.get(\"position\") == \"relative\") {\n\t\t\t\t\tlet childHeight = child.get(\"height\");\n\t\t\t\t\tif (childHeight instanceof Percent) {\n\t\t\t\t\t\ttotalPercent += childHeight.value;\n\n\t\t\t\t\t\tlet h = availableHeight * childHeight.value;\n\t\t\t\t\t\tlet minHeight = child.get(\"minHeight\", child.getPrivate(\"minHeight\", -Infinity));\n\t\t\t\t\t\tif (minHeight > h) {\n\t\t\t\t\t\t\tavailableHeight -= minHeight;\n\t\t\t\t\t\t\ttotalPercent -= childHeight.value;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlet maxHeight = child.get(\"maxHeight\", child.getPrivate(\"maxHeight\", Infinity));\n\t\t\t\t\t\tif (h > maxHeight) {\n\t\t\t\t\t\t\tavailableHeight -= maxHeight;\n\t\t\t\t\t\t\ttotalPercent -= childHeight.value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (!$type.isNumber(childHeight)) {\n\t\t\t\t\t\t\tchildHeight = child.height();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tavailableHeight -= childHeight + child.get(\"marginTop\", 0) + child.get(\"marginBottom\", 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\n\t\tif(availableHeight < 0){\n\t\t\tavailableHeight = 0.01;\n\t\t}\n\n\t\t//if (availableHeight > 0) {\n\t\t\teachChildren(container, (child) => {\n\t\t\t\tif (child.isVisible()) {\n\t\t\t\t\tif (child.get(\"position\") == \"relative\") {\n\t\t\t\t\t\tlet childHeight = child.get(\"height\");\n\n\t\t\t\t\t\tif (childHeight instanceof Percent) {\n\t\t\t\t\t\t\tlet privateHeight = availableHeight * childHeight.value / totalPercent - child.get(\"marginTop\", 0) - child.get(\"marginBottom\", 0);\n\n\t\t\t\t\t\t\tlet minHeight = child.get(\"minHeight\", child.getPrivate(\"minHeight\", -Infinity));\n\t\t\t\t\t\t\tlet maxHeight = child.get(\"maxHeight\", child.getPrivate(\"maxHeight\", Infinity));\n\t\t\t\t\t\t\tprivateHeight = Math.min(Math.max(minHeight, privateHeight), maxHeight);\n\n\t\t\t\t\t\t\tchild.setPrivate(\"height\", privateHeight);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t//}\n\n\t\tlet prevY = paddingTop;\n\n\t\teachChildren(container, (child) => {\n\t\t\tif (child.get(\"position\") == \"relative\") {\n\t\t\t\tif (child.isVisible()) {\n\t\t\t\t\tlet bounds = child.adjustedLocalBounds();\n\t\t\t\t\tlet marginTop = child.get(\"marginTop\", 0);\n\t\t\t\t\tlet marginBottom = child.get(\"marginBottom\", 0);\n\t\t\t\t\tlet y = prevY + marginTop - bounds.top;\n\t\t\t\t\tchild.setPrivate(\"y\", y);\n\t\t\t\t\tprevY = y + bounds.bottom + marginBottom;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tchild.setPrivate(\"y\", undefined);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n"]}
1
+ {"version":3,"file":"VerticalLayout.js","sourceRoot":"","sources":["../../../../../src/.internal/core/render/VerticalLayout.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAI1C;;;;GAIG;AACH;IAAoC,kCAAM;IAA1C;;IAiGA,CAAC;IA5FA;;OAEG;;;;;eACH,UAAuB,SAAoB;YAC1C,IAAI,UAAU,GAAG,SAAS,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;YAEhD,IAAI,eAAe,GAAG,SAAS,CAAC,WAAW,EAAE,CAAC;YAC9C,IAAI,YAAY,GAAG,CAAC,CAAC;YAErB,YAAY,CAAC,SAAS,EAAE,UAAC,KAAK;gBAC7B,IAAI,KAAK,CAAC,SAAS,EAAE,EAAE;oBACtB,IAAI,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,UAAU,EAAE;wBACxC,IAAI,WAAW,GAAG,KAAK,CAAC,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G,CAAC,WAAW,CAAC,CAAC;wBACvC,IAAI,SAAS,EAAE;4BACd,IAAI,MAAM,GAAG,KAAG,GAAG,SAAS,EAAE;gCAC7B,MAAM,GAAG,KAAG,GAAG,SAAS,CAAC;6BACzB;yBACD;wBAED,IAAI,YAAY,GAAG,KAAK,CAAC,GAAG,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;wBAChD,IAAI,CAAC,GAAG,KAAK,GAAG,SAAS,GAAG,KAAG,CAAC;wBAChC,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;wBACzB,KAAK,GAAG,CAAC,GAAG,MAAM,GAAG,YAAY,CAAC;qBAClC;yBACI;wBACJ,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;qBACjC;iBACD;YACF,CAAC,CAAC,CAAC;QACJ,CAAC;;IA9FD;;;;eAAkC,gBAAgB;OAAC;IACnD;;;;eAA0C,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;OAAC;IA8FhG,qBAAC;CAAA,AAjGD,CAAoC,MAAM,GAiGzC;SAjGY,cAAc","sourcesContent":["import { Layout, eachChildren } from \"./Layout\";\nimport * as $type from \"../util/Type\";\nimport { Percent } from \"../util/Percent\";\nimport type { Container } from \"./Container\";\n\n\n/**\n * A vertical children layout for [[Container]].\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/containers/#Layout} for more info\n */\nexport class VerticalLayout extends Layout {\n\n\tpublic static className: string = \"VerticalLayout\";\n\tpublic static classNames: Array<string> = Layout.classNames.concat([VerticalLayout.className]);\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateContainer(container: Container): void {\n\t\tlet paddingTop = container.get(\"paddingTop\", 0);\n\n\t\tlet availableHeight = container.innerHeight();\n\t\tlet totalPercent = 0;\n\n\t\teachChildren(container, (child) => {\n\t\t\tif (child.isVisible()) {\n\t\t\t\tif (child.get(\"position\") == \"relative\") {\n\t\t\t\t\tlet childHeight = child.get(\"height\");\n\t\t\t\t\tif (childHeight instanceof Percent) {\n\t\t\t\t\t\ttotalPercent += childHeight.value;\n\n\t\t\t\t\t\tlet h = availableHeight * childHeight.value;\n\t\t\t\t\t\tlet minHeight = child.get(\"minHeight\", child.getPrivate(\"minHeight\", -Infinity));\n\t\t\t\t\t\tif (minHeight > h) {\n\t\t\t\t\t\t\tavailableHeight -= minHeight;\n\t\t\t\t\t\t\ttotalPercent -= childHeight.value;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlet maxHeight = child.get(\"maxHeight\", child.getPrivate(\"maxHeight\", Infinity));\n\t\t\t\t\t\tif (h > maxHeight) {\n\t\t\t\t\t\t\tavailableHeight -= maxHeight;\n\t\t\t\t\t\t\ttotalPercent -= childHeight.value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (!$type.isNumber(childHeight)) {\n\t\t\t\t\t\t\tchildHeight = child.height();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tavailableHeight -= childHeight + child.get(\"marginTop\", 0) + child.get(\"marginBottom\", 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\n\t\tif (availableHeight < 0) {\n\t\t\tavailableHeight = 0.01;\n\t\t}\n\n\t\t//if (availableHeight > 0) {\n\t\teachChildren(container, (child) => {\n\t\t\tif (child.isVisible()) {\n\t\t\t\tif (child.get(\"position\") == \"relative\") {\n\t\t\t\t\tlet childHeight = child.get(\"height\");\n\n\t\t\t\t\tif (childHeight instanceof Percent) {\n\t\t\t\t\t\tlet privateHeight = availableHeight * childHeight.value / totalPercent - child.get(\"marginTop\", 0) - child.get(\"marginBottom\", 0);\n\n\t\t\t\t\t\tlet minHeight = child.get(\"minHeight\", child.getPrivate(\"minHeight\", -Infinity));\n\t\t\t\t\t\tlet maxHeight = child.get(\"maxHeight\", child.getPrivate(\"maxHeight\", Infinity));\n\t\t\t\t\t\tprivateHeight = Math.min(Math.max(minHeight, privateHeight), maxHeight);\n\n\t\t\t\t\t\tchild.setPrivate(\"height\", privateHeight);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t//}\n\n\t\tlet prevY = paddingTop;\n\n\t\teachChildren(container, (child) => {\n\t\t\tif (child.get(\"position\") == \"relative\") {\n\t\t\t\tif (child.isVisible()) {\n\t\t\t\t\tlet bounds = child.adjustedLocalBounds();\n\t\t\t\t\tlet marginTop = child.get(\"marginTop\", 0);\n\n\t\t\t\t\tlet top = bounds.top;\n\t\t\t\t\tlet bottom = bounds.bottom;\n\n\t\t\t\t\tlet maxHeight = child.get(\"maxHeight\");\n\t\t\t\t\tif (maxHeight) {\n\t\t\t\t\t\tif (bottom - top > maxHeight) {\n\t\t\t\t\t\t\tbottom = top + maxHeight;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tlet marginBottom = child.get(\"marginBottom\", 0);\n\t\t\t\t\tlet y = prevY + marginTop - top;\n\t\t\t\t\tchild.setPrivate(\"y\", y);\n\t\t\t\t\tprevY = y + bottom + marginBottom;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tchild.setPrivate(\"y\", undefined);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n"]}
@@ -182,7 +182,7 @@ export declare class Color {
182
182
  /**
183
183
  * Returns a new [[Color]] saturated by `percent` value.
184
184
  *
185
- * Use negative value to desaturate the color.
185
+ * Value range is between `0` (fully desaturated), to `1` (full color).
186
186
  *
187
187
  * @param color Source color
188
188
  * @param percent Percent
@@ -387,7 +387,7 @@ var Color = /** @class */ (function () {
387
387
  /**
388
388
  * Returns a new [[Color]] saturated by `percent` value.
389
389
  *
390
- * Use negative value to desaturate the color.
390
+ * Value range is between `0` (fully desaturated), to `1` (full color).
391
391
  *
392
392
  * @param color Source color
393
393
  * @param percent Percent
@@ -1 +1 @@
1
- {"version":3,"file":"Color.js","sourceRoot":"","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QAC9C,CAAC;;IACF,YAAC;AAAD,CAAC,AA/QD,IA+QC","sourcesContent":["import { range, Time } from \"./Animation\";\nimport * as $utils from \"./Utils\";\nimport * as $type from \"./Type\";\n\n/**\n * @ignore\n */\nfunction string2hex(string: string): number {\n\t//string = cssColorNames[string.toLowerCase()] || string;\n\n\tif (string[0] === \"#\") {\n\t\tstring = string.substr(1);\n\t}\n\tif (string.length == 3) {\n\t\tstring = string[0].repeat(2) + string[1].repeat(2) + string[2].repeat(2);\n\t}\n\n\treturn parseInt(string, 16);\n}\n\n/**\n * @ignore\n */\nexport function rgba2hex(color: string): number {\n\tcolor = color.replace(/[ ]/g, \"\");\n\n\t// Init\n\tlet matches: string[] | null = color.match(/^rgb\\(([0-9]*),([0-9]*),([0-9]*)\\)/i);\n\n\t// Try rgb() format\n\tif (matches) {\n\t\tmatches.push(\"1\");\n\n\t} else {\n\t\tmatches = color.match(/^rgba\\(([0-9]*),([0-9]*),([0-9]*),([.0-9]*)\\)/i);\n\n\t\tif (!matches) {\n\t\t\treturn 0x000000;\n\t\t}\n\t}\n\n\tlet hex = \"\";\n\tfor (let i = 1; i <= 3; i++) {\n\t\tlet val = parseInt(matches[i]).toString(16);\n\t\tif (val.length == 1) {\n\t\t\tval = \"0\" + val;\n\t\t}\n\t\thex += val;\n\t}\n\n\treturn string2hex(hex);\n\n}\n\n/**\n * Returns a new [[Color]] object base on input.\n *\n * Accepts parameters in CSS hex or rgb/rtba strings, or hex numbers.\n *\n * * `\"#f00\"`\n * * `\"#ff0000\"`\n * * `\"rgb(255, 0, 0)\"`\n * * `\"rgba(255, 0, 0, 1)\"`\n * * `0xff0000`\n * \n * @param input Input color\n * @return Color\n */\nexport function color(input: number | string): Color {\n\treturn Color.fromAny(input);\n}\n\n/**\n * Wherever color needs to be specified in amCharts 5, `Color` object needs to\n * be used.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/} for more info\n * @important\n */\nexport class Color {\n\tprotected _hex: number;\n\n\tprivate constructor(hex: number) {\n\t\tthis._hex = hex | 0;\n\t}\n\n\t/**\n\t * Color numeric value.\n\t */\n\tpublic get hex(): number {\n\t\treturn this._hex;\n\t}\n\n\t/**\n\t * Value of color's R channel.\n\t * @return R value\n\t */\n\tpublic get r(): number {\n\t\treturn this._hex >>> 16;\n\t}\n\n\t/**\n\t * Value of color's G channel.\n\t * @return G value\n\t */\n\tpublic get g(): number {\n\t\treturn (this._hex >> 8) & 0xFF;\n\t}\n\n\t/**\n\t * Value of color's B channel.\n\t * @return B value\n\t */\n\tpublic get b(): number {\n\t\treturn this._hex & 0xFF;\n\t}\n\n\t/**\n\t * Returns color CSS representation in form of `rgba(r, g, b, a)` string.\n\t * \n\t * @param alpha Opacity\n\t * @return CSS string\n\t */\n\tpublic toCSS(alpha: number = 1): string {\n\t\treturn \"rgba(\" + this.r + \", \" + this.g + \", \" + this.b + \", \" + alpha + \")\";\n\t}\n\n\t/**\n\t * Returns color CSS representation in form of `#rgb` string.\n\t * \n\t * @return CSS string\n\t */\n\tpublic toCSSHex(): string {\n\t\treturn \"#\" + $utils.padString(this.r.toString(16), 2) + $utils.padString(this.g.toString(16), 2) + $utils.padString(this.b.toString(16), 2);\n\t}\n\n\t/**\n\t * Returns color's HSL info.\n\t * @param alpha Opacity\n\t * @return HSL info\n\t */\n\tpublic toHSL(alpha: number = 1): $utils.iHSL {\n\t\treturn $utils.rgbToHsl({\n\t\t\tr: this.r,\n\t\t\tg: this.g,\n\t\t\tb: this.b,\n\t\t\ta: alpha\n\t\t})\n\t}\n\n\t/**\n\t * Converts HSL values into a new [[Color]] object.\n\t *\n\t * @param h H value\n\t * @param s S value\n\t * @param l L value\n\t * @return Color object\n\t */\n\tpublic static fromHSL(h: number, s: number, l: number): Color {\n\t\tconst rgb = $utils.hslToRgb({\n\t\t\th: h,\n\t\t\ts: s,\n\t\t\tl: l\n\t\t});\n\t\treturn this.fromRGB(rgb.r, rgb.g, rgb.b);\n\t}\n\n\tpublic toString(): string {\n\t\treturn this.toCSSHex();\n\t}\n\n\t/**\n\t * Converts hex number into a new [[Color]] object.\n\t *\n\t * ```TypeScript\n\t * Color.fromHex(0xff0000) // red\n\t * ```\n\t * ```JavaScript\n\t * Color.fromHex(0xff0000) // red\n\t * ```\n\t *\n\t * @param hex Hex color\n\t * @return Color\n\t */\n\tpublic static fromHex(hex: number): Color {\n\t\treturn new Color(hex);\n\t}\n\n\t/**\n\t * Converts RGB values to a new [[Color]] object.\n\t *\n\t * @param r R value\n\t * @param g G value\n\t * @param b B value\n\t * @return Color\n\t */\n\tpublic static fromRGB(r: number, g: number, b: number): Color {\n\t\treturn new Color((b | 0) + (g << 8) + (r << 16));\n\t}\n\n\t/**\n\t * Converts RGB string to a new [[Color]] object.\n\t *\n\t * ```TypeScript\n\t * Color.fromString(\"#ff0000\") // red\n\t * ```\n\t * ```JavaScript\n\t * Color.fromString(\"#ff0000\") // red\n\t * ```\n\t *\n\t * @param s RGB string\n\t * @return Color\n\t */\n\tpublic static fromString(s: string): Color {\n\t\treturn new Color(string2hex(s));\n\t}\n\n\t/**\n\t * Converts CSS rgba() syntax to a new [[Color]] object.\n\t *\n\t * ```TypeScript\n\t * Color.fromCSS(\"rgba(255, 0, 0, 1)\") // red\n\t * ```\n\t * ```JavaScript\n\t * Color.fromCSS(\"rgba(255, 0, 0, 1)\") // red\n\t * ```\n\t *\n\t * @param {string} s [description]\n\t * @return {Color} [description]\n\t */\n\tpublic static fromCSS(s: string): Color {\n\t\treturn new Color(rgba2hex(s));\n\t}\n\n\t/**\n\t * Convert to color from virtually anything.\n\t *\n\t * Will throw an exception if unable to resolve the color.\n\t *\n\t * @param s Source\n\t * @return Color\n\t */\n\tpublic static fromAny(s: string | number | Color): Color {\n\t\tif ($type.isString(s)) {\n\t\t\tif (s[0] == \"#\") {\n\t\t\t\treturn Color.fromString(s);\n\t\t\t}\n\t\t\telse if (s.substr(0, 3) == \"rgb\") {\n\t\t\t\treturn Color.fromCSS(s);\n\t\t\t}\n\t\t}\n\t\telse if ($type.isNumber(s)) {\n\t\t\treturn Color.fromHex(s);\n\t\t}\n\t\telse if (s instanceof Color) {\n\t\t\treturn Color.fromHex(s.hex);\n\t\t}\n\n\t\tthrow new Error(\"Unknown color syntax: \" + s);\n\t}\n\n\t/**\n\t * Returns a new [[Color]] object based on either `lightAlternative` or\n\t * `darkAlternative` depending on which one is more contrasting with\n\t * the `color`.\n\t *\n\t * @param color Reference color\n\t * @param lightAlternative Light color\n\t * @param darkAlternative Dark color\n\t * @return Alternative color\n\t */\n\tpublic static alternative(color: Color, lightAlternative?: Color, darkAlternative?: Color): Color {\n\t\tconst rgb = $utils.alternativeColor(\n\t\t\t{ r: color.r, g: color.g, b: color.b },\n\t\t\tlightAlternative ? { r: lightAlternative.r, g: lightAlternative.g, b: lightAlternative.b } : undefined,\n\t\t\tdarkAlternative ? { r: darkAlternative.r, g: darkAlternative.g, b: darkAlternative.b } : undefined\n\t\t);\n\t\treturn this.fromRGB(rgb.r, rgb.g, rgb.b);\n\t}\n\n\t/**\n\t * Returns an intermediate Color between two reference colors depending on\n\t * the progress (`diff`) between the two.\n\t *\n\t * @param diff Progress\n\t * @param from Source color\n\t * @param to Target color\n\t * @param mode Interpolation mode\n\t * @return Color\n\t */\n\tpublic static interpolate(diff: Time, from: Color, to: Color, mode: \"rgb\" | \"hsl\" = \"rgb\"): Color {\n\t\tif (mode == \"hsl\") {\n\t\t\tconst fromHSL = from.toHSL();\n\t\t\tconst toHSL = to.toHSL();\n\t\t\treturn Color.fromHSL(\n\t\t\t\trange(diff, fromHSL.h, toHSL.h),\n\t\t\t\trange(diff, fromHSL.s, toHSL.s),\n\t\t\t\trange(diff, fromHSL.l, toHSL.l)\n\t\t\t);\n\t\t}\n\t\telse {\n\t\t\treturn Color.fromRGB(\n\t\t\t\trange(diff, from.r, to.r),\n\t\t\t\trange(diff, from.g, to.g),\n\t\t\t\trange(diff, from.b, to.b)\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Returns a new [[Color]] lightened by `percent` value.\n\t *\n\t * Use negative value to darken the color.\n\t *\n\t * @param color Source color\n\t * @param percent Percent\n\t * @return New color\n\t */\n\tpublic static lighten(color: Color, percent: number): Color {\n\t\tconst rgb = $utils.lighten({ r: color.r, g: color.g, b: color.b }, percent);\n\t\treturn Color.fromRGB(rgb!.r, rgb!.g, rgb!.b);\n\t}\n\n\t/**\n\t * Returns a new [[Color]] brightened by `percent` value.\n\t *\n\t * Use negative value to dim the color.\n\t *\n\t * @param color Source color\n\t * @param percent Percent\n\t * @return New color\n\t */\n\tpublic static brighten(color: Color, percent: number): Color {\n\t\tconst rgb = $utils.brighten({ r: color.r, g: color.g, b: color.b }, percent);\n\t\treturn Color.fromRGB(rgb!.r, rgb!.g, rgb!.b);\n\t}\n\n\t/**\n\t * Returns a new [[Color]] saturated by `percent` value.\n\t *\n\t * Use negative value to desaturate the color.\n\t *\n\t * @param color Source color\n\t * @param percent Percent\n\t * @return New color\n\t */\n\tpublic static saturate(color: Color, percent: number): Color {\n\t\tconst rgb = $utils.saturate({ r: color.r, g: color.g, b: color.b }, percent);\n\t\treturn Color.fromRGB(rgb!.r, rgb!.g, rgb!.b);\n\t}\n}\n"]}
1
+ {"version":3,"file":"Color.js","sourceRoot":"","sources":["../../../../../src/.internal/core/util/Color.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAQ,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,SAAS,CAAC;AAClC,OAAO,KAAK,KAAK,MAAM,QAAQ,CAAC;AAEhC;;GAEG;AACH,SAAS,UAAU,CAAC,MAAc;IACjC,yDAAyD;IAEzD,IAAI,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;QACtB,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;KAC1B;IACD,IAAI,MAAM,CAAC,MAAM,IAAI,CAAC,EAAE;QACvB,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAA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AAE,GAAI,CAAC,CAAC,CAAC,CAAC;QAC9C,CAAC;;IAED;;;;;;;;OAQG;;;;;eACH,UAAuB,KAAY,EAAE,OAAe;YACnD,IAAM,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;YAC7E,OAAO,KAAK,CAAC,OAAO,CAAC,GAAI,CAAC,CAAC,EAAE,GAAI,CAAC,CAAC,EAAE,GAAI,CAAC,CAAC,CAAC,CAAC;QAC9C,CAAC;;IAED;;;;;;;;OAQG;;;;;eACH,UAAuB,KAAY,EAAE,OAAe;YACnD,IAAM,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;YAC7E,OAAO,KAAK,CAAC,OAAO,CAAC,GAAI,CAAC,CAAC,EAAE,GAAI,CAAC,CAAC,EAAE,GAAI,CAAC,CAAC,CAAC,CAAC;QAC9C,CAAC;;IACF,YAAC;AAAD,CAAC,AA/QD,IA+QC","sourcesContent":["import { range, Time } from \"./Animation\";\nimport * as $utils from \"./Utils\";\nimport * as $type from \"./Type\";\n\n/**\n * @ignore\n */\nfunction string2hex(string: string): number {\n\t//string = cssColorNames[string.toLowerCase()] || string;\n\n\tif (string[0] === \"#\") {\n\t\tstring = string.substr(1);\n\t}\n\tif (string.length == 3) {\n\t\tstring = string[0].repeat(2) + string[1].repeat(2) + string[2].repeat(2);\n\t}\n\n\treturn parseInt(string, 16);\n}\n\n/**\n * @ignore\n */\nexport function rgba2hex(color: string): number {\n\tcolor = color.replace(/[ ]/g, \"\");\n\n\t// Init\n\tlet matches: string[] | null = color.match(/^rgb\\(([0-9]*),([0-9]*),([0-9]*)\\)/i);\n\n\t// Try rgb() format\n\tif (matches) {\n\t\tmatches.push(\"1\");\n\n\t} else {\n\t\tmatches = color.match(/^rgba\\(([0-9]*),([0-9]*),([0-9]*),([.0-9]*)\\)/i);\n\n\t\tif (!matches) {\n\t\t\treturn 0x000000;\n\t\t}\n\t}\n\n\tlet hex = \"\";\n\tfor (let i = 1; i <= 3; i++) {\n\t\tlet val = parseInt(matches[i]).toString(16);\n\t\tif (val.length == 1) {\n\t\t\tval = \"0\" + val;\n\t\t}\n\t\thex += val;\n\t}\n\n\treturn string2hex(hex);\n\n}\n\n/**\n * Returns a new [[Color]] object base on input.\n *\n * Accepts parameters in CSS hex or rgb/rtba strings, or hex numbers.\n *\n * * `\"#f00\"`\n * * `\"#ff0000\"`\n * * `\"rgb(255, 0, 0)\"`\n * * `\"rgba(255, 0, 0, 1)\"`\n * * `0xff0000`\n * \n * @param input Input color\n * @return Color\n */\nexport function color(input: number | string): Color {\n\treturn Color.fromAny(input);\n}\n\n/**\n * Wherever color needs to be specified in amCharts 5, `Color` object needs to\n * be used.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/} for more info\n * @important\n */\nexport class Color {\n\tprotected _hex: number;\n\n\tprivate constructor(hex: number) {\n\t\tthis._hex = hex | 0;\n\t}\n\n\t/**\n\t * Color numeric value.\n\t */\n\tpublic get hex(): number {\n\t\treturn this._hex;\n\t}\n\n\t/**\n\t * Value of color's R channel.\n\t * @return R value\n\t */\n\tpublic get r(): number {\n\t\treturn this._hex >>> 16;\n\t}\n\n\t/**\n\t * Value of color's G channel.\n\t * @return G value\n\t */\n\tpublic get g(): number {\n\t\treturn (this._hex >> 8) & 0xFF;\n\t}\n\n\t/**\n\t * Value of color's B channel.\n\t * @return B value\n\t */\n\tpublic get b(): number {\n\t\treturn this._hex & 0xFF;\n\t}\n\n\t/**\n\t * Returns color CSS representation in form of `rgba(r, g, b, a)` string.\n\t * \n\t * @param alpha Opacity\n\t * @return CSS string\n\t */\n\tpublic toCSS(alpha: number = 1): string {\n\t\treturn \"rgba(\" + this.r + \", \" + this.g + \", \" + this.b + \", \" + alpha + \")\";\n\t}\n\n\t/**\n\t * Returns color CSS representation in form of `#rgb` string.\n\t * \n\t * @return CSS string\n\t */\n\tpublic toCSSHex(): string {\n\t\treturn \"#\" + $utils.padString(this.r.toString(16), 2) + $utils.padString(this.g.toString(16), 2) + $utils.padString(this.b.toString(16), 2);\n\t}\n\n\t/**\n\t * Returns color's HSL info.\n\t * @param alpha Opacity\n\t * @return HSL info\n\t */\n\tpublic toHSL(alpha: number = 1): $utils.iHSL {\n\t\treturn $utils.rgbToHsl({\n\t\t\tr: this.r,\n\t\t\tg: this.g,\n\t\t\tb: this.b,\n\t\t\ta: alpha\n\t\t})\n\t}\n\n\t/**\n\t * Converts HSL values into a new [[Color]] object.\n\t *\n\t * @param h H value\n\t * @param s S value\n\t * @param l L value\n\t * @return Color object\n\t */\n\tpublic static fromHSL(h: number, s: number, l: number): Color {\n\t\tconst rgb = $utils.hslToRgb({\n\t\t\th: h,\n\t\t\ts: s,\n\t\t\tl: l\n\t\t});\n\t\treturn this.fromRGB(rgb.r, rgb.g, rgb.b);\n\t}\n\n\tpublic toString(): string {\n\t\treturn this.toCSSHex();\n\t}\n\n\t/**\n\t * Converts hex number into a new [[Color]] object.\n\t *\n\t * ```TypeScript\n\t * Color.fromHex(0xff0000) // red\n\t * ```\n\t * ```JavaScript\n\t * Color.fromHex(0xff0000) // red\n\t * ```\n\t *\n\t * @param hex Hex color\n\t * @return Color\n\t */\n\tpublic static fromHex(hex: number): Color {\n\t\treturn new Color(hex);\n\t}\n\n\t/**\n\t * Converts RGB values to a new [[Color]] object.\n\t *\n\t * @param r R value\n\t * @param g G value\n\t * @param b B value\n\t * @return Color\n\t */\n\tpublic static fromRGB(r: number, g: number, b: number): Color {\n\t\treturn new Color((b | 0) + (g << 8) + (r << 16));\n\t}\n\n\t/**\n\t * Converts RGB string to a new [[Color]] object.\n\t *\n\t * ```TypeScript\n\t * Color.fromString(\"#ff0000\") // red\n\t * ```\n\t * ```JavaScript\n\t * Color.fromString(\"#ff0000\") // red\n\t * ```\n\t *\n\t * @param s RGB string\n\t * @return Color\n\t */\n\tpublic static fromString(s: string): Color {\n\t\treturn new Color(string2hex(s));\n\t}\n\n\t/**\n\t * Converts CSS rgba() syntax to a new [[Color]] object.\n\t *\n\t * ```TypeScript\n\t * Color.fromCSS(\"rgba(255, 0, 0, 1)\") // red\n\t * ```\n\t * ```JavaScript\n\t * Color.fromCSS(\"rgba(255, 0, 0, 1)\") // red\n\t * ```\n\t *\n\t * @param {string} s [description]\n\t * @return {Color} [description]\n\t */\n\tpublic static fromCSS(s: string): Color {\n\t\treturn new Color(rgba2hex(s));\n\t}\n\n\t/**\n\t * Convert to color from virtually anything.\n\t *\n\t * Will throw an exception if unable to resolve the color.\n\t *\n\t * @param s Source\n\t * @return Color\n\t */\n\tpublic static fromAny(s: string | number | Color): Color {\n\t\tif ($type.isString(s)) {\n\t\t\tif (s[0] == \"#\") {\n\t\t\t\treturn Color.fromString(s);\n\t\t\t}\n\t\t\telse if (s.substr(0, 3) == \"rgb\") {\n\t\t\t\treturn Color.fromCSS(s);\n\t\t\t}\n\t\t}\n\t\telse if ($type.isNumber(s)) {\n\t\t\treturn Color.fromHex(s);\n\t\t}\n\t\telse if (s instanceof Color) {\n\t\t\treturn Color.fromHex(s.hex);\n\t\t}\n\n\t\tthrow new Error(\"Unknown color syntax: \" + s);\n\t}\n\n\t/**\n\t * Returns a new [[Color]] object based on either `lightAlternative` or\n\t * `darkAlternative` depending on which one is more contrasting with\n\t * the `color`.\n\t *\n\t * @param color Reference color\n\t * @param lightAlternative Light color\n\t * @param darkAlternative Dark color\n\t * @return Alternative color\n\t */\n\tpublic static alternative(color: Color, lightAlternative?: Color, darkAlternative?: Color): Color {\n\t\tconst rgb = $utils.alternativeColor(\n\t\t\t{ r: color.r, g: color.g, b: color.b },\n\t\t\tlightAlternative ? { r: lightAlternative.r, g: lightAlternative.g, b: lightAlternative.b } : undefined,\n\t\t\tdarkAlternative ? { r: darkAlternative.r, g: darkAlternative.g, b: darkAlternative.b } : undefined\n\t\t);\n\t\treturn this.fromRGB(rgb.r, rgb.g, rgb.b);\n\t}\n\n\t/**\n\t * Returns an intermediate Color between two reference colors depending on\n\t * the progress (`diff`) between the two.\n\t *\n\t * @param diff Progress\n\t * @param from Source color\n\t * @param to Target color\n\t * @param mode Interpolation mode\n\t * @return Color\n\t */\n\tpublic static interpolate(diff: Time, from: Color, to: Color, mode: \"rgb\" | \"hsl\" = \"rgb\"): Color {\n\t\tif (mode == \"hsl\") {\n\t\t\tconst fromHSL = from.toHSL();\n\t\t\tconst toHSL = to.toHSL();\n\t\t\treturn Color.fromHSL(\n\t\t\t\trange(diff, fromHSL.h, toHSL.h),\n\t\t\t\trange(diff, fromHSL.s, toHSL.s),\n\t\t\t\trange(diff, fromHSL.l, toHSL.l)\n\t\t\t);\n\t\t}\n\t\telse {\n\t\t\treturn Color.fromRGB(\n\t\t\t\trange(diff, from.r, to.r),\n\t\t\t\trange(diff, from.g, to.g),\n\t\t\t\trange(diff, from.b, to.b)\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Returns a new [[Color]] lightened by `percent` value.\n\t *\n\t * Use negative value to darken the color.\n\t *\n\t * @param color Source color\n\t * @param percent Percent\n\t * @return New color\n\t */\n\tpublic static lighten(color: Color, percent: number): Color {\n\t\tconst rgb = $utils.lighten({ r: color.r, g: color.g, b: color.b }, percent);\n\t\treturn Color.fromRGB(rgb!.r, rgb!.g, rgb!.b);\n\t}\n\n\t/**\n\t * Returns a new [[Color]] brightened by `percent` value.\n\t *\n\t * Use negative value to dim the color.\n\t *\n\t * @param color Source color\n\t * @param percent Percent\n\t * @return New color\n\t */\n\tpublic static brighten(color: Color, percent: number): Color {\n\t\tconst rgb = $utils.brighten({ r: color.r, g: color.g, b: color.b }, percent);\n\t\treturn Color.fromRGB(rgb!.r, rgb!.g, rgb!.b);\n\t}\n\n\t/**\n\t * Returns a new [[Color]] saturated by `percent` value.\n\t *\n\t * Value range is between `0` (fully desaturated), to `1` (full color).\n\t *\n\t * @param color Source color\n\t * @param percent Percent\n\t * @return New color\n\t */\n\tpublic static saturate(color: Color, percent: number): Color {\n\t\tconst rgb = $utils.saturate({ r: color.r, g: color.g, b: color.b }, percent);\n\t\treturn Color.fromRGB(rgb!.r, rgb!.g, rgb!.b);\n\t}\n}\n"]}
package/CHANGELOG.md CHANGED
@@ -5,6 +5,19 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
5
5
  Please note, that this project, while following numbering syntax, it DOES NOT
6
6
  adhere to [Semantic Versioning](http://semver.org/spec/v2.0.0.html) rules.
7
7
 
8
+ ## [5.2.18] - 2022-08-24
9
+
10
+ ### Added
11
+ - `disabled` key support added to `DropdownList` item interface.
12
+
13
+ ### Fixed
14
+ - Removed leftover debug code in `IndicatorControl`.
15
+ - `selected` event in `IndicatorControl` was not firing.
16
+ - Adding an adapter on Y-axis' labels could cause flickers on the chart.
17
+ - `maxWidth`/`maxHeight` of a `Container` was ignored when arranging objects by Horizontal or Vertical layout.
18
+ - `maxWidth`/`maxHeight` of a `Container` was ignored when drawing background.
19
+
20
+
8
21
  ## [5.2.17] - 2022-08-17
9
22
 
10
23
  ### Added
@@ -3,7 +3,7 @@
3
3
  "name": "amcharts5-example-flow-chord",
4
4
  "version": "0.1.0",
5
5
  "devDependencies": {
6
- "@amcharts/amcharts5": "^5.2.17",
6
+ "@amcharts/amcharts5": "^5.2.18",
7
7
  "source-map-loader": "^3.0.0",
8
8
  "webpack": "^5.1.3",
9
9
  "webpack-cli": "^4.1.0",
@@ -3,7 +3,7 @@
3
3
  "name": "amcharts5-example-flow-chord-directed",
4
4
  "version": "0.1.0",
5
5
  "devDependencies": {
6
- "@amcharts/amcharts5": "^5.2.17",
6
+ "@amcharts/amcharts5": "^5.2.18",
7
7
  "source-map-loader": "^3.0.0",
8
8
  "webpack": "^5.1.3",
9
9
  "webpack-cli": "^4.1.0",
@@ -3,7 +3,7 @@
3
3
  "name": "amcharts5-example-flow-chord-non-ribbon",
4
4
  "version": "0.1.0",
5
5
  "devDependencies": {
6
- "@amcharts/amcharts5": "^5.2.17",
6
+ "@amcharts/amcharts5": "^5.2.18",
7
7
  "source-map-loader": "^3.0.0",
8
8
  "webpack": "^5.1.3",
9
9
  "webpack-cli": "^4.1.0",
@@ -3,7 +3,7 @@
3
3
  "name": "amcharts5-example-flow-sankey",
4
4
  "version": "0.1.0",
5
5
  "devDependencies": {
6
- "@amcharts/amcharts5": "^5.2.17",
6
+ "@amcharts/amcharts5": "^5.2.18",
7
7
  "source-map-loader": "^3.0.0",
8
8
  "webpack": "^5.1.3",
9
9
  "webpack-cli": "^4.1.0",
@@ -3,7 +3,7 @@
3
3
  "name": "amcharts5-example-gauge",
4
4
  "version": "0.1.0",
5
5
  "devDependencies": {
6
- "@amcharts/amcharts5": "^5.2.17",
6
+ "@amcharts/amcharts5": "^5.2.18",
7
7
  "source-map-loader": "^3.0.0",
8
8
  "webpack": "^5.1.3",
9
9
  "webpack-cli": "^4.1.0",
@@ -3,7 +3,7 @@
3
3
  "name": "amcharts5-example-gauge-bands",
4
4
  "version": "0.1.0",
5
5
  "devDependencies": {
6
- "@amcharts/amcharts5": "^5.2.17",
6
+ "@amcharts/amcharts5": "^5.2.18",
7
7
  "source-map-loader": "^3.0.0",
8
8
  "webpack": "^5.1.3",
9
9
  "webpack-cli": "^4.1.0",
@@ -3,7 +3,7 @@
3
3
  "name": "amcharts5-example-hierarchy-force-directed",
4
4
  "version": "0.1.0",
5
5
  "devDependencies": {
6
- "@amcharts/amcharts5": "^5.2.17",
6
+ "@amcharts/amcharts5": "^5.2.18",
7
7
  "source-map-loader": "^3.0.0",
8
8
  "webpack": "^5.1.3",
9
9
  "webpack-cli": "^4.1.0",
@@ -3,7 +3,7 @@
3
3
  "name": "amcharts5-example-hierarchy-pack",
4
4
  "version": "0.1.0",
5
5
  "devDependencies": {
6
- "@amcharts/amcharts5": "^5.2.17",
6
+ "@amcharts/amcharts5": "^5.2.18",
7
7
  "source-map-loader": "^3.0.0",
8
8
  "webpack": "^5.1.3",
9
9
  "webpack-cli": "^4.1.0",
@@ -3,7 +3,7 @@
3
3
  "name": "amcharts5-example-hierarchy-partition",
4
4
  "version": "0.1.0",
5
5
  "devDependencies": {
6
- "@amcharts/amcharts5": "^5.2.17",
6
+ "@amcharts/amcharts5": "^5.2.18",
7
7
  "source-map-loader": "^3.0.0",
8
8
  "webpack": "^5.1.3",
9
9
  "webpack-cli": "^4.1.0",
@@ -3,7 +3,7 @@
3
3
  "name": "amcharts5-example-hierarchy-sunburst",
4
4
  "version": "0.1.0",
5
5
  "devDependencies": {
6
- "@amcharts/amcharts5": "^5.2.17",
6
+ "@amcharts/amcharts5": "^5.2.18",
7
7
  "source-map-loader": "^3.0.0",
8
8
  "webpack": "^5.1.3",
9
9
  "webpack-cli": "^4.1.0",
@@ -3,7 +3,7 @@
3
3
  "name": "amcharts5-example-hierarchy-tree",
4
4
  "version": "0.1.0",
5
5
  "devDependencies": {
6
- "@amcharts/amcharts5": "^5.2.17",
6
+ "@amcharts/amcharts5": "^5.2.18",
7
7
  "source-map-loader": "^3.0.0",
8
8
  "webpack": "^5.1.3",
9
9
  "webpack-cli": "^4.1.0",
@@ -3,7 +3,7 @@
3
3
  "name": "amcharts5-example-hierarchy-treemap",
4
4
  "version": "0.1.0",
5
5
  "devDependencies": {
6
- "@amcharts/amcharts5": "^5.2.17",
6
+ "@amcharts/amcharts5": "^5.2.18",
7
7
  "source-map-loader": "^3.0.0",
8
8
  "webpack": "^5.1.3",
9
9
  "webpack-cli": "^4.1.0",
@@ -0,0 +1,6 @@
1
+ Steps to use
2
+ ============
3
+
4
+ 1. Run `yarn`
5
+
6
+ 2. Run `yarn start` for development, or `yarn build` for production
@@ -0,0 +1,6 @@
1
+ module.exports = {
2
+ presets: [
3
+ ['@babel/preset-env', {targets: {node: 'current'}}],
4
+ '@babel/preset-typescript',
5
+ ],
6
+ };
@@ -0,0 +1,11 @@
1
+ body {
2
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
3
+ padding: 0;
4
+ margin: 0;
5
+ background-color: #ffffff;
6
+ }
7
+
8
+ #chartdiv {
9
+ width: 100%;
10
+ height: 80vh;
11
+ }
@@ -0,0 +1,12 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <title>amCharts 5 Example - jest</title>
6
+ <link rel="stylesheet" href="index.css" />
7
+ </head>
8
+ <body>
9
+ <div id="chartdiv"></div>
10
+ <script src="dist/index.js"></script>
11
+ </body>
12
+ </html>
@@ -0,0 +1,3 @@
1
+ import { makeChart } from "./src/chart";
2
+
3
+ makeChart();