@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,255 @@
|
|
|
1
|
+
import { D as M, F as k, H as w, x as b, I as T, q as v, w as W, J as L, C as R, f as I, L as P, T as N, b as H, m as V, K as j, e as x, r as S, i as K } from "./am-chart.oZVBmpnn.js";
|
|
2
|
+
class O extends M {
|
|
3
|
+
setupDefaultRules() {
|
|
4
|
+
super.setupDefaultRules();
|
|
5
|
+
const t = this._root.interfaceColors, u = this.rule.bind(this);
|
|
6
|
+
u("WordCloud").setAll({
|
|
7
|
+
width: b,
|
|
8
|
+
height: b,
|
|
9
|
+
minFontSize: w(2),
|
|
10
|
+
maxFontSize: w(15),
|
|
11
|
+
excludeWords: [],
|
|
12
|
+
angles: [0, -90],
|
|
13
|
+
minWordLength: 1,
|
|
14
|
+
step: 15,
|
|
15
|
+
randomness: 0,
|
|
16
|
+
autoFit: !0,
|
|
17
|
+
animationEasing: k(T)
|
|
18
|
+
});
|
|
19
|
+
{
|
|
20
|
+
const o = u("Label", ["wordcloud"]);
|
|
21
|
+
o.setAll({
|
|
22
|
+
text: "{category}",
|
|
23
|
+
centerX: v,
|
|
24
|
+
centerY: v,
|
|
25
|
+
position: "absolute",
|
|
26
|
+
lineHeight: b,
|
|
27
|
+
populateText: !0
|
|
28
|
+
}), o.setup = (i) => {
|
|
29
|
+
i.set("background", W.new(this._root, {
|
|
30
|
+
fill: t.get("background"),
|
|
31
|
+
fillOpacity: 0
|
|
32
|
+
}));
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
class y extends L {
|
|
38
|
+
constructor() {
|
|
39
|
+
super(...arguments), this._currentIndex = 0, this._ghostContainer = this.children.push(R.new(this._root, { layer: 99, opacity: 0.01 })), this._pointSets = [], this._sets = 3, this._process = !1, this._buffer = [], this.labels = this.addDisposer(this._makeLabels());
|
|
40
|
+
}
|
|
41
|
+
_afterNew() {
|
|
42
|
+
this._defaultThemes.push(O.new(this._root)), this.fields.push("category", "fill"), this._setDefault("valueField", "value"), this._setDefault("categoryField", "category"), this._setDefault("fillField", "fill"), super._afterNew(), this._root.events.on("frameended", () => {
|
|
43
|
+
this.set("progress", this._currentIndex / this.dataItems.length);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* @ignore
|
|
48
|
+
*/
|
|
49
|
+
makeLabel(t) {
|
|
50
|
+
const u = this.children.push(this.labels.make());
|
|
51
|
+
u._setDataItem(t);
|
|
52
|
+
const o = t.get("fill");
|
|
53
|
+
o != null && u.set("fill", o), u.set("x", -999999), t.set("label", u), this.labels.push(u);
|
|
54
|
+
const i = this._ghostContainer.children.push(this.labels.make());
|
|
55
|
+
return i._setDataItem(t), i.setAll({ fill: I.fromHex(0), fontWeight: "900" }), t.set("ghostLabel", i), this.labels.push(i), u;
|
|
56
|
+
}
|
|
57
|
+
_makeLabels() {
|
|
58
|
+
return new P(N.new({}), () => H._new(this._root, {
|
|
59
|
+
themeTags: V(this.labels.template.get("themeTags", []), ["wordcloud", "series"])
|
|
60
|
+
}, [this.labels.template]));
|
|
61
|
+
}
|
|
62
|
+
processDataItem(t) {
|
|
63
|
+
if (super.processDataItem(t), t.get("fill") == null) {
|
|
64
|
+
let u = this.get("colors");
|
|
65
|
+
u && t.setRaw("fill", u.next());
|
|
66
|
+
}
|
|
67
|
+
this.makeLabel(t);
|
|
68
|
+
}
|
|
69
|
+
_prepareChildren() {
|
|
70
|
+
super._prepareChildren(), this.isDirty("text") && (this.data.setAll(this._getWords(this.get("text"))), this._dirty.text = !1);
|
|
71
|
+
}
|
|
72
|
+
_updateChildren() {
|
|
73
|
+
super._updateChildren();
|
|
74
|
+
const t = this._root._renderer.resolution, u = Math.round(this._root.width() * t);
|
|
75
|
+
let o = this.get("step", 1) * 2;
|
|
76
|
+
if (this._valuesDirty || this._sizeDirty || this.isPrivateDirty("adjustedFontSize")) {
|
|
77
|
+
const a = this.getPrivate("adjustedFontSize", 1), s = this.innerWidth(), r = this.innerHeight(), C = Math.min(s, r), F = Math.max(s, r);
|
|
78
|
+
this._buffer = Array(Math.ceil(this._root.width() * this._root.height() * t * t)).fill(0), C < 800 && (o = o / 2), this._ghostContainer._display.clear(), this._pointSets = [];
|
|
79
|
+
for (let l = 0; l < this._sets; l++) {
|
|
80
|
+
const e = o * (this._sets - l), g = j(s / 2, r / 2, s, r, 0, e * r / F, e * s / F, 0, 0);
|
|
81
|
+
for (let A = g.length - 1; A >= 0; A--) {
|
|
82
|
+
let B = g[A];
|
|
83
|
+
if (B.x < 0 || B.x > s || B.y < 0 || B.y > r) {
|
|
84
|
+
g.splice(A, 1);
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
this._pointSets.push(g);
|
|
89
|
+
}
|
|
90
|
+
let c = 0, n = 0, h = 0, D = 1 / 0, d = 0;
|
|
91
|
+
x(this._dataItems, (l) => {
|
|
92
|
+
const e = l.get("valueWorking", 0);
|
|
93
|
+
c += e, n += Math.abs(e);
|
|
94
|
+
}), this._dataItems.sort((l, e) => {
|
|
95
|
+
let g = l.get("value", 0), A = e.get("value", 0);
|
|
96
|
+
return g > A ? -1 : g < A ? 1 : 0;
|
|
97
|
+
}), x(this._dataItems, (l) => {
|
|
98
|
+
const e = l.get("valueWorking", 0);
|
|
99
|
+
e >= n && (c = l.get("value", 0)), e > h && (h = e), e < D && (D = e), d++;
|
|
100
|
+
}), this.setPrivateRaw("valueLow", D), this.setPrivateRaw("valueHigh", h), this.setPrivateRaw("valueSum", c), this.setPrivateRaw("valueAverage", c / d), this.setPrivateRaw("valueAbsoluteSum", n);
|
|
101
|
+
const E = Math.min(s, r), p = S(this.get("minFontSize", 10), E) * a, _ = S(this.get("maxFontSize", 100), E) * a, f = this.get("angles", [0]);
|
|
102
|
+
x(this._dataItems, (l) => {
|
|
103
|
+
const e = l.get("valueWorking", 0), g = l.get("ghostLabel");
|
|
104
|
+
let A = p + (_ - p) * (e - D) / (h - D);
|
|
105
|
+
K(A) && (A = _);
|
|
106
|
+
const B = this._sets - 1 - Math.floor((A - p) / (_ - p) * (this._sets - 1));
|
|
107
|
+
l.setRaw("set", B), l.setRaw("fontSize", A);
|
|
108
|
+
let m = f[Math.floor(Math.random() * f.length)];
|
|
109
|
+
l.setRaw("angle", m), g.setAll({ fontSize: A, rotation: m, x: -1e4 });
|
|
110
|
+
}), this._process = !1, this._currentIndex = 0, this._root.events.once("frameended", () => {
|
|
111
|
+
this.setTimeout(() => {
|
|
112
|
+
this._process = !0, this._markDirtyKey("progress");
|
|
113
|
+
}, 50);
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
const i = this._boundsToAdd;
|
|
117
|
+
if (i) {
|
|
118
|
+
const a = this._ghostContainer._display.getLayer().context, s = Math.round(i.top), r = Math.round(i.left), C = Math.round(i.right - i.left), F = Math.round(i.bottom - i.top), c = a.getImageData(r, s, C, F).data, n = this._buffer;
|
|
119
|
+
let h = 3;
|
|
120
|
+
for (let D = s; D < s + F; D++)
|
|
121
|
+
for (let d = r; d < r + C; d++) {
|
|
122
|
+
let E = (D + 1) * u - (u - d);
|
|
123
|
+
c[h] != 0 && (n[E] = 1), h += 4;
|
|
124
|
+
}
|
|
125
|
+
this._boundsToAdd = void 0;
|
|
126
|
+
}
|
|
127
|
+
this._process && this.isDirty("progress") && this._processItem();
|
|
128
|
+
}
|
|
129
|
+
_processItem() {
|
|
130
|
+
if (this._boundsToAdd = void 0, this._currentIndex < this.dataItems.length) {
|
|
131
|
+
const t = this.dataItems[this._currentIndex], u = t.get("label"), o = t.get("ghostLabel"), i = this._root._renderer.resolution;
|
|
132
|
+
let a = o.width(), s = o.height();
|
|
133
|
+
const r = o._display.getLayer().context, C = t.get("set"), F = this._pointSets[C], c = this.innerWidth(), n = this.innerHeight(), h = Math.round(this._root.width() * i), D = this.x(), d = this.y(), E = this.get("angles", [0]);
|
|
134
|
+
c > n && a >= c / 2 && x(E, (f) => {
|
|
135
|
+
f == 0 && t.get("angle") != 0 && (t.setRaw("angle", 0), o.set("rotation", 0), [a, s] = [s, a]);
|
|
136
|
+
}), n > c && a >= c / 2 && x(E, (f) => {
|
|
137
|
+
Math.abs(f) == 90 && t.get("angle") == 0 && (t.setRaw("angle", f), o.set("rotation", f), [a, s] = [s, a]);
|
|
138
|
+
});
|
|
139
|
+
const p = Math.ceil(a * i), _ = Math.ceil(s * i);
|
|
140
|
+
if (r && a > 0 && s > 0) {
|
|
141
|
+
let f = Math.round(Math.random() * F.length * this.get("randomness", 0)), l = !0;
|
|
142
|
+
for (; l; ) {
|
|
143
|
+
let e = F[f];
|
|
144
|
+
if (e) {
|
|
145
|
+
if (l = !1, this._currentIndex > 0) {
|
|
146
|
+
let g = Math.round((e.x + D) * i - p / 2), A = Math.round((e.y + d) * i - _ / 2);
|
|
147
|
+
l = this._hasColor(g, A, p, _, h);
|
|
148
|
+
}
|
|
149
|
+
if (e.x - a / 2 < 0 || e.x + a / 2 > c || e.y - s / 2 < 0 || e.y + s / 2 > n)
|
|
150
|
+
f++, l = !0;
|
|
151
|
+
else if (l)
|
|
152
|
+
f += 2;
|
|
153
|
+
else {
|
|
154
|
+
const g = t.get("angle", 0), A = t.get("fontSize", 0);
|
|
155
|
+
u.get("x") != -999999 ? (u.animate({ key: "x", to: e.x, duration: this.get("animationDuration", 0), easing: this.get("animationEasing") }), u.animate({ key: "y", to: e.y, duration: this.get("animationDuration", 0), easing: this.get("animationEasing") }), u.animate({ key: "rotation", to: g, duration: this.get("animationDuration", 0), easing: this.get("animationEasing") }), u.animate({ key: "fontSize", to: A, duration: this.get("animationDuration", 0), easing: this.get("animationEasing") })) : (u.setAll({ x: e.x, y: e.y, rotation: g, fontSize: A }), u.appear()), o.setAll({ x: e.x, y: e.y });
|
|
156
|
+
for (let B = F.length - 1; B >= 0; B--) {
|
|
157
|
+
let m = F[B];
|
|
158
|
+
m.x >= e.x - a / 2 && m.x <= e.x + a / 2 && m.y >= e.y - s / 2 && m.y <= e.y + s / 2 && F.splice(B, 1);
|
|
159
|
+
}
|
|
160
|
+
this._boundsToAdd = { left: (e.x + D - a / 2) * i, right: (e.x + D + a / 2) * i, top: (e.y + d - s / 2) * i, bottom: (e.y + d + s / 2) * i };
|
|
161
|
+
}
|
|
162
|
+
} else {
|
|
163
|
+
if (this.get("autoFit")) {
|
|
164
|
+
this.setTimeout(() => {
|
|
165
|
+
this.setPrivate("adjustedFontSize", this.getPrivate("adjustedFontSize", 1) * 0.9);
|
|
166
|
+
}, 50);
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
u.set("x", -999999), l = !1;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
this._currentIndex++;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* @ignore
|
|
178
|
+
*/
|
|
179
|
+
disposeDataItem(t) {
|
|
180
|
+
super.disposeDataItem(t);
|
|
181
|
+
const u = t.get("label");
|
|
182
|
+
u && (this.labels.removeValue(u), u.dispose());
|
|
183
|
+
const o = t.get("ghostLabel");
|
|
184
|
+
o && (this.labels.removeValue(o), o.dispose());
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Extracts words and number of their appearances from a text.
|
|
188
|
+
*
|
|
189
|
+
* @ignore
|
|
190
|
+
* @param input Source text
|
|
191
|
+
*/
|
|
192
|
+
_getWords(t) {
|
|
193
|
+
let u = [];
|
|
194
|
+
if (t) {
|
|
195
|
+
const o = "A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶ-ͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԣԱ-Ֆՙա-ևא-תװ-ײء-يٮ-ٯٱ-ۓەۥ-ۦۮ-ۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴ-ߵߺऄ-हऽॐक़-ॡॱ-ॲॻ-ॿঅ-ঌএ-ঐও-নপ-রলশ-হঽৎড়-ঢ়য়-ৡৰ-ৱਅ-ਊਏ-ਐਓ-ਨਪ-ਰਲ-ਲ਼ਵ-ਸ਼ਸ-ਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલ-ળવ-હઽૐૠ-ૡଅ-ଌଏ-ଐଓ-ନପ-ରଲ-ଳଵ-ହଽଡ଼-ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கங-சஜஞ-டண-தந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘ-ౙౠ-ౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠ-ೡഅ-ഌഎ-ഐഒ-നപ-ഹഽൠ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะา-ำเ-ๆກ-ຂຄງ-ຈຊຍດ-ທນ-ຟມ-ຣລວສ-ຫອ-ະາ-ຳຽເ-ໄໆໜ-ໝༀཀ-ཇཉ-ཬྈ-ྋက-ဪဿၐ-ၕၚ-ၝၡၥ-ၦၮ-ၰၵ-ႁႎႠ-Ⴥა-ჺჼᄀ-ᅙᅟ-ᆢᆨ-ᇹሀ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙶᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦩᧁ-ᧇᨀ-ᨖᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮ-ᮯᰀ-ᰣᱍ-ᱏᱚ-ᱽᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₔℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-Ɐⱱ-ⱽⲀ-ⳤⴀ-ⴥⴰ-ⵥⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆷㇰ-ㇿ㐀䶵一鿃ꀀ-ꒌꔀ-ꘌꘐ-ꘟꘪ-ꘫꙀ-ꙟꙢ-ꙮꙿ-ꚗꜗ-ꜟꜢ-ꞈꞋ-ꞌꟻ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꤊ-ꤥꤰ-ꥆꨀ-ꨨꩀ-ꩂꩄ-ꩋ가-힣豈-鶴侮-頻並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּ-סּףּ-פּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ0-9@+", i = new RegExp("([" + o + "]+[-" + o + "]*[" + o + "]+)|([" + o + "]+)", "ig");
|
|
196
|
+
let a = t.match(i);
|
|
197
|
+
if (!a)
|
|
198
|
+
return [];
|
|
199
|
+
let s;
|
|
200
|
+
for (; s = a.pop(), !!s; ) {
|
|
201
|
+
let n;
|
|
202
|
+
for (let h = 0; h < u.length; h++)
|
|
203
|
+
if (u[h].category.toLowerCase() == s.toLowerCase()) {
|
|
204
|
+
n = u[h];
|
|
205
|
+
break;
|
|
206
|
+
}
|
|
207
|
+
n ? (n.value++, this.isCapitalized(s) || (n.category = s)) : u.push({
|
|
208
|
+
category: s,
|
|
209
|
+
value: 1
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
let r = this.get("excludeWords");
|
|
213
|
+
const C = this.get("minValue", 1), F = this.get("minWordLength", 1);
|
|
214
|
+
if (C > 1 || F > 1 || r && r.length > 0)
|
|
215
|
+
for (let n = u.length - 1; n >= 0; n--) {
|
|
216
|
+
let h = u[n], D = h.category;
|
|
217
|
+
h.value < C && u.splice(n, 1), D.length < F && u.splice(n, 1), r && r.indexOf(D) !== -1 && u.splice(n, 1);
|
|
218
|
+
}
|
|
219
|
+
u.sort(function(n, h) {
|
|
220
|
+
return n.value == h.value ? 0 : n.value > h.value ? -1 : 1;
|
|
221
|
+
});
|
|
222
|
+
const c = this.get("maxCount", 1 / 0);
|
|
223
|
+
u.length > c && (u = u.slice(0, c));
|
|
224
|
+
}
|
|
225
|
+
return u;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Checks if word is capitalized (starts with an uppercase) or not.
|
|
229
|
+
*
|
|
230
|
+
* @ignore
|
|
231
|
+
* @param word Word
|
|
232
|
+
* @return Capitalized?
|
|
233
|
+
*/
|
|
234
|
+
isCapitalized(t) {
|
|
235
|
+
let u = t.toLowerCase();
|
|
236
|
+
return t[0] != u[0] && t.substr(1) == u.substr(1) && t != u;
|
|
237
|
+
}
|
|
238
|
+
_hasColor(t, u, o, i, a) {
|
|
239
|
+
const s = this._buffer;
|
|
240
|
+
if (s)
|
|
241
|
+
for (let r = u; r < u + i; r += 4)
|
|
242
|
+
for (let C = t; C < t + o; C += 4) {
|
|
243
|
+
let F = (r + 1) * a - (a - C);
|
|
244
|
+
if (s[F] != 0)
|
|
245
|
+
return !0;
|
|
246
|
+
}
|
|
247
|
+
return !1;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
y.className = "WordCloud";
|
|
251
|
+
y.classNames = L.classNames.concat([y.className]);
|
|
252
|
+
export {
|
|
253
|
+
O as DefaultTheme,
|
|
254
|
+
y as WordCloud
|
|
255
|
+
};
|