@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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as a, C as p } from "./lib-cortex-element.CVMmyPMC.js";
|
|
2
2
|
import { c as m } from "./component.styles.DMSLciL5.js";
|
|
3
3
|
import { c as y } from "./custom-element.L4WJXn1j.js";
|
|
4
|
-
import { w as d } from "./watch.
|
|
4
|
+
import { w as d } from "./watch.BCJD77bD.js";
|
|
5
5
|
import { i as b, x as u } from "./lit-element.jLBm65_O.js";
|
|
6
6
|
import { r as g } from "./query-async.CTgXGyQ5.js";
|
|
7
7
|
const h = b`
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { n as i, C as v } from "./lib-cortex-element.CVMmyPMC.js";
|
|
2
2
|
import { c as g } from "./component.styles.DMSLciL5.js";
|
|
3
3
|
import { c as C } from "./custom-element.L4WJXn1j.js";
|
|
4
|
-
import { F as x, v as w } from "./form.
|
|
5
|
-
import { L as $ } from "./i18n.
|
|
4
|
+
import { F as x, v as w } from "./form.DgwYWi0O.js";
|
|
5
|
+
import { L as $ } from "./i18n.C0iakJkV.js";
|
|
6
6
|
import { H as S, g as O } from "./slot.j5oheLJC.js";
|
|
7
|
-
import { w as m } from "./watch.
|
|
7
|
+
import { w as m } from "./watch.BCJD77bD.js";
|
|
8
8
|
import { r as u } from "./state.CSDxrqLd.js";
|
|
9
9
|
import { e as L } from "./query.BBf1UFkC.js";
|
|
10
10
|
import { e as D } from "./class-map.BiVq-cVR.js";
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
function s(i, t, _) {
|
|
2
|
+
i._context.bezierCurveTo(
|
|
3
|
+
i._x1 + i._k * (i._x2 - i._x0),
|
|
4
|
+
i._y1 + i._k * (i._y2 - i._y0),
|
|
5
|
+
i._x2 + i._k * (i._x1 - t),
|
|
6
|
+
i._y2 + i._k * (i._y1 - _),
|
|
7
|
+
i._x2,
|
|
8
|
+
i._y2
|
|
9
|
+
);
|
|
10
|
+
}
|
|
11
|
+
function e(i, t) {
|
|
12
|
+
this._context = i, this._k = (1 - t) / 6;
|
|
13
|
+
}
|
|
14
|
+
e.prototype = {
|
|
15
|
+
areaStart: function() {
|
|
16
|
+
this._line = 0;
|
|
17
|
+
},
|
|
18
|
+
areaEnd: function() {
|
|
19
|
+
this._line = NaN;
|
|
20
|
+
},
|
|
21
|
+
lineStart: function() {
|
|
22
|
+
this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._point = 0;
|
|
23
|
+
},
|
|
24
|
+
lineEnd: function() {
|
|
25
|
+
switch (this._point) {
|
|
26
|
+
case 2:
|
|
27
|
+
this._context.lineTo(this._x2, this._y2);
|
|
28
|
+
break;
|
|
29
|
+
case 3:
|
|
30
|
+
s(this, this._x1, this._y1);
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
|
|
34
|
+
},
|
|
35
|
+
point: function(i, t) {
|
|
36
|
+
switch (i = +i, t = +t, this._point) {
|
|
37
|
+
case 0:
|
|
38
|
+
this._point = 1, this._line ? this._context.lineTo(i, t) : this._context.moveTo(i, t);
|
|
39
|
+
break;
|
|
40
|
+
case 1:
|
|
41
|
+
this._point = 2, this._x1 = i, this._y1 = t;
|
|
42
|
+
break;
|
|
43
|
+
case 2:
|
|
44
|
+
this._point = 3;
|
|
45
|
+
// falls through
|
|
46
|
+
default:
|
|
47
|
+
s(this, i, t);
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
this._x0 = this._x1, this._x1 = this._x2, this._x2 = i, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
const o = function i(t) {
|
|
54
|
+
function _(n) {
|
|
55
|
+
return new e(n, t);
|
|
56
|
+
}
|
|
57
|
+
return _.tension = function(n) {
|
|
58
|
+
return i(+n);
|
|
59
|
+
}, _;
|
|
60
|
+
}(0);
|
|
61
|
+
export {
|
|
62
|
+
o as c,
|
|
63
|
+
s as p
|
|
64
|
+
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import z from "../components/space.js";
|
|
2
|
-
import { C as $ } from "./table.
|
|
2
|
+
import { C as $ } from "./table.wVHv1Xze.js";
|
|
3
3
|
import { C as k } from "./typography.oDzoLbZS.js";
|
|
4
4
|
import { n as h, C as F } from "./lib-cortex-element.CVMmyPMC.js";
|
|
5
|
-
import { C, a as m } from "./color-swatch.
|
|
5
|
+
import { C, a as m } from "./color-swatch.BkpPCXd6.js";
|
|
6
6
|
import { c as A } from "./component.styles.DMSLciL5.js";
|
|
7
|
-
import { D as p } from "./content-builder.
|
|
7
|
+
import { D as p } from "./content-builder.B4Tqoc6M.js";
|
|
8
8
|
import { c as S } from "./custom-element.L4WJXn1j.js";
|
|
9
9
|
import { d as T } from "./debounce.DaHuiSGU.js";
|
|
10
|
-
import { L as E } from "./i18n.
|
|
11
|
-
import { w as x } from "./watch.
|
|
12
|
-
import { g as D, a as R } from "./responsive.
|
|
10
|
+
import { L as E } from "./i18n.C0iakJkV.js";
|
|
11
|
+
import { w as x } from "./watch.BCJD77bD.js";
|
|
12
|
+
import { g as D, a as R } from "./responsive.DL-wBD4P.js";
|
|
13
13
|
import { x as l, B as H, i as O } from "./lit-element.jLBm65_O.js";
|
|
14
14
|
import { r as d } from "./state.CSDxrqLd.js";
|
|
15
15
|
import { e as P } from "./query.BBf1UFkC.js";
|
|
@@ -8,8 +8,8 @@ import { c as F } from "./component.styles.DMSLciL5.js";
|
|
|
8
8
|
import { c as n, C as h, H as $, l as z } from "./color.vLD2sNTs.js";
|
|
9
9
|
import { c as O } from "./custom-element.L4WJXn1j.js";
|
|
10
10
|
import { d as W } from "./debounce.DaHuiSGU.js";
|
|
11
|
-
import { L as A } from "./i18n.
|
|
12
|
-
import { w as i } from "./watch.
|
|
11
|
+
import { L as A } from "./i18n.C0iakJkV.js";
|
|
12
|
+
import { w as i } from "./watch.BCJD77bD.js";
|
|
13
13
|
import { i as G, x as u } from "./lit-element.jLBm65_O.js";
|
|
14
14
|
import { r as c } from "./state.CSDxrqLd.js";
|
|
15
15
|
import { e as R } from "./query.BBf1UFkC.js";
|
|
@@ -0,0 +1,527 @@
|
|
|
1
|
+
import { D as L, q as i, R as m, d as s, x as c, H as A, C as h, w as g, L as R, T, B as y, G as _, b, s as G, c as S, a as x, f as p, bx as D, by as P } from "./am-chart.oZVBmpnn.js";
|
|
2
|
+
import { L as k } from "./LinearGradient.CxfXxvMw.js";
|
|
3
|
+
import { C as M } from "./Circle.tOnnO-F-.js";
|
|
4
|
+
import { E as H } from "./EditableLabel.DPmicdjK.js";
|
|
5
|
+
import { S as B } from "./Slider.FKJwoPq2.js";
|
|
6
|
+
class O extends L {
|
|
7
|
+
setupDefaultRules() {
|
|
8
|
+
super.setupDefaultRules();
|
|
9
|
+
const t = this.rule.bind(this);
|
|
10
|
+
t("ColorPickerButton").setAll({
|
|
11
|
+
colorOpacity: 1,
|
|
12
|
+
width: 35,
|
|
13
|
+
height: 35,
|
|
14
|
+
marginRight: 0,
|
|
15
|
+
cursorOverStyle: "pointer"
|
|
16
|
+
}), t("Graphics", ["colorpickerbutton", "icon"]).setAll({
|
|
17
|
+
svgPath: "M 1 14 L 3 16 L 5 14 L 7 14 L 15 6 A 0.6 0.6 90 0 0 11 2 L 3 10 L 3 12 L 1 14 M 7 4 L 13 10",
|
|
18
|
+
forceInactive: !0,
|
|
19
|
+
centerX: i,
|
|
20
|
+
centerY: i,
|
|
21
|
+
x: i,
|
|
22
|
+
y: i,
|
|
23
|
+
strokeOpacity: 0.5
|
|
24
|
+
}), t("Graphics", ["colorpickerbutton", "nocolor"]).setAll({
|
|
25
|
+
x: i,
|
|
26
|
+
y: i,
|
|
27
|
+
centerX: i,
|
|
28
|
+
centerY: i,
|
|
29
|
+
forceInactive: !0,
|
|
30
|
+
svgPath: "M 5 5 L 25 25 M 25 5 L 5 25"
|
|
31
|
+
}), t("ColorPicker").setAll({
|
|
32
|
+
exportable: !1,
|
|
33
|
+
paddingBottom: 20,
|
|
34
|
+
paddingTop: 20,
|
|
35
|
+
paddingLeft: 20,
|
|
36
|
+
paddingRight: 20,
|
|
37
|
+
width: 250,
|
|
38
|
+
position: "absolute",
|
|
39
|
+
x: i,
|
|
40
|
+
y: i,
|
|
41
|
+
centerX: i,
|
|
42
|
+
centerY: i,
|
|
43
|
+
background: m.new(this._root, {
|
|
44
|
+
strokeOpacity: 1,
|
|
45
|
+
fillOpacity: 1,
|
|
46
|
+
shadowBlur: 8,
|
|
47
|
+
shadowColor: s(0),
|
|
48
|
+
shadowOpacity: 0.3,
|
|
49
|
+
shadowOffsetX: 2,
|
|
50
|
+
shadowOffsetY: 2,
|
|
51
|
+
fill: s(16777215)
|
|
52
|
+
})
|
|
53
|
+
}), t("ColorPicker").states.create("hidden", {
|
|
54
|
+
stateAnimationDuration: 200,
|
|
55
|
+
opacity: 0,
|
|
56
|
+
visible: !1
|
|
57
|
+
}), t("ColorPicker").states.create("default", {
|
|
58
|
+
stateAnimationDuration: 300
|
|
59
|
+
}), t("Container", ["colorpicker", "lastcolors"]).setAll({
|
|
60
|
+
layout: this._root.horizontalLayout,
|
|
61
|
+
width: c
|
|
62
|
+
}), t("Circle", ["colorpicker", "circle", "target"]).setAll({
|
|
63
|
+
radius: 5,
|
|
64
|
+
fill: s(16777215),
|
|
65
|
+
stroke: s(16777215),
|
|
66
|
+
fillOpacity: 1,
|
|
67
|
+
strokeOpacity: 1,
|
|
68
|
+
strokeWidth: 2,
|
|
69
|
+
shadowColor: s(0),
|
|
70
|
+
shadowOpacity: 1,
|
|
71
|
+
shadowBlur: 5,
|
|
72
|
+
shadowOffsetX: 0,
|
|
73
|
+
shadowOffsetY: 0
|
|
74
|
+
}), t("Slider", ["colorpicker", "gradient"]).setAll({
|
|
75
|
+
marginLeft: 15,
|
|
76
|
+
marginRight: 0
|
|
77
|
+
}), t("RoundedRectangle", ["colorpicker", "gradient", "scrollbar", "main", "background"]).setAll({
|
|
78
|
+
fillGradient: k.new(this._root, {
|
|
79
|
+
rotation: 90,
|
|
80
|
+
stops: [
|
|
81
|
+
{ color: s(16711680), offset: 0 },
|
|
82
|
+
{ color: s(16776960), offset: 0.17 },
|
|
83
|
+
{ color: s(65280), offset: 0.34 },
|
|
84
|
+
{ color: s(65535), offset: 0.51 },
|
|
85
|
+
{ color: s(255), offset: 0.68 },
|
|
86
|
+
{ color: s(16711935), offset: 0.85 },
|
|
87
|
+
{ color: s(16711680), offset: 1 }
|
|
88
|
+
]
|
|
89
|
+
})
|
|
90
|
+
}), t("Button", ["colorpicker", "resize"]).setAll({
|
|
91
|
+
tooltipY: 0,
|
|
92
|
+
width: 22,
|
|
93
|
+
height: 22,
|
|
94
|
+
paddingTop: 0,
|
|
95
|
+
paddingBottom: 0,
|
|
96
|
+
paddingLeft: 0,
|
|
97
|
+
paddingRight: 0
|
|
98
|
+
}), t("RoundedRectangle", ["colorpicker", "resize", "background"]).setAll({
|
|
99
|
+
fillOpacity: 1,
|
|
100
|
+
strokeOpacity: 1,
|
|
101
|
+
strokeWidth: 2,
|
|
102
|
+
shadowColor: s(0),
|
|
103
|
+
shadowOpacity: 1,
|
|
104
|
+
shadowBlur: 5,
|
|
105
|
+
shadowOffsetX: 0,
|
|
106
|
+
shadowOffsetY: 0
|
|
107
|
+
}), t("Graphics", ["colorpicker", "resize", "button", "icon"]).setAll({
|
|
108
|
+
forceHidden: !0
|
|
109
|
+
}), t("Slider", ["colorpicker", "opacity"]).setAll({
|
|
110
|
+
centerY: i,
|
|
111
|
+
y: i,
|
|
112
|
+
width: c
|
|
113
|
+
}), t("RoundedRectangle", ["colorpicker", "main", "opacity", "background"]).setAll({
|
|
114
|
+
strokeWidth: 1,
|
|
115
|
+
strokeOpacity: 0.5
|
|
116
|
+
}), t("EditableLabel", ["colorpicker", "input"]).setAll({
|
|
117
|
+
text: "Text",
|
|
118
|
+
width: c,
|
|
119
|
+
height: 30,
|
|
120
|
+
marginLeft: 5,
|
|
121
|
+
fontSize: "13px",
|
|
122
|
+
fontFamily: "monospace",
|
|
123
|
+
oversizedBehavior: "none",
|
|
124
|
+
textAlign: "center",
|
|
125
|
+
minWidth: 50
|
|
126
|
+
}), t("EditableLabel", ["colorpicker", "color", "input"]).setAll({
|
|
127
|
+
maxChars: 7
|
|
128
|
+
}), t("RoundedRectangle", ["colorpicker", "background", "input"]).setAll({
|
|
129
|
+
strokeWidth: 1,
|
|
130
|
+
cornerRadiusBL: 4,
|
|
131
|
+
cornerRadiusBR: 4,
|
|
132
|
+
cornerRadiusTL: 4,
|
|
133
|
+
cornerRadiusTR: 4,
|
|
134
|
+
strokeOpacity: 0.25,
|
|
135
|
+
fillOpacity: 0
|
|
136
|
+
}), t("Button", ["colorpicker", "pickertool"]).setAll({
|
|
137
|
+
width: 30,
|
|
138
|
+
height: 30,
|
|
139
|
+
marginTop: 0,
|
|
140
|
+
marginBottom: 0,
|
|
141
|
+
marginLeft: 0,
|
|
142
|
+
marginRight: 0,
|
|
143
|
+
tooltipX: A(90)
|
|
144
|
+
}), t("Button", ["colorpicker", "pickertool", "nocolor"]).setAll({
|
|
145
|
+
tooltipText: "No color",
|
|
146
|
+
marginLeft: 5
|
|
147
|
+
}), t("Graphics", ["colorpicker", "icon", "nocolor"]).setAll({
|
|
148
|
+
svgPath: "M 0 0 L 14 14 M 14 0 L 0 14",
|
|
149
|
+
centerX: i,
|
|
150
|
+
centerY: i,
|
|
151
|
+
x: i,
|
|
152
|
+
y: i
|
|
153
|
+
}), t("Button", ["colorpicker", "picker"]).setAll({
|
|
154
|
+
tooltipText: "Pick color from screen"
|
|
155
|
+
}), t("Graphics", ["picker", "icon"]).setAll({
|
|
156
|
+
centerX: i,
|
|
157
|
+
centerY: i,
|
|
158
|
+
x: i,
|
|
159
|
+
y: i,
|
|
160
|
+
svgPath: "M 1 14 L 3 16 L 5 14 L 7 14 L 15 6 A 0.6 0.6 90 0 0 11 2 L 3 10 L 3 12 L 1 14 M 7 4 L 13 10"
|
|
161
|
+
}), t("Button", ["colorpicker", "button"]).setAll({
|
|
162
|
+
height: void 0,
|
|
163
|
+
paddingTop: 1,
|
|
164
|
+
paddingBottom: 1,
|
|
165
|
+
width: i
|
|
166
|
+
}), t("Button", ["colorpicker", "button", "ok"]).setAll({
|
|
167
|
+
marginLeft: 5
|
|
168
|
+
}), t("Label", ["colorpicker", "cancel"]).setAll({
|
|
169
|
+
text: "Cancel",
|
|
170
|
+
x: i,
|
|
171
|
+
centerX: i
|
|
172
|
+
}), t("Label", ["colorpicker", "ok"]).setAll({
|
|
173
|
+
text: "OK",
|
|
174
|
+
x: i,
|
|
175
|
+
centerX: i
|
|
176
|
+
}), t("Tooltip", ["colorpicker"]).setAll({
|
|
177
|
+
getFillFromSprite: !1,
|
|
178
|
+
autoTextColor: !1,
|
|
179
|
+
paddingBottom: 5,
|
|
180
|
+
paddingTop: 5,
|
|
181
|
+
paddingLeft: 7,
|
|
182
|
+
paddingRight: 7
|
|
183
|
+
}), t("PointedRectangle", ["colorpicker", "tooltip", "background"]).setAll({
|
|
184
|
+
fill: s(0),
|
|
185
|
+
fillOpacity: 0.9,
|
|
186
|
+
stroke: s(16777215),
|
|
187
|
+
strokeOpacity: 1
|
|
188
|
+
}), t("Label", ["colorpicker", "tooltip"]).setAll({
|
|
189
|
+
fontSize: "12px",
|
|
190
|
+
fill: s(16777215)
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
class v extends h {
|
|
195
|
+
constructor() {
|
|
196
|
+
super(...arguments), this._clickOverlay = this.children.push(g.new(this._root, {
|
|
197
|
+
position: "absolute",
|
|
198
|
+
fillOpacity: 0,
|
|
199
|
+
interactive: !0,
|
|
200
|
+
isMeasured: !1,
|
|
201
|
+
fill: s(0),
|
|
202
|
+
forceHidden: !0
|
|
203
|
+
})), this.rectangles = new R(T.new({}), () => m._new(this._root, {}, [this.rectangles.template])), this.gradientsContainer = this.children.push(h.new(this._root, {
|
|
204
|
+
themeTagsSelf: ["gradientscontainer"],
|
|
205
|
+
width: c,
|
|
206
|
+
layout: this._root.horizontalLayout
|
|
207
|
+
})), this.colorGradientsContainer = this.gradientsContainer.children.push(h.new(this._root, {
|
|
208
|
+
width: c,
|
|
209
|
+
layer: 0
|
|
210
|
+
})), this.colorRectangle = this.colorGradientsContainer.children.push(g.new(this._root, {
|
|
211
|
+
crisp: !0,
|
|
212
|
+
themeTags: ["colorrectangle"],
|
|
213
|
+
width: c,
|
|
214
|
+
height: c,
|
|
215
|
+
strokeWidth: 1
|
|
216
|
+
})), this.colorRectangleWhiteOverlay = this.colorGradientsContainer.children.push(g.new(this._root, {
|
|
217
|
+
crisp: !0,
|
|
218
|
+
forceInactive: !0,
|
|
219
|
+
width: c,
|
|
220
|
+
height: c
|
|
221
|
+
})), this.colorRectangleBlackOverlay = this.colorGradientsContainer.children.push(g.new(this._root, {
|
|
222
|
+
crisp: !0,
|
|
223
|
+
forceInactive: !0,
|
|
224
|
+
width: c,
|
|
225
|
+
height: c
|
|
226
|
+
})), this.slider = this.gradientsContainer.children.push(B.new(this._root, {
|
|
227
|
+
orientation: "vertical",
|
|
228
|
+
themeTags: ["gradient"]
|
|
229
|
+
})), this.inputContainer = this.children.push(h.new(this._root, {
|
|
230
|
+
marginTop: 10,
|
|
231
|
+
layout: this._root.horizontalLayout,
|
|
232
|
+
width: c
|
|
233
|
+
})), this.pickerButton = this.inputContainer.children.push(y.new(this._root, {
|
|
234
|
+
themeTags: ["picker", "pickertool"],
|
|
235
|
+
toggleKey: "active",
|
|
236
|
+
icon: _.new(this._root, {
|
|
237
|
+
themeTags: ["icon"]
|
|
238
|
+
})
|
|
239
|
+
})), this.noColorButton = this.inputContainer.children.push(y.new(this._root, {
|
|
240
|
+
themeTags: ["nocolor", "pickertool"],
|
|
241
|
+
icon: _.new(this._root, {
|
|
242
|
+
themeTags: ["icon"]
|
|
243
|
+
})
|
|
244
|
+
})), this.colorInput = this.inputContainer.children.push(H.new(this._root, {
|
|
245
|
+
themeTags: ["input", "color"]
|
|
246
|
+
})), this.opacityContainer = this.children.push(h.new(this._root, {
|
|
247
|
+
width: c,
|
|
248
|
+
marginTop: 10,
|
|
249
|
+
layout: this._root.horizontalLayout
|
|
250
|
+
})), this.opacitySlider = this.opacityContainer.children.push(B.new(this._root, {
|
|
251
|
+
themeTags: ["opacity"],
|
|
252
|
+
orientation: "horizontal"
|
|
253
|
+
})), this.targetCircle = this.colorGradientsContainer.children.push(M.new(this._root, {
|
|
254
|
+
themeTags: ["circle", "target"],
|
|
255
|
+
isMeasured: !1,
|
|
256
|
+
forceInactive: !0,
|
|
257
|
+
position: "absolute",
|
|
258
|
+
layer: 30
|
|
259
|
+
})), this.buttonsContainer = this.children.push(h.new(this._root, {
|
|
260
|
+
marginTop: 10,
|
|
261
|
+
layout: this._root.horizontalLayout,
|
|
262
|
+
width: c
|
|
263
|
+
})), this.cancelButton = this.buttonsContainer.children.push(y.new(this._root, {
|
|
264
|
+
themeTags: ["cancel"],
|
|
265
|
+
label: b.new(this._root, {})
|
|
266
|
+
})), this.okButton = this.buttonsContainer.children.push(y.new(this._root, {
|
|
267
|
+
themeTags: ["ok"],
|
|
268
|
+
label: b.new(this._root, {})
|
|
269
|
+
})), this._isColorDown = !1, this._isPicking = !1, this._isEditing = !1;
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* @ignore
|
|
273
|
+
*/
|
|
274
|
+
_afterNew() {
|
|
275
|
+
this._defaultThemes.push(O.new(this._root)), this.addTag("colorpicker"), super._afterNew(), this.set("tooltip", this._root.systemTooltip), this.cancelButton.events.on("click", () => {
|
|
276
|
+
this.cancel();
|
|
277
|
+
}), this.okButton.events.on("click", () => {
|
|
278
|
+
this.set("colorButton", void 0), this.events.dispatch("colorchanged", {
|
|
279
|
+
type: "colorchanged",
|
|
280
|
+
target: this,
|
|
281
|
+
color: this.get("color"),
|
|
282
|
+
colorOpacity: this.get("colorOpacity")
|
|
283
|
+
});
|
|
284
|
+
});
|
|
285
|
+
const t = this.root.container;
|
|
286
|
+
t.events.on("boundschanged", () => {
|
|
287
|
+
const o = t.width(), e = t.height();
|
|
288
|
+
this._clickOverlay.setAll({
|
|
289
|
+
width: o,
|
|
290
|
+
height: e,
|
|
291
|
+
x: 0,
|
|
292
|
+
y: 0
|
|
293
|
+
});
|
|
294
|
+
}), this._clickOverlay.events.on("click", () => {
|
|
295
|
+
!this._isPicking && !this._isEditing ? this.cancel() : this.pickerButton.set("active", !1);
|
|
296
|
+
}), this.set("layout", this._root.verticalLayout), this.noColorButton.events.on("click", () => {
|
|
297
|
+
this.set("color", void 0);
|
|
298
|
+
const o = this.get("colorButton");
|
|
299
|
+
o && o.setAll({
|
|
300
|
+
color: void 0,
|
|
301
|
+
colorOpacity: 1
|
|
302
|
+
}), this.events.dispatch("colorchanged", {
|
|
303
|
+
type: "colorchanged",
|
|
304
|
+
target: this,
|
|
305
|
+
color: void 0,
|
|
306
|
+
colorOpacity: 1
|
|
307
|
+
}), this.set("colorButton", void 0);
|
|
308
|
+
}), this.colorInput.on("text", (o) => {
|
|
309
|
+
if (o) {
|
|
310
|
+
o = o.replace(/[^abcdef0-9#]/ig, ""), o.substring(0, 1) !== "#" && (o = "#" + o);
|
|
311
|
+
try {
|
|
312
|
+
this.set("color", s(o));
|
|
313
|
+
} catch {
|
|
314
|
+
return;
|
|
315
|
+
}
|
|
316
|
+
this.colorInput.set("text", o);
|
|
317
|
+
}
|
|
318
|
+
}), this.pickerButton.on("active", (o) => {
|
|
319
|
+
this._isPicking = !!o, this.set("forceInactive", o);
|
|
320
|
+
}), G("keyboardevents") && this._disposers.push(S(document, "keyup", (o) => {
|
|
321
|
+
o.key === "Escape" && this.set("colorButton", void 0);
|
|
322
|
+
})), this.gradientsContainer.events.on("boundschanged", () => {
|
|
323
|
+
const o = Math.floor(this.colorGradientsContainer.width());
|
|
324
|
+
this.colorGradientsContainer.setAll({ width: o, height: o }), this.slider.set("height", o);
|
|
325
|
+
}), this.targetCircle.setAll({
|
|
326
|
+
x: this.colorRectangle.width(),
|
|
327
|
+
y: 0
|
|
328
|
+
}), this.targetCircle.adapters.add("x", (o) => {
|
|
329
|
+
if (x(o)) {
|
|
330
|
+
const e = this.colorRectangle.width();
|
|
331
|
+
return Math.min(e, Math.max(0, o));
|
|
332
|
+
}
|
|
333
|
+
}), this.targetCircle.adapters.add("y", (o) => {
|
|
334
|
+
if (x(o)) {
|
|
335
|
+
const e = this.colorRectangle.height();
|
|
336
|
+
return Math.min(e, Math.max(0, o));
|
|
337
|
+
}
|
|
338
|
+
}), this.slider.on("start", () => {
|
|
339
|
+
this.set("hue", this.slider.get("start", 0));
|
|
340
|
+
});
|
|
341
|
+
const r = this.slider.get("background");
|
|
342
|
+
r && r.set("layer", 0), this.opacitySlider.on("start", () => {
|
|
343
|
+
this.set("colorOpacity", this.opacitySlider.get("start", 1));
|
|
344
|
+
});
|
|
345
|
+
const a = this.opacitySlider.get("background");
|
|
346
|
+
a && a.set("layer", 0), this.colorRectangle.events.on("pointerdown", (o) => {
|
|
347
|
+
this._isColorDown = !0, this._handleTargetMove(o), this.set("draggable", !1), this.dragStop(o);
|
|
348
|
+
}), this.colorRectangle.events.on("globalpointermove", (o) => {
|
|
349
|
+
if (this._isColorDown && this._handleTargetMove(o), this._isPicking) {
|
|
350
|
+
const e = this._root.container._display, l = e.getLayer().context, n = e._renderer.resolution, d = l.getImageData(Math.floor(o.point.x * n), Math.floor(o.point.y * n), 1, 1).data, f = p.fromRGB(d[0], d[1], d[2]);
|
|
351
|
+
this.set("color", f);
|
|
352
|
+
}
|
|
353
|
+
}), this.colorRectangle.events.on("globalpointerup", (o) => {
|
|
354
|
+
this.set("draggable", !0), this.dragStop(o), this._isColorDown = !1;
|
|
355
|
+
}), this.colorInput.on("active", (o) => {
|
|
356
|
+
this._isEditing = !!o;
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* @ignore
|
|
361
|
+
*/
|
|
362
|
+
_updateChildren() {
|
|
363
|
+
var t, r, a, o;
|
|
364
|
+
if (super._updateChildren(), this.isDirty("colorButton")) {
|
|
365
|
+
this.pickerButton.set("active", !1);
|
|
366
|
+
const e = this.get("colorButton");
|
|
367
|
+
let l = !0;
|
|
368
|
+
if (e) {
|
|
369
|
+
this.opacityContainer.set("forceHidden", e.get("disableOpacity")), this._previousColor = e.get("color", e.getPrivate("color")), this._previousOpacity = e.get("colorOpacity");
|
|
370
|
+
const n = this.parent;
|
|
371
|
+
n && (n.children.moveValue(this._clickOverlay), n.children.moveValue(this)), l = !1, this.show(), this.set("color", e.get("color", e.getPrivate("color"))), this.set("colorOpacity", e.get("colorOpacity") || 1);
|
|
372
|
+
} else
|
|
373
|
+
this.hide();
|
|
374
|
+
this._clickOverlay.set("forceHidden", l);
|
|
375
|
+
}
|
|
376
|
+
if (this.isDirty("hue") && (this._handleDirtyHue(), this._updateColor()), this.isDirty("colorOpacity")) {
|
|
377
|
+
const e = this.opacitySlider, l = this.get("colorOpacity", 1);
|
|
378
|
+
e.startGrip.set("tooltipText", "opacity:" + Math.round(l * 100) + "%"), e.startGrip.isDragging() ? e.startGrip.hover() : (e.set("start", l), e.markDirtyKey("start"));
|
|
379
|
+
const n = this.get("colorButton");
|
|
380
|
+
n && n.set("colorOpacity", l), this._updateOpacitySliderGrip();
|
|
381
|
+
}
|
|
382
|
+
if (this.isDirty("color")) {
|
|
383
|
+
const e = this.get("color"), l = this._prevColor;
|
|
384
|
+
let n = !1;
|
|
385
|
+
if (e && l && e.toCSSHex() === l.toCSSHex() && (n = !0), !n) {
|
|
386
|
+
if (e) {
|
|
387
|
+
if (this.targetCircle.show(), !this._isColorDown) {
|
|
388
|
+
const u = D(e.toHSL());
|
|
389
|
+
this.setRaw("hue", u.h), this.slider.startGrip.isDragging() || this.slider.set("start", u.h), this.targetCircle.setAll({
|
|
390
|
+
x: this.colorRectangle.width() * u.s,
|
|
391
|
+
y: this.colorRectangle.height() * (1 - u.v)
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
this.targetCircle.set("fill", e), this._handleDirtyHue(), this.colorInput.set("text", e.toCSSHex().substring(1, 7));
|
|
395
|
+
} else
|
|
396
|
+
this.targetCircle.hide(), this.colorInput.set("text", "");
|
|
397
|
+
this._prevColor = e;
|
|
398
|
+
const d = this.opacitySlider.get("background");
|
|
399
|
+
d && d.set("fillGradient", k.new(this._root, {
|
|
400
|
+
rotation: 0,
|
|
401
|
+
stops: [
|
|
402
|
+
{ color: e, opacity: 0 },
|
|
403
|
+
{ color: e, opacity: 1 }
|
|
404
|
+
]
|
|
405
|
+
}));
|
|
406
|
+
const f = this.get("colorButton");
|
|
407
|
+
f && f.set("color", e), this._updateOpacitySliderGrip();
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
if (this.isDirty("backgroundColor")) {
|
|
411
|
+
const e = this.get("backgroundColor", s(16777215));
|
|
412
|
+
this.colorRectangle.setAll({
|
|
413
|
+
stroke: e
|
|
414
|
+
}), this.colorRectangleBlackOverlay.setAll({
|
|
415
|
+
stroke: e
|
|
416
|
+
}), this.colorRectangleWhiteOverlay.setAll({
|
|
417
|
+
stroke: e
|
|
418
|
+
}), (t = this.pickerButton.get("background")) === null || t === void 0 || t.states.applyAnimate("default", 0), (r = this.noColorButton.get("background")) === null || r === void 0 || r.states.applyAnimate("default", 0), (a = this.cancelButton.get("background")) === null || a === void 0 || a.states.applyAnimate("default", 0), (o = this.okButton.get("background")) === null || o === void 0 || o.states.applyAnimate("default", 0);
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
/**
|
|
422
|
+
* @ignore
|
|
423
|
+
*/
|
|
424
|
+
_handleDirtyHue() {
|
|
425
|
+
var t, r, a;
|
|
426
|
+
const o = this.slider.get("start", 0), e = p.fromHSL(o, 1, 0.5), l = this.slider.startGrip;
|
|
427
|
+
this.colorRectangle.setAll({
|
|
428
|
+
fill: e,
|
|
429
|
+
stroke: this.get("backgroundColor", s(16777215))
|
|
430
|
+
});
|
|
431
|
+
const n = l.get("background");
|
|
432
|
+
n && (n.set("fill", e), (t = n.states.lookup("default")) === null || t === void 0 || t.set("fill", e), (r = n.states.lookup("hover")) === null || r === void 0 || r.set("fill", e), (a = n.states.lookup("down")) === null || a === void 0 || a.set("fill", e)), this.colorRectangleWhiteOverlay.setAll({
|
|
433
|
+
fillGradient: k.new(this._root, {
|
|
434
|
+
rotation: 0,
|
|
435
|
+
stops: [
|
|
436
|
+
{ color: s(16777215), opacity: 1, offset: 0 },
|
|
437
|
+
{ color: s(16777215), opacity: 0, offset: 1 }
|
|
438
|
+
]
|
|
439
|
+
})
|
|
440
|
+
}), this.colorRectangleBlackOverlay.setAll({
|
|
441
|
+
fillGradient: k.new(this._root, {
|
|
442
|
+
stops: [
|
|
443
|
+
{ color: s(0), opacity: 0, offset: 0 },
|
|
444
|
+
{ color: s(0), opacity: 1, offset: 1 }
|
|
445
|
+
]
|
|
446
|
+
})
|
|
447
|
+
});
|
|
448
|
+
}
|
|
449
|
+
/**
|
|
450
|
+
* @ignore
|
|
451
|
+
*/
|
|
452
|
+
_handleTargetMove(t) {
|
|
453
|
+
const r = this.colorGradientsContainer.toLocal({ x: t.point.x, y: t.point.y });
|
|
454
|
+
this.targetCircle.setAll({
|
|
455
|
+
x: r.x,
|
|
456
|
+
y: r.y
|
|
457
|
+
}), this._updateColor();
|
|
458
|
+
}
|
|
459
|
+
/**
|
|
460
|
+
* @ignore
|
|
461
|
+
*/
|
|
462
|
+
_updateColor() {
|
|
463
|
+
const t = this.targetCircle.x(), r = this.targetCircle.y(), a = this.colorRectangle.height(), o = this.colorRectangle.width(), e = this.slider.get("start", 0);
|
|
464
|
+
let l = P({ h: e, s: t / o, v: 1 - r / a });
|
|
465
|
+
this.set("color", p.fromHSL(l.h, l.s, l.l));
|
|
466
|
+
}
|
|
467
|
+
/**
|
|
468
|
+
* @ignore
|
|
469
|
+
*/
|
|
470
|
+
_updateOpacitySliderGrip() {
|
|
471
|
+
var t, r, a;
|
|
472
|
+
const o = this.opacitySlider.startGrip.get("background");
|
|
473
|
+
if (o) {
|
|
474
|
+
const e = p.interpolate(this.get("colorOpacity", 1), this.get("backgroundColor", s(16777215)), this.get("color", s(16777215)));
|
|
475
|
+
o.set("fill", e), (t = o.states.lookup("default")) === null || t === void 0 || t.set("fill", e), (r = o.states.lookup("hover")) === null || r === void 0 || r.set("fill", e), (a = o.states.lookup("down")) === null || a === void 0 || a.set("fill", e);
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
/**
|
|
479
|
+
* Cancels color selection and restores previous color.
|
|
480
|
+
*/
|
|
481
|
+
cancel() {
|
|
482
|
+
var t;
|
|
483
|
+
(t = this.get("colorButton")) === null || t === void 0 || t.setAll({
|
|
484
|
+
color: this._previousColor,
|
|
485
|
+
colorOpacity: this._previousOpacity
|
|
486
|
+
}), this._isEditing = !1, this._isPicking = !1, this.set("color", this._previousColor), this.set("colorButton", void 0);
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
v.className = "ColorPicker";
|
|
490
|
+
v.classNames = h.classNames.concat([v.className]);
|
|
491
|
+
class w extends h {
|
|
492
|
+
constructor() {
|
|
493
|
+
super(...arguments), this.noColorGraphics = this.children.push(_.new(this._root, {
|
|
494
|
+
themeTags: ["nocolor"]
|
|
495
|
+
})), this.icon = this.children.push(_.new(this._root, {
|
|
496
|
+
themeTags: ["icon"]
|
|
497
|
+
}));
|
|
498
|
+
}
|
|
499
|
+
_afterNew() {
|
|
500
|
+
this._defaultThemes.push(O.new(this._root)), this.addTag("colorpickerbutton"), super._afterNew(), this.set("background", m.new(this._root, {
|
|
501
|
+
themeTags: ["background"]
|
|
502
|
+
}));
|
|
503
|
+
}
|
|
504
|
+
_changed() {
|
|
505
|
+
if (super._changed(), this.isDirty("color") || this.isPrivateDirty("color") || this.isDirty("colorOpacity") || this.isDirty("backgroundColor")) {
|
|
506
|
+
let t = this.get("color", this.getPrivate("color")), r = this.get("colorOpacity", 1);
|
|
507
|
+
t ? this.noColorGraphics.hide() : this.noColorGraphics.show();
|
|
508
|
+
const a = this.get("backgroundColor", s(16777215));
|
|
509
|
+
t || (t = a);
|
|
510
|
+
let o = t, e = -0.1;
|
|
511
|
+
a.toHSL().l < 0.5 && (e = -e), o = p.lighten(t, e), this.noColorGraphics.set("stroke", o);
|
|
512
|
+
const l = this.get("background");
|
|
513
|
+
l && l.setAll({
|
|
514
|
+
fill: t,
|
|
515
|
+
stroke: o,
|
|
516
|
+
fillOpacity: r,
|
|
517
|
+
strokeOpacity: Math.max(0.2, r)
|
|
518
|
+
}), this.icon.set("stroke", p.alternative(o, this._root.interfaceColors.get("alternativeText"), this._root.interfaceColors.get("text")));
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
w.className = "ColorPickerButton";
|
|
523
|
+
w.classNames = h.classNames.concat([w.className]);
|
|
524
|
+
export {
|
|
525
|
+
v as ColorPicker,
|
|
526
|
+
w as ColorPickerButton
|
|
527
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { C as _ } from "./button.
|
|
2
|
-
import { C as u, D as h } from "./dialog.
|
|
1
|
+
import { C as _ } from "./button.CAAJPQFu.js";
|
|
2
|
+
import { C as u, D as h } from "./dialog.qSV5AjOE.js";
|
|
3
3
|
import g from "../components/dropdown.js";
|
|
4
4
|
import { C as x } from "./typography.oDzoLbZS.js";
|
|
5
5
|
import { n as e, C as b } from "./lib-cortex-element.CVMmyPMC.js";
|
|
6
6
|
import { c as y } from "./component.styles.DMSLciL5.js";
|
|
7
7
|
import { c as w } from "./custom-element.L4WJXn1j.js";
|
|
8
|
-
import { L as $ } from "./i18n.
|
|
8
|
+
import { L as $ } from "./i18n.C0iakJkV.js";
|
|
9
9
|
import { i as z, x as d } from "./lit-element.jLBm65_O.js";
|
|
10
10
|
import { e as m } from "./query.BBf1UFkC.js";
|
|
11
11
|
import { e as a } from "./class-map.BiVq-cVR.js";
|