@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.
- package/library/chunks/AxisLabelRadial.BTpA5dYy.js +11 -0
- package/library/chunks/BaseColumnSeries.hIO71GLG.js +304 -0
- package/library/chunks/CandlestickSeries.w9C0GR9v.js +362 -0
- package/library/chunks/Circle.tOnnO-F-.js +17 -0
- package/library/chunks/ColumnSeries.Ckz75x1M.js +54 -0
- package/library/chunks/EditableAxisLabel.CCMTJT7K.js +445 -0
- package/library/chunks/EditableLabel.DPmicdjK.js +119 -0
- package/library/chunks/Gradient.BrDBLm8v.js +40 -0
- package/library/chunks/LinearGradient.CxfXxvMw.js +37 -0
- package/library/chunks/MonotoneXTension.CJMEHHj3.js +139 -0
- package/library/chunks/Picture.BNASYM-P.js +49 -0
- package/library/chunks/Polygon.Dr-GV2hn.js +70 -0
- package/library/chunks/ProgressPie.4mPA6xqm.js +234 -0
- package/library/chunks/RadialLabel.HfsGiN4x.js +88 -0
- package/library/chunks/Scrollbar.Bgg-RhjP.js +118 -0
- package/library/chunks/Slice.Dm56LTKj.js +120 -0
- package/library/chunks/Slider.FKJwoPq2.js +19 -0
- package/library/chunks/SpriteResizer.-qJDgug8.js +446 -0
- package/library/chunks/Triangle.BECgi7mc.js +21 -0
- package/library/chunks/ZoomTools.cgwuIB0e.js +199 -0
- package/library/chunks/___vite-browser-external_commonjs-proxy.C2tf3HsQ.js +8 -0
- package/library/chunks/{_baseUniq.Df-fLIBx.js → _baseUniq.BUihBa8c.js} +56 -53
- package/library/chunks/{_commonjsHelpers.ByX85dGu.js → _commonjsHelpers.DQNKXVTB.js} +2 -2
- package/library/chunks/accessors.BHk36ecy.js +11 -0
- package/library/chunks/am-chart.oZVBmpnn.js +18435 -0
- package/library/chunks/{animation.DfUHRQry.js → animation.DU8t6mrk.js} +1 -1
- package/library/chunks/{button.SoX-7UYy.js → button.CAAJPQFu.js} +3 -3
- package/library/chunks/{capitalize.WSkCXkNE.js → capitalize.CNStXZBq.js} +1 -1
- package/library/chunks/cardinal.BCA_LB0u.js +64 -0
- package/library/chunks/{color-swatch-group.Dx1fbSJx.js → color-swatch-group.CKHyWM8K.js} +6 -6
- package/library/chunks/{color-swatch.B7XXHxx1.js → color-swatch.BkpPCXd6.js} +2 -2
- package/library/chunks/colorPicker.C4w_vDjh.js +527 -0
- package/library/chunks/{confirm-popover.327ATuQH.js → confirm-popover.ZD74yDWw.js} +3 -3
- package/library/chunks/{content-builder.Bxi6k2LA.js → content-builder.B4Tqoc6M.js} +40 -34
- package/library/chunks/{cropper.BraEEykE.js → cropper.CQB3_qqG.js} +6937 -6935
- package/library/chunks/{dialog.eN3RUbwx.js → dialog.qSV5AjOE.js} +2 -2
- package/library/chunks/{dom.CZrJ64Dm.js → dom.BQVKDNd8.js} +1 -1
- package/library/chunks/{dot-pagination.Bek4w4zz.js → dot-pagination.BN_0ljfc.js} +2 -2
- package/library/chunks/exporting.BdjsEGF8.js +1407 -0
- package/library/chunks/{file-on-demand.BiC4cymk.js → file-on-demand.CXE4zf0J.js} +448 -386
- package/library/chunks/flow.D0FqdfOy.js +1594 -0
- package/library/chunks/{folder-select.DVEFgexx.js → folder-select.CPALQK22.js} +4 -4
- package/library/chunks/{form.CO12-VK0.js → form.DgwYWi0O.js} +1 -1
- package/library/chunks/gantt.DfUM7Gvb.js +2459 -0
- package/library/chunks/{header.Da5yvwdy.js → header.DXZ_5gLY.js} +2 -2
- package/library/chunks/hierarchy.5kfBCoGt.js +3561 -0
- package/library/chunks/{hub-connection.CfARlehM.js → hub-connection.Ot2odiCz.js} +1 -1
- package/library/chunks/{i18n.BMRLOAZR.js → i18n.C0iakJkV.js} +19 -11
- package/library/chunks/{iframe.BJizUE1A.js → iframe.BlzVfeBc.js} +2 -2
- package/library/chunks/{image.bndP5q2c.js → image.B3WjaCXP.js} +2 -2
- package/library/chunks/index.BkoLctE9.js +533 -0
- package/library/chunks/index.CZJTjkLp.js +142 -0
- package/library/chunks/{index.Bhnf0N8Q.js → index.CmVKj_wl.js} +7 -7
- package/library/chunks/index.DU0XUO4k.js +176 -0
- package/library/chunks/index.DcjJFMlq.js +1520 -0
- package/library/chunks/isObjectLike.z36Fu426.js +34 -0
- package/library/chunks/{isSymbol.huJ_Cvxt.js → isSymbol.L0C2ND_U.js} +1 -1
- package/library/chunks/json.BjaT7cyo.js +119 -0
- package/library/chunks/{list-editor.Du1h2Ms0.js → list-editor.CIAAFPco.js} +251 -222
- package/library/chunks/map.DbgNAGxD.js +3037 -0
- package/library/chunks/markerjs2.esm.B_9kjmye.js +1912 -0
- package/library/chunks/{option.Ce_wlnZj.js → option.ByVbmxUQ.js} +2 -2
- package/library/chunks/{pagination.DXu-mFAk.js → pagination.DPQn2fKX.js} +4 -4
- package/library/chunks/pdfmake.Bs7cMDH0.js +41224 -0
- package/library/chunks/percent.DO4FjAdu.js +902 -0
- package/library/chunks/{purify.es.BGaRrCfO.js → purify.es.BIuh5IAZ.js} +115 -115
- package/library/chunks/radar.Dd5fJVMg.js +789 -0
- package/library/chunks/{responsive.DgQTIrna.js → responsive.DL-wBD4P.js} +1 -1
- package/library/chunks/sliceGrouper.DA3aeuJ-.js +93 -0
- package/library/chunks/stock.BfI5MUyK.js +12684 -0
- package/library/chunks/{string.Cp_XNbnV.js → string.B_rEG27K.js} +1 -1
- package/library/chunks/{tab-group.B2pW__9H.js → tab-group.1h51o_Ly.js} +4 -4
- package/library/chunks/{table.5eWm9FfN.js → table.wVHv1Xze.js} +348 -327
- package/library/chunks/timeline.BxMLjB5J.js +837 -0
- package/library/chunks/timer.B39XOBYL.js +123 -0
- package/library/chunks/{toString.CRT5zqEU.js → toString.CL_lYXbK.js} +3 -3
- package/library/chunks/transform.BuqENXeT.js +50 -0
- package/library/chunks/{tree.Zls5YZ8z.js → tree.Bx0IGsWm.js} +2 -2
- package/library/chunks/venn.CxFupTb9.js +966 -0
- package/library/chunks/vfs_fonts.VJpdcrR6.js +9 -0
- package/library/chunks/watch.BCJD77bD.js +547 -0
- package/library/chunks/wc.ThQubbN2.js +255 -0
- package/library/chunks/xlsx.v-qkA-dg.js +25118 -0
- package/library/chunks/xy.q6e68du3.js +333 -0
- package/library/components/alert.js +2 -2
- package/library/components/am-chart.d.ts +3 -0
- package/library/components/am-chart.js +11 -0
- package/library/components/animated-image.js +1 -1
- package/library/components/animation.js +2 -2
- package/library/components/array-line-clamp.js +1 -1
- package/library/components/asset-link-format.js +7 -7
- package/library/components/atoms.js +166 -162
- package/library/components/avatar.js +1 -1
- package/library/components/border-input-group.js +1 -1
- package/library/components/breadcrumb-item.js +1 -1
- package/library/components/breadcrumb.js +1 -1
- package/library/components/button.js +4 -4
- package/library/components/checkbox.js +2 -2
- package/library/components/color-picker.js +4 -4
- package/library/components/color-swatch-group.js +7 -7
- package/library/components/color-swatch.js +3 -3
- package/library/components/confirm-popover.js +4 -4
- package/library/components/copy-button.js +2 -2
- package/library/components/corner-position-input-group.js +2 -2
- package/library/components/cropper.js +1 -1
- package/library/components/details.js +3 -2
- package/library/components/dialog.js +3 -3
- package/library/components/divider.js +1 -1
- package/library/components/dot-pagination.js +3 -3
- package/library/components/drawer.js +3 -3
- package/library/components/dropdown.js +2 -2
- package/library/components/dynamic-select.js +32 -30
- package/library/components/e-chart.d.ts +3 -0
- package/library/components/e-chart.js +47908 -0
- package/library/components/element-clamp.js +3 -3
- package/library/components/file-on-demand.js +10 -10
- package/library/components/folder-select.js +4 -4
- package/library/components/format-bytes.js +1 -1
- package/library/components/format-date.js +1 -1
- package/library/components/format-number.js +1 -1
- package/library/components/format-time.js +2 -2
- package/library/components/grid-item.js +1 -1
- package/library/components/header.js +3 -3
- package/library/components/hub-connection.js +2 -2
- package/library/components/icon-button.js +1 -1
- package/library/components/icon.js +1 -1
- package/library/components/iframe.js +3 -3
- package/library/components/image-comparer.js +2 -2
- package/library/components/image.js +3 -3
- package/library/components/include.js +1 -1
- package/library/components/input.js +3 -3
- package/library/components/line-clamp.js +1 -1
- package/library/components/list-editor.js +11 -8
- package/library/components/markdown.js +2 -2
- package/library/components/masonry.js +2 -2
- package/library/components/menu-item.js +2 -2
- package/library/components/menu.js +1 -1
- package/library/components/molecules.js +5 -5
- package/library/components/mutation-observer.js +1 -1
- package/library/components/option.js +3 -3
- package/library/components/organisms.js +2 -2
- package/library/components/pagination.js +5 -5
- package/library/components/popup.js +1 -1
- package/library/components/position-picker.js +1 -1
- package/library/components/progress-bar.js +1 -1
- package/library/components/progress-ring.js +1 -1
- package/library/components/qr-code.js +1 -1
- package/library/components/radio-button.js +1 -1
- package/library/components/radio-card.js +1 -1
- package/library/components/radio-group.js +2 -2
- package/library/components/radio.js +1 -1
- package/library/components/range.js +3 -3
- package/library/components/rating.js +2 -2
- package/library/components/relative-time.js +1 -1
- package/library/components/resize-observer.js +1 -1
- package/library/components/select.js +4 -4
- package/library/components/share-option-list.js +3 -3
- package/library/components/sidebar.js +1 -1
- package/library/components/size-input-group.js +2 -2
- package/library/components/spinner.js +1 -1
- package/library/components/split-panel.js +2 -2
- package/library/components/stepper.js +1 -1
- package/library/components/switch.js +2 -2
- package/library/components/tab-group.js +5 -5
- package/library/components/tab-panel.js +1 -1
- package/library/components/tab.js +2 -2
- package/library/components/table.js +5 -5
- package/library/components/tag.js +1 -1
- package/library/components/textarea.js +2 -2
- package/library/components/timecode.js +2 -2
- package/library/components/tooltip.js +2 -2
- package/library/components/tree-item.js +3 -3
- package/library/components/tree.js +3 -3
- package/library/components/typeface.js +2 -2
- package/library/components/types.js +27684 -27970
- package/library/components/video.js +1107 -1110
- package/library/package.json +1 -1
- package/library/packages/atoms/src/components/am-chart/am-chart.d.ts +45 -0
- package/library/packages/atoms/src/components/am-chart/am-chart.styles.d.ts +2 -0
- package/library/packages/atoms/src/components/am-chart/am-chart.utils.d.ts +23 -0
- package/library/packages/atoms/src/components/e-chart/e-chart-controller.d.ts +30 -0
- package/library/packages/atoms/src/components/e-chart/e-chart.d.ts +38 -0
- package/library/packages/atoms/src/components/e-chart/e-chart.styles.d.ts +2 -0
- package/library/packages/atoms/src/components/table/table.d.ts +21 -0
- package/library/packages/atoms/src/components/table/tabulator-tables/core/Tabulator.d.ts +1 -0
- package/library/packages/atoms/src/components/table/tabulator-tables/core/tools/DataLoader.d.ts +3 -1
- package/library/packages/atoms/src/index.d.ts +2 -0
- package/library/packages/events/src/cx-chart-plan-change.d.ts +10 -0
- package/library/packages/events/src/cx-dashboard-filter-change.d.ts +6 -0
- package/library/packages/events/src/cx-dashboard-table-load-more.d.ts +9 -0
- package/library/packages/events/src/cx-e-chart-drill-down.d.ts +16 -0
- package/library/packages/events/src/events.d.ts +4 -0
- package/library/packages/molecules/src/index.d.ts +1 -0
- package/library/packages/molecules/src/list-editor/list-editor.d.ts +7 -0
- package/library/packages/molecules/src/stat-card/stat-card.d.ts +81 -0
- package/library/packages/molecules/src/stat-card/stat-card.styles.d.ts +2 -0
- package/library/packages/molecules/src/storybook/storybook.d.ts +1 -0
- package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +1 -1
- package/library/packages/organisms/src/content-builder/components/chart-plan-builder/chart-plan-builder.d.ts +88 -0
- package/library/packages/organisms/src/content-builder/components/chart-plan-builder/chart-plan-builder.styles.d.ts +2 -0
- package/library/packages/organisms/src/content-builder/components/chart-plan-builder/chart-plan-schema.d.ts +100 -0
- package/library/packages/organisms/src/content-builder/styleController.d.ts +2 -2
- package/library/packages/organisms/src/dashboard-filter/dashboard-filter.d.ts +83 -0
- package/library/packages/organisms/src/dashboard-filter/dashboard-filter.styles.d.ts +2 -0
- package/library/packages/organisms/src/dashboard-table/dashboard-table.d.ts +45 -0
- package/library/packages/organisms/src/dashboard-table/dashboard-table.styles.d.ts +2 -0
- package/library/packages/organisms/src/index.d.ts +3 -0
- package/library/packages/services/src/api/endpoints.d.ts +3 -0
- package/library/packages/types/src/am-chart.d.ts +22 -0
- package/library/packages/types/src/content-builder.d.ts +1 -0
- package/library/packages/types/src/stat-card.d.ts +19 -0
- package/library/packages/types/src/table.d.ts +4 -0
- package/library/packages/utils/src/custom-element/i18n.d.ts +8 -0
- package/library/react-web-component.d.ts +280 -4
- package/library/utils.js +8 -8
- package/package.json +1 -1
- package/library/chunks/_baseRest.ClTMQtN1.js +0 -67
- package/library/chunks/identity.ByMq8VxU.js +0 -6
- package/library/chunks/isObjectLike.D3cpZO39.js +0 -81
- package/library/chunks/watch.q1sEjPWL.js +0 -501
|
@@ -0,0 +1,446 @@
|
|
|
1
|
+
import { E as C, ad as V, c as P, s as G, g as H, M as O, ac as h, ae as X, G as z, J as F, L as k, T as w, C as v, R as y, m as g, b as E, w as Y, d as j, aj as q, q as b, P as B, h as M, j as A } from "./am-chart.oZVBmpnn.js";
|
|
2
|
+
let x;
|
|
3
|
+
function J(r, e, t) {
|
|
4
|
+
const i = e.interfaceColors, a = i.get("secondaryButton").toCSS(), n = i.get("text").toCSS(), o = i.get("alternativeBackground").toCSS(0.45);
|
|
5
|
+
if (!x) {
|
|
6
|
+
const s = new O([
|
|
7
|
+
new h(r, ".am5-modal", {
|
|
8
|
+
width: "100%",
|
|
9
|
+
height: "100%",
|
|
10
|
+
position: "absolute",
|
|
11
|
+
"z-index": "100000",
|
|
12
|
+
top: "0",
|
|
13
|
+
left: "0"
|
|
14
|
+
}, e.nonce),
|
|
15
|
+
new h(r, ".am5-modal-curtain", {
|
|
16
|
+
top: "0",
|
|
17
|
+
left: "0",
|
|
18
|
+
width: "100%",
|
|
19
|
+
height: "100%",
|
|
20
|
+
position: "absolute",
|
|
21
|
+
background: i.get("background").toCSS(0.5),
|
|
22
|
+
"z-index": "100"
|
|
23
|
+
}, e.nonce),
|
|
24
|
+
new h(r, ".am5-modal-wrapper", {
|
|
25
|
+
top: "0",
|
|
26
|
+
left: "0",
|
|
27
|
+
width: "100%",
|
|
28
|
+
height: "100%",
|
|
29
|
+
position: "absolute",
|
|
30
|
+
"text-align": "center",
|
|
31
|
+
"white-space": "nowrap",
|
|
32
|
+
background: i.get("background").toCSS(0.5),
|
|
33
|
+
"z-index": "101"
|
|
34
|
+
}, e.nonce),
|
|
35
|
+
new h(r, ".am5-modal-wrapper:before", {
|
|
36
|
+
content: "''",
|
|
37
|
+
display: "inline-block",
|
|
38
|
+
height: "100%",
|
|
39
|
+
"vertical-align": "middle",
|
|
40
|
+
"margin-right": "-0.25em"
|
|
41
|
+
}, e.nonce),
|
|
42
|
+
new h(r, ".am5-modal-content", {
|
|
43
|
+
display: "inline-block",
|
|
44
|
+
padding: "1.2em",
|
|
45
|
+
"vertical-align": "middle",
|
|
46
|
+
"text-align": "start",
|
|
47
|
+
"white-space": "normal",
|
|
48
|
+
background: i.get("background").toCSS(),
|
|
49
|
+
//"border": "1px solid " + ic.get("alternativeBackground")!.toCSS(),
|
|
50
|
+
"border-radius": "4px",
|
|
51
|
+
"-webkit-box-shadow": "0px 0px 36px 0px " + o,
|
|
52
|
+
"box-shadow": "0px 0px 36px 0px " + o,
|
|
53
|
+
color: n
|
|
54
|
+
}, e.nonce),
|
|
55
|
+
new h(r, ".am5-modal-content h1", {
|
|
56
|
+
"font-size": "1em",
|
|
57
|
+
margin: "0 0 0.5em 0"
|
|
58
|
+
}, e.nonce),
|
|
59
|
+
new h(r, ".am5-modal-table", {
|
|
60
|
+
display: "table",
|
|
61
|
+
margin: "1em 0"
|
|
62
|
+
}, e.nonce),
|
|
63
|
+
new h(r, ".am5-modal-table-row", {
|
|
64
|
+
display: "table-row"
|
|
65
|
+
}, e.nonce),
|
|
66
|
+
new h(r, ".am5-modal-table-heading", {
|
|
67
|
+
display: "table-heading",
|
|
68
|
+
padding: "3px 10px 3px 0"
|
|
69
|
+
}, e.nonce),
|
|
70
|
+
new h(r, ".am5-modal-table-cell", {
|
|
71
|
+
display: "table-cell",
|
|
72
|
+
padding: "3px 0 3px 0"
|
|
73
|
+
}, e.nonce),
|
|
74
|
+
new h(r, ".am5-modal-table-cell > *", {
|
|
75
|
+
"vertical-align": "middle"
|
|
76
|
+
}, e.nonce),
|
|
77
|
+
new h(r, ".am5-modal-content input[type=text], .am5-modal-content input[type=number], .am5-modal-content select", {
|
|
78
|
+
border: "1px solid " + a,
|
|
79
|
+
"border-radius": "4px",
|
|
80
|
+
padding: "3px 5px",
|
|
81
|
+
margin: "2px"
|
|
82
|
+
}, e.nonce),
|
|
83
|
+
new h(r, ".am5-modal-input-narrow", {
|
|
84
|
+
width: "50px"
|
|
85
|
+
}, e.nonce),
|
|
86
|
+
new h(r, ".am5-modal-button", {
|
|
87
|
+
"font-weight": "400",
|
|
88
|
+
color: i.get("secondaryButtonText").toCSS(),
|
|
89
|
+
"line-height": "1.5",
|
|
90
|
+
"text-align": "center",
|
|
91
|
+
"text-decoration": "none",
|
|
92
|
+
"vertical-align": "middle",
|
|
93
|
+
cursor: "pointer",
|
|
94
|
+
padding: "0.2em 0.8em",
|
|
95
|
+
"font-size": "1em",
|
|
96
|
+
"border-radius": "0.25em",
|
|
97
|
+
margin: "0 0.25em 0 0",
|
|
98
|
+
border: "1px solid " + i.get("secondaryButtonStroke").toCSS(),
|
|
99
|
+
background: i.get("secondaryButton").toCSS()
|
|
100
|
+
}, e.nonce),
|
|
101
|
+
new h(r, ".am5-modal-button:hover", {
|
|
102
|
+
background: i.get("secondaryButtonHover").toCSS()
|
|
103
|
+
}, e.nonce),
|
|
104
|
+
new h(r, ".am5-modal-button.am5-modal-primary", {
|
|
105
|
+
color: i.get("primaryButtonText").toCSS(),
|
|
106
|
+
border: "1px solid " + i.get("primaryButtonStroke").toCSS(),
|
|
107
|
+
background: i.get("primaryButton").toCSS()
|
|
108
|
+
}, e.nonce),
|
|
109
|
+
new h(r, ".am5-modal-button.am5-modal-primary:hover", {
|
|
110
|
+
background: i.get("primaryButtonHover").toCSS()
|
|
111
|
+
}, e.nonce)
|
|
112
|
+
]);
|
|
113
|
+
x = new X(() => {
|
|
114
|
+
x = void 0, s.dispose();
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
return x.increment();
|
|
118
|
+
}
|
|
119
|
+
class S extends C {
|
|
120
|
+
//protected _currentPass: number = 0;
|
|
121
|
+
_afterNew() {
|
|
122
|
+
super._afterNewApplyThemes(), this._setRawDefault("deactivateRoot", !0), J(V(this._root.dom), this._root);
|
|
123
|
+
const e = document.createElement("div");
|
|
124
|
+
e.className = "am5-modal", e.style.display = "none", this.root._inner.appendChild(e), this.setPrivate("container", e);
|
|
125
|
+
const t = document.createElement("div");
|
|
126
|
+
t.className = "am5-modal-curtain", e.appendChild(t), this.setPrivate("curtain", t), this._disposers.push(P(t, "click", () => {
|
|
127
|
+
this.cancel();
|
|
128
|
+
}));
|
|
129
|
+
const i = document.createElement("div");
|
|
130
|
+
i.className = "am5-modal-wrapper", e.appendChild(i), this.setPrivate("wrapper", i);
|
|
131
|
+
const a = document.createElement("div");
|
|
132
|
+
a.className = "am5-modal-content", i.appendChild(a), this.setPrivate("content", a);
|
|
133
|
+
const n = this.get("content");
|
|
134
|
+
n && (a.innerHTML = n), G("keyboardevents") && this._disposers.push(P(document, "keydown", (o) => {
|
|
135
|
+
this.isOpen() && H(o) == "Escape" && this.cancel();
|
|
136
|
+
}));
|
|
137
|
+
}
|
|
138
|
+
_beforeChanged() {
|
|
139
|
+
super._beforeChanged(), this.isDirty("content") && (this.getPrivate("content").innerHTML = this.get("content", ""));
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Returns `true` if modal is currently open.
|
|
143
|
+
*
|
|
144
|
+
* @return Modal open?
|
|
145
|
+
*/
|
|
146
|
+
isOpen() {
|
|
147
|
+
return this.getPrivate("container").style.display != "none";
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Opens modal.
|
|
151
|
+
*/
|
|
152
|
+
open() {
|
|
153
|
+
this.getPrivate("container").style.display = "block", this.get("deactivateRoot") && this.setTimeout(() => {
|
|
154
|
+
this._root._renderer.interactionsEnabled = !1;
|
|
155
|
+
}, 10), this.events.dispatch("opened", {
|
|
156
|
+
type: "opened",
|
|
157
|
+
target: this
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Closes modal.
|
|
162
|
+
*/
|
|
163
|
+
close() {
|
|
164
|
+
this.getPrivate("container").style.display = "none", this.get("deactivateRoot") && (this._root._renderer.interactionsEnabled = !0), this.events.dispatch("closed", {
|
|
165
|
+
type: "closed",
|
|
166
|
+
target: this
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Closes modal and invokes `cancelled` event.
|
|
171
|
+
*/
|
|
172
|
+
cancel() {
|
|
173
|
+
this.getPrivate("container").style.display = "none", this.get("deactivateRoot") && (this._root._renderer.interactionsEnabled = !0), this.events.dispatch("cancelled", {
|
|
174
|
+
type: "cancelled",
|
|
175
|
+
target: this
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Disposes modal.
|
|
180
|
+
*/
|
|
181
|
+
_dispose() {
|
|
182
|
+
super._dispose();
|
|
183
|
+
const e = this.getPrivate("container");
|
|
184
|
+
e.parentElement && e.parentElement.removeChild(e);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
S.className = "Modal";
|
|
188
|
+
S.classNames = C.classNames.concat([S.className]);
|
|
189
|
+
class T extends C {
|
|
190
|
+
_afterNew() {
|
|
191
|
+
super._afterNewApplyThemes();
|
|
192
|
+
}
|
|
193
|
+
_beforeChanged() {
|
|
194
|
+
if (super._beforeChanged(), this.isDirty("sprite")) {
|
|
195
|
+
const e = this.get("sprite");
|
|
196
|
+
e && (e.setAll({ position: "absolute", role: "figure" }), this._disposers.push(e));
|
|
197
|
+
}
|
|
198
|
+
(this.isDirty("locationX") || this.isDirty("locationY")) && this.series && this.series._positionBullet(this);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
T.className = "Bullet";
|
|
202
|
+
T.classNames = C.classNames.concat([T.className]);
|
|
203
|
+
class D extends z {
|
|
204
|
+
_beforeChanged() {
|
|
205
|
+
super._beforeChanged(), (this.isDirty("radiusX") || this.isDirty("radiusY") || this.isDirty("rotation")) && (this._clear = !0);
|
|
206
|
+
}
|
|
207
|
+
_changed() {
|
|
208
|
+
super._changed(), this._clear && this._display.drawEllipse(0, 0, Math.abs(this.get("radiusX")), Math.abs(this.get("radiusY")));
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
D.className = "Ellipse";
|
|
212
|
+
D.classNames = z.classNames.concat([D.className]);
|
|
213
|
+
class L extends F {
|
|
214
|
+
constructor() {
|
|
215
|
+
super(...arguments), this.itemContainers = this.addDisposer(new k(w.new({}), () => v._new(this._root, {
|
|
216
|
+
themeTags: g(this.itemContainers.template.get("themeTags", []), ["legend", "item"]),
|
|
217
|
+
themeTagsSelf: g(this.itemContainers.template.get("themeTagsSelf", []), ["itemcontainer"]),
|
|
218
|
+
background: y.new(this._root, {
|
|
219
|
+
themeTags: g(this.itemContainers.template.get("themeTags", []), ["legend", "item", "background"]),
|
|
220
|
+
themeTagsSelf: g(this.itemContainers.template.get("themeTagsSelf", []), ["itemcontainer"])
|
|
221
|
+
})
|
|
222
|
+
}, [this.itemContainers.template]))), this.markers = this.addDisposer(new k(w.new({}), () => v._new(this._root, {
|
|
223
|
+
themeTags: g(this.markers.template.get("themeTags", []), ["legend", "marker"])
|
|
224
|
+
}, [this.markers.template]))), this.labels = this.addDisposer(new k(w.new({}), () => E._new(this._root, {
|
|
225
|
+
themeTags: g(this.labels.template.get("themeTags", []), ["legend", "label"])
|
|
226
|
+
}, [this.labels.template]))), this.valueLabels = this.addDisposer(new k(w.new({}), () => E._new(this._root, {
|
|
227
|
+
themeTags: g(this.valueLabels.template.get("themeTags", []), ["legend", "label", "value"])
|
|
228
|
+
}, [this.valueLabels.template]))), this.markerRectangles = this.addDisposer(new k(w.new({}), () => y._new(this._root, {
|
|
229
|
+
themeTags: g(this.markerRectangles.template.get("themeTags", []), ["legend", "marker", "rectangle"])
|
|
230
|
+
}, [this.markerRectangles.template])));
|
|
231
|
+
}
|
|
232
|
+
_afterNew() {
|
|
233
|
+
this._settings.themeTags = g(this._settings.themeTags, ["legend"]), this.fields.push("name", "stroke", "fill"), super._afterNew();
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* @ignore
|
|
237
|
+
*/
|
|
238
|
+
makeItemContainer(e) {
|
|
239
|
+
const t = this.children.push(this.itemContainers.make());
|
|
240
|
+
return t._setDataItem(e), this.itemContainers.push(t), t.states.create("disabled", {}), t;
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* @ignore
|
|
244
|
+
*/
|
|
245
|
+
makeMarker() {
|
|
246
|
+
const e = this.markers.make();
|
|
247
|
+
return this.markers.push(e), e.states.create("disabled", {}), e;
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* @ignore
|
|
251
|
+
*/
|
|
252
|
+
makeLabel() {
|
|
253
|
+
const e = this.labels.make();
|
|
254
|
+
return e.states.create("disabled", {}), e;
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* @ignore
|
|
258
|
+
*/
|
|
259
|
+
makeValueLabel() {
|
|
260
|
+
const e = this.valueLabels.make();
|
|
261
|
+
return e.states.create("disabled", {}), e;
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* @ignore
|
|
265
|
+
*/
|
|
266
|
+
makeMarkerRectangle() {
|
|
267
|
+
const e = this.markerRectangles.make();
|
|
268
|
+
return e.states.create("disabled", {}), e;
|
|
269
|
+
}
|
|
270
|
+
processDataItem(e) {
|
|
271
|
+
super.processDataItem(e);
|
|
272
|
+
const t = this.makeItemContainer(e), i = this.get("nameField"), a = this.get("fillField"), n = this.get("strokeField");
|
|
273
|
+
if (t) {
|
|
274
|
+
const o = this.get("clickTarget", "itemContainer"), s = e.dataContext;
|
|
275
|
+
s && s.set && s.set("legendDataItem", e), t._setDataItem(e), e.set("itemContainer", t);
|
|
276
|
+
const p = this.makeMarker();
|
|
277
|
+
if (p) {
|
|
278
|
+
t.children.push(p), p._setDataItem(e), e.set("marker", p);
|
|
279
|
+
const l = this.get("useDefaultMarker"), c = p.children.push(this.makeMarkerRectangle());
|
|
280
|
+
let f = e.get("fill"), u = e.get("stroke");
|
|
281
|
+
e.set("markerRectangle", c), s && s.get && (f = s.get(a, f), u = s.get(n, u)), u || (u = f), l ? s.on && (s.on(a, () => {
|
|
282
|
+
c.set("fill", s.get(a));
|
|
283
|
+
}), s.on(n, () => {
|
|
284
|
+
c.set("stroke", s.get(n));
|
|
285
|
+
})) : s && s.createLegendMarker && s.createLegendMarker(), c.setAll({ fill: f, stroke: u });
|
|
286
|
+
const _ = s.component;
|
|
287
|
+
_ && _.updateLegendMarker && _.updateLegendMarker(s);
|
|
288
|
+
}
|
|
289
|
+
const d = this.makeLabel();
|
|
290
|
+
if (d) {
|
|
291
|
+
t.children.push(d), d._setDataItem(e), e.set("label", d), d.text.on("text", () => {
|
|
292
|
+
t.setRaw("ariaLabel", d.text._getText() + (this.get("clickTarget") !== "none" ? "; " + this._t("Press ENTER to toggle") : "")), t.markDirtyAccessibility();
|
|
293
|
+
}), s && s.get && e.set("name", s.get(i));
|
|
294
|
+
let l = e.get("name");
|
|
295
|
+
l && d.set("text", l);
|
|
296
|
+
}
|
|
297
|
+
const m = this.makeValueLabel();
|
|
298
|
+
if (m && (t.children.push(m), m._setDataItem(e), e.set("valueLabel", m)), s && s.show && (s.on("visible", (l) => {
|
|
299
|
+
t.set("disabled", !l);
|
|
300
|
+
}), s.get("visible") || t.set("disabled", !0), o != "none")) {
|
|
301
|
+
let l = t;
|
|
302
|
+
o == "marker" && (l = p), this._addClickEvents(l, s, e);
|
|
303
|
+
}
|
|
304
|
+
this.children.values.sort((l, c) => {
|
|
305
|
+
const f = l.dataItem.dataContext, u = c.dataItem.dataContext;
|
|
306
|
+
if (f && u) {
|
|
307
|
+
const _ = this.data.indexOf(f), R = this.data.indexOf(u);
|
|
308
|
+
if (_ > R)
|
|
309
|
+
return 1;
|
|
310
|
+
if (_ < R)
|
|
311
|
+
return -1;
|
|
312
|
+
}
|
|
313
|
+
return 0;
|
|
314
|
+
}), s && s.updateLegendValue && s.updateLegendValue();
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
_addClickEvents(e, t, i) {
|
|
318
|
+
e.set("cursorOverStyle", "pointer"), e.events.on("pointerover", () => {
|
|
319
|
+
const a = t.component;
|
|
320
|
+
a && a.hoverDataItem && a.hoverDataItem(t);
|
|
321
|
+
}), e.events.on("pointerout", () => {
|
|
322
|
+
const a = t.component;
|
|
323
|
+
a && a.hoverDataItem && a.unhoverDataItem(t);
|
|
324
|
+
}), e.events.on("click", () => {
|
|
325
|
+
const a = i.get("label").text._getText();
|
|
326
|
+
t.show && t.isHidden && (t.isHidden() || t.get("visible") === !1) ? (t.show(), e.set("disabled", !1), this._root.readerAlert(this._t("%1 shown", this._root.locale, a))) : t.hide && (t.hide(), e.set("disabled", !0), this._root.readerAlert(this._t("%1 hidden", this._root.locale, a)));
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* @ignore
|
|
331
|
+
*/
|
|
332
|
+
disposeDataItem(e) {
|
|
333
|
+
super.disposeDataItem(e);
|
|
334
|
+
const t = e.dataContext;
|
|
335
|
+
t && t.get && t.get("legendDataItem") == e && t.set("legendDataItem", void 0);
|
|
336
|
+
let i = e.get("itemContainer");
|
|
337
|
+
i && (this.itemContainers.removeValue(i), i.dispose());
|
|
338
|
+
let a = e.get("marker");
|
|
339
|
+
a && (this.markers.removeValue(a), a.dispose());
|
|
340
|
+
let n = e.get("markerRectangle");
|
|
341
|
+
n && (this.markerRectangles.removeValue(n), n.dispose());
|
|
342
|
+
let o = e.get("label");
|
|
343
|
+
o && (this.labels.removeValue(o), o.dispose());
|
|
344
|
+
let s = e.get("valueLabel");
|
|
345
|
+
s && (this.valueLabels.removeValue(s), s.dispose());
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
L.className = "Legend";
|
|
349
|
+
L.classNames = F.classNames.concat([L.className]);
|
|
350
|
+
class N extends v {
|
|
351
|
+
constructor() {
|
|
352
|
+
super(...arguments), this.rectangle = this.children.push(Y.new(this._root, { themeTags: ["rectangle"], fillOpacity: 0, fill: j(16777215) })), this.gripL = this._createGrip("left"), this.gripR = this._createGrip("right"), this.gripT = this._createGrip("top"), this.gripB = this._createGrip("bottom"), this._is = 1, this._ix = 0, this._iw = 0, this._isHover = !1;
|
|
353
|
+
}
|
|
354
|
+
_afterNew() {
|
|
355
|
+
super._afterNew(), this.addTag("resizer"), this.set("visible", !1), this.gripL.events.on("dragged", (e) => {
|
|
356
|
+
this._resize(e.target, -1);
|
|
357
|
+
}), this.gripR.events.on("dragged", (e) => {
|
|
358
|
+
this._resize(e.target, 1);
|
|
359
|
+
}), this.gripL.events.on("dragstart", (e) => {
|
|
360
|
+
this._resizeStart(e.target);
|
|
361
|
+
}), this.gripR.events.on("dragstart", (e) => {
|
|
362
|
+
this._resizeStart(e.target);
|
|
363
|
+
}), this.gripT.events.on("dragged", (e) => {
|
|
364
|
+
this._rotate(e, 90);
|
|
365
|
+
}), this.gripB.events.on("dragged", (e) => {
|
|
366
|
+
this._rotate(e, -90);
|
|
367
|
+
}), this.gripT.events.on("dragstart", (e) => {
|
|
368
|
+
this._resizeStart(e.target);
|
|
369
|
+
}), this.gripB.events.on("dragstart", (e) => {
|
|
370
|
+
this._resizeStart(e.target);
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
_resizeStart(e) {
|
|
374
|
+
const t = this.get("sprite");
|
|
375
|
+
t && (this._is = t.get("scale", 1), this._ix = e.x(), this._iw = this.width() / 2);
|
|
376
|
+
}
|
|
377
|
+
_resize(e, t) {
|
|
378
|
+
const i = this.get("sprite"), a = this.get("spriteTemplate");
|
|
379
|
+
if (i) {
|
|
380
|
+
const n = Math.max(0.01, this._is * (1 + t * (e.x() - this._ix) / this._iw));
|
|
381
|
+
a ? a.set("scale", n) : i.set("scale", n), i.states.lookup("default").set("scale", n), this._updatePositions();
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
_rotate(e, t) {
|
|
385
|
+
const i = this.get("sprite"), a = this.get("spriteTemplate");
|
|
386
|
+
if (i) {
|
|
387
|
+
const n = this.parent;
|
|
388
|
+
if (n) {
|
|
389
|
+
const o = this.get("rotationStep", 10);
|
|
390
|
+
let s = Math.round((q({ x: this.x(), y: this.y() }, n.toLocal(e.point)) + t) / o) * o;
|
|
391
|
+
a ? a.set("rotation", s) : i.set("rotation", s), i.states.lookup("default").set("rotation", s), this._updatePositions();
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
_createGrip(e) {
|
|
396
|
+
const t = this.children.push(v.new(this._root, {
|
|
397
|
+
themeTags: ["grip", e],
|
|
398
|
+
setStateOnChildren: !0,
|
|
399
|
+
draggable: !0
|
|
400
|
+
}));
|
|
401
|
+
return t.children.push(y.new(this._root, {
|
|
402
|
+
themeTags: ["outline"],
|
|
403
|
+
centerX: b,
|
|
404
|
+
centerY: b
|
|
405
|
+
})), t.children.push(y.new(this._root, {
|
|
406
|
+
centerX: b,
|
|
407
|
+
centerY: b
|
|
408
|
+
})), t;
|
|
409
|
+
}
|
|
410
|
+
_updateChildren() {
|
|
411
|
+
if (super._updateChildren(), this.isDirty("sprite")) {
|
|
412
|
+
const e = this.get("sprite");
|
|
413
|
+
if (e) {
|
|
414
|
+
this.show(0), this.setPrivate("visible", !0), this._updatePositions();
|
|
415
|
+
const t = e.parent;
|
|
416
|
+
t && t.children.moveValue(this, 0), this._positionDP = e.events.on("positionchanged", () => {
|
|
417
|
+
this._updatePositions();
|
|
418
|
+
}), this._positionDP = e.events.on("boundschanged", () => {
|
|
419
|
+
this._updatePositions();
|
|
420
|
+
});
|
|
421
|
+
} else
|
|
422
|
+
this.hide(0), this.setPrivate("visible", !1), this._positionDP && this._positionDP.dispose();
|
|
423
|
+
}
|
|
424
|
+
(this.isDirty("width") || this.isDirty("height") || this.isDirty("rotation")) && this._updatePositions();
|
|
425
|
+
}
|
|
426
|
+
_updatePositions() {
|
|
427
|
+
const e = this.get("sprite");
|
|
428
|
+
if (e) {
|
|
429
|
+
let t = e.localBounds(), i = e.get("scale", 1), a = 20, n = (t.right - t.left) * i + a, o = (t.bottom - t.top) * i + a, s = e.get("rotation", 0);
|
|
430
|
+
const p = this.rectangle;
|
|
431
|
+
let d = e.get("centerX", b), m = e.get("centerY", b), l = 0;
|
|
432
|
+
d instanceof B && (l = d.value);
|
|
433
|
+
let c = 0;
|
|
434
|
+
m instanceof B && (c = m.value), p.setAll({ centerX: d, centerY: m, width: n, height: o }), this.setAll({ x: e.x() + a * (l - 0.5) * M(s) - a * (c - 0.5) * A(s), y: e.y() + a * (c - 0.5) * M(s) + a * (l - 0.5) * A(s), width: n, height: o, rotation: s }), this.gripT.setAll({ x: (0.5 - l) * n, y: -c * o }), this.gripB.setAll({ x: (0.5 - l) * n, y: (1 - c) * o }), this.gripL.setAll({ x: -l * n, y: (0.5 - c) * o }), this.gripR.setAll({ x: (1 - l) * n, y: (0.5 - c) * o }), this.rectangle.setAll({ width: n, height: o });
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
N.className = "SpriteResizer";
|
|
439
|
+
N.classNames = v.classNames.concat([N.className]);
|
|
440
|
+
export {
|
|
441
|
+
T as B,
|
|
442
|
+
D as E,
|
|
443
|
+
L,
|
|
444
|
+
S as M,
|
|
445
|
+
N as S
|
|
446
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { G as a } from "./am-chart.oZVBmpnn.js";
|
|
2
|
+
class e extends a {
|
|
3
|
+
_beforeChanged() {
|
|
4
|
+
super._beforeChanged(), (this.isDirty("width") || this.isDirty("height") || this.isPrivateDirty("width") || this.isPrivateDirty("height")) && (this._clear = !0);
|
|
5
|
+
}
|
|
6
|
+
_changed() {
|
|
7
|
+
super._changed(), this._clear && !this.get("draw") && this._draw();
|
|
8
|
+
}
|
|
9
|
+
_draw() {
|
|
10
|
+
const t = this.width(), s = this.height(), i = this._display;
|
|
11
|
+
i.moveTo(-t / 2, s / 2), i.lineTo(0, -s / 2), i.lineTo(t / 2, s / 2), i.lineTo(-t / 2, s / 2), i.closePath();
|
|
12
|
+
}
|
|
13
|
+
_updateSize() {
|
|
14
|
+
this.markDirty(), this._clear = !0;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
e.className = "Triangle";
|
|
18
|
+
e.classNames = a.classNames.concat([e.className]);
|
|
19
|
+
export {
|
|
20
|
+
e as T
|
|
21
|
+
};
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { C as l, w as z, x as f, d as N, a as y, k as B, t as L, y as x, z as Z, B as u, G as p, M as k } from "./am-chart.oZVBmpnn.js";
|
|
2
|
+
class m extends l {
|
|
3
|
+
constructor() {
|
|
4
|
+
super(...arguments), this._movePoints = {}, this._downScale = 1, this._downX = 0, this._downY = 0, this.contents = this.children.push(l.new(this._root, {
|
|
5
|
+
width: f,
|
|
6
|
+
height: f,
|
|
7
|
+
x: 0,
|
|
8
|
+
y: 0,
|
|
9
|
+
draggable: !0,
|
|
10
|
+
background: z.new(this._root, {
|
|
11
|
+
fill: N(16777215),
|
|
12
|
+
fillOpacity: 0
|
|
13
|
+
})
|
|
14
|
+
}));
|
|
15
|
+
}
|
|
16
|
+
_afterNew() {
|
|
17
|
+
super._afterNew();
|
|
18
|
+
const i = this.contents.events;
|
|
19
|
+
this._disposers.push(i.on("pointerdown", (t) => {
|
|
20
|
+
this._handleThisDown(t);
|
|
21
|
+
})), this._disposers.push(i.on("globalpointerup", (t) => {
|
|
22
|
+
this._handleThisUp(t);
|
|
23
|
+
})), this._disposers.push(i.on("globalpointermove", (t) => {
|
|
24
|
+
this._handleThisMove(t);
|
|
25
|
+
}));
|
|
26
|
+
const e = this.contents.get("background");
|
|
27
|
+
e && (e.adapters.add("width", (t) => Number(t) * 20), e.adapters.add("height", (t) => Number(t) * 20), e.adapters.add("x", (t) => Number(t) - e.width() / 2), e.adapters.add("y", (t) => Number(t) - e.height() / 2));
|
|
28
|
+
const o = this.contents;
|
|
29
|
+
o.adapters.add("x", (t) => {
|
|
30
|
+
const s = o.get("scale", 1);
|
|
31
|
+
if (y(t) && s >= 1) {
|
|
32
|
+
let n = this.get("maxPanOut", 0.4), h = o.width();
|
|
33
|
+
t = Math.min(h * n, t), t = Math.max(this.width() - h * s * (1 + n), t);
|
|
34
|
+
}
|
|
35
|
+
return t;
|
|
36
|
+
}), o.adapters.add("y", (t) => {
|
|
37
|
+
const s = o.get("scale", 1);
|
|
38
|
+
if (y(t) && s >= 1) {
|
|
39
|
+
let n = this.get("maxPanOut", 0.4), h = o.height();
|
|
40
|
+
t = Math.min(h * n, t), t = Math.max(this.height() - h * s * (1 + n), t);
|
|
41
|
+
}
|
|
42
|
+
return t;
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
_prepareChildren() {
|
|
46
|
+
super._prepareChildren(), this.isDirty("wheelable") && this._handleSetWheel(), this.contents._display.cancelTouch = this.get("pinchZoom", !1);
|
|
47
|
+
}
|
|
48
|
+
_handleSetWheel() {
|
|
49
|
+
this.get("wheelable") ? (this._wheelDp && this._wheelDp.dispose(), this._wheelDp = this.events.on("wheel", (i) => {
|
|
50
|
+
const e = i.originalEvent;
|
|
51
|
+
if (B(e, this))
|
|
52
|
+
e.preventDefault();
|
|
53
|
+
else
|
|
54
|
+
return;
|
|
55
|
+
const o = this.toLocal(i.point);
|
|
56
|
+
this._handleWheelZoom(e.deltaY, o);
|
|
57
|
+
}), this._disposers.push(this._wheelDp)) : this._wheelDp && this._wheelDp.dispose();
|
|
58
|
+
}
|
|
59
|
+
_handleWheelZoom(i, e) {
|
|
60
|
+
let o = this.get("zoomStep", 2), t = this.contents.get("scale", 1), s = t;
|
|
61
|
+
i > 0 ? s = t / o : i < 0 && (s = t * o), s != t && this.zoomToPoint(e, s);
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Zooms to specific X/Y point.
|
|
65
|
+
*
|
|
66
|
+
* @param point Center point
|
|
67
|
+
* @param level Zoom level
|
|
68
|
+
* @return Zoom Animation object
|
|
69
|
+
*/
|
|
70
|
+
zoomToPoint(i, e) {
|
|
71
|
+
e && (e = L(e, this.get("minZoomLevel", 1), this.get("maxZoomLevel", 32)));
|
|
72
|
+
const o = this.contents.get("scale", 1);
|
|
73
|
+
let t = i.x, s = i.y, n = t, h = s;
|
|
74
|
+
const r = this.contents;
|
|
75
|
+
let _ = r.x(), a = r.y(), c = n - (t - _) / o * e, d = h - (s - a) / o * e;
|
|
76
|
+
return this._animateTo(c, d, e), this._za;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Zooms the container contents in by `zoomStep`.
|
|
80
|
+
*
|
|
81
|
+
* @return Zoom Animation object
|
|
82
|
+
*/
|
|
83
|
+
zoomIn() {
|
|
84
|
+
return this.zoomToPoint({ x: this.width() / 2, y: this.height() / 2 }, this.contents.get("scale", 1) * this.get("zoomStep", 2));
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Zooms the container contents out by `zoomStep`.
|
|
88
|
+
*
|
|
89
|
+
* @return Zoom Animation object
|
|
90
|
+
*/
|
|
91
|
+
zoomOut() {
|
|
92
|
+
return this.zoomToPoint({ x: this.width() / 2, y: this.height() / 2 }, this.contents.get("scale", 1) / this.get("zoomStep", 2));
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Fully zooms out the container contents.
|
|
96
|
+
*
|
|
97
|
+
* @return Zoom Animation object
|
|
98
|
+
*/
|
|
99
|
+
goHome() {
|
|
100
|
+
return this._animateTo(0, 0, 1);
|
|
101
|
+
}
|
|
102
|
+
_animateTo(i, e, o) {
|
|
103
|
+
const t = this.get("animationDuration", 0), s = this.get("animationEasing"), n = this.contents;
|
|
104
|
+
this._txa = n.animate({ key: "x", to: i, duration: t, easing: s }), this._tya = n.animate({ key: "y", to: e, duration: t, easing: s }), this._za = n.animate({ key: "scale", to: o, duration: t, easing: s });
|
|
105
|
+
}
|
|
106
|
+
_handleThisUp(i) {
|
|
107
|
+
this._downPoints = {};
|
|
108
|
+
}
|
|
109
|
+
_handleThisDown(i) {
|
|
110
|
+
const e = this.contents;
|
|
111
|
+
this._downScale = e.get("scale", 1);
|
|
112
|
+
const o = e._downPoints;
|
|
113
|
+
let t = x(o).length;
|
|
114
|
+
if (t == 1) {
|
|
115
|
+
let s = o[1];
|
|
116
|
+
s || (s = o[0]), s && s.x == i.point.x && s.y == i.point.y && (t = 0);
|
|
117
|
+
}
|
|
118
|
+
if (t > 0) {
|
|
119
|
+
this._downX = e.x(), this._downY = e.y();
|
|
120
|
+
const s = e._getDownPointId();
|
|
121
|
+
if (s) {
|
|
122
|
+
let n = this._movePoints[s];
|
|
123
|
+
n && (e._downPoints[s] = n);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
_handleThisMove(i) {
|
|
128
|
+
const o = i.originalEvent.pointerId;
|
|
129
|
+
if (this.get("pinchZoom") && o && (this._movePoints[o] = i.point, x(this.contents._downPoints).length > 1)) {
|
|
130
|
+
this._handlePinch();
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
_handlePinch() {
|
|
135
|
+
let i = 0, e = [], o = [];
|
|
136
|
+
if (Z(this.contents._downPoints, (t, s) => {
|
|
137
|
+
e[i] = s;
|
|
138
|
+
let n = this._movePoints[t];
|
|
139
|
+
n && (o[i] = n), i++;
|
|
140
|
+
}), e.length > 1 && o.length > 1) {
|
|
141
|
+
this.contents._isDragging = !1;
|
|
142
|
+
let t = e[0], s = e[1], n = o[0], h = o[1];
|
|
143
|
+
if (t && s && n && h) {
|
|
144
|
+
t = this.toLocal(t), s = this.toLocal(s), n = this.toLocal(n), h = this.toLocal(h);
|
|
145
|
+
let r = Math.hypot(s.x - t.x, s.y - t.y), a = Math.hypot(h.x - n.x, h.y - n.y) / r * this._downScale, c = { x: n.x + (h.x - n.x) / 2, y: n.y + (h.y - n.y) / 2 }, d = { x: t.x + (s.x - t.x) / 2, y: t.y + (s.y - t.y) / 2 }, P = this._downX || 0, T = this._downY || 0, w = this._downScale, D = c.x - (-P + d.x) / w * a, b = c.y - (-T + d.y) / w * a;
|
|
146
|
+
this.contents.setAll({
|
|
147
|
+
x: D,
|
|
148
|
+
y: b,
|
|
149
|
+
scale: a
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
m.className = "ZoomableContainer";
|
|
156
|
+
m.classNames = l.classNames.concat([m.className]);
|
|
157
|
+
class g extends l {
|
|
158
|
+
constructor() {
|
|
159
|
+
super(...arguments), this.homeButton = this.children.push(u.new(this._root, { width: 35, height: 35, themeTags: ["home"] })), this.plusButton = this.children.push(u.new(this._root, { width: 35, height: 35, themeTags: ["plus"] })), this.minusButton = this.children.push(u.new(this._root, { width: 35, height: 35, themeTags: ["minus"] }));
|
|
160
|
+
}
|
|
161
|
+
_afterNew() {
|
|
162
|
+
super._afterNew(), this.set("position", "absolute"), this.set("layout", this._root.verticalLayout), this.addTag("zoomtools"), this.plusButton.setAll({
|
|
163
|
+
icon: p.new(this._root, { themeTags: ["icon"] }),
|
|
164
|
+
layout: void 0
|
|
165
|
+
}), this.minusButton.setAll({
|
|
166
|
+
icon: p.new(this._root, { themeTags: ["icon"] }),
|
|
167
|
+
layout: void 0
|
|
168
|
+
}), this.homeButton.setAll({
|
|
169
|
+
icon: p.new(this._root, { themeTags: ["icon"] }),
|
|
170
|
+
layout: void 0
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
_prepareChildren() {
|
|
174
|
+
if (super._prepareChildren(), this.isDirty("target")) {
|
|
175
|
+
const i = this.get("target"), e = this._prevSettings.target;
|
|
176
|
+
i && (i instanceof m && (this._targetDisposer = this.addDisposer(i.contents.on("scale", (o) => {
|
|
177
|
+
o == i.get("minZoomLevel") ? this.minusButton.set("disabled", !0) : this.minusButton.set("disabled", !1), o == i.get("maxZoomLevel") ? this.plusButton.set("disabled", !0) : this.plusButton.set("disabled", !1);
|
|
178
|
+
})), this.root.events.once("frameended", () => {
|
|
179
|
+
i.get("scale") == i.get("minZoomLevel") && this.minusButton.set("disabled", !0);
|
|
180
|
+
})), this._disposer = new k([
|
|
181
|
+
this.plusButton.events.on("click", () => {
|
|
182
|
+
i.zoomIn();
|
|
183
|
+
}),
|
|
184
|
+
this.minusButton.events.on("click", () => {
|
|
185
|
+
i.zoomOut();
|
|
186
|
+
}),
|
|
187
|
+
this.homeButton.events.on("click", () => {
|
|
188
|
+
i.goHome();
|
|
189
|
+
})
|
|
190
|
+
])), e && (this._disposer && this._disposer.dispose(), this._targetDisposer && this._targetDisposer.dispose());
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
g.className = "ZoomTools";
|
|
195
|
+
g.classNames = l.classNames.concat([g.className]);
|
|
196
|
+
export {
|
|
197
|
+
m as Z,
|
|
198
|
+
g as a
|
|
199
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { g as e } from "./_commonjsHelpers.DQNKXVTB.js";
|
|
2
|
+
const t = {}, r = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3
|
+
__proto__: null,
|
|
4
|
+
default: t
|
|
5
|
+
}, Symbol.toStringTag, { value: "Module" })), a = /* @__PURE__ */ e(r);
|
|
6
|
+
export {
|
|
7
|
+
a as r
|
|
8
|
+
};
|