@orangelogic/design-system 2.69.0 → 2.70.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (220) hide show
  1. package/library/chunks/AxisLabelRadial.BTpA5dYy.js +11 -0
  2. package/library/chunks/BaseColumnSeries.hIO71GLG.js +304 -0
  3. package/library/chunks/CandlestickSeries.w9C0GR9v.js +362 -0
  4. package/library/chunks/Circle.tOnnO-F-.js +17 -0
  5. package/library/chunks/ColumnSeries.Ckz75x1M.js +54 -0
  6. package/library/chunks/EditableAxisLabel.CCMTJT7K.js +445 -0
  7. package/library/chunks/EditableLabel.DPmicdjK.js +119 -0
  8. package/library/chunks/Gradient.BrDBLm8v.js +40 -0
  9. package/library/chunks/LinearGradient.CxfXxvMw.js +37 -0
  10. package/library/chunks/MonotoneXTension.CJMEHHj3.js +139 -0
  11. package/library/chunks/Picture.BNASYM-P.js +49 -0
  12. package/library/chunks/Polygon.Dr-GV2hn.js +70 -0
  13. package/library/chunks/ProgressPie.4mPA6xqm.js +234 -0
  14. package/library/chunks/RadialLabel.HfsGiN4x.js +88 -0
  15. package/library/chunks/Scrollbar.Bgg-RhjP.js +118 -0
  16. package/library/chunks/Slice.Dm56LTKj.js +120 -0
  17. package/library/chunks/Slider.FKJwoPq2.js +19 -0
  18. package/library/chunks/SpriteResizer.-qJDgug8.js +446 -0
  19. package/library/chunks/Triangle.BECgi7mc.js +21 -0
  20. package/library/chunks/ZoomTools.cgwuIB0e.js +199 -0
  21. package/library/chunks/___vite-browser-external_commonjs-proxy.C2tf3HsQ.js +8 -0
  22. package/library/chunks/{_baseUniq.Df-fLIBx.js → _baseUniq.BUihBa8c.js} +56 -53
  23. package/library/chunks/{_commonjsHelpers.ByX85dGu.js → _commonjsHelpers.DQNKXVTB.js} +2 -2
  24. package/library/chunks/accessors.BHk36ecy.js +11 -0
  25. package/library/chunks/am-chart.oZVBmpnn.js +18435 -0
  26. package/library/chunks/{animation.DfUHRQry.js → animation.DU8t6mrk.js} +1 -1
  27. package/library/chunks/{button.SoX-7UYy.js → button.CAAJPQFu.js} +3 -3
  28. package/library/chunks/{capitalize.WSkCXkNE.js → capitalize.CNStXZBq.js} +1 -1
  29. package/library/chunks/cardinal.BCA_LB0u.js +64 -0
  30. package/library/chunks/{color-swatch-group.Dx1fbSJx.js → color-swatch-group.CKHyWM8K.js} +6 -6
  31. package/library/chunks/{color-swatch.B7XXHxx1.js → color-swatch.BkpPCXd6.js} +2 -2
  32. package/library/chunks/colorPicker.C4w_vDjh.js +527 -0
  33. package/library/chunks/{confirm-popover.327ATuQH.js → confirm-popover.ZD74yDWw.js} +3 -3
  34. package/library/chunks/{content-builder.Bxi6k2LA.js → content-builder.B4Tqoc6M.js} +40 -34
  35. package/library/chunks/{cropper.BraEEykE.js → cropper.CQB3_qqG.js} +6937 -6935
  36. package/library/chunks/{dialog.eN3RUbwx.js → dialog.qSV5AjOE.js} +2 -2
  37. package/library/chunks/{dom.CZrJ64Dm.js → dom.BQVKDNd8.js} +1 -1
  38. package/library/chunks/{dot-pagination.Bek4w4zz.js → dot-pagination.BN_0ljfc.js} +2 -2
  39. package/library/chunks/exporting.BdjsEGF8.js +1407 -0
  40. package/library/chunks/{file-on-demand.BiC4cymk.js → file-on-demand.CXE4zf0J.js} +448 -386
  41. package/library/chunks/flow.D0FqdfOy.js +1594 -0
  42. package/library/chunks/{folder-select.DVEFgexx.js → folder-select.CPALQK22.js} +4 -4
  43. package/library/chunks/{form.CO12-VK0.js → form.DgwYWi0O.js} +1 -1
  44. package/library/chunks/gantt.DfUM7Gvb.js +2459 -0
  45. package/library/chunks/{header.Da5yvwdy.js → header.DXZ_5gLY.js} +2 -2
  46. package/library/chunks/hierarchy.5kfBCoGt.js +3561 -0
  47. package/library/chunks/{hub-connection.CfARlehM.js → hub-connection.Ot2odiCz.js} +1 -1
  48. package/library/chunks/{i18n.BMRLOAZR.js → i18n.C0iakJkV.js} +19 -11
  49. package/library/chunks/{iframe.BJizUE1A.js → iframe.BlzVfeBc.js} +2 -2
  50. package/library/chunks/{image.bndP5q2c.js → image.B3WjaCXP.js} +2 -2
  51. package/library/chunks/index.BkoLctE9.js +533 -0
  52. package/library/chunks/index.CZJTjkLp.js +142 -0
  53. package/library/chunks/{index.Bhnf0N8Q.js → index.CmVKj_wl.js} +7 -7
  54. package/library/chunks/index.DU0XUO4k.js +176 -0
  55. package/library/chunks/index.DcjJFMlq.js +1520 -0
  56. package/library/chunks/isObjectLike.z36Fu426.js +34 -0
  57. package/library/chunks/{isSymbol.huJ_Cvxt.js → isSymbol.L0C2ND_U.js} +1 -1
  58. package/library/chunks/json.BjaT7cyo.js +119 -0
  59. package/library/chunks/{list-editor.Du1h2Ms0.js → list-editor.CIAAFPco.js} +251 -222
  60. package/library/chunks/map.DbgNAGxD.js +3037 -0
  61. package/library/chunks/markerjs2.esm.B_9kjmye.js +1912 -0
  62. package/library/chunks/{option.Ce_wlnZj.js → option.ByVbmxUQ.js} +2 -2
  63. package/library/chunks/{pagination.DXu-mFAk.js → pagination.DPQn2fKX.js} +4 -4
  64. package/library/chunks/pdfmake.Bs7cMDH0.js +41224 -0
  65. package/library/chunks/percent.DO4FjAdu.js +902 -0
  66. package/library/chunks/{purify.es.BGaRrCfO.js → purify.es.BIuh5IAZ.js} +115 -115
  67. package/library/chunks/radar.Dd5fJVMg.js +789 -0
  68. package/library/chunks/{responsive.DgQTIrna.js → responsive.DL-wBD4P.js} +1 -1
  69. package/library/chunks/sliceGrouper.DA3aeuJ-.js +93 -0
  70. package/library/chunks/stock.BfI5MUyK.js +12684 -0
  71. package/library/chunks/{string.Cp_XNbnV.js → string.B_rEG27K.js} +1 -1
  72. package/library/chunks/{tab-group.B2pW__9H.js → tab-group.1h51o_Ly.js} +4 -4
  73. package/library/chunks/{table.5eWm9FfN.js → table.wVHv1Xze.js} +348 -327
  74. package/library/chunks/timeline.BxMLjB5J.js +837 -0
  75. package/library/chunks/timer.B39XOBYL.js +123 -0
  76. package/library/chunks/{toString.CRT5zqEU.js → toString.CL_lYXbK.js} +3 -3
  77. package/library/chunks/transform.BuqENXeT.js +50 -0
  78. package/library/chunks/{tree.Zls5YZ8z.js → tree.Bx0IGsWm.js} +2 -2
  79. package/library/chunks/venn.CxFupTb9.js +966 -0
  80. package/library/chunks/vfs_fonts.VJpdcrR6.js +9 -0
  81. package/library/chunks/watch.BCJD77bD.js +547 -0
  82. package/library/chunks/wc.ThQubbN2.js +255 -0
  83. package/library/chunks/xlsx.v-qkA-dg.js +25118 -0
  84. package/library/chunks/xy.q6e68du3.js +333 -0
  85. package/library/components/alert.js +2 -2
  86. package/library/components/am-chart.d.ts +3 -0
  87. package/library/components/am-chart.js +11 -0
  88. package/library/components/animated-image.js +1 -1
  89. package/library/components/animation.js +2 -2
  90. package/library/components/array-line-clamp.js +1 -1
  91. package/library/components/asset-link-format.js +7 -7
  92. package/library/components/atoms.js +166 -162
  93. package/library/components/avatar.js +1 -1
  94. package/library/components/border-input-group.js +1 -1
  95. package/library/components/breadcrumb-item.js +1 -1
  96. package/library/components/breadcrumb.js +1 -1
  97. package/library/components/button.js +4 -4
  98. package/library/components/checkbox.js +2 -2
  99. package/library/components/color-picker.js +4 -4
  100. package/library/components/color-swatch-group.js +7 -7
  101. package/library/components/color-swatch.js +3 -3
  102. package/library/components/confirm-popover.js +4 -4
  103. package/library/components/copy-button.js +2 -2
  104. package/library/components/corner-position-input-group.js +2 -2
  105. package/library/components/cropper.js +1 -1
  106. package/library/components/details.js +3 -2
  107. package/library/components/dialog.js +3 -3
  108. package/library/components/divider.js +1 -1
  109. package/library/components/dot-pagination.js +3 -3
  110. package/library/components/drawer.js +3 -3
  111. package/library/components/dropdown.js +2 -2
  112. package/library/components/dynamic-select.js +32 -30
  113. package/library/components/e-chart.d.ts +3 -0
  114. package/library/components/e-chart.js +47908 -0
  115. package/library/components/element-clamp.js +3 -3
  116. package/library/components/file-on-demand.js +10 -10
  117. package/library/components/folder-select.js +4 -4
  118. package/library/components/format-bytes.js +1 -1
  119. package/library/components/format-date.js +1 -1
  120. package/library/components/format-number.js +1 -1
  121. package/library/components/format-time.js +2 -2
  122. package/library/components/grid-item.js +1 -1
  123. package/library/components/header.js +3 -3
  124. package/library/components/hub-connection.js +2 -2
  125. package/library/components/icon-button.js +1 -1
  126. package/library/components/icon.js +1 -1
  127. package/library/components/iframe.js +3 -3
  128. package/library/components/image-comparer.js +2 -2
  129. package/library/components/image.js +3 -3
  130. package/library/components/include.js +1 -1
  131. package/library/components/input.js +3 -3
  132. package/library/components/line-clamp.js +1 -1
  133. package/library/components/list-editor.js +11 -8
  134. package/library/components/markdown.js +2 -2
  135. package/library/components/masonry.js +2 -2
  136. package/library/components/menu-item.js +2 -2
  137. package/library/components/menu.js +1 -1
  138. package/library/components/molecules.js +5 -5
  139. package/library/components/mutation-observer.js +1 -1
  140. package/library/components/option.js +3 -3
  141. package/library/components/organisms.js +2 -2
  142. package/library/components/pagination.js +5 -5
  143. package/library/components/popup.js +1 -1
  144. package/library/components/position-picker.js +1 -1
  145. package/library/components/progress-bar.js +1 -1
  146. package/library/components/progress-ring.js +1 -1
  147. package/library/components/qr-code.js +1 -1
  148. package/library/components/radio-button.js +1 -1
  149. package/library/components/radio-card.js +1 -1
  150. package/library/components/radio-group.js +2 -2
  151. package/library/components/radio.js +1 -1
  152. package/library/components/range.js +3 -3
  153. package/library/components/rating.js +2 -2
  154. package/library/components/relative-time.js +1 -1
  155. package/library/components/resize-observer.js +1 -1
  156. package/library/components/select.js +4 -4
  157. package/library/components/share-option-list.js +3 -3
  158. package/library/components/sidebar.js +1 -1
  159. package/library/components/size-input-group.js +2 -2
  160. package/library/components/spinner.js +1 -1
  161. package/library/components/split-panel.js +2 -2
  162. package/library/components/stepper.js +1 -1
  163. package/library/components/switch.js +2 -2
  164. package/library/components/tab-group.js +5 -5
  165. package/library/components/tab-panel.js +1 -1
  166. package/library/components/tab.js +2 -2
  167. package/library/components/table.js +5 -5
  168. package/library/components/tag.js +1 -1
  169. package/library/components/textarea.js +2 -2
  170. package/library/components/timecode.js +2 -2
  171. package/library/components/tooltip.js +2 -2
  172. package/library/components/tree-item.js +3 -3
  173. package/library/components/tree.js +3 -3
  174. package/library/components/typeface.js +2 -2
  175. package/library/components/types.js +27684 -27970
  176. package/library/components/video.js +1107 -1110
  177. package/library/package.json +1 -1
  178. package/library/packages/atoms/src/components/am-chart/am-chart.d.ts +45 -0
  179. package/library/packages/atoms/src/components/am-chart/am-chart.styles.d.ts +2 -0
  180. package/library/packages/atoms/src/components/am-chart/am-chart.utils.d.ts +23 -0
  181. package/library/packages/atoms/src/components/e-chart/e-chart-controller.d.ts +30 -0
  182. package/library/packages/atoms/src/components/e-chart/e-chart.d.ts +38 -0
  183. package/library/packages/atoms/src/components/e-chart/e-chart.styles.d.ts +2 -0
  184. package/library/packages/atoms/src/components/table/table.d.ts +21 -0
  185. package/library/packages/atoms/src/components/table/tabulator-tables/core/Tabulator.d.ts +1 -0
  186. package/library/packages/atoms/src/components/table/tabulator-tables/core/tools/DataLoader.d.ts +3 -1
  187. package/library/packages/atoms/src/index.d.ts +2 -0
  188. package/library/packages/events/src/cx-chart-plan-change.d.ts +10 -0
  189. package/library/packages/events/src/cx-dashboard-filter-change.d.ts +6 -0
  190. package/library/packages/events/src/cx-dashboard-table-load-more.d.ts +9 -0
  191. package/library/packages/events/src/cx-e-chart-drill-down.d.ts +16 -0
  192. package/library/packages/events/src/events.d.ts +4 -0
  193. package/library/packages/molecules/src/index.d.ts +1 -0
  194. package/library/packages/molecules/src/list-editor/list-editor.d.ts +7 -0
  195. package/library/packages/molecules/src/stat-card/stat-card.d.ts +81 -0
  196. package/library/packages/molecules/src/stat-card/stat-card.styles.d.ts +2 -0
  197. package/library/packages/molecules/src/storybook/storybook.d.ts +1 -0
  198. package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +1 -1
  199. package/library/packages/organisms/src/content-builder/components/chart-plan-builder/chart-plan-builder.d.ts +88 -0
  200. package/library/packages/organisms/src/content-builder/components/chart-plan-builder/chart-plan-builder.styles.d.ts +2 -0
  201. package/library/packages/organisms/src/content-builder/components/chart-plan-builder/chart-plan-schema.d.ts +100 -0
  202. package/library/packages/organisms/src/content-builder/styleController.d.ts +2 -2
  203. package/library/packages/organisms/src/dashboard-filter/dashboard-filter.d.ts +83 -0
  204. package/library/packages/organisms/src/dashboard-filter/dashboard-filter.styles.d.ts +2 -0
  205. package/library/packages/organisms/src/dashboard-table/dashboard-table.d.ts +45 -0
  206. package/library/packages/organisms/src/dashboard-table/dashboard-table.styles.d.ts +2 -0
  207. package/library/packages/organisms/src/index.d.ts +3 -0
  208. package/library/packages/services/src/api/endpoints.d.ts +3 -0
  209. package/library/packages/types/src/am-chart.d.ts +22 -0
  210. package/library/packages/types/src/content-builder.d.ts +1 -0
  211. package/library/packages/types/src/stat-card.d.ts +19 -0
  212. package/library/packages/types/src/table.d.ts +4 -0
  213. package/library/packages/utils/src/custom-element/i18n.d.ts +8 -0
  214. package/library/react-web-component.d.ts +280 -4
  215. package/library/utils.js +8 -8
  216. package/package.json +1 -1
  217. package/library/chunks/_baseRest.ClTMQtN1.js +0 -67
  218. package/library/chunks/identity.ByMq8VxU.js +0 -6
  219. package/library/chunks/isObjectLike.D3cpZO39.js +0 -81
  220. package/library/chunks/watch.q1sEjPWL.js +0 -501
@@ -0,0 +1,17 @@
1
+ import { G as e } from "./am-chart.oZVBmpnn.js";
2
+ class s extends e {
3
+ _afterNew() {
4
+ super._afterNew(), this._display.isMeasured = !0, this.setPrivateRaw("trustBounds", !0);
5
+ }
6
+ _beforeChanged() {
7
+ super._beforeChanged(), this.isDirty("radius") && (this._clear = !0);
8
+ }
9
+ _changed() {
10
+ super._changed(), this._clear && this._display.drawCircle(0, 0, Math.abs(this.get("radius", 10)));
11
+ }
12
+ }
13
+ s.className = "Circle";
14
+ s.classNames = e.classNames.concat([s.className]);
15
+ export {
16
+ s as C
17
+ };
@@ -0,0 +1,54 @@
1
+ import { B as g } from "./BaseColumnSeries.hIO71GLG.js";
2
+ import { G as D, L as k, T as w, R as C, m as _, e as O } from "./am-chart.oZVBmpnn.js";
3
+ class m extends g {
4
+ constructor() {
5
+ super(...arguments), this.allColumns = this.children.push(D.new(this._root, {})), this.allColumnsData = [], this.columns = this.addDisposer(new k(w.new({}), () => C._new(this._root, {
6
+ position: "absolute",
7
+ themeTags: _(this.columns.template.get("themeTags", []), ["series", "column"])
8
+ }, [this.columns.template])));
9
+ }
10
+ /**
11
+ * @ignore
12
+ */
13
+ makeColumn(e, t) {
14
+ const s = t.make();
15
+ return this.get("turboMode") ? s.virtualParent = this.chart : this.mainContainer.children.push(s), s._setDataItem(e), t.push(s), s;
16
+ }
17
+ _processAxisRange(e) {
18
+ super._processAxisRange(e), e.columns = new k(w.new({}), () => C._new(this._root, {
19
+ position: "absolute",
20
+ themeTags: _(e.columns.template.get("themeTags", []), ["series", "column"])
21
+ }, [this.columns.template, e.columns.template]));
22
+ }
23
+ _beforeColumnsDraw() {
24
+ this.allColumnsData = [];
25
+ }
26
+ _afterColumnsDraw() {
27
+ this.get("turboMode") && this.allColumns.set("draw", (e) => {
28
+ e.clear(), O(this.allColumnsData, (t) => {
29
+ const s = t.width, o = t.height, i = t.x, n = t.y, a = t.stroke, r = t.fill, h = t.strokeWidth, u = t.strokeOpacity, c = t.fillOpacity;
30
+ e.beginFill(r, c), e.beginPath(), e.lineStyle(h, a, u), e.drawRect(i, n, s, o), e.endStroke(), e.endFill();
31
+ });
32
+ });
33
+ }
34
+ _updateChildren() {
35
+ this.isDirty("turboMode") && (this.markDirtyValues(), this.get("turboMode") || this.allColumns.set("draw", void 0)), super._updateChildren();
36
+ }
37
+ _updateSeriesGraphics(e, t, s, o, i, n, a, r) {
38
+ if (this.get("turboMode")) {
39
+ t.virtualParent = this.chart, t.parent && (this.mainContainer.children.removeValue(t), t._parent = void 0);
40
+ const h = t.get("stroke"), u = t.get("fillOpacity", 1), c = t.get("strokeOpacity", 1), y = t.get("strokeWidth", 1), x = t.get("fill"), p = this.getPoint(s, i), d = this.getPoint(o, n), l = e.get("point");
41
+ if (l) {
42
+ const f = this.getPoint(l.x, l.y);
43
+ l.x = f.x + this._x, l.y = f.y + this._y;
44
+ }
45
+ s = p.x, o = d.x, i = p.y, n = d.y, e.setRaw("left", s), e.setRaw("right", o), e.setRaw("top", i), e.setRaw("bottom", n), this.allColumnsData.push({ width: o - s, height: n - i, x: s, y: i, stroke: h, fill: x, strokeWidth: y, strokeOpacity: c, fillOpacity: u });
46
+ } else
47
+ t.parent || this.mainContainer.children.push(t), super._updateSeriesGraphics(e, t, s, o, i, n, a, r);
48
+ }
49
+ }
50
+ m.className = "ColumnSeries";
51
+ m.classNames = g.classNames.concat([m.className]);
52
+ export {
53
+ m as C
54
+ };
@@ -0,0 +1,445 @@
1
+ import { A, m as w, e as P, V as k, a as v, t as L, u as F } from "./am-chart.oZVBmpnn.js";
2
+ import { E as S } from "./EditableLabel.DPmicdjK.js";
3
+ class T extends A {
4
+ constructor() {
5
+ super(...arguments), this._frequency = 1, this._itemMap = {};
6
+ }
7
+ _afterNew() {
8
+ this._settings.themeTags = w(this._settings.themeTags, ["axis"]), this.fields.push("category", "id", "cellSize"), this.setPrivateRaw("name", "category"), this.addTag("category"), super._afterNew();
9
+ }
10
+ _afterDataChange() {
11
+ super._afterDataChange();
12
+ const t = this.dataItems.length;
13
+ t > 0 && this.setPrivateRaw("maxZoomFactor", t), this.setPrivateRaw("startIndex", Math.min(this.getPrivate("startIndex", 0), t)), this.setPrivateRaw("endIndex", Math.min(this.getPrivate("endIndex", t), 1));
14
+ }
15
+ _prepareChildren() {
16
+ super._prepareChildren();
17
+ const t = this.dataItems.length;
18
+ let e = 0;
19
+ this._valuesDirty && (this._itemMap = {}, P(this.dataItems, (n) => {
20
+ n.setRaw("index", e), this._itemMap[n.get("category")] = n, e++;
21
+ }), this.setPrivateRaw("maxZoomFactor", t));
22
+ let a = this.get("start", 0), i = this.get("end", 1), s = this._getIndices(a, i);
23
+ this.setPrivateRaw("startIndex", s.startIndex), this.setPrivateRaw("endIndex", s.endIndex), (this._sizeDirty || this._valuesDirty || this.isDirty("start") || this.isDirty("end") || this.isPrivateDirty("endIndex") || this.isPrivateDirty("startIndex") || this.isPrivateDirty("width") || this.isPrivateDirty("height")) && this.dataItems.length > 0 && (this._handleRangeChange(), this._prepareAxisItems(), this._updateAxisRanges());
24
+ }
25
+ /**
26
+ * @ignore
27
+ */
28
+ adjustZoom() {
29
+ const t = this.dataItems.length;
30
+ if (t > 1) {
31
+ let e = this.get("maxZoomCount", this.dataItems.length), a = this.get("minZoomCount", 1), i = 0, s = this.getPrivate("startIndex", 0), n = this.getPrivate("endIndex", 0);
32
+ const d = this._sAnimation, r = this._eAnimation;
33
+ let l = this.get("start", 0), o = !1;
34
+ d && !d.stopped && (l = Number(d.to), o = !0);
35
+ let m = this.get("end", 1);
36
+ if (r && !r.stopped && (m = Number(r.to), o = !0), o) {
37
+ const h = this._getIndices(l, m);
38
+ s = h.startIndex, n = h.endIndex;
39
+ }
40
+ for (let h = s; h < n; h++) {
41
+ const g = this.dataItems[h];
42
+ i += g.get("finalCellSize", 1);
43
+ }
44
+ if (i <= a) {
45
+ let h = 0;
46
+ for (let g = s; g < t; g++) {
47
+ const I = this.dataItems[g];
48
+ if (h += I.get("finalCellSize", 1), n = g + 1, h >= a)
49
+ break;
50
+ }
51
+ if (h < a)
52
+ for (let g = s - 1; g >= 0; g--) {
53
+ const I = this.dataItems[g];
54
+ if (h += I.get("finalCellSize", 1), s = g, h >= a)
55
+ break;
56
+ }
57
+ this.zoomToIndexes(s, n);
58
+ } else if (i >= e) {
59
+ let h = i;
60
+ for (let g = n - 1; g >= s; g--) {
61
+ const I = this.dataItems[g];
62
+ if (h -= I.get("finalCellSize", 1), h <= e) {
63
+ n = g + 1;
64
+ break;
65
+ }
66
+ }
67
+ this.zoomToIndexes(s, n);
68
+ }
69
+ }
70
+ }
71
+ _handleRangeChange() {
72
+ P(this.series, (t) => {
73
+ let e = this.dataItems[this.startIndex()].get("category"), a = this.dataItems[this.endIndex() - 1].get("category"), i = t.get("baseAxis"), s = t.get("xAxis"), n = t.get("yAxis");
74
+ if (s instanceof T && n instanceof T)
75
+ t._markDirtyAxes();
76
+ else if (i === this) {
77
+ let d, r, l = n;
78
+ if (s === i ? (t.get("categoryXField") && (d = "categoryX"), t.get("openCategoryXField") && (r = "openCategoryX")) : n === i && (t.get("categoryYField") && (d = "categoryY"), t.get("openCategoryYField") && (r = "openCategoryY"), l = s), l instanceof k && (d || r)) {
79
+ let h = function(x, p, f, _, R, z) {
80
+ let c, D = p.categoryToIndex(R);
81
+ for (; !c && D >= 0 && D < p.dataItems.length; ) {
82
+ let C = p.dataItems[D].get("category");
83
+ if (z == "previous")
84
+ for (let u = x.dataItems.length - 1; u >= 0; u--) {
85
+ let y = x.dataItems[u];
86
+ if (f && y.get(f) === C) {
87
+ c = y;
88
+ break;
89
+ }
90
+ if (_ && y.get(_) === C) {
91
+ c = y;
92
+ break;
93
+ }
94
+ }
95
+ else
96
+ for (let u = 0, y = x.dataItems.length; u < y; u++) {
97
+ let M = x.dataItems[u];
98
+ if (f && M.get(f) === C) {
99
+ c = M;
100
+ break;
101
+ }
102
+ if (_ && M.get(_) === C) {
103
+ c = M;
104
+ break;
105
+ }
106
+ }
107
+ c || (D += z === "previous" ? -1 : 1);
108
+ }
109
+ return c;
110
+ }, o, m;
111
+ o = h(t, this, d, r, e, "next"), m = h(t, this, d, r, a, "previous");
112
+ let g = 0, I = t.dataItems.length;
113
+ o && (g = t.dataItems.indexOf(o)), m && (I = t.dataItems.indexOf(m) + 1), t.setPrivate("startIndex", g), t.setPrivate("endIndex", I);
114
+ let b = !1;
115
+ for (let x = g; x < I; x++) {
116
+ const p = t.dataItems[x];
117
+ if (P(t.__valueXShowFields, (f) => {
118
+ p.get(f) != null && (b = !0);
119
+ }), P(t.__valueYShowFields, (f) => {
120
+ p.get(f) != null && (b = !0);
121
+ }), b)
122
+ break;
123
+ }
124
+ t.setPrivate("outOfSelection", !b);
125
+ }
126
+ t._markDirtyAxes();
127
+ }
128
+ });
129
+ }
130
+ _prepareAxisItems() {
131
+ var t;
132
+ const e = this.get("renderer"), a = this.dataItems.length;
133
+ let i = this.startIndex();
134
+ i > 0 && i--;
135
+ let s = this.endIndex();
136
+ s < a && s++;
137
+ const n = e.get("minorLabelsEnabled"), d = e.get("minorGridEnabled", n);
138
+ let r = e.axisLength() / Math.max(e.get("minGridDistance"), 1), l = Math.max(1, Math.min(a, Math.ceil((s - i) / r)));
139
+ i = Math.floor(i / l) * l, this._frequency = l;
140
+ for (let m = 0; m < a; m++)
141
+ this._toggleDataItem(this.dataItems[m], !1);
142
+ let o = this.dataItems[i].get("index", 0);
143
+ for (let m = i; m < s; m = m + l) {
144
+ let h = this.dataItems[m];
145
+ this._createAssets(h, []), this._toggleDataItem(h, !0);
146
+ let g = l;
147
+ d && (g = 1), this._prepareDataItem(h, o, g), o++;
148
+ }
149
+ if (e.get("minorGridEnabled"))
150
+ for (let m = i; m < s; m++) {
151
+ let h = this.dataItems[m];
152
+ m % l != 0 && (this._createAssets(h, ["minor"], !0), this._toggleDataItem(h, !0), this._prepareDataItem(h, 0, 1), n || (t = h.get("label")) === null || t === void 0 || t.setPrivate("visible", !1));
153
+ }
154
+ this._updateGhost();
155
+ }
156
+ _prepareDataItem(t, e, a) {
157
+ let i = this.get("renderer"), s = t.get("categoryLocation", 0), n = t.get("endCategoryLocation", 1), d = t.get("index");
158
+ v(d) || (d = this.categoryToIndex(t.get("category")));
159
+ let r = this.indexToPosition(d, s), l = t.get("endCategory"), o;
160
+ l ? (o = this.categoryToIndex(l), v(o) || (o = d)) : o = d;
161
+ let m = this.indexToPosition(o, n), h, g;
162
+ if (t.get("isRange")) {
163
+ if (h = o, !v(d)) {
164
+ this._toggleDataItem(t, !1);
165
+ return;
166
+ }
167
+ } else
168
+ h = d + this._frequency - 1;
169
+ g = this.indexToPosition(h, n), i.updateLabel(t.get("label"), r, m, a), i.updateGrid(t.get("grid"), r, m), i.updateTick(t.get("tick"), r, m, a), i.updateFill(t.get("axisFill"), r, g), this._processBullet(t), i.updateBullet(t.get("bullet"), r, m);
170
+ const I = this.get("fillRule");
171
+ I && I(t, e);
172
+ }
173
+ startIndex() {
174
+ let t = this.dataItems.length;
175
+ return Math.min(Math.max(this.getPrivate("startIndex", 0), 0), t - 1);
176
+ }
177
+ endIndex() {
178
+ let t = this.dataItems.length;
179
+ return Math.max(1, Math.min(this.getPrivate("endIndex", t), t));
180
+ }
181
+ /**
182
+ * @ignore
183
+ */
184
+ baseValue() {
185
+ }
186
+ /**
187
+ * @ignore
188
+ */
189
+ basePosition() {
190
+ return 0;
191
+ }
192
+ /**
193
+ * Returns X coordinate in pixels corresponding to specific category index.
194
+ *
195
+ * @param value Index
196
+ * @return X coordinate
197
+ */
198
+ getX(t) {
199
+ let e = this._itemMap[t];
200
+ return e ? this._settings.renderer.positionToCoordinate(this.indexToPosition(e.get("index", 0))) : NaN;
201
+ }
202
+ /**
203
+ * Returns Y coordinate in pixels corresponding to specific category index.
204
+ *
205
+ * @param value Index
206
+ * @return Y coordinate
207
+ */
208
+ getY(t) {
209
+ let e = this._itemMap[t];
210
+ return e ? this._settings.renderer.positionToCoordinate(this.indexToPosition(e.get("index", 0))) : NaN;
211
+ }
212
+ /**
213
+ * @ignore
214
+ */
215
+ getDataItemPositionX(t, e, a, i) {
216
+ const s = t.get(e), n = this._itemMap[s];
217
+ return n ? this.indexToPosition(n.get("index", 0), a) : NaN;
218
+ }
219
+ /**
220
+ * @ignore
221
+ */
222
+ getDataItemCoordinateX(t, e, a, i) {
223
+ return this._settings.renderer.positionToCoordinate(this.getDataItemPositionX(t, e, a, i));
224
+ }
225
+ /**
226
+ * @ignore
227
+ */
228
+ getDataItemPositionY(t, e, a, i) {
229
+ const s = t.get(e), n = this._itemMap[s];
230
+ return n ? this.indexToPosition(n.get("index", 0), a) : NaN;
231
+ }
232
+ /**
233
+ * @ignore
234
+ */
235
+ getDataItemCoordinateY(t, e, a, i) {
236
+ return this._settings.renderer.positionToCoordinate(this.getDataItemPositionY(t, e, a, i));
237
+ }
238
+ /**
239
+ * Converts category index to a relative position.
240
+ *
241
+ * `location` indicates relative position within category: 0 - start, 1 - end.
242
+ *
243
+ * If not set, will use middle (0.5) of the category.
244
+ *
245
+ * @param index Index
246
+ * @param location Location
247
+ * @return Index
248
+ */
249
+ indexToPosition(t, e, a) {
250
+ let i = this.dataItems.length, s = 0;
251
+ if (i == 0 || (t >= i && (t = i - 1, e = 1), v(e) || (e = 0.5), !v(t)))
252
+ return 0;
253
+ let n = this.get("startLocation", 0), d = this.get("endLocation", 1);
254
+ if (!this.get("cellSizeField"))
255
+ i -= n, i -= 1 - d, s = (t + e - n) / i;
256
+ else {
257
+ let r = a ? "finalCellSize" : "cellSize";
258
+ const l = this.dataItems;
259
+ let o = 0;
260
+ P(this.dataItems, (g) => {
261
+ o += g.get(r, 1);
262
+ }), o -= n * l[0].get(r, 1), o -= (1 - d) * l[l.length - 1].get(r, 1);
263
+ let m = 0;
264
+ for (let g = 0; g < t; g++)
265
+ m += l[g].get(r, 1);
266
+ let h = l[t].get(r, 1);
267
+ s = (m + e * h - n * l[0].get(r, 1)) / o;
268
+ }
269
+ if (!a) {
270
+ let r = this.dataItems[t];
271
+ r && (s += r.get("deltaPosition", 0));
272
+ }
273
+ return s;
274
+ }
275
+ /**
276
+ * Returns a position of a category.
277
+ *
278
+ * @param category Category to look up
279
+ * @return Position
280
+ */
281
+ categoryToPosition(t) {
282
+ let e = this._itemMap[t];
283
+ return e ? this.indexToPosition(e.get("index")) : NaN;
284
+ }
285
+ /**
286
+ * Returns an index of a category.
287
+ *
288
+ * @param category Category to look up
289
+ * @return Index
290
+ */
291
+ categoryToIndex(t) {
292
+ let e = this._itemMap[t];
293
+ return e ? e.get("index") : NaN;
294
+ }
295
+ /**
296
+ * @ignore
297
+ */
298
+ dataItemToPosition(t) {
299
+ return this.indexToPosition(t.get("index"));
300
+ }
301
+ /**
302
+ * @ignore
303
+ */
304
+ roundAxisPosition(t, e) {
305
+ return t += (0.5 - e) / this.dataItems.length, this.indexToPosition(this.axisPositionToIndex(t), e);
306
+ }
307
+ /**
308
+ * Returns an index of the category that corresponds to specific pixel
309
+ * position within axis.
310
+ *
311
+ * @param position Position (px)
312
+ * @return Category index
313
+ */
314
+ axisPositionToIndex(t) {
315
+ let e = this.dataItems.length;
316
+ if (e === 0)
317
+ return 0;
318
+ if (this.get("cellSizeField")) {
319
+ let a = 0, i = [];
320
+ P(this.dataItems, (l) => {
321
+ const o = l.get("cellSize", 1);
322
+ i.push(o), a += o;
323
+ });
324
+ let s = this.get("startLocation", 0), n = this.get("endLocation", 1);
325
+ a -= s, a -= 1 - n;
326
+ let d = t * a + s, r = 0;
327
+ for (let l = 0; l < e; l++) {
328
+ const o = i[l];
329
+ if (d < r + o)
330
+ return l;
331
+ r += o;
332
+ }
333
+ return e - 1;
334
+ } else
335
+ return L(Math.floor(t * e), 0, e - 1);
336
+ }
337
+ /**
338
+ * Returns text to be used in an axis tooltip for specific relative position.
339
+ *
340
+ * @param position Position
341
+ * @return Tooltip text
342
+ */
343
+ getTooltipText(t, e) {
344
+ const a = this.dataItems[this.axisPositionToIndex(t)];
345
+ if (a) {
346
+ const i = a.get("label");
347
+ if (i)
348
+ return F(i, this.get("tooltipText", ""));
349
+ }
350
+ }
351
+ _updateTooltipText(t, e) {
352
+ t._setDataItem(this.dataItems[this.axisPositionToIndex(e)]), t.label.text.markDirtyText();
353
+ }
354
+ /**
355
+ * Returns a data item from series that is closest to the `position`.
356
+ *
357
+ * @param series Series
358
+ * @param position Relative position
359
+ * @return Data item
360
+ */
361
+ getSeriesItem(t, e) {
362
+ if (this.dataItems.length > 0) {
363
+ let a = this.getPrivate("name") + this.get("renderer").getPrivate("letter"), i = this.axisPositionToIndex(e), s = t.dataItems[i], n = this.dataItems[i], d = n.get("category");
364
+ if (s && n && s.get(a) === d)
365
+ return s;
366
+ for (let r = 0, l = t.dataItems.length; r < l; r++) {
367
+ let o = t.dataItems[r];
368
+ if (o.get(a) === d)
369
+ return o;
370
+ }
371
+ }
372
+ }
373
+ _getIndices(t, e) {
374
+ let a = this.dataItems.length, i = 0, s = a, n = "cellSize";
375
+ if (this.get("cellSizeField")) {
376
+ let d = 0;
377
+ const r = this.dataItems;
378
+ if (r.length == 0)
379
+ return { startIndex: 0, endIndex: 0 };
380
+ P(r, (o) => {
381
+ d += o.get(n, 1);
382
+ }), d -= this.get("startLocation", 0) * r[0].get(n, 1), d -= (1 - this.get("endLocation", 1)) * r[r.length - 1].get(n, 1);
383
+ let l = 0;
384
+ for (let o = 0; o < a; o++)
385
+ if (l += this.dataItems[o].get(n, 1), Math.round(l) > Math.round(t * d)) {
386
+ i = o;
387
+ break;
388
+ }
389
+ for (let o = i + 1; o < a; o++)
390
+ if (l += this.dataItems[o].get(n, 1), Math.round(l) >= Math.round(e * d)) {
391
+ s = o + 1;
392
+ break;
393
+ }
394
+ i = Math.max(i, 0), s = Math.min(s, a);
395
+ } else
396
+ i = Math.max(Math.round(this.get("start", 0) * a), 0), s = Math.min(Math.round(this.get("end", 1) * a), a);
397
+ return { startIndex: i, endIndex: s };
398
+ }
399
+ /**
400
+ * Zooms the axis to specific `start` and `end` indexes.
401
+ *
402
+ * Optional `duration` specifies duration of zoom animation in milliseconds.
403
+ *
404
+ * @param start Start index
405
+ * @param end End index
406
+ * @param duration Duration in milliseconds
407
+ */
408
+ zoomToIndexes(t, e, a) {
409
+ let i = this.dataItems.length;
410
+ this.get("cellSizeField") ? (t = Math.min(Math.max(t, 0), i), e = Math.max(Math.min(e, i), 1), this.setPrivateRaw("startIndex", t), this.setPrivateRaw("endIndex", e), this.zoom(this.indexToPosition(t, 0, !0), this.indexToPosition(e, 0, !0), a)) : this.zoom(t / i, e / i, a);
411
+ }
412
+ zoomToCategories(t, e, a) {
413
+ this.zoomToIndexes(this.categoryToIndex(t), this.categoryToIndex(e) + 1, a);
414
+ }
415
+ /**
416
+ * Returns position span between start and end of a single cell in axis.
417
+ *
418
+ * @since 5.2.30
419
+ * @return Position
420
+ */
421
+ getCellWidthPosition() {
422
+ return this._frequency / this.dataItems.length / (this.get("end", 1) - this.get("start", 0));
423
+ }
424
+ /**
425
+ * @ignore
426
+ */
427
+ nextPosition(t) {
428
+ t == null && (t = 1), this.get("renderer").getPrivate("letter") == "Y" && (t *= -1);
429
+ const e = this.getPrivate("tooltipPosition", 0), a = L(this.axisPositionToIndex(e) + t, 0, this.dataItems.length - 1);
430
+ return this.toGlobalPosition(this.indexToPosition(a));
431
+ }
432
+ }
433
+ T.className = "CategoryAxis";
434
+ T.classNames = A.classNames.concat([T.className]);
435
+ class N extends S {
436
+ constructor() {
437
+ super(...arguments), this._tickPoints = [];
438
+ }
439
+ }
440
+ N.className = "EditableAxisLabel";
441
+ N.classNames = S.classNames.concat([N.className]);
442
+ export {
443
+ T as C,
444
+ N as E
445
+ };
@@ -0,0 +1,119 @@
1
+ import { b as p, C as u, R as v, M as m, s as x, c as f, g as c, e as _, d as b, P as w, a as y } from "./am-chart.oZVBmpnn.js";
2
+ class d extends p {
3
+ _afterNew() {
4
+ super._afterNew();
5
+ const e = this.children.push(u.new(this._root, {
6
+ html: '<textarea class="am5-editable-label"></textarea>',
7
+ isMeasured: !1
8
+ }));
9
+ e.hide(), this.setPrivate("input", e);
10
+ let t = this.get("background");
11
+ t ? t.set("themeTags", ["editablelabel", "background"]) : t = this.set("background", v.new(this._root, {
12
+ themeTags: ["editablelabel", "background"]
13
+ }));
14
+ }
15
+ _beforeChanged() {
16
+ if (super._beforeChanged(), this.isDirty("editOn")) {
17
+ this._editOnEvents && this._editOnEvents.dispose();
18
+ const e = this.get("editOn", "click");
19
+ e != "none" && (this._editOnEvents = new m([
20
+ this.getPrivate("input").events.on(e, (t) => {
21
+ }),
22
+ this.events.on(e, (t) => {
23
+ this.set("active", !0);
24
+ })
25
+ ]));
26
+ }
27
+ }
28
+ _prepareChildren() {
29
+ super._prepareChildren(), this._maybeInitTextarea();
30
+ }
31
+ _updateChildren() {
32
+ if (super._updateChildren(), this.isDirty("active")) {
33
+ const e = this.get("active", !1);
34
+ e ? this._startEditing() : this._stopEditing();
35
+ const t = this.get("background");
36
+ t && t.set("active", e);
37
+ }
38
+ this._syncText(), this._syncStyle();
39
+ }
40
+ _maybeInitTextarea() {
41
+ if (!this._isInited()) {
42
+ const e = this.getPrivate("input");
43
+ if (e && e.getPrivate("htmlElement")) {
44
+ const i = e.getPrivate("htmlElement").querySelector(".am5-editable-label");
45
+ i && (this.setPrivate("textarea", i), i.addEventListener("input", (s) => {
46
+ this.get("multiLine") === !1 && (i.value = i.value.replace(/\n/g, " ")), this.set("text", i.value), this._syncStyle();
47
+ }), i.addEventListener("blur", (s) => this.set("active", !1)), x("keyboardevents") && this._disposers.push(f(document, "keydown", (s) => {
48
+ c(s) == "Escape" && this.set("active", !1);
49
+ })), this._disposers.push(f(document, "keydown", (s) => {
50
+ c(s) == "Enter" && this.get("multiLine") === !1 && (s.preventDefault(), this.set("active", !1));
51
+ })), this.events.dispatch("inited", {
52
+ type: "inited",
53
+ target: this
54
+ }));
55
+ }
56
+ }
57
+ }
58
+ _isInited() {
59
+ return !!this.getPrivate("textarea");
60
+ }
61
+ _startEditing() {
62
+ if (!this._isInited()) {
63
+ this.events.once("inited", () => {
64
+ this._startEditing();
65
+ });
66
+ return;
67
+ }
68
+ this._text.set("opacity", 0);
69
+ const e = this.getPrivate("input"), t = this.getPrivate("textarea");
70
+ t && (this.get("text", "") == "" && this.set("text", " "), e.show(0), this.setTimeout(() => {
71
+ this._syncStyle(), t.focus();
72
+ }, 100));
73
+ }
74
+ _stopEditing() {
75
+ if (!this._isInited()) {
76
+ this.events.once("inited", () => {
77
+ this._stopEditing();
78
+ });
79
+ return;
80
+ }
81
+ const e = this.getPrivate("input"), t = this.getPrivate("textarea");
82
+ t && (this.set("text", t.value), e.hide(0), this._text.set("opacity", 1));
83
+ }
84
+ _syncStyle() {
85
+ const e = this.getPrivate("input"), t = this.getPrivate("textarea"), i = e.getPrivate("htmlElement");
86
+ if (t && i) {
87
+ const s = window.getComputedStyle(t);
88
+ _(s, (h) => {
89
+ t.style[h] = "initial";
90
+ }), t.style.color = this.get("fill", b(0)).toCSS(this.get("fillOpacity", 1)), t.style.backgroundColor = "rgba(0, 0, 0, 0)", t.style.border = "none", t.style.outline = "none", t.style.padding = "0", t.wrap = "off", t.style.resize = "none", t.style.overflow = "hidden";
91
+ const g = this.get("maxWidth", 0) - this.get("paddingLeft", 0) - this.get("paddingRight", 0);
92
+ g > 0 ? t.style.maxWidth = g + "px" : t.style.minWidth = "", t.style.height = "auto", t.style.minHeight = t.scrollHeight + "px", this.get("width") && (t.style.width = this.width() - this.get("paddingLeft", 0) - this.get("paddingRight", 0) + "px", t.style.minWidth = "");
93
+ const n = this.get("lineHeight");
94
+ n ? n instanceof w ? t.style.lineHeight = n.value + "" : y(n) && (t.style.lineHeight = n + "") : t.style.lineHeight = "1.2";
95
+ let o = this.get("fontFamily");
96
+ o || (o = getComputedStyle(i, "font-family").getPropertyValue("font-family")), t.style.fontFamily = o;
97
+ let a = this.get("fontSize");
98
+ a ? y(a) ? a = a + "px" : a = a : a = getComputedStyle(i, "font-size").getPropertyValue("font-size"), t.style.fontSize = a;
99
+ let l = this.get("fontWeight");
100
+ l ? l = l : l = getComputedStyle(i, "font-weight").getPropertyValue("font-weight"), t.style.fontWeight = l;
101
+ let r = this.get("fontStyle");
102
+ r ? r = r : r = getComputedStyle(i, "font-style").getPropertyValue("font-style"), t.style.fontStyle = r, this.get("oversizedBehavior") == "wrap" ? t.style.whiteSpace = "pre-wrap" : t.style.whiteSpace = "nowrap", this._root.events.on("frameended", () => {
103
+ t.style.minWidth == "" && (t.style.minWidth = t.scrollWidth + 20 + "px");
104
+ const h = this.get("textAlign", "start");
105
+ h == "center" ? (t.style.textAlign = "center", !i.style.transform.match(/translateX/) && !this.get("width") && (i.style.transform += " translateX(-50%)")) : h == "end" ? (t.style.textAlign = "right", !i.style.transform.match(/translateX/) && !this.get("width") && (i.style.transform += " translateX(-100%)")) : t.style.textAlign = h;
106
+ });
107
+ }
108
+ }
109
+ _syncText() {
110
+ const e = this.getPrivate("textarea");
111
+ let t = this.get("text", "");
112
+ t == " " && (t = ""), e && (e.value = t);
113
+ }
114
+ }
115
+ d.className = "EditableLabel";
116
+ d.classNames = p.classNames.concat([d.className]);
117
+ export {
118
+ d as E
119
+ };
@@ -0,0 +1,40 @@
1
+ import { E as r } from "./am-chart.oZVBmpnn.js";
2
+ class c extends r {
3
+ _afterNew() {
4
+ super._afterNewApplyThemes();
5
+ }
6
+ /**
7
+ * @ignore
8
+ */
9
+ getFill(o) {
10
+ return {
11
+ addColorStop: (n, t) => {
12
+ }
13
+ };
14
+ }
15
+ _changed() {
16
+ super._changed();
17
+ }
18
+ /**
19
+ * @ignore
20
+ */
21
+ getBounds(o) {
22
+ const n = this.get("target");
23
+ if (n) {
24
+ let t = n.globalBounds();
25
+ const a = o.toLocal({ x: t.left, y: t.top }), e = o.toLocal({ x: t.right, y: t.top }), s = o.toLocal({ x: t.right, y: t.bottom }), l = o.toLocal({ x: t.left, y: t.bottom });
26
+ return {
27
+ left: Math.min(a.x, e.x, s.x, l.x),
28
+ top: Math.min(a.y, e.y, s.y, l.y),
29
+ right: Math.max(a.x, e.x, s.x, l.x),
30
+ bottom: Math.max(a.y, e.y, s.y, l.y)
31
+ };
32
+ }
33
+ return o._display.getLocalBounds();
34
+ }
35
+ }
36
+ c.className = "Gradient";
37
+ c.classNames = r.classNames.concat([c.className]);
38
+ export {
39
+ c as G
40
+ };