@luzmo/analytics-components-kit 1.0.1-alpha.90 → 1.0.1-alpha.94
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/README.md +195 -0
- package/angular/README.md +1 -0
- package/angular/components/widget-menu.component.ts +25 -0
- package/angular/esm/components/widget-menu.component.d.ts +13 -0
- package/angular/esm/components/widget-menu.component.js +49 -0
- package/angular/esm/index.d.ts +3 -1
- package/angular/esm/index.js +4 -1
- package/angular/esm/types.d.ts +4 -0
- package/angular/index.ts +4 -1
- package/angular/types.ts +6 -0
- package/components/ai-chat-message-assistant/index.cjs +1 -1
- package/components/ai-chat-message-assistant/index.js +1 -0
- package/components/ai-chat-messages-container/index.cjs +1 -1
- package/components/ai-chat-messages-container/index.js +2 -2
- package/components/ai-interaction-textarea/index.cjs +1 -1
- package/components/ai-interaction-textarea/index.js +2 -1
- package/components/area-chart-options.config-C7sMAHco.cjs +20 -0
- package/components/{area-chart-options.config-u8itidsi.js → area-chart-options.config-_J0sG4NF.js} +26 -14
- package/components/{bar-chart-options.config-DIirbAJ0.js → bar-chart-options.config-D1mb5TDl.js} +35 -21
- package/components/bar-chart-options.config-DcxEkOT5.cjs +20 -0
- package/components/box-plot-options.config-SrrbDEYW.cjs +20 -0
- package/components/{box-plot-options.config-BWROiguA.js → box-plot-options.config-xu_i6ms7.js} +88 -52
- package/components/{bubble-chart-options.config-4QD8VPhU.js → bubble-chart-options.config-BacgXkJ_.js} +18 -9
- package/components/bubble-chart-options.config-Ihn6eVQI.cjs +20 -0
- package/components/{bullet-chart-options.config-3bH7uekx.js → bullet-chart-options.config-CDPpX1yc.js} +1 -1
- package/components/{bullet-chart-options.config-tWb6Fio-.cjs → bullet-chart-options.config-DfS4Bwds.cjs} +1 -1
- package/components/calculate-data-item-icon-CEa82-5u.cjs +20 -0
- package/components/calculate-data-item-icon-DjlZwMdO.js +147 -0
- package/components/{choropleth-map-options.config-CMxx3ORp.js → choropleth-map-options.config-B_W9-rhe.js} +84 -63
- package/components/choropleth-map-options.config-ZW8yoZH2.cjs +20 -0
- package/components/{circular-gauge-options.config-DhIKn44k.js → circular-gauge-options.config-DAIjz4Rl.js} +36 -23
- package/components/circular-gauge-options.config-msZ4mfpN.cjs +20 -0
- package/components/color-B6LaL8qz.cjs +20 -0
- package/components/{color-B7m0j8lX.js → color-DuJ4-73S.js} +950 -941
- package/components/{color-range-utils-BSfqtB3A.js → color-range-utils-Bvo9sm5A.js} +32 -31
- package/components/color-range-utils-C5yXW7ZC.cjs +20 -0
- package/components/{column-chart-options.config-D5-yR7iq.js → column-chart-options.config-B5SjBVdy.js} +37 -27
- package/components/column-chart-options.config-BjDvA7i9.cjs +20 -0
- package/components/{conditional-number-options.config-DPYsdML5.js → conditional-number-options.config-BCEpSK9J.js} +40 -24
- package/components/conditional-number-options.config-DgzUo0xi.cjs +20 -0
- package/components/dataset-icon/index.cjs +1 -1
- package/components/dataset-icon/index.js +2 -1
- package/components/dataset-selector-list/index.cjs +1 -1
- package/components/dataset-selector-list/index.js +35 -32
- package/components/dataset-selector-row/index.cjs +9 -9
- package/components/dataset-selector-row/index.js +53 -51
- package/components/{date-comparison-filter-options.config-QaoWaFUn.cjs → date-comparison-filter-options.config-DAVncmi0.cjs} +1 -1
- package/components/{date-comparison-filter-options.config-CSwGyuBg.js → date-comparison-filter-options.config-JA_yYpJa.js} +6 -3
- package/components/{date-filter-options.config-n-zhWaYa.cjs → date-filter-options.config-CWPMtA18.cjs} +1 -1
- package/components/{date-filter-options.config-BTVyHRkp.js → date-filter-options.config-DBRxlTWy.js} +6 -3
- package/components/display-settings/index.cjs +1 -1
- package/components/display-settings/index.js +1 -1
- package/components/display-settings-binning/index.cjs +5 -5
- package/components/display-settings-binning/index.js +30 -29
- package/components/display-settings-datetime/index.cjs +29 -29
- package/components/display-settings-datetime/index.js +120 -112
- package/components/display-settings-grand-totals/index.cjs +4 -4
- package/components/display-settings-grand-totals/index.js +24 -23
- package/components/display-settings-numeric/index.cjs +48 -48
- package/components/display-settings-numeric/index.js +211 -194
- package/components/display-settings-period-over-period/index.cjs +16 -16
- package/components/display-settings-period-over-period/index.js +97 -91
- package/components/{donut-chart-options.config-3ZqX8Cbb.js → donut-chart-options.config-BulUEiaH.js} +37 -21
- package/components/donut-chart-options.config-tNpqBZfR.cjs +20 -0
- package/components/draggable-data-item/index.cjs +5 -5
- package/components/draggable-data-item/index.js +46 -45
- package/components/draggable-data-item-level/index.cjs +11 -11
- package/components/draggable-data-item-level/index.js +73 -70
- package/components/{dropdown-filter-options.config-CGJTtgAX.js → dropdown-filter-options.config-D9dvPypF.js} +10 -7
- package/components/{dropdown-filter-options.config-DJvfCTk7.cjs → dropdown-filter-options.config-DS-MORmq.cjs} +1 -1
- package/components/droppable-slot/index.cjs +16 -16
- package/components/droppable-slot/index.js +223 -208
- package/components/edit-item/index.cjs +9 -9
- package/components/edit-item/index.js +119 -116
- package/components/edit-option/index.cjs +1 -1
- package/components/edit-option/index.js +1 -1
- package/components/edit-option-action-button-group/index.cjs +8 -8
- package/components/edit-option-action-button-group/index.js +53 -52
- package/components/{edit-option-base-Bh29-Cak.js → edit-option-base-DIc7iC-b.js} +1 -1
- package/components/{edit-option-base-tFr8Qg2B.cjs → edit-option-base-VhTih9T1.cjs} +1 -1
- package/components/edit-option-color-palette-picker/index.cjs +1 -1
- package/components/edit-option-color-palette-picker/index.js +1 -1
- package/components/edit-option-color-picker/index.cjs +1 -1
- package/components/edit-option-color-picker/index.js +1 -1
- package/components/edit-option-color-range/index.cjs +19 -19
- package/components/edit-option-color-range/index.js +117 -106
- package/components/edit-option-multi-language-field/index.cjs +3 -3
- package/components/edit-option-multi-language-field/index.js +27 -26
- package/components/edit-option-number-field/index.cjs +1 -1
- package/components/edit-option-number-field/index.js +1 -1
- package/components/edit-option-picker/index.cjs +5 -5
- package/components/edit-option-picker/index.js +7 -7
- package/components/edit-option-position-picker/index.cjs +4 -4
- package/components/edit-option-position-picker/index.js +25 -21
- package/components/edit-option-positions-number-field/index.cjs +9 -9
- package/components/edit-option-positions-number-field/index.js +81 -76
- package/components/edit-option-radio-button-group/index.cjs +6 -6
- package/components/edit-option-radio-button-group/index.js +22 -21
- package/components/edit-option-slider/index.cjs +1 -1
- package/components/edit-option-slider/index.js +1 -1
- package/components/edit-option-switch/index.cjs +1 -1
- package/components/edit-option-switch/index.js +1 -1
- package/components/edit-option-text-field/index.cjs +2 -2
- package/components/edit-option-text-field/index.js +23 -22
- package/components/en-BKBhKBXY.cjs +20 -0
- package/components/en-BOTjhwEc.js +1488 -0
- package/components/{en-GB-ialeqj_z.js → en-GB-CEHEs8F2.js} +1 -1
- package/components/{en-GB-TqvgIw9B.cjs → en-GB-DG6uS3sM.cjs} +1 -1
- package/components/{evolution-number-options.config-Bc9eKYnn.cjs → evolution-number-options.config-BgIZY4gQ.cjs} +1 -1
- package/components/{evolution-number-options.config-BIPO_4n3.js → evolution-number-options.config-DzkfeoIN.js} +14 -11
- package/components/{extrapolate-color-C0n1UDs-.cjs → extrapolate-color-0j_AeYkz.cjs} +1 -1
- package/components/{extrapolate-color-v1PimdQr.js → extrapolate-color-CC9CURf6.js} +1 -1
- package/components/filter-data-item-picker/index.cjs +7 -7
- package/components/filter-data-item-picker/index.js +86 -85
- package/components/filter-expression-picker/index.cjs +1 -1
- package/components/filter-expression-picker/index.js +1 -1
- package/components/filter-item/index.cjs +6 -6
- package/components/filter-item/index.js +119 -109
- package/components/filter-value-picker/index.cjs +2 -2
- package/components/filter-value-picker/index.js +36 -34
- package/components/filter-value-picker-datetime/index.cjs +8 -8
- package/components/filter-value-picker-datetime/index.js +71 -56
- package/components/filter-value-picker-hierarchy/index.cjs +12 -12
- package/components/filter-value-picker-hierarchy/index.js +124 -113
- package/components/filter-value-picker-numeric/index.cjs +8 -8
- package/components/filter-value-picker-numeric/index.js +110 -101
- package/components/focusable-B3E_hQmm.cjs +20 -0
- package/components/{focusable-BS2pbY7w.js → focusable-DCIFkpiW.js} +26 -24
- package/components/{funnel-chart-options.config-CrJy2U7_.js → funnel-chart-options.config-C_VjTOvD.js} +20 -5
- package/components/funnel-chart-options.config-D7H7gFcx.cjs +20 -0
- package/components/get-css-variable-BEYG097C.js +1446 -0
- package/components/get-css-variable-BZxY4IOa.cjs +35 -0
- package/components/get-css-variable-DLiZYZEi.cjs +24 -0
- package/components/{get-css-variable-CdwF98oh.js → get-css-variable-YlLiVgo8.js} +35 -35
- package/components/grid/index.cjs +49 -43
- package/components/grid/index.js +1878 -2610
- package/components/{heat-map-options.config-CmL87j1j.js → heat-map-options.config-BnLWe8jS.js} +41 -35
- package/components/heat-map-options.config-DVH-Bb5-.cjs +20 -0
- package/components/heat-table-options.config-B12JEYnp.cjs +20 -0
- package/components/{heat-table-options.config-BrCYAgYD.js → heat-table-options.config-CUsDdgUr.js} +88 -60
- package/components/helpers-DXQwEH1P.cjs +20 -0
- package/components/helpers-v1bPALRP.js +91 -0
- package/components/hexbin-map-options.config-DZERRhM8.cjs +20 -0
- package/components/{hexbin-map-options.config-BguV1w8q.js → hexbin-map-options.config-F-7uCqxb.js} +38 -20
- package/components/{index-BNAmjOkm.cjs → index-BPNsFiyq.cjs} +4 -4
- package/components/index-CDi4fe3N.js +1716 -0
- package/components/index-CQ9ck-BO.cjs +249 -0
- package/components/index-CXn67vdn.cjs +121 -0
- package/components/{index-haa7WNrl.js → index-CdIUfo-L.js} +481 -453
- package/components/index-Cz9vSXy6.cjs +20 -0
- package/components/{index-DdyZ2g5L.js → index-D0GBF6tg.js} +104 -94
- package/components/index-Dn0j_pcR.cjs +20 -0
- package/components/{index-CqKpf0B8.js → index-Do7O9azB.js} +123 -112
- package/components/index-E239Dotg.js +1735 -0
- package/components/index.cjs +1 -1
- package/components/index.js +20 -18
- package/components/item-options-configs.cjs +1 -1
- package/components/item-options-configs.js +37 -37
- package/components/{line-chart-options.config-BhirTGqD.js → line-chart-options.config-DB3IsXXr.js} +28 -13
- package/components/line-chart-options.config-DSugoe0t.cjs +20 -0
- package/components/{localize-CcDpq940.js → localize-BX7q0S0M.js} +10 -10
- package/components/{localize-C4zNlrwK.cjs → localize-r7ALOUy_.cjs} +1 -1
- package/components/{marker-map-options.config-Bx17jmiq.js → marker-map-options.config-DPJ955tt.js} +1 -1
- package/components/{marker-map-options.config-CvhCylSC.cjs → marker-map-options.config-_FYZzRwA.cjs} +1 -1
- package/components/pivot-table-options.config-BiJXKSFR.cjs +20 -0
- package/components/{pivot-table-options.config-CFc7y0IT.js → pivot-table-options.config-DNK_AIG7.js} +24 -15
- package/components/pyramid-chart-options.config-C4zbFS26.cjs +20 -0
- package/components/{pyramid-chart-options.config-2Waxb11l.js → pyramid-chart-options.config-CcVMatYx.js} +43 -29
- package/components/{radar-chart-options.config-CPN5fOl8.js → radar-chart-options.config-CUZn_3Fd.js} +23 -11
- package/components/radar-chart-options.config-EqQu6PTh.cjs +20 -0
- package/components/{regular-table-options.config-CFKCJQK1.js → regular-table-options.config-BoLZsBry.js} +23 -17
- package/components/{regular-table-options.config-YRuoijIk.cjs → regular-table-options.config-DTx3RTnS.cjs} +1 -1
- package/components/{route-map-options.config-CyolTJfK.js → route-map-options.config-CN86T7c0.js} +109 -87
- package/components/route-map-options.config-D7NJePTu.cjs +20 -0
- package/components/{sankey-diagram-options.config-D7OSvSqm.cjs → sankey-diagram-options.config-RFB83YLZ.cjs} +1 -1
- package/components/{sankey-diagram-options.config-Ldjk84ro.js → sankey-diagram-options.config-tVLKy_Zn.js} +10 -7
- package/components/scatter-plot-options.config-CFfGJXsV.cjs +20 -0
- package/components/{scatter-plot-options.config-CfxEfkQ1.js → scatter-plot-options.config-Corlzno1.js} +86 -56
- package/components/{search-filter-options.config-Oqco9BKj.cjs → search-filter-options.config-BCaDlYqZ.cjs} +1 -1
- package/components/{search-filter-options.config-C0syQmP4.js → search-filter-options.config-BE3JhR-F.js} +6 -3
- package/components/{set-locale-hKTMz37h.js → set-locale-Dp3N_gXN.js} +8 -1
- package/components/{slicer-filter-options.config-DmOe3440.js → slicer-filter-options.config-3JZZcw5C.js} +18 -9
- package/components/slicer-filter-options.config-DNI-XevE.cjs +20 -0
- package/components/{slider-filter-options.config-B1M8RcDs.js → slider-filter-options.config-DH4SS8wH.js} +1 -1
- package/components/{slider-filter-options.config-k45I-t6G.cjs → slider-filter-options.config-_8Z2zKmU.cjs} +1 -1
- package/components/slot-contents-picker/index.cjs +33 -33
- package/components/slot-contents-picker/index.js +205 -194
- package/components/slot-menu/index.cjs +12 -12
- package/components/slot-menu/index.js +184 -171
- package/components/slot-menu-list/index.cjs +3 -3
- package/components/slot-menu-list/index.js +103 -97
- package/components/speedometer-chart-options.config-BX9LTQBH.cjs +20 -0
- package/components/{speedometer-chart-options.config-CzOmuEF8.js → speedometer-chart-options.config-SL581yOa.js} +53 -31
- package/components/{spike-map-options.config-Cbt1YUw6.js → spike-map-options.config-C5KewecZ.js} +122 -91
- package/components/spike-map-options.config-DoBFXPmN.cjs +20 -0
- package/components/{sunburst-chart-options.config-Yrxc2i57.cjs → sunburst-chart-options.config-AbNjWS6t.cjs} +1 -1
- package/components/{sunburst-chart-options.config-_dyLQxPJ.js → sunburst-chart-options.config-CNauGQJv.js} +20 -9
- package/components/{symbol-map-options.config-BORL1NSU.js → symbol-map-options.config-DdDA4aa7.js} +20 -11
- package/components/symbol-map-options.config-m-lwLTtu.cjs +20 -0
- package/components/treemap-chart-options.config-C0Q9aQ1Z.cjs +20 -0
- package/components/{treemap-chart-options.config-B9i9qIm_.js → treemap-chart-options.config-D5AJaF_u.js} +37 -20
- package/components/utils.cjs +1 -1
- package/components/utils.js +97 -94
- package/components/{video-options.config-B0asgYt8.cjs → video-options.config-CGsDTwHc.cjs} +1 -1
- package/components/{video-options.config-UX-9MDfS.js → video-options.config-Dk36zJ1B.js} +10 -7
- package/components/widget-menu/index.cjs +51 -0
- package/components/widget-menu/index.d.ts +8 -0
- package/components/widget-menu/index.js +211 -0
- package/components/widget-menu/widget-menu.d.ts +77 -0
- package/components/{wordcloud-chart-options.config-BKtJT8Va.cjs → wordcloud-chart-options.config-vGfCW8kE.cjs} +1 -1
- package/components/{wordcloud-chart-options.config-BoB_KuhA.js → wordcloud-chart-options.config-w2NUIWVA.js} +7 -4
- package/custom-elements.json +133 -20
- package/index.d.ts +1 -0
- package/package.json +6 -1
- package/types.d.ts +4 -0
- package/components/area-chart-options.config-Bl8bhhOo.cjs +0 -20
- package/components/bar-chart-options.config-CePAqM83.cjs +0 -20
- package/components/box-plot-options.config-BVNrV2eD.cjs +0 -20
- package/components/bubble-chart-options.config-BDgOe3GQ.cjs +0 -20
- package/components/calculate-data-item-icon-DMDhKq_m.js +0 -147
- package/components/calculate-data-item-icon-DtVGbet3.cjs +0 -20
- package/components/choropleth-map-options.config-CWJACFd0.cjs +0 -20
- package/components/circular-gauge-options.config-BMxgq3zH.cjs +0 -20
- package/components/color-Czp4Im5q.cjs +0 -20
- package/components/color-range-utils-DYYR-iwx.cjs +0 -20
- package/components/column-chart-options.config-BV9R3ssH.cjs +0 -20
- package/components/conditional-number-options.config-Co099Qfm.cjs +0 -20
- package/components/donut-chart-options.config-BQyPgnC9.cjs +0 -20
- package/components/en-D3ihEGXg.js +0 -1483
- package/components/en-DZcn_iz_.cjs +0 -20
- package/components/focusable-QLh-LlNt.cjs +0 -20
- package/components/funnel-chart-options.config-DrP4AFgk.cjs +0 -20
- package/components/get-css-variable-COd1d84B.cjs +0 -24
- package/components/heat-map-options.config-CIHnPdYE.cjs +0 -20
- package/components/heat-table-options.config-DTlZRc_i.cjs +0 -20
- package/components/helpers-9I0oLoUB.cjs +0 -20
- package/components/helpers-bR8Ibjqh.js +0 -79
- package/components/hexbin-map-options.config-CKnn3VAB.cjs +0 -20
- package/components/index-BekTY3Em.cjs +0 -121
- package/components/index-CFL6gmIu.cjs +0 -20
- package/components/index-DNPULp4A.js +0 -1755
- package/components/index-DvkzMbLt.cjs +0 -249
- package/components/line-chart-options.config-Cqwou5u6.cjs +0 -20
- package/components/pivot-table-options.config-uZDAertf.cjs +0 -20
- package/components/pyramid-chart-options.config-DoGfEvzU.cjs +0 -20
- package/components/radar-chart-options.config-CtNUMN1l.cjs +0 -20
- package/components/route-map-options.config-CVTk5RVL.cjs +0 -20
- package/components/scatter-plot-options.config-5gN7pMTm.cjs +0 -20
- package/components/slicer-filter-options.config-CrusP6a0.cjs +0 -20
- package/components/speedometer-chart-options.config-B4ceg_qI.cjs +0 -20
- package/components/spike-map-options.config-BkkDqb4g.cjs +0 -20
- package/components/symbol-map-options.config-NpBKm64d.cjs +0 -20
- package/components/treemap-chart-options.config-x4J54WSw.cjs +0 -20
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
/*! * A kit of modern Luzmo Web Components for analytics in your web application.
|
|
2
|
+
*
|
|
3
|
+
* Copyright © 2025 Luzmo
|
|
4
|
+
* All rights reserved.
|
|
5
|
+
* Luzmo web components (“Luzmo Web Components”)
|
|
6
|
+
* must be used according to the Luzmo Terms of Service.
|
|
7
|
+
* This license allows users with a current active Luzmo account
|
|
8
|
+
* to use the Luzmo Web Components. This license terminates
|
|
9
|
+
* automatically if a user no longer has an active Luzmo account.
|
|
10
|
+
* Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
|
|
11
|
+
*
|
|
12
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
13
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
14
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
15
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
16
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
17
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
18
|
+
* SOFTWARE.
|
|
19
|
+
* */
|
|
20
|
+
import { localized as s, msg as c } from "@lit/localize";
|
|
21
|
+
import { luzmoTrashOutline as g, luzmoClone as v, luzmoEdit as z } from "@luzmo/icons";
|
|
22
|
+
import "@luzmo/lucero/icon";
|
|
23
|
+
import "@luzmo/lucero/tooltip";
|
|
24
|
+
import { unsafeCSS as h, LitElement as b, html as m } from "lit";
|
|
25
|
+
import { property as n } from "lit/decorators.js";
|
|
26
|
+
import { g as p, t as w, s as f } from "../set-locale-Dp3N_gXN.js";
|
|
27
|
+
(function() {
|
|
28
|
+
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
29
|
+
const o = document.createElement("style");
|
|
30
|
+
o.setAttribute("data-luzmo-vars", ""), o.textContent = 'html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: rgb(140, 140, 140);--luzmo-border-color-full-down: rgb(110, 110, 110);--luzmo-border-color-full-focus: rgb(140, 140, 140);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: #f0f0fc;--luzmo-background-color-down: #f1f1ff;--luzmo-background-color-focus: #f0f0fc;--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: rgb(225, 225, 225);--luzmo-background-color-highlight-down: rgb(215, 215, 215);--luzmo-background-color-highlight-focus: rgb(225, 225, 225);--luzmo-background-color-alt-1: rgb(250, 250, 250);--luzmo-background-color-alt-2: rgb(239, 239, 239);--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-hard: #000;--luzmo-font-color-disabled: var(--luzmo-color-disabled);--luzmo-font-color-extra-dimmed: #888;--luzmo-font-color-hover: #333;--luzmo-font-color-down: #111;--luzmo-font-color-focus: #333;--luzmo-primary: #4434ff;--luzmo-primary-hover: #4234e4;--luzmo-primary-down: #392cc7;--luzmo-primary-focus: #4234e4;--luzmo-primary-inverse-color: #ffffff;--luzmo-primary-rgb: 68, 52, 255;--luzmo-secondary: #ff00ff;--luzmo-secondary-hover: #e309e3;--luzmo-secondary-down: #c711c7;--luzmo-secondary-focus: #e309e3;--luzmo-secondary-inverse-color: #ffffff;--luzmo-secondary-rgb: 255, 0, 255;--luzmo-secondary-outline: rgba(255, 0, 255, 0.2);--luzmo-negative-color: #ca221c;--luzmo-negative-color-hover: #b3241f;--luzmo-negative-color-down: #9f231f;--luzmo-negative-color-focus: #b3241f;--luzmo-negative-color-rgb: 202, 34, 28;--luzmo-positive-color: rgb(20, 150, 101);--luzmo-positive-color-hover: rgb(17, 128, 86);--luzmo-positive-color-down: rgb(16, 105, 71);--luzmo-positive-color-focus: rgb(17, 128, 86);--luzmo-positive-color-rgb: 20, 150, 101;--luzmo-selected-color: rgb(110, 110, 110);--luzmo-selected-color-hover: rgb(70, 70, 70);--luzmo-selected-color-down: rgb(40, 40, 40);--luzmo-selected-color-focus: rgb(70, 70, 70);--luzmo-selected-color-hard: #1e1e1e;--luzmo-selected-color-hard-hover: rgb(0, 0, 0);--luzmo-selected-color-hard-down: rgb(0, 0, 0);--luzmo-selected-color-hard-focus: rgb(0, 0, 0);--luzmo-color-informative: #1a77e9;--luzmo-color-informative-rgb: 26, 119, 233;--luzmo-color-disabled: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 12px;--luzmo-icon-size-xs: 14px;--luzmo-icon-size-s: 16px;--luzmo-icon-size-m: 18px;--luzmo-icon-size-l: 20px;--luzmo-icon-size-xl: 22px;--luzmo-icon-size-xxl: 32px}', document.head.appendChild(o);
|
|
31
|
+
}
|
|
32
|
+
})();
|
|
33
|
+
const x = ':host{box-sizing:border-box;display:block;width:100%}:host .widget-menu{display:flex;flex-direction:column;align-items:center;gap:var(--luzmo-widget-menu-gap, var(--widget-menu-gap));font-size:var(--luzmo-widget-menu-font-size, var(--widget-menu-font-size));width:min-content}:host .widget-menu .widget-edit{display:flex;flex-direction:column;gap:var(--luzmo-widget-menu-edit-item-gap, var(--widget-menu-edit-item-gap))}:host .widget-menu .widget-edit-item{display:flex;align-items:center;justify-content:center;cursor:pointer;position:relative;padding:var(--luzmo-widget-menu-edit-item-padding, var(--widget-menu-edit-item-padding));background-color:var(--luzmo-widget-menu-edit-item-background, var(--widget-menu-edit-item-background));transition:var(--luzmo-widget-menu-transition, var(--widget-menu-transition))}:host .widget-menu .widget-edit-item:first-of-type{border-top-right-radius:var(--luzmo-widget-menu-edit-item-border-radius, var(--widget-menu-edit-item-border-radius));border-top-left-radius:var(--luzmo-widget-menu-edit-item-border-radius, var(--widget-menu-edit-item-border-radius))}:host .widget-menu .widget-edit-item:last-of-type{border-bottom-right-radius:var(--luzmo-widget-menu-edit-item-border-radius, var(--widget-menu-edit-item-border-radius));border-bottom-left-radius:var(--luzmo-widget-menu-edit-item-border-radius, var(--widget-menu-edit-item-border-radius));box-shadow:var(--luzmo-widget-menu-box-shadow, var(--widget-menu-box-shadow))}:host .widget-menu .widget-edit-item:hover,:host .widget-menu .widget-edit-item[selected]{background-color:var(--luzmo-widget-menu-edit-item-background-hover, var(--widget-menu-edit-item-background-hover))}:host .widget-menu .widget-edit-item:active{background-color:var(--luzmo-widget-menu-edit-item-background-active, var(--widget-menu-edit-item-background-active))}:host .widget-menu .widget-edit-item luzmo-icon{color:var(--luzmo-widget-menu-edit-item-icon-color, var(--widget-menu-edit-item-icon-color))}:host .widget-menu .widget-remove{display:flex;align-items:center;justify-content:center;cursor:pointer;position:relative;padding:var(--luzmo-widget-menu-remove-padding, var(--widget-menu-remove-padding));border-radius:var(--luzmo-widget-menu-remove-border-radius, var(--widget-menu-remove-border-radius));background-color:var(--luzmo-widget-menu-remove-background, var(--widget-menu-remove-background));transition:var(--luzmo-widget-menu-transition, var(--widget-menu-transition));box-shadow:var(--luzmo-widget-menu-box-shadow, var(--widget-menu-box-shadow))}:host .widget-menu .widget-remove:hover,:host .widget-menu .widget-remove[selected]{background-color:var(--luzmo-widget-menu-remove-background-hover, var(--widget-menu-remove-background-hover))}:host .widget-menu .widget-remove:hover luzmo-icon,:host .widget-menu .widget-remove[selected] luzmo-icon{color:var(--luzmo-widget-menu-remove-icon-color-hover, var(--widget-menu-remove-icon-color-hover))}:host .widget-menu .widget-remove:active{background-color:var(--luzmo-widget-menu-remove-background-active, var(--widget-menu-remove-background-active))}:host .widget-menu .widget-remove:active luzmo-icon{color:var(--luzmo-widget-menu-remove-icon-color-hover, var(--widget-menu-remove-icon-color-hover))}:host .widget-menu .widget-remove luzmo-icon{color:var(--luzmo-widget-menu-remove-icon-color, var(--widget-menu-remove-icon-color))}:host .widget-menu luzmo-tooltip{--tooltip-font-family: var( --luzmo-widget-menu-tooltip-font-family, var(--widget-menu-tooltip-font-family) );font-family:var(--luzmo-widget-menu-tooltip-font-family, var(--widget-menu-tooltip-font-family))}:host{--widget-menu-gap: var(--luzmo-spacing-3, .375rem);--widget-menu-edit-item-gap: 0;--widget-menu-edit-item-padding: var(--luzmo-spacing-3, .125rem);--widget-menu-edit-item-border-radius: var(--luzmo-border-radius, .25rem);--widget-menu-edit-item-background: var(--luzmo-selected-color-hover, rgb(70, 69, 76));--widget-menu-edit-item-background-hover: var(--secondary, var(--luzmo-primary));--widget-menu-edit-item-background-active: var(--secondary, var(--luzmo-primary));--widget-menu-edit-item-icon-color: var(--luzmo-primary-inverse-color, white);--widget-menu-remove-padding: var(--luzmo-spacing-3, .125rem);--widget-menu-remove-border-radius: var(--luzmo-border-radius, .25rem);--widget-menu-remove-background: var(--luzmo-selected-color-hover, rgb(70, 69, 76));--widget-menu-remove-background-hover: var(--luzmo-negative-color, rgb(222, 55, 55));--widget-menu-remove-background-active: var(--luzmo-negative-color, rgb(222, 55, 55));--widget-menu-remove-icon-color: var(--luzmo-primary-inverse-color, white);--widget-menu-remove-icon-color-hover: var(--luzmo-primary-inverse-color, white);--widget-menu-transition: all var(--luzmo-animation-duration, .2s) ease;--widget-menu-font-size: var(--luzmo-font-size-m, .875rem);--widget-menu-box-shadow: 0px 4px 4px 0px var(--Boxshadow, rgba(var(--luzmo-border-color-rgb), .2));--widget-menu-tooltip-font-family: var(--luzmo-font-family, "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif)}';
|
|
34
|
+
var y = Object.defineProperty, k = Object.getOwnPropertyDescriptor, d = (e, o, t, i) => {
|
|
35
|
+
for (var l = i > 1 ? void 0 : i ? k(o, t) : o, u = e.length - 1, a; u >= 0; u--)
|
|
36
|
+
(a = e[u]) && (l = (i ? a(o, t, l) : a(l)) || l);
|
|
37
|
+
return i && l && y(o, t, l), l;
|
|
38
|
+
};
|
|
39
|
+
let r = class extends b {
|
|
40
|
+
constructor() {
|
|
41
|
+
super(...arguments), this.vizItemId = "", this.hide = [], this.language = "en", this.selectedItem = null, this.menuItemConfigs = {
|
|
42
|
+
edit: {
|
|
43
|
+
icon: z,
|
|
44
|
+
label: "Edit",
|
|
45
|
+
eventName: "edit",
|
|
46
|
+
itemType: "edit",
|
|
47
|
+
cssClass: "widget-edit-item widget-edit",
|
|
48
|
+
dataE2e: "widget-menu-edit",
|
|
49
|
+
onHover: () => this._handleHoverOverEdit()
|
|
50
|
+
},
|
|
51
|
+
clone: {
|
|
52
|
+
icon: v,
|
|
53
|
+
label: "Clone",
|
|
54
|
+
eventName: "clone",
|
|
55
|
+
itemType: "clone",
|
|
56
|
+
cssClass: "widget-edit-item widget-clone",
|
|
57
|
+
dataE2e: "widget-menu-clone"
|
|
58
|
+
},
|
|
59
|
+
remove: {
|
|
60
|
+
icon: g,
|
|
61
|
+
label: "Delete",
|
|
62
|
+
eventName: "remove",
|
|
63
|
+
itemType: "remove",
|
|
64
|
+
cssClass: "widget-remove"
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Check if there are any edit items to show
|
|
70
|
+
*/
|
|
71
|
+
get hasEditItemsToShow() {
|
|
72
|
+
var t, i;
|
|
73
|
+
const e = !((t = this.hide) != null && t.includes("edit")), o = !((i = this.hide) != null && i.includes("clone"));
|
|
74
|
+
return e || o;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Check if a menu item should be shown
|
|
78
|
+
*/
|
|
79
|
+
_shouldShowItem(e) {
|
|
80
|
+
var o;
|
|
81
|
+
return !((o = this.hide) != null && o.includes(e));
|
|
82
|
+
}
|
|
83
|
+
willUpdate(e) {
|
|
84
|
+
e.has("language") && this.language !== p() && ([...w].includes(this.language ?? "en") || this.language === "en") && f(this.language);
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Toggle selected state for a menu item
|
|
88
|
+
*/
|
|
89
|
+
_handleSelectedToggle(e) {
|
|
90
|
+
const o = this.selectedItem === e ? null : e;
|
|
91
|
+
this.selectedItem = o, this._emitSelectedChanged();
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Emit selected-changed event
|
|
95
|
+
*/
|
|
96
|
+
_emitSelectedChanged() {
|
|
97
|
+
this.dispatchEvent(
|
|
98
|
+
new CustomEvent("selected-changed", {
|
|
99
|
+
bubbles: !0,
|
|
100
|
+
composed: !0,
|
|
101
|
+
detail: { selectedItem: this.selectedItem }
|
|
102
|
+
})
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Handle menu item click with unified event dispatching
|
|
107
|
+
*/
|
|
108
|
+
_handleMenuItemClick(e) {
|
|
109
|
+
this._handleSelectedToggle(e.itemType), this.dispatchEvent(
|
|
110
|
+
new CustomEvent("widget-menu-element-clicked", {
|
|
111
|
+
bubbles: !0,
|
|
112
|
+
composed: !0,
|
|
113
|
+
detail: {
|
|
114
|
+
action: e.eventName,
|
|
115
|
+
type: e.itemType,
|
|
116
|
+
id: this.vizItemId
|
|
117
|
+
}
|
|
118
|
+
})
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Create a bound click handler for a menu item config
|
|
123
|
+
*/
|
|
124
|
+
_createMenuItemClickHandler(e) {
|
|
125
|
+
return () => this._handleMenuItemClick(e);
|
|
126
|
+
}
|
|
127
|
+
_handleHoverOverEdit() {
|
|
128
|
+
this.dispatchEvent(
|
|
129
|
+
new CustomEvent("hover-over-edit", {
|
|
130
|
+
bubbles: !0,
|
|
131
|
+
composed: !0
|
|
132
|
+
})
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Render a menu item button
|
|
137
|
+
*/
|
|
138
|
+
_renderMenuItem(e) {
|
|
139
|
+
const o = this.selectedItem === e.itemType, t = c(e.label, {
|
|
140
|
+
desc: `Widget menu ${e.itemType} tooltip`
|
|
141
|
+
});
|
|
142
|
+
return m`
|
|
143
|
+
<div
|
|
144
|
+
class=${e.cssClass}
|
|
145
|
+
data-e2e=${e.dataE2e || ""}
|
|
146
|
+
data-menu-item=${e.itemType}
|
|
147
|
+
role="button"
|
|
148
|
+
tabindex="0"
|
|
149
|
+
aria-label=${t}
|
|
150
|
+
?selected=${o}
|
|
151
|
+
@mouseenter=${e.onHover}
|
|
152
|
+
@click=${this._createMenuItemClickHandler(e)}
|
|
153
|
+
>
|
|
154
|
+
<luzmo-icon .icon=${e.icon} size="s"></luzmo-icon>
|
|
155
|
+
<luzmo-tooltip
|
|
156
|
+
self-managed
|
|
157
|
+
placement="right"
|
|
158
|
+
fallback-placements="left"
|
|
159
|
+
>
|
|
160
|
+
${t}
|
|
161
|
+
</luzmo-tooltip>
|
|
162
|
+
</div>
|
|
163
|
+
`;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Render edit section (edit and clone items)
|
|
167
|
+
*/
|
|
168
|
+
_renderEditSection() {
|
|
169
|
+
return this.hasEditItemsToShow ? m`
|
|
170
|
+
<div class="widget-edit">
|
|
171
|
+
${this._shouldShowItem("edit") ? this._renderMenuItem(this.menuItemConfigs.edit) : ""}
|
|
172
|
+
${this._shouldShowItem("clone") ? this._renderMenuItem(this.menuItemConfigs.clone) : ""}
|
|
173
|
+
</div>
|
|
174
|
+
` : m``;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Render remove section
|
|
178
|
+
*/
|
|
179
|
+
_renderRemoveSection() {
|
|
180
|
+
return this._shouldShowItem("remove") ? this._renderMenuItem(this.menuItemConfigs.remove) : m``;
|
|
181
|
+
}
|
|
182
|
+
render() {
|
|
183
|
+
return m`
|
|
184
|
+
<div class="widget-menu font-size-lg">
|
|
185
|
+
${this._renderEditSection()}
|
|
186
|
+
${this._renderRemoveSection()}
|
|
187
|
+
</div>
|
|
188
|
+
`;
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
r.styles = h(x);
|
|
192
|
+
r.tagName = "luzmo-widget-menu";
|
|
193
|
+
d([
|
|
194
|
+
n({ type: String, reflect: !0, attribute: "viz-item-id" })
|
|
195
|
+
], r.prototype, "vizItemId", 2);
|
|
196
|
+
d([
|
|
197
|
+
n({ type: Array, attribute: !1 })
|
|
198
|
+
], r.prototype, "hide", 2);
|
|
199
|
+
d([
|
|
200
|
+
n({ type: String, reflect: !0 })
|
|
201
|
+
], r.prototype, "language", 2);
|
|
202
|
+
d([
|
|
203
|
+
n({ type: String, reflect: !0, attribute: "selected-item" })
|
|
204
|
+
], r.prototype, "selectedItem", 2);
|
|
205
|
+
r = d([
|
|
206
|
+
s()
|
|
207
|
+
], r);
|
|
208
|
+
customElements.get("luzmo-widget-menu") || customElements.define("luzmo-widget-menu", r);
|
|
209
|
+
export {
|
|
210
|
+
r as LuzmoWidgetMenu
|
|
211
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import '@luzmo/lucero/icon';
|
|
2
|
+
import '@luzmo/lucero/tooltip';
|
|
3
|
+
import { LitElement, PropertyValues, TemplateResult } from 'lit';
|
|
4
|
+
import type { WidgetMenuItem } from '../../types';
|
|
5
|
+
/**
|
|
6
|
+
* @element luzmo-widget-menu
|
|
7
|
+
* @summary A menu component for widget actions (data, config, clone, remove)
|
|
8
|
+
* @fires widget-menu-element-clicked - Emitted when any menu item is clicked, includes { action: string, type: WidgetMenuItem, id: string } in detail
|
|
9
|
+
* @fires hover-over-edit - Emitted when hovering over the edit button
|
|
10
|
+
* @fires selected-changed - Emitted when the selected item changes, includes { selectedItem: WidgetMenuItem | null } in detail
|
|
11
|
+
*/
|
|
12
|
+
export declare class LuzmoWidgetMenu extends LitElement {
|
|
13
|
+
static styles: import("lit").CSSResult;
|
|
14
|
+
static tagName: string;
|
|
15
|
+
/**
|
|
16
|
+
* The visualization item ID
|
|
17
|
+
*/
|
|
18
|
+
vizItemId: string;
|
|
19
|
+
/**
|
|
20
|
+
* Array of menu items to hide
|
|
21
|
+
* @default []
|
|
22
|
+
*/
|
|
23
|
+
hide: WidgetMenuItem[];
|
|
24
|
+
/**
|
|
25
|
+
* The language to display the menu in
|
|
26
|
+
* @default 'en'
|
|
27
|
+
*/
|
|
28
|
+
language: string;
|
|
29
|
+
/**
|
|
30
|
+
* The currently selected menu item
|
|
31
|
+
* @default null
|
|
32
|
+
*/
|
|
33
|
+
selectedItem: WidgetMenuItem | null;
|
|
34
|
+
/**
|
|
35
|
+
* Menu item configurations
|
|
36
|
+
*/
|
|
37
|
+
private readonly menuItemConfigs;
|
|
38
|
+
/**
|
|
39
|
+
* Check if there are any edit items to show
|
|
40
|
+
*/
|
|
41
|
+
private get hasEditItemsToShow();
|
|
42
|
+
/**
|
|
43
|
+
* Check if a menu item should be shown
|
|
44
|
+
*/
|
|
45
|
+
private _shouldShowItem;
|
|
46
|
+
protected willUpdate(changedProperties: PropertyValues): void;
|
|
47
|
+
/**
|
|
48
|
+
* Toggle selected state for a menu item
|
|
49
|
+
*/
|
|
50
|
+
private _handleSelectedToggle;
|
|
51
|
+
/**
|
|
52
|
+
* Emit selected-changed event
|
|
53
|
+
*/
|
|
54
|
+
private _emitSelectedChanged;
|
|
55
|
+
/**
|
|
56
|
+
* Handle menu item click with unified event dispatching
|
|
57
|
+
*/
|
|
58
|
+
private _handleMenuItemClick;
|
|
59
|
+
/**
|
|
60
|
+
* Create a bound click handler for a menu item config
|
|
61
|
+
*/
|
|
62
|
+
private _createMenuItemClickHandler;
|
|
63
|
+
private _handleHoverOverEdit;
|
|
64
|
+
/**
|
|
65
|
+
* Render a menu item button
|
|
66
|
+
*/
|
|
67
|
+
private _renderMenuItem;
|
|
68
|
+
/**
|
|
69
|
+
* Render edit section (edit and clone items)
|
|
70
|
+
*/
|
|
71
|
+
private _renderEditSection;
|
|
72
|
+
/**
|
|
73
|
+
* Render remove section
|
|
74
|
+
*/
|
|
75
|
+
private _renderRemoveSection;
|
|
76
|
+
protected render(): TemplateResult;
|
|
77
|
+
}
|
|
@@ -17,4 +17,4 @@
|
|
|
17
17
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
18
18
|
* SOFTWARE.
|
|
19
19
|
* */
|
|
20
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
20
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./helpers-DXQwEH1P.cjs"),t=[{key:"general",type:"group",open:!0,children:[{key:"display.title",control:{type:"switch",label:"Title",default:!0}},{key:"categories.colored",control:{type:"switch",label:"Word color by category",default:!0}},{key:"color",control:{type:"color-picker",default:({theme:e})=>l.getThemeMainColor(e),extraLabel:({options:e,theme:o})=>l.getThemeMainColorResetLabel(e,o,"color"),extraLabelHasClickAction:({options:e,theme:o})=>l.getThemeMainColorExtraLabelHasClickAction(e,o,"color"),extraLabelClickAction:({options:e,theme:o})=>l.getThemeMainColorExtraLabelClickAction(e,o,"color")},visibleIf:({options:e})=>{var o;return((o=e==null?void 0:e.categories)==null?void 0:o.colored)===!1}},{key:"layout",control:{type:"radio-button-group",label:"Layout",default:"horizontal",enum:["horizontal","random"]}}]}];exports.default=t;
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
18
18
|
* SOFTWARE.
|
|
19
19
|
* */
|
|
20
|
-
import { g as
|
|
20
|
+
import { g as l, a as t, b as a, c as r } from "./helpers-v1bPALRP.js";
|
|
21
21
|
const i = [
|
|
22
22
|
{
|
|
23
23
|
key: "general",
|
|
@@ -46,10 +46,13 @@ const i = [
|
|
|
46
46
|
type: "color-picker",
|
|
47
47
|
default: ({ theme: e }) => r(e),
|
|
48
48
|
extraLabel: ({ options: e, theme: o }) => a(e, o, "color"),
|
|
49
|
-
extraLabelHasClickAction: ({ options: e, theme: o }) =>
|
|
50
|
-
extraLabelClickAction: ({ options: e, theme: o }) =>
|
|
49
|
+
extraLabelHasClickAction: ({ options: e, theme: o }) => t(e, o, "color"),
|
|
50
|
+
extraLabelClickAction: ({ options: e, theme: o }) => l(e, o, "color")
|
|
51
51
|
},
|
|
52
|
-
visibleIf: ({ options: e }) =>
|
|
52
|
+
visibleIf: ({ options: e }) => {
|
|
53
|
+
var o;
|
|
54
|
+
return ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.colored) === !1;
|
|
55
|
+
}
|
|
53
56
|
},
|
|
54
57
|
{
|
|
55
58
|
key: "layout",
|
package/custom-elements.json
CHANGED
|
@@ -6960,16 +6960,6 @@
|
|
|
6960
6960
|
],
|
|
6961
6961
|
"tagName": "luzmo-filter-value-picker-hierarchy",
|
|
6962
6962
|
"customElement": true
|
|
6963
|
-
},
|
|
6964
|
-
{
|
|
6965
|
-
"kind": "variable",
|
|
6966
|
-
"name": "abortController",
|
|
6967
|
-
"default": "new AbortController()"
|
|
6968
|
-
},
|
|
6969
|
-
{
|
|
6970
|
-
"kind": "variable",
|
|
6971
|
-
"name": "promise",
|
|
6972
|
-
"default": "new Promise((resolve, reject) => { const fetchDataPromise = dataBroker.fetchData(query); fetchDataPromise.then(resolve).catch(reject); abortController.signal.addEventListener('abort', () => { console.warn('Request aborted'); reject({ status: 'aborted' }); }); })"
|
|
6973
6963
|
}
|
|
6974
6964
|
],
|
|
6975
6965
|
"exports": [
|
|
@@ -7173,16 +7163,6 @@
|
|
|
7173
7163
|
],
|
|
7174
7164
|
"tagName": "luzmo-filter-value-picker-numeric",
|
|
7175
7165
|
"customElement": true
|
|
7176
|
-
},
|
|
7177
|
-
{
|
|
7178
|
-
"kind": "variable",
|
|
7179
|
-
"name": "abortController",
|
|
7180
|
-
"default": "new AbortController()"
|
|
7181
|
-
},
|
|
7182
|
-
{
|
|
7183
|
-
"kind": "variable",
|
|
7184
|
-
"name": "promise",
|
|
7185
|
-
"default": "new Promise((resolve, reject) => { const fetchDataPromise = dataBroker.fetchData(query); fetchDataPromise.then(resolve).catch(reject); abortController.signal.addEventListener('abort', () => { console.warn('Request aborted'); reject({ status: 'aborted' }); }); })"
|
|
7186
7166
|
}
|
|
7187
7167
|
],
|
|
7188
7168
|
"exports": [
|
|
@@ -8711,6 +8691,139 @@
|
|
|
8711
8691
|
}
|
|
8712
8692
|
]
|
|
8713
8693
|
},
|
|
8694
|
+
{
|
|
8695
|
+
"kind": "javascript-module",
|
|
8696
|
+
"path": "src/components/widget-menu/widget-menu.ts",
|
|
8697
|
+
"declarations": [
|
|
8698
|
+
{
|
|
8699
|
+
"kind": "class",
|
|
8700
|
+
"description": "",
|
|
8701
|
+
"name": "LuzmoWidgetMenu",
|
|
8702
|
+
"members": [
|
|
8703
|
+
{
|
|
8704
|
+
"kind": "field",
|
|
8705
|
+
"name": "tagName",
|
|
8706
|
+
"type": {
|
|
8707
|
+
"text": "string"
|
|
8708
|
+
},
|
|
8709
|
+
"static": true,
|
|
8710
|
+
"default": "'luzmo-widget-menu'"
|
|
8711
|
+
},
|
|
8712
|
+
{
|
|
8713
|
+
"kind": "field",
|
|
8714
|
+
"name": "vizItemId",
|
|
8715
|
+
"type": {
|
|
8716
|
+
"text": "string"
|
|
8717
|
+
},
|
|
8718
|
+
"default": "''",
|
|
8719
|
+
"description": "The visualization item ID",
|
|
8720
|
+
"attribute": "viz-item-id",
|
|
8721
|
+
"reflects": true
|
|
8722
|
+
},
|
|
8723
|
+
{
|
|
8724
|
+
"kind": "field",
|
|
8725
|
+
"name": "hide",
|
|
8726
|
+
"type": {
|
|
8727
|
+
"text": "WidgetMenuItem[]"
|
|
8728
|
+
},
|
|
8729
|
+
"default": "[]",
|
|
8730
|
+
"description": "Array of menu items to hide"
|
|
8731
|
+
},
|
|
8732
|
+
{
|
|
8733
|
+
"kind": "field",
|
|
8734
|
+
"name": "language",
|
|
8735
|
+
"type": {
|
|
8736
|
+
"text": "string"
|
|
8737
|
+
},
|
|
8738
|
+
"default": "'en'",
|
|
8739
|
+
"description": "The language to display the menu in",
|
|
8740
|
+
"attribute": "language",
|
|
8741
|
+
"reflects": true
|
|
8742
|
+
},
|
|
8743
|
+
{
|
|
8744
|
+
"kind": "field",
|
|
8745
|
+
"name": "selectedItem",
|
|
8746
|
+
"type": {
|
|
8747
|
+
"text": "WidgetMenuItem | null"
|
|
8748
|
+
},
|
|
8749
|
+
"default": "null",
|
|
8750
|
+
"description": "The currently selected menu item",
|
|
8751
|
+
"attribute": "selected-item",
|
|
8752
|
+
"reflects": true
|
|
8753
|
+
}
|
|
8754
|
+
],
|
|
8755
|
+
"events": [
|
|
8756
|
+
{
|
|
8757
|
+
"name": "selected-changed",
|
|
8758
|
+
"type": {
|
|
8759
|
+
"text": "CustomEvent"
|
|
8760
|
+
},
|
|
8761
|
+
"description": "Emitted when the selected item changes, includes { selectedItem: WidgetMenuItem | null } in detail"
|
|
8762
|
+
},
|
|
8763
|
+
{
|
|
8764
|
+
"name": "widget-menu-element-clicked",
|
|
8765
|
+
"type": {
|
|
8766
|
+
"text": "CustomEvent"
|
|
8767
|
+
},
|
|
8768
|
+
"description": "Emitted when any menu item is clicked, includes { action: string, type: WidgetMenuItem, id: string } in detail"
|
|
8769
|
+
},
|
|
8770
|
+
{
|
|
8771
|
+
"name": "hover-over-edit",
|
|
8772
|
+
"type": {
|
|
8773
|
+
"text": "CustomEvent"
|
|
8774
|
+
},
|
|
8775
|
+
"description": "Emitted when hovering over the edit button"
|
|
8776
|
+
}
|
|
8777
|
+
],
|
|
8778
|
+
"attributes": [
|
|
8779
|
+
{
|
|
8780
|
+
"name": "viz-item-id",
|
|
8781
|
+
"type": {
|
|
8782
|
+
"text": "string"
|
|
8783
|
+
},
|
|
8784
|
+
"default": "''",
|
|
8785
|
+
"description": "The visualization item ID",
|
|
8786
|
+
"fieldName": "vizItemId"
|
|
8787
|
+
},
|
|
8788
|
+
{
|
|
8789
|
+
"name": "language",
|
|
8790
|
+
"type": {
|
|
8791
|
+
"text": "string"
|
|
8792
|
+
},
|
|
8793
|
+
"default": "'en'",
|
|
8794
|
+
"description": "The language to display the menu in",
|
|
8795
|
+
"fieldName": "language"
|
|
8796
|
+
},
|
|
8797
|
+
{
|
|
8798
|
+
"name": "selected-item",
|
|
8799
|
+
"type": {
|
|
8800
|
+
"text": "WidgetMenuItem | null"
|
|
8801
|
+
},
|
|
8802
|
+
"default": "null",
|
|
8803
|
+
"description": "The currently selected menu item",
|
|
8804
|
+
"fieldName": "selectedItem"
|
|
8805
|
+
}
|
|
8806
|
+
],
|
|
8807
|
+
"superclass": {
|
|
8808
|
+
"name": "LitElement",
|
|
8809
|
+
"package": "lit"
|
|
8810
|
+
},
|
|
8811
|
+
"tagName": "luzmo-widget-menu",
|
|
8812
|
+
"customElement": true,
|
|
8813
|
+
"summary": "A menu component for widget actions (data, config, clone, remove)"
|
|
8814
|
+
}
|
|
8815
|
+
],
|
|
8816
|
+
"exports": [
|
|
8817
|
+
{
|
|
8818
|
+
"kind": "js",
|
|
8819
|
+
"name": "LuzmoWidgetMenu",
|
|
8820
|
+
"declaration": {
|
|
8821
|
+
"name": "LuzmoWidgetMenu",
|
|
8822
|
+
"module": "src/components/widget-menu/widget-menu.ts"
|
|
8823
|
+
}
|
|
8824
|
+
}
|
|
8825
|
+
]
|
|
8826
|
+
},
|
|
8714
8827
|
{
|
|
8715
8828
|
"kind": "javascript-module",
|
|
8716
8829
|
"path": "src/components/droppable-slot/item-slots-configs/slot-labels.const.ts",
|
package/index.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ export * from './components/grid';
|
|
|
40
40
|
export * from './components/slot-contents-picker';
|
|
41
41
|
export * from './components/slot-menu';
|
|
42
42
|
export * from './components/slot-menu-list';
|
|
43
|
+
export * from './components/widget-menu';
|
|
43
44
|
export * from './item-definitions/item-list';
|
|
44
45
|
export * from './types';
|
|
45
46
|
export * from './utils';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luzmo/analytics-components-kit",
|
|
3
|
-
"version": "1.0.1-alpha.
|
|
3
|
+
"version": "1.0.1-alpha.94",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./components/index.js",
|
|
6
6
|
"module": "./components/index.js",
|
|
@@ -231,6 +231,11 @@
|
|
|
231
231
|
"import": "./components/slot-menu-list/index.js",
|
|
232
232
|
"require": "./components/slot-menu-list/index.cjs"
|
|
233
233
|
},
|
|
234
|
+
"./widget-menu": {
|
|
235
|
+
"types": "./components/widget-menu/index.d.ts",
|
|
236
|
+
"import": "./components/widget-menu/index.js",
|
|
237
|
+
"require": "./components/widget-menu/index.cjs"
|
|
238
|
+
},
|
|
234
239
|
"./item-slots-configs": {
|
|
235
240
|
"types": "./components/droppable-slot/item-slots-configs/index.d.ts",
|
|
236
241
|
"import": "./components/item-slots-configs.js",
|
package/types.d.ts
CHANGED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/*! * A kit of modern Luzmo Web Components for analytics in your web application.
|
|
2
|
-
*
|
|
3
|
-
* Copyright © 2025 Luzmo
|
|
4
|
-
* All rights reserved.
|
|
5
|
-
* Luzmo web components (“Luzmo Web Components”)
|
|
6
|
-
* must be used according to the Luzmo Terms of Service.
|
|
7
|
-
* This license allows users with a current active Luzmo account
|
|
8
|
-
* to use the Luzmo Web Components. This license terminates
|
|
9
|
-
* automatically if a user no longer has an active Luzmo account.
|
|
10
|
-
* Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
|
|
11
|
-
*
|
|
12
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
13
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
14
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
15
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
16
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
17
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
18
|
-
* SOFTWARE.
|
|
19
|
-
* */
|
|
20
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./helpers-9I0oLoUB.cjs"),l=({slots:e})=>Array.isArray(e)&&e?.length>0?e?.find(t=>t?.name==="legend")?.content?.length>0||e?.find(t=>t?.name==="measure")?.content?.length>1:!1,i=({slots:e})=>Array.isArray(e)&&e?.length>0?!(e?.find(t=>t?.name==="legend")?.content?.length>0)&&e?.find(t=>t?.name==="measure")?.content?.length<=1:!0,r=({slots:e})=>Array.isArray(e)&&e?.find(t=>t?.name==="x-axis")?.content?.[0]?.type==="datetime",o=({options:e,slots:t})=>Array.isArray(t)&&t?.find(a=>a?.name==="x-axis")?.content?.[0]?.type==="datetime"&&e?.missingValue?.type==="manual",c=[{key:"general",type:"group",open:!0,children:[{key:"display.title",control:{label:"Title",type:"switch",default:!0}},{type:"divider"},{key:"mode",control:{label:"Mode",type:"picker",default:"stacked",enum:["100","unstacked","stacked","stream"]},visibleIf:l},{key:"interpolation",control:{label:"Interpolation",type:"picker",default:"linear",enum:["linear","step-before","step-after","monotone"]}},{key:"display.legend",control:{label:"Legend",type:"switch",default:!0},visibleIf:l},{key:"display.modeOption",control:{label:"Mode option",type:"switch",default:!0},visibleIf:l},{key:"missingValue.type",control:{label:"Fill missing values",type:"picker",default:"no",enum:["no","break","manual"]},visibleIf:r},{key:"missingValue.value",control:{label:"Value",type:"number-field",default:"no",min:1},visibleIf:o},{key:"color",control:{label:"Area color",type:"color-picker",default:({theme:e})=>n.getThemeMainColor(e),extraLabel:({options:e,theme:t})=>n.getThemeMainColorResetLabel(e,t,"color"),extraLabelHasClickAction:({options:e,theme:t})=>n.getThemeMainColorExtraLabelHasClickAction(e,t,"color"),extraLabelClickAction:({options:e,theme:t})=>n.getThemeMainColorExtraLabelClickAction(e,t,"color")},visibleIf:i}]},{key:"legend",type:"group",open:!1,children:[{key:"legend.position",control:{label:"Position",type:"position-picker",default:"topRight",enum:["topLeft","top","topRight","right","bottomRight","bottom","bottomLeft","left"]}}],visibleIf:l}];exports.default=c;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/*! * A kit of modern Luzmo Web Components for analytics in your web application.
|
|
2
|
-
*
|
|
3
|
-
* Copyright © 2025 Luzmo
|
|
4
|
-
* All rights reserved.
|
|
5
|
-
* Luzmo web components (“Luzmo Web Components”)
|
|
6
|
-
* must be used according to the Luzmo Terms of Service.
|
|
7
|
-
* This license allows users with a current active Luzmo account
|
|
8
|
-
* to use the Luzmo Web Components. This license terminates
|
|
9
|
-
* automatically if a user no longer has an active Luzmo account.
|
|
10
|
-
* Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
|
|
11
|
-
*
|
|
12
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
13
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
14
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
15
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
16
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
17
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
18
|
-
* SOFTWARE.
|
|
19
|
-
* */
|
|
20
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./helpers-9I0oLoUB.cjs"),r=({slots:e})=>Array.isArray(e)&&e?.length>0?e?.find(t=>t?.name==="legend")?.content?.length>0||e?.find(t=>t?.name==="measure")?.content?.length>1:!1,o=({slots:e})=>Array.isArray(e)&&e?.length>0?e?.find(t=>t?.name==="legend")?.content?.length===0&&e?.find(t=>t?.name==="measure")?.content?.length<=1:!0,i=[{key:"general",type:"group",open:!0,children:[{key:"mode",control:{type:"picker",default:"grouped",enum:["grouped","stacked","100"]},visibleIf:r},{type:"divider",visibleIf:r},{key:"display.title",control:{type:"switch",default:!0}},{key:"display.legend",control:{type:"switch",default:!0},visibleIf:r},{key:"display.modeOption",control:{type:"switch",default:!1},visibleIf:r},{key:"bars.label",control:{type:"picker",default:"none",enum:["none","absolute","percentage","percentageLegend","percentageCategory","percentageMax"]}},{key:"categories.colored",control:{type:"switch",default:!1},visibleIf:o},{key:"bars.roundedCorners",control:{type:"slider",default:({theme:e})=>e?.itemSpecific?.rounding,min:0,max:20,step:1,extraLabel:({options:e,theme:t})=>{if(typeof t?.itemSpecific?.rounding=="number")return typeof e?.bars?.roundedCorners!="number"?"auto":"reset"},extraLabelHasClickAction:({options:e,theme:t})=>!(typeof t?.itemSpecific?.rounding!="number"||typeof e?.bars?.roundedCorners!="number"),extraLabelClickAction:({options:e})=>{const t={...e};return delete t?.bars?.roundedCorners,{value:null,options:t}}}},{key:"color",control:{type:"color-picker",label:"Bar color",default:({theme:e})=>n.getThemeMainColor(e),extraLabel:({options:e,theme:t})=>n.getThemeMainColorResetLabel(e,t,"color"),extraLabelHasClickAction:({options:e,theme:t})=>n.getThemeMainColorExtraLabelHasClickAction(e,t,"color"),extraLabelClickAction:({options:e,theme:t})=>n.getThemeMainColorExtraLabelClickAction(e,t,"color")},visibleIf:o}]},{key:"legend",type:"group",open:!1,children:[{key:"legend.position",control:{label:"Position",type:"position-picker",default:"topRight",enum:["topLeft","top","topRight","right","bottomRight","bottom","bottomLeft","left"]}}],visibleIf:r}];exports.default=i;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/*! * A kit of modern Luzmo Web Components for analytics in your web application.
|
|
2
|
-
*
|
|
3
|
-
* Copyright © 2025 Luzmo
|
|
4
|
-
* All rights reserved.
|
|
5
|
-
* Luzmo web components (“Luzmo Web Components”)
|
|
6
|
-
* must be used according to the Luzmo Terms of Service.
|
|
7
|
-
* This license allows users with a current active Luzmo account
|
|
8
|
-
* to use the Luzmo Web Components. This license terminates
|
|
9
|
-
* automatically if a user no longer has an active Luzmo account.
|
|
10
|
-
* Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
|
|
11
|
-
*
|
|
12
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
13
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
14
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
15
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
16
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
17
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
18
|
-
* SOFTWARE.
|
|
19
|
-
* */
|
|
20
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./color-palettes-DhNHcib8.cjs"),t=require("./helpers-9I0oLoUB.cjs"),r=({options:e})=>e?.observations?.display===!0,i=[{key:"general",type:"group",open:!0,children:[{key:"display.title",control:{type:"switch",label:"Title",default:!0}},{key:"horizontal",control:{type:"picker",label:"Display",default:"vertical",enum:["vertical","horizontal"],parseValue:e=>e?"horizontal":"vertical",toValue:e=>e==="horizontal"}},{key:"extentTicks",control:{type:"switch",label:"Extent ticks",default:!0}}]},{key:"box",type:"group",open:!0,children:[{key:"boxWidth",control:{type:"slider",label:"Box width",default:.9,min:.1,max:1,step:.1}},{key:"boxFill",control:{type:"color-picker",label:"Box fill",default:({theme:e})=>t.getThemeMainColor(e),extraLabel:({options:e,theme:o})=>t.getThemeMainColorResetLabel(e,o,"boxFill"),extraLabelHasClickAction:({options:e,theme:o})=>t.getThemeMainColorExtraLabelHasClickAction(e,o,"boxFill"),extraLabelClickAction:({options:e,theme:o})=>t.getThemeMainColorExtraLabelClickAction(e,o,"boxFill")}},{key:"roundedCorners",control:{type:"slider",label:"Rounded corners",default:({theme:e})=>e?.itemSpecific?.rounding??8,min:0,max:24,step:1,extraLabel:({options:e,theme:o})=>{if(typeof o?.itemSpecific?.rounding=="number")return typeof e?.roundedCorners!="number"?"auto":"reset"},extraLabelHasClickAction:({options:e,theme:o})=>!(typeof o?.itemSpecific?.rounding!="number"||typeof e?.roundedCorners!="number"),extraLabelClickAction:({options:e})=>{const o={...e};return o?.roundedCorners!==void 0&&delete o.roundedCorners,{value:null,options:o}}}},{key:"boxStrokeWidth",control:{type:"slider",label:"Box stroke width",default:1,min:0,max:5,step:.5}},{key:"boxStrokeColor",control:{type:"color-picker",label:"Box stroke color",default:({theme:e})=>t.getThemeMainColor(e),extraLabel:({options:e,theme:o})=>t.getThemeMainColorResetLabel(e,o,"boxStrokeColor"),extraLabelHasClickAction:({options:e,theme:o})=>t.getThemeMainColorExtraLabelHasClickAction(e,o,"boxStrokeColor"),extraLabelClickAction:({options:e,theme:o})=>t.getThemeMainColorExtraLabelClickAction(e,o,"boxStrokeColor")}},{key:"medianStrokeWidth",control:{type:"slider",label:"Median stroke width",default:2,min:0,max:5,step:.5}},{key:"medianStrokeColor",control:{type:"color-picker",label:"Median stroke color",default:"#000000"}}]},{key:"observations",type:"group",open:!0,children:[{key:"observations.display",control:{type:"switch",label:"Show",default:!1}},{key:"observations.onlyOutliers",control:{type:"switch",label:"Only outliers",default:!1},visibleIf:r},{key:"observations.type",control:{type:"picker",label:"Type",default:"dot",enum:["dot","ticks"]},visibleIf:r},{key:"observations.size",control:{type:"slider",label:"Size",default:3,min:1,max:10,step:1},visibleIf:r},{key:"observations.opacity",control:{type:"slider",label:"Opacity",default:.4,min:.1,max:1,step:.1},visibleIf:r},{key:"observations.jitter",control:{type:"slider",label:"Jitter",default:30,min:1,max:100,step:1},visibleIf:r},{key:"observations.colorType",control:{type:"picker",label:"Color mode",default:"single",enum:["single","range"]},visibleIf:r},{key:"observations.color",control:{type:"color-picker",label:"Color",default:({theme:e})=>e?.colors?.[1],extraLabel:({options:e,theme:o})=>{if(o?.colors?.[1]&&e.observations?.color&&e.observations?.color!==o?.colors?.[1])return"reset"},extraLabelHasClickAction:({options:e,theme:o})=>!!(o?.colors?.[1]&&e.observations?.color!==o?.colors?.[1]),extraLabelClickAction:({options:e,theme:o})=>{const l={...e};return l.observations.color=o?.colors?.[1],{value:l.observations.color,options:l}}},visibleIf:({options:e})=>r({options:e})&&e?.observations?.colorType==="single"},{key:"observations.colorsType",control:{type:"picker",label:"Colors type",default:"divergent",enum:["sequential","divergent"],calculateValue:({options:e})=>e?.observations?.colorsClass==="manual"?"manual":a.getColorMaps()?.[e?.observations?.colorsClass]?.type??"divergent",toOptions:({options:e,value:o})=>{if(o==="manual")return{...e,observations:{...e.observations,colorsType:"manual",colorsClass:"manual"}};let l=e.observations?.colorClass;const s=a.getColorMaps()?.[e?.observations?.colorsClass]?.type;return o!==s&&(l=a.getColorMapKeys(o??"divergent")[0]),{...e,observations:{...e.observations,colorsClass:l,colorsType:o}}}},visibleIf:({options:e})=>r({options:e})&&e?.observations?.colorType==="range"},{key:"observations.colorsClass",control:{type:"color-palette-picker",label:"Color palette",hideLabel:!0,default:({options:e})=>{const l=a.getColorMaps()?.[e?.observations?.colorsClass]?.type;return a.getColorMapKeys(l??"divergent")[0]},enum:({options:e})=>{const l=a.getColorMaps()?.[e?.observations?.colorsClass]?.type;return a.getColorMapKeys(l??"divergent")}},visibleIf:({options:e})=>r({options:e})&&e?.observations?.colorType==="range"&&e?.observations?.colorsClass!=="manual"}]}];exports.default=i;
|