@luzmo/analytics-components-kit 1.0.1-alpha.91 → 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/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-Bb7TxJdX.js → get-css-variable-YlLiVgo8.js} +37 -37
- 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-Pzks_rOx.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
|
@@ -19,34 +19,34 @@
|
|
|
19
19
|
* */
|
|
20
20
|
import "@luzmo/lucero/select";
|
|
21
21
|
import "@luzmo/lucero/text-field";
|
|
22
|
-
import { unsafeCSS as
|
|
23
|
-
import { msg as
|
|
24
|
-
import { SizedMixin as
|
|
25
|
-
import { d as v } from "../index-
|
|
26
|
-
import { l as
|
|
27
|
-
import { property as
|
|
28
|
-
import { g as
|
|
22
|
+
import { unsafeCSS as $, html as y } from "lit";
|
|
23
|
+
import { msg as b, localized as C } from "@lit/localize";
|
|
24
|
+
import { SizedMixin as T, LuzmoElement as E, ElementSizes as I } from "@luzmo/lucero/utils";
|
|
25
|
+
import { d as v } from "../index-E239Dotg.js";
|
|
26
|
+
import { l as w } from "../localize-BX7q0S0M.js";
|
|
27
|
+
import { property as z, state as _ } from "lit/decorators.js";
|
|
28
|
+
import { g as H, t as R, s as O } from "../set-locale-Dp3N_gXN.js";
|
|
29
29
|
(function() {
|
|
30
30
|
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
31
31
|
const r = document.createElement("style");
|
|
32
32
|
r.setAttribute("data-luzmo-vars", ""), r.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(r);
|
|
33
33
|
}
|
|
34
34
|
})();
|
|
35
|
-
const
|
|
36
|
-
var
|
|
37
|
-
for (var
|
|
38
|
-
(
|
|
39
|
-
return
|
|
35
|
+
const D = ".missing-value{opacity:.4}:host{--var: blue}";
|
|
36
|
+
var P = Object.defineProperty, Q = Object.getOwnPropertyDescriptor, m = (e, r, o, s) => {
|
|
37
|
+
for (var t = s > 1 ? void 0 : s ? Q(r, o) : r, n = e.length - 1, a; n >= 0; n--)
|
|
38
|
+
(a = e[n]) && (t = (s ? a(r, o, t) : a(t)) || t);
|
|
39
|
+
return s && t && P(r, o, t), t;
|
|
40
40
|
};
|
|
41
|
-
const
|
|
42
|
-
let
|
|
43
|
-
validSizes: Object.values(
|
|
41
|
+
const S = 5e3;
|
|
42
|
+
let u = class extends T(E, {
|
|
43
|
+
validSizes: Object.values(I)
|
|
44
44
|
}) {
|
|
45
45
|
constructor() {
|
|
46
46
|
super(...arguments), this.language = "en", this.contentLanguage = "en", this._hierarchyValues = [], this._retrieving = !0, this._search = "", this._error = null, this._allValuesRetrieved = !1, this._runningQueries = [];
|
|
47
47
|
}
|
|
48
48
|
static get styles() {
|
|
49
|
-
return [
|
|
49
|
+
return [$(D)];
|
|
50
50
|
}
|
|
51
51
|
connectedCallback() {
|
|
52
52
|
super.connectedCallback();
|
|
@@ -54,12 +54,13 @@ let l = class extends S(k, {
|
|
|
54
54
|
this.apiUrl && (e.apiUrl = this.apiUrl), this.cacheTime && (e.staleTime = this.cacheTime, e.gcTime = this.cacheTime * 2), this.authKey && this.authToken && (e.authKey = this.authKey, e.authToken = this.authToken), v.configure(e);
|
|
55
55
|
}
|
|
56
56
|
willUpdate(e) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
var o, s, t, n, a, d, c, f, g, p, i, l, h, x;
|
|
58
|
+
if (e.has("language") && this.language !== H() && ([...R].includes(this.language ?? "en") || this.language === "en") && O(this.language), e.has("filter") && this.filter) {
|
|
59
|
+
const k = (o = e.get("filter")) == null ? void 0 : o.expression, L = ((n = (t = (s = e.get("filter")) == null ? void 0 : s.parameters) == null ? void 0 : t[0]) == null ? void 0 : n.columnId) || ((c = (d = (a = e.get("filter")) == null ? void 0 : a.parameters) == null ? void 0 : d[0]) == null ? void 0 : c.formulaId), V = ((p = (g = (f = this.filter) == null ? void 0 : f.parameters) == null ? void 0 : g[0]) == null ? void 0 : p.columnId) || ((h = (l = (i = this.filter) == null ? void 0 : i.parameters) == null ? void 0 : l[0]) == null ? void 0 : h.formulaId);
|
|
60
|
+
L !== V && (["? in ?", "? not in ?", "? = ?", "? != ?"].includes(
|
|
61
|
+
(x = this.filter) == null ? void 0 : x.expression
|
|
61
62
|
) || !["? in ?", "? not in ?", "? = ?", "? != ?"].includes(
|
|
62
|
-
|
|
63
|
+
k
|
|
63
64
|
)) && (this._hierarchyValues = [], this._allValuesRetrieved = !1, this._retrieving = !0);
|
|
64
65
|
}
|
|
65
66
|
}
|
|
@@ -67,75 +68,76 @@ let l = class extends S(k, {
|
|
|
67
68
|
* Fetches hierarchy values from the databroker
|
|
68
69
|
*/
|
|
69
70
|
async _fetchHierarchyValues(e = 0) {
|
|
71
|
+
var g, p;
|
|
70
72
|
if (this._allValuesRetrieved) {
|
|
71
73
|
this._retrieving = !1;
|
|
72
74
|
return;
|
|
73
75
|
}
|
|
74
|
-
if (!this.filter
|
|
76
|
+
if (!((p = (g = this.filter) == null ? void 0 : g.parameters) != null && p[0])) {
|
|
75
77
|
this._retrieving = !1, this._error = "Missing column parameters";
|
|
76
78
|
return;
|
|
77
79
|
}
|
|
78
|
-
const r = this.filter.parameters[0],
|
|
79
|
-
if (!
|
|
80
|
+
const r = this.filter.parameters[0], o = r.columnId, s = r.formulaId, t = r.datasetId;
|
|
81
|
+
if (!o && !s) {
|
|
80
82
|
this._retrieving = !1, this._error = "Missing column id or formula id";
|
|
81
83
|
return;
|
|
82
|
-
} else if (!
|
|
84
|
+
} else if (!t) {
|
|
83
85
|
this._retrieving = !1, this._error = "Missing dataset id";
|
|
84
86
|
return;
|
|
85
87
|
}
|
|
86
88
|
this._retrieving = !0, this._error = null;
|
|
87
|
-
const
|
|
89
|
+
const n = {
|
|
88
90
|
expression: "? like ?",
|
|
89
91
|
parameters: [
|
|
90
92
|
{
|
|
91
|
-
column_id:
|
|
92
|
-
formula_id:
|
|
93
|
-
dataset_id:
|
|
93
|
+
column_id: o,
|
|
94
|
+
formula_id: s,
|
|
95
|
+
dataset_id: t
|
|
94
96
|
},
|
|
95
97
|
this._search
|
|
96
98
|
]
|
|
97
|
-
},
|
|
99
|
+
}, a = {
|
|
98
100
|
dimensions: [
|
|
99
101
|
{
|
|
100
|
-
column_id:
|
|
101
|
-
formula_id:
|
|
102
|
-
dataset_id:
|
|
102
|
+
column_id: o,
|
|
103
|
+
formula_id: s,
|
|
104
|
+
dataset_id: t
|
|
103
105
|
}
|
|
104
106
|
],
|
|
105
107
|
where: [],
|
|
106
108
|
order: [
|
|
107
109
|
{
|
|
108
|
-
column_id:
|
|
109
|
-
formula_id:
|
|
110
|
-
dataset_id:
|
|
110
|
+
column_id: o,
|
|
111
|
+
formula_id: s,
|
|
112
|
+
dataset_id: t,
|
|
111
113
|
order: "asc"
|
|
112
114
|
}
|
|
113
115
|
],
|
|
114
116
|
limit: {
|
|
115
|
-
by:
|
|
117
|
+
by: S,
|
|
116
118
|
offset: e
|
|
117
119
|
}
|
|
118
120
|
};
|
|
119
|
-
this._search && this._allValuesRetrieved &&
|
|
120
|
-
const
|
|
121
|
-
v.fetchData(
|
|
122
|
-
console.warn("Request aborted"),
|
|
121
|
+
this._search && this._allValuesRetrieved && a.where.push(n);
|
|
122
|
+
const d = new AbortController(), c = new Promise((i, l) => {
|
|
123
|
+
v.fetchData(a).then(i).catch(l), d.signal.addEventListener("abort", () => {
|
|
124
|
+
console.warn("Request aborted"), l({ status: "aborted" });
|
|
123
125
|
});
|
|
124
|
-
}),
|
|
125
|
-
promise:
|
|
126
|
-
abortController:
|
|
126
|
+
}), f = {
|
|
127
|
+
promise: c,
|
|
128
|
+
abortController: d
|
|
127
129
|
};
|
|
128
|
-
this._runningQueries.push(
|
|
130
|
+
this._runningQueries.push(f);
|
|
129
131
|
try {
|
|
130
|
-
const
|
|
131
|
-
this._search || (this._allValuesRetrieved =
|
|
132
|
-
} catch (
|
|
133
|
-
if (
|
|
132
|
+
const i = await c, l = i && Array.isArray(i.data) ? i.data.map((h) => h[0]) : [];
|
|
133
|
+
this._search || (this._allValuesRetrieved = l.length < S), this._hierarchyValues = e > 0 ? [...this._hierarchyValues, ...l] : l;
|
|
134
|
+
} catch (i) {
|
|
135
|
+
if ((i == null ? void 0 : i.status) === "aborted")
|
|
134
136
|
return;
|
|
135
|
-
this._error =
|
|
137
|
+
this._error = i instanceof Error ? i.message : "Unknown error", this._hierarchyValues = [];
|
|
136
138
|
} finally {
|
|
137
139
|
this._runningQueries = this._runningQueries.filter(
|
|
138
|
-
(
|
|
140
|
+
(i) => i.promise !== c
|
|
139
141
|
), this._retrieving = !1;
|
|
140
142
|
}
|
|
141
143
|
}
|
|
@@ -152,26 +154,30 @@ let l = class extends S(k, {
|
|
|
152
154
|
);
|
|
153
155
|
}
|
|
154
156
|
setHierarchy(e) {
|
|
157
|
+
var o, s, t, n, a, d, c, f;
|
|
155
158
|
let r;
|
|
156
|
-
["? in ?", "? not in ?"].includes(this.filter
|
|
159
|
+
["? in ?", "? not in ?"].includes((o = this.filter) == null ? void 0 : o.expression) ? r = (s = e == null ? void 0 : e.detail) == null ? void 0 : s.value : ["? = ?", "? != ?"].includes((t = this.filter) == null ? void 0 : t.expression) ? r = (a = (n = e == null ? void 0 : e.detail) == null ? void 0 : n.value) == null ? void 0 : a[0] : r = (d = e == null ? void 0 : e.target) == null ? void 0 : d.value, this._value !== r && (this._value = r, this.filter = {
|
|
157
160
|
...this.filter,
|
|
158
|
-
parameters: [{ ...this.filter
|
|
161
|
+
parameters: [{ ...(f = (c = this.filter) == null ? void 0 : c.parameters) == null ? void 0 : f[0] }, this._value]
|
|
159
162
|
}, this._sendChangeEvent());
|
|
160
163
|
}
|
|
161
164
|
onScrolled(e) {
|
|
162
|
-
|
|
165
|
+
var r;
|
|
166
|
+
!this._retrieving && !this._allValuesRetrieved && ((r = e == null ? void 0 : e.detail) == null ? void 0 : r.last) === this._hierarchyValues.length - 1 && this._fetchHierarchyValues(this._hierarchyValues.length);
|
|
163
167
|
}
|
|
164
168
|
renderTextField() {
|
|
165
|
-
|
|
169
|
+
var e, r;
|
|
170
|
+
return y`<luzmo-text-field
|
|
166
171
|
.size=${this.size}
|
|
167
172
|
@change=${this.setHierarchy}
|
|
168
173
|
@input=${this.setHierarchy}
|
|
169
|
-
.value=${this.filter
|
|
174
|
+
.value=${((r = (e = this.filter) == null ? void 0 : e.parameters) == null ? void 0 : r[1]) ?? ""}
|
|
170
175
|
></luzmo-text-field>`;
|
|
171
176
|
}
|
|
172
177
|
setSearchString(e) {
|
|
173
|
-
|
|
174
|
-
|
|
178
|
+
var r;
|
|
179
|
+
this._search = ((r = e == null ? void 0 : e.detail) == null ? void 0 : r.string) ?? "", this._allValuesRetrieved || (this._searchQueryTimeout && (this._runningQueries.forEach((o) => {
|
|
180
|
+
o != null && o.abortController && o.abortController.abort();
|
|
175
181
|
}), this._runningQueries = [], clearTimeout(this._searchQueryTimeout)), this._searchQueryTimeout = setTimeout(() => {
|
|
176
182
|
this._fetchHierarchyValues();
|
|
177
183
|
}, 500));
|
|
@@ -183,83 +189,88 @@ let l = class extends S(k, {
|
|
|
183
189
|
this._fetchHierarchyValues();
|
|
184
190
|
}
|
|
185
191
|
renderHierarchyPicker() {
|
|
192
|
+
var c, f, g, p, i;
|
|
186
193
|
if (this._error)
|
|
187
|
-
return
|
|
188
|
-
const e = (this._search ? this._hierarchyValues.filter((
|
|
189
|
-
|
|
190
|
-
return
|
|
191
|
-
|
|
192
|
-
|
|
194
|
+
return y`<div class="error">Error: ${this._error}</div>`;
|
|
195
|
+
const e = (this._search ? this._hierarchyValues.filter((l) => {
|
|
196
|
+
var h;
|
|
197
|
+
return ((h = w(l.name, this.contentLanguage, { allowEmpty: !0 })) == null ? void 0 : h.toLowerCase().includes(this._search.toLowerCase())) || l.toString().toLowerCase().includes(this._search.toLowerCase());
|
|
198
|
+
}) : this._hierarchyValues).map((l) => {
|
|
199
|
+
let h = w(l == null ? void 0 : l.name, this.contentLanguage) ?? "N/A";
|
|
200
|
+
return typeof h != "string" && (h = "N/A"), {
|
|
201
|
+
value: l == null ? void 0 : l.id,
|
|
202
|
+
label: h
|
|
193
203
|
};
|
|
194
|
-
}), r = this.filter
|
|
195
|
-
return
|
|
204
|
+
}), r = (c = this.filter) == null ? void 0 : c.expression, o = ["? = ?", "? != ?"].includes(r), s = b("Selected {count} items"), t = b("Search"), n = b("No data"), a = b("No results"), d = b("Select...");
|
|
205
|
+
return y`<luzmo-select
|
|
196
206
|
.size=${this.size}
|
|
197
|
-
.label=${
|
|
207
|
+
.label=${d}
|
|
198
208
|
.retrieving=${this._retrieving}
|
|
199
|
-
.selects=${
|
|
200
|
-
.variant=${
|
|
209
|
+
.selects=${o ? "single" : "multiple"}
|
|
210
|
+
.variant=${o ? "highlight" : "checkboxes"}
|
|
201
211
|
emphasized
|
|
202
212
|
no-wrap
|
|
203
213
|
?invalid=${!!this._error}
|
|
204
|
-
.multipleLabelTemplate=${
|
|
205
|
-
.searchLabel=${
|
|
206
|
-
.noDataLabel=${
|
|
207
|
-
.noResultsLabel=${
|
|
214
|
+
.multipleLabelTemplate=${s}
|
|
215
|
+
.searchLabel=${t}
|
|
216
|
+
.noDataLabel=${n}
|
|
217
|
+
.noResultsLabel=${a}
|
|
208
218
|
@change=${this.setHierarchy}
|
|
209
219
|
@luzmo-search=${this.setSearchString}
|
|
210
220
|
@luzmo-opened=${this.onOpened}
|
|
211
221
|
@luzmo-closed=${this.resetSearchString}
|
|
212
222
|
@luzmo-scrolled=${this.onScrolled}
|
|
213
223
|
.options=${e}
|
|
214
|
-
.value=${
|
|
224
|
+
.value=${o ? [(g = (f = this.filter) == null ? void 0 : f.parameters) == null ? void 0 : g[1]] : (i = (p = this.filter) == null ? void 0 : p.parameters) == null ? void 0 : i[1]}
|
|
215
225
|
>
|
|
216
226
|
</luzmo-select>`;
|
|
217
227
|
}
|
|
218
228
|
render() {
|
|
219
|
-
|
|
229
|
+
var r;
|
|
230
|
+
const e = (r = this.filter) == null ? void 0 : r.expression;
|
|
220
231
|
return ["? in ?", "? not in ?", "? = ?", "? != ?"].includes(e) ? this.renderHierarchyPicker() : this.renderTextField();
|
|
221
232
|
}
|
|
222
233
|
};
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
],
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
],
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
],
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
],
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
],
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
],
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
],
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
],
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
],
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
],
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
],
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
],
|
|
234
|
+
m([
|
|
235
|
+
z({ type: String, attribute: "api-url", reflect: !0 })
|
|
236
|
+
], u.prototype, "apiUrl", 2);
|
|
237
|
+
m([
|
|
238
|
+
z({ type: String, attribute: "auth-key", reflect: !0 })
|
|
239
|
+
], u.prototype, "authKey", 2);
|
|
240
|
+
m([
|
|
241
|
+
z({ type: String, attribute: "auth-token", reflect: !0 })
|
|
242
|
+
], u.prototype, "authToken", 2);
|
|
243
|
+
m([
|
|
244
|
+
z({ type: Number, attribute: "cache-time", reflect: !0 })
|
|
245
|
+
], u.prototype, "cacheTime", 2);
|
|
246
|
+
m([
|
|
247
|
+
z({ type: String, reflect: !0 })
|
|
248
|
+
], u.prototype, "language", 2);
|
|
249
|
+
m([
|
|
250
|
+
z({ type: String, attribute: "content-language", reflect: !0 })
|
|
251
|
+
], u.prototype, "contentLanguage", 2);
|
|
252
|
+
m([
|
|
253
|
+
z({ type: Object, reflect: !1 })
|
|
254
|
+
], u.prototype, "filter", 2);
|
|
255
|
+
m([
|
|
256
|
+
_()
|
|
257
|
+
], u.prototype, "_hierarchyValues", 2);
|
|
258
|
+
m([
|
|
259
|
+
_()
|
|
260
|
+
], u.prototype, "_retrieving", 2);
|
|
261
|
+
m([
|
|
262
|
+
_()
|
|
263
|
+
], u.prototype, "_search", 2);
|
|
264
|
+
m([
|
|
265
|
+
_()
|
|
266
|
+
], u.prototype, "_error", 2);
|
|
267
|
+
u = m([
|
|
268
|
+
C()
|
|
269
|
+
], u);
|
|
259
270
|
customElements.get("luzmo-filter-value-picker-hierarchy") || customElements.define(
|
|
260
271
|
"luzmo-filter-value-picker-hierarchy",
|
|
261
|
-
|
|
272
|
+
u
|
|
262
273
|
);
|
|
263
274
|
export {
|
|
264
|
-
|
|
275
|
+
u as LuzmoFilterValuePickerHierarchy
|
|
265
276
|
};
|
|
@@ -17,14 +17,14 @@
|
|
|
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"});require("@luzmo/lucero/number-field");require("@luzmo/lucero/select");const
|
|
20
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("@luzmo/lucero/number-field");require("@luzmo/lucero/select");const V=require("lit"),p=require("@lit/localize"),y=require("@luzmo/lucero/utils"),k=require("../index-Dn0j_pcR.cjs"),v=require("../set-locale-BRRalqne.cjs"),c=require("lit/decorators.js"),T=".missing-value{opacity:.4}:host{--var: blue}";var C=Object.defineProperty,E=Object.getOwnPropertyDescriptor,n=(b,e,t,r)=>{for(var i=r>1?void 0:r?E(e,t):e,s=b.length-1,a;s>=0;s--)(a=b[s])&&(i=(r?a(e,t,i):a(i))||i);return r&&i&&C(e,t,i),i};const S=5e3;exports.LuzmoFilterValuePickerNumeric=class extends y.SizedMixin(y.LuzmoElement,{validSizes:Object.values(y.ElementSizes)}){constructor(){super(...arguments),this.language="en",this.contentLanguage="en",this._numericValues=[],this._retrieving=!0,this._search="",this._error=null,this._allValuesRetrieved=!1,this._runningQueries=[]}static get styles(){return[V.unsafeCSS(T)]}connectedCallback(){super.connectedCallback();const e={};this.apiUrl&&(e.apiUrl=this.apiUrl),this.cacheTime&&(e.staleTime=this.cacheTime,e.gcTime=this.cacheTime*2),this.authKey&&this.authToken&&(e.authKey=this.authKey,e.authToken=this.authToken),k.dataBroker.configure(e)}willUpdate(e){var i,s,a,u,m,o,_,d,f,l,h,g,L,z;const t=e.has("filter");if(e.has("language")&&this.language!==v.getLocale()&&([...v.targetLocales].includes(this.language??"en")||this.language==="en")&&v.setLocale(this.language),t&&this.filter){const N=(i=e.get("filter"))==null?void 0:i.expression,P=(s=this.filter)==null?void 0:s.expression,F=((m=(u=(a=e.get("filter"))==null?void 0:a.parameters)==null?void 0:u[0])==null?void 0:m.columnId)||((d=(_=(o=e.get("filter"))==null?void 0:o.parameters)==null?void 0:_[0])==null?void 0:d.formulaId),$=((h=(l=(f=this.filter)==null?void 0:f.parameters)==null?void 0:l[0])==null?void 0:h.columnId)||((z=(L=(g=this.filter)==null?void 0:g.parameters)==null?void 0:L[0])==null?void 0:z.formulaId);(F!==$||!["? in ?","? not in ?"].includes(N))&&["? in ?","? not in ?"].includes(P)&&(this._numericValues=[],this._allValuesRetrieved=!1,this._retrieving=!0)}}async _fetchNumericValues(e=0){var d,f;if(this._allValuesRetrieved){this._retrieving=!1;return}if(!((f=(d=this.filter)==null?void 0:d.parameters)!=null&&f[0])){this._retrieving=!1,this._error="Missing column parameters";return}const t=this.filter.parameters[0],r=t.columnId,i=t.formulaId,s=t.datasetId;if(!r&&!i){this._retrieving=!1,this._error="Missing column id or formula id";return}else if(!s){this._retrieving=!1,this._error="Missing dataset id";return}this._retrieving=!0,this._error=null;const a={expression:"? like ?",parameters:[{dataset_id:s,expression:`CAST({${s}:${r??i}},hierarchy)`},this._search]},u={dimensions:[{column_id:r,formula_id:i,dataset_id:s}],where:[],order:[{column_id:r,formula_id:i,dataset_id:s,order:"asc"}],limit:{by:S,offset:e}};this._search&&!this._allValuesRetrieved&&u.where.push(a);const m=new AbortController,o=new Promise((l,h)=>{k.dataBroker.fetchData(u).then(l).catch(h),m.signal.addEventListener("abort",()=>{console.warn("Request aborted"),h({status:"aborted"})})}),_={promise:o,abortController:m};this._runningQueries.push(_);try{const l=await o,h=l&&Array.isArray(l.data)?l.data.map(g=>g[0]):[];this._search||(this._allValuesRetrieved=h.length<S),this._numericValues=e>0?[...this._numericValues,...h]:h}catch(l){if((l==null?void 0:l.status)==="aborted")return;this._error=l instanceof Error?l.message:"Unknown error",this._numericValues=[]}finally{this._runningQueries=this._runningQueries.filter(l=>l.promise!==o),this._retrieving=!1}}_sendChangeEvent(){this.dispatchEvent(new CustomEvent("filter-value-changed",{bubbles:!0,composed:!0,cancelable:!0,detail:{value:this._value}}))}setValue(e){var r,i,s,a,u;const t=["? in ?","? not in ?"].includes((r=this.filter)==null?void 0:r.expression)?(i=e==null?void 0:e.detail)==null?void 0:i.value:(s=e==null?void 0:e.target)==null?void 0:s.value;this._value!==t&&(this._value=t,this.filter={...this.filter,parameters:[{...(u=(a=this.filter)==null?void 0:a.parameters)==null?void 0:u[0]},t]},this._sendChangeEvent())}selectValue(e){var i,s,a;const r=(((i=e.detail)==null?void 0:i.value)??"").map(u=>Number.parseFloat(u));this.filter={...this.filter,parameters:[{...(a=(s=this.filter)==null?void 0:s.parameters)==null?void 0:a[0]},r]},this._value=r,this._sendChangeEvent()}onScrolled(e){var t;!this._retrieving&&!this._allValuesRetrieved&&((t=e==null?void 0:e.detail)==null?void 0:t.last)===this._numericValues.length-1&&this._fetchNumericValues(this._numericValues.length)}renderNumberField(){var e,t;return V.html`<luzmo-number-field
|
|
21
21
|
.size=${this.size}
|
|
22
22
|
@change=${this.setValue}
|
|
23
23
|
@input=${this.setValue}
|
|
24
|
-
.value=${this.filter
|
|
25
|
-
></luzmo-number-field>`}setSearchString(e){this._search=e
|
|
24
|
+
.value=${(t=(e=this.filter)==null?void 0:e.parameters)==null?void 0:t[1]}
|
|
25
|
+
></luzmo-number-field>`}setSearchString(e){var t;this._search=((t=e==null?void 0:e.detail)==null?void 0:t.string)??"",this._allValuesRetrieved||(this._searchQueryTimeout&&(this._runningQueries.forEach(r=>{r!=null&&r.abortController&&r.abortController.abort()}),this._runningQueries=[],clearTimeout(this._searchQueryTimeout)),this._searchQueryTimeout=setTimeout(()=>{this._fetchNumericValues()},500))}resetSearchString(){this._search=""}onOpened(){this._fetchNumericValues()}renderValuePicker(){var u,m;this._error&&console.error(`Numeric value retrieve error: ${this._error}`);const e=this._numericValues.filter(o=>o.toString().toLowerCase().includes(this._search.toLowerCase())).map(o=>({value:o,label:o})),t=p.msg("Selected {count} items"),r=p.msg("Search"),i=p.msg("No data"),s=p.msg("No results"),a=p.msg("Select...");return V.html`<luzmo-select
|
|
26
26
|
.size=${this.size}
|
|
27
|
-
.label=${
|
|
27
|
+
.label=${a}
|
|
28
28
|
.retrieving=${this._retrieving}
|
|
29
29
|
selects="multiple"
|
|
30
30
|
variant="checkboxes"
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
no-wrap
|
|
33
33
|
?invalid=${!!this._error}
|
|
34
34
|
.multipleLabelTemplate=${t}
|
|
35
|
-
.searchLabel=${
|
|
36
|
-
.noDataLabel=${
|
|
35
|
+
.searchLabel=${r}
|
|
36
|
+
.noDataLabel=${i}
|
|
37
37
|
.noResultsLabel=${s}
|
|
38
38
|
@change=${this.selectValue}
|
|
39
39
|
@luzmo-search=${this.setSearchString}
|
|
@@ -41,6 +41,6 @@
|
|
|
41
41
|
@luzmo-closed=${this.resetSearchString}
|
|
42
42
|
@luzmo-scrolled=${this.onScrolled}
|
|
43
43
|
.options=${e}
|
|
44
|
-
.value=${this.filter
|
|
44
|
+
.value=${(m=(u=this.filter)==null?void 0:u.parameters)==null?void 0:m[1]}
|
|
45
45
|
>
|
|
46
|
-
</luzmo-select>`}render(){const e=this.filter
|
|
46
|
+
</luzmo-select>`}render(){var t;const e=(t=this.filter)==null?void 0:t.expression;return["? in ?","? not in ?"].includes(e)?this.renderValuePicker():this.renderNumberField()}};n([c.property({type:String,attribute:"api-url",reflect:!0})],exports.LuzmoFilterValuePickerNumeric.prototype,"apiUrl",2);n([c.property({type:String,attribute:"auth-key",reflect:!0})],exports.LuzmoFilterValuePickerNumeric.prototype,"authKey",2);n([c.property({type:String,attribute:"auth-token",reflect:!0})],exports.LuzmoFilterValuePickerNumeric.prototype,"authToken",2);n([c.property({type:Number,attribute:"cache-time",reflect:!0})],exports.LuzmoFilterValuePickerNumeric.prototype,"cacheTime",2);n([c.property({type:String,reflect:!0})],exports.LuzmoFilterValuePickerNumeric.prototype,"language",2);n([c.property({type:String,attribute:"content-language",reflect:!0})],exports.LuzmoFilterValuePickerNumeric.prototype,"contentLanguage",2);n([c.property({type:Object,reflect:!1})],exports.LuzmoFilterValuePickerNumeric.prototype,"filter",2);n([c.state()],exports.LuzmoFilterValuePickerNumeric.prototype,"_numericValues",2);n([c.state()],exports.LuzmoFilterValuePickerNumeric.prototype,"_retrieving",2);n([c.state()],exports.LuzmoFilterValuePickerNumeric.prototype,"_search",2);n([c.state()],exports.LuzmoFilterValuePickerNumeric.prototype,"_error",2);exports.LuzmoFilterValuePickerNumeric=n([p.localized()],exports.LuzmoFilterValuePickerNumeric);customElements.get("luzmo-filter-value-picker-numeric")||customElements.define("luzmo-filter-value-picker-numeric",exports.LuzmoFilterValuePickerNumeric);
|