@luzmo/analytics-components-kit 1.0.1-alpha.86 → 1.0.1-alpha.87
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/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 +1 -2
- package/components/area-chart-options.config-Bl8bhhOo.cjs +20 -0
- package/components/{area-chart-options.config-_J0sG4NF.js → area-chart-options.config-u8itidsi.js} +14 -26
- package/components/bar-chart-options.config-CePAqM83.cjs +20 -0
- package/components/{bar-chart-options.config-D1mb5TDl.js → bar-chart-options.config-DIirbAJ0.js} +21 -35
- package/components/box-plot-options.config-BVNrV2eD.cjs +20 -0
- package/components/{box-plot-options.config-xu_i6ms7.js → box-plot-options.config-BWROiguA.js} +52 -88
- package/components/{bubble-chart-options.config-BacgXkJ_.js → bubble-chart-options.config-4QD8VPhU.js} +9 -18
- package/components/bubble-chart-options.config-BDgOe3GQ.cjs +20 -0
- package/components/{bullet-chart-options.config-CDPpX1yc.js → bullet-chart-options.config-3bH7uekx.js} +1 -1
- package/components/{bullet-chart-options.config-DfS4Bwds.cjs → bullet-chart-options.config-tWb6Fio-.cjs} +1 -1
- package/components/calculate-data-item-icon-C8CbsMQf.js +139 -0
- package/components/{calculate-data-item-icon-DjW1_RI1.cjs → calculate-data-item-icon-CX4VW9Km.cjs} +1 -1
- package/components/{choropleth-map-options.config-B_W9-rhe.js → choropleth-map-options.config-CMxx3ORp.js} +63 -84
- package/components/choropleth-map-options.config-CWJACFd0.cjs +20 -0
- package/components/circular-gauge-options.config-BMxgq3zH.cjs +20 -0
- package/components/{circular-gauge-options.config-DAIjz4Rl.js → circular-gauge-options.config-DhIKn44k.js} +23 -36
- package/components/{color-DuJ4-73S.js → color-B7m0j8lX.js} +941 -950
- package/components/color-Czp4Im5q.cjs +20 -0
- package/components/{color-range-utils-Bvo9sm5A.js → color-range-utils-BSfqtB3A.js} +31 -32
- package/components/color-range-utils-DYYR-iwx.cjs +20 -0
- package/components/column-chart-options.config-BV9R3ssH.cjs +20 -0
- package/components/{column-chart-options.config-B5SjBVdy.js → column-chart-options.config-D5-yR7iq.js} +27 -37
- package/components/conditional-number-options.config-Co099Qfm.cjs +20 -0
- package/components/{conditional-number-options.config-BCEpSK9J.js → conditional-number-options.config-DPYsdML5.js} +24 -40
- package/components/dataset-icon/index.cjs +1 -1
- package/components/dataset-icon/index.js +1 -2
- package/components/dataset-selector-list/index.cjs +1 -1
- package/components/dataset-selector-list/index.js +32 -35
- package/components/dataset-selector-row/index.cjs +9 -9
- package/components/dataset-selector-row/index.js +51 -53
- package/components/{date-comparison-filter-options.config-JA_yYpJa.js → date-comparison-filter-options.config-CSwGyuBg.js} +3 -6
- package/components/{date-comparison-filter-options.config-DAVncmi0.cjs → date-comparison-filter-options.config-QaoWaFUn.cjs} +1 -1
- package/components/{date-filter-options.config-DBRxlTWy.js → date-filter-options.config-BTVyHRkp.js} +3 -6
- package/components/{date-filter-options.config-CWPMtA18.cjs → date-filter-options.config-n-zhWaYa.cjs} +1 -1
- 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 +29 -30
- package/components/display-settings-datetime/index.cjs +29 -29
- package/components/display-settings-datetime/index.js +112 -120
- package/components/display-settings-grand-totals/index.cjs +4 -4
- package/components/display-settings-grand-totals/index.js +23 -24
- package/components/display-settings-numeric/index.cjs +48 -48
- package/components/display-settings-numeric/index.js +194 -211
- package/components/display-settings-period-over-period/index.cjs +16 -16
- package/components/display-settings-period-over-period/index.js +91 -97
- package/components/{donut-chart-options.config-BulUEiaH.js → donut-chart-options.config-3ZqX8Cbb.js} +21 -37
- package/components/donut-chart-options.config-BQyPgnC9.cjs +20 -0
- package/components/draggable-data-item/index.cjs +8 -8
- package/components/draggable-data-item/index.js +44 -45
- package/components/draggable-data-item-level/index.cjs +11 -11
- package/components/draggable-data-item-level/index.js +89 -92
- package/components/{dropdown-filter-options.config-D9dvPypF.js → dropdown-filter-options.config-CGJTtgAX.js} +7 -10
- package/components/{dropdown-filter-options.config-DS-MORmq.cjs → dropdown-filter-options.config-DJvfCTk7.cjs} +1 -1
- package/components/droppable-slot/index.cjs +20 -20
- package/components/droppable-slot/index.js +167 -181
- package/components/edit-item/index.cjs +9 -9
- package/components/edit-item/index.js +116 -119
- 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 +52 -53
- package/components/{edit-option-base-DIc7iC-b.js → edit-option-base-Bh29-Cak.js} +1 -1
- package/components/{edit-option-base-VhTih9T1.cjs → edit-option-base-tFr8Qg2B.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 +106 -117
- package/components/edit-option-multi-language-field/index.cjs +3 -3
- package/components/edit-option-multi-language-field/index.js +26 -27
- 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 +21 -25
- package/components/edit-option-positions-number-field/index.cjs +9 -9
- package/components/edit-option-positions-number-field/index.js +76 -81
- package/components/edit-option-radio-button-group/index.cjs +6 -6
- package/components/edit-option-radio-button-group/index.js +21 -22
- 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 +22 -23
- package/components/en--a5SfjnM.cjs +20 -0
- package/components/en-CtCctD2c.js +1483 -0
- package/components/{en-GB-DG6uS3sM.cjs → en-GB-CXVKFWyH.cjs} +1 -1
- package/components/{en-GB-CEHEs8F2.js → en-GB-CbNfyZMo.js} +1 -1
- package/components/{evolution-number-options.config-DzkfeoIN.js → evolution-number-options.config-BIPO_4n3.js} +11 -14
- package/components/{evolution-number-options.config-BgIZY4gQ.cjs → evolution-number-options.config-Bc9eKYnn.cjs} +1 -1
- package/components/{extrapolate-color-0j_AeYkz.cjs → extrapolate-color-C0n1UDs-.cjs} +1 -1
- package/components/{extrapolate-color-CC9CURf6.js → extrapolate-color-v1PimdQr.js} +1 -1
- package/components/filter-data-item-picker/index.cjs +7 -7
- package/components/filter-data-item-picker/index.js +85 -86
- 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 +109 -119
- package/components/filter-value-picker/index.cjs +2 -2
- package/components/filter-value-picker/index.js +34 -36
- package/components/filter-value-picker-datetime/index.cjs +8 -8
- package/components/filter-value-picker-datetime/index.js +56 -71
- package/components/filter-value-picker-hierarchy/index.cjs +12 -12
- package/components/filter-value-picker-hierarchy/index.js +113 -124
- package/components/filter-value-picker-numeric/index.cjs +8 -8
- package/components/filter-value-picker-numeric/index.js +101 -110
- package/components/{focusable-DCIFkpiW.js → focusable-BS2pbY7w.js} +24 -26
- package/components/focusable-QLh-LlNt.cjs +20 -0
- package/components/{funnel-chart-options.config-C_VjTOvD.js → funnel-chart-options.config-CrJy2U7_.js} +5 -20
- package/components/funnel-chart-options.config-DrP4AFgk.cjs +20 -0
- package/components/{get-css-variable-DLiZYZEi.cjs → get-css-variable-CuDaWSjr.cjs} +2 -2
- package/components/{get-css-variable-YlLiVgo8.js → get-css-variable-DEf4GhTH.js} +4 -4
- package/components/grid/index.cjs +46 -46
- package/components/grid/index.js +2612 -1873
- package/components/heat-map-options.config-CIHnPdYE.cjs +20 -0
- package/components/{heat-map-options.config-BnLWe8jS.js → heat-map-options.config-CmL87j1j.js} +35 -41
- package/components/{heat-table-options.config-CUsDdgUr.js → heat-table-options.config-BrCYAgYD.js} +60 -88
- package/components/heat-table-options.config-DTlZRc_i.cjs +20 -0
- package/components/helpers-9I0oLoUB.cjs +20 -0
- package/components/helpers-bR8Ibjqh.js +79 -0
- package/components/{hexbin-map-options.config-F-7uCqxb.js → hexbin-map-options.config-BguV1w8q.js} +20 -38
- package/components/hexbin-map-options.config-CKnn3VAB.cjs +20 -0
- package/components/{index-Do7O9azB.js → index-3WsfvkZF.js} +112 -123
- package/components/index-BGb_wRRW.js +1766 -0
- package/components/{index-BPNsFiyq.cjs → index-BNAmjOkm.cjs} +4 -4
- package/components/index-BUal0r_D.cjs +121 -0
- package/components/index-D1Y5TRsH.cjs +20 -0
- package/components/{index-PMDgRSzR.js → index-DdyZ2g5L.js} +94 -104
- package/components/index-DvkzMbLt.cjs +249 -0
- package/components/{index-CdIUfo-L.js → index-haa7WNrl.js} +453 -481
- package/components/index.cjs +1 -1
- package/components/index.js +5 -5
- package/components/item-options-configs.cjs +1 -1
- package/components/item-options-configs.js +37 -37
- package/components/{line-chart-options.config-DB3IsXXr.js → line-chart-options.config-BhirTGqD.js} +13 -28
- package/components/line-chart-options.config-Cqwou5u6.cjs +20 -0
- package/components/{localize-r7ALOUy_.cjs → localize-C4zNlrwK.cjs} +1 -1
- package/components/{localize-BX7q0S0M.js → localize-CcDpq940.js} +10 -10
- package/components/{marker-map-options.config-DPJ955tt.js → marker-map-options.config-Bx17jmiq.js} +1 -1
- package/components/{marker-map-options.config-_FYZzRwA.cjs → marker-map-options.config-CvhCylSC.cjs} +1 -1
- package/components/{pivot-table-options.config-DNK_AIG7.js → pivot-table-options.config-CFc7y0IT.js} +15 -24
- package/components/pivot-table-options.config-uZDAertf.cjs +20 -0
- package/components/{pyramid-chart-options.config-CcVMatYx.js → pyramid-chart-options.config-2Waxb11l.js} +29 -43
- package/components/pyramid-chart-options.config-DoGfEvzU.cjs +20 -0
- package/components/{radar-chart-options.config-CUZn_3Fd.js → radar-chart-options.config-CPN5fOl8.js} +11 -23
- package/components/radar-chart-options.config-CtNUMN1l.cjs +20 -0
- package/components/{regular-table-options.config-BoLZsBry.js → regular-table-options.config-CFKCJQK1.js} +17 -23
- package/components/{regular-table-options.config-DTx3RTnS.cjs → regular-table-options.config-YRuoijIk.cjs} +1 -1
- package/components/route-map-options.config-CVTk5RVL.cjs +20 -0
- package/components/{route-map-options.config-CN86T7c0.js → route-map-options.config-CyolTJfK.js} +87 -109
- package/components/{sankey-diagram-options.config-RFB83YLZ.cjs → sankey-diagram-options.config-D7OSvSqm.cjs} +1 -1
- package/components/{sankey-diagram-options.config-tVLKy_Zn.js → sankey-diagram-options.config-Ldjk84ro.js} +7 -10
- package/components/scatter-plot-options.config-5gN7pMTm.cjs +20 -0
- package/components/{scatter-plot-options.config-Corlzno1.js → scatter-plot-options.config-CfxEfkQ1.js} +56 -86
- package/components/{search-filter-options.config-BE3JhR-F.js → search-filter-options.config-C0syQmP4.js} +3 -6
- package/components/{search-filter-options.config-BCaDlYqZ.cjs → search-filter-options.config-Oqco9BKj.cjs} +1 -1
- package/components/{set-locale-B-Tz2sdI.js → set-locale-hKTMz37h.js} +7 -9
- package/components/slicer-filter-options.config-CrusP6a0.cjs +20 -0
- package/components/{slicer-filter-options.config-3JZZcw5C.js → slicer-filter-options.config-DmOe3440.js} +9 -18
- package/components/{slider-filter-options.config-DH4SS8wH.js → slider-filter-options.config-B1M8RcDs.js} +1 -1
- package/components/{slider-filter-options.config-_8Z2zKmU.cjs → slider-filter-options.config-k45I-t6G.cjs} +1 -1
- package/components/slot-contents-picker/index.cjs +33 -33
- package/components/slot-contents-picker/index.js +194 -205
- package/components/slot-menu/index.cjs +12 -12
- package/components/slot-menu/index.js +171 -184
- package/components/slot-menu-list/index.cjs +3 -3
- package/components/slot-menu-list/index.js +97 -103
- package/components/speedometer-chart-options.config-B4ceg_qI.cjs +20 -0
- package/components/{speedometer-chart-options.config-SL581yOa.js → speedometer-chart-options.config-CzOmuEF8.js} +31 -53
- package/components/spike-map-options.config-BkkDqb4g.cjs +20 -0
- package/components/{spike-map-options.config-C5KewecZ.js → spike-map-options.config-Cbt1YUw6.js} +91 -122
- package/components/{sunburst-chart-options.config-AbNjWS6t.cjs → sunburst-chart-options.config-Yrxc2i57.cjs} +1 -1
- package/components/{sunburst-chart-options.config-CNauGQJv.js → sunburst-chart-options.config-_dyLQxPJ.js} +9 -20
- package/components/{symbol-map-options.config-DdDA4aa7.js → symbol-map-options.config-BORL1NSU.js} +11 -20
- package/components/symbol-map-options.config-NpBKm64d.cjs +20 -0
- package/components/{treemap-chart-options.config-D5AJaF_u.js → treemap-chart-options.config-B9i9qIm_.js} +20 -37
- package/components/treemap-chart-options.config-x4J54WSw.cjs +20 -0
- package/components/utils.cjs +1 -1
- package/components/utils.js +64 -65
- package/components/{video-options.config-CGsDTwHc.cjs → video-options.config-B0asgYt8.cjs} +1 -1
- package/components/{video-options.config-Dk36zJ1B.js → video-options.config-UX-9MDfS.js} +7 -10
- package/components/{wordcloud-chart-options.config-vGfCW8kE.cjs → wordcloud-chart-options.config-BKtJT8Va.cjs} +1 -1
- package/components/{wordcloud-chart-options.config-w2NUIWVA.js → wordcloud-chart-options.config-BoB_KuhA.js} +4 -7
- package/custom-elements.json +20 -0
- package/package.json +3 -3
- package/components/area-chart-options.config-C7sMAHco.cjs +0 -20
- package/components/bar-chart-options.config-DcxEkOT5.cjs +0 -20
- package/components/box-plot-options.config-SrrbDEYW.cjs +0 -20
- package/components/bubble-chart-options.config-Ihn6eVQI.cjs +0 -20
- package/components/calculate-data-item-icon-DZDqb3xu.js +0 -139
- package/components/choropleth-map-options.config-ZW8yoZH2.cjs +0 -20
- package/components/circular-gauge-options.config-msZ4mfpN.cjs +0 -20
- package/components/color-B6LaL8qz.cjs +0 -20
- package/components/color-range-utils-C5yXW7ZC.cjs +0 -20
- package/components/column-chart-options.config-BjDvA7i9.cjs +0 -20
- package/components/conditional-number-options.config-DgzUo0xi.cjs +0 -20
- package/components/donut-chart-options.config-tNpqBZfR.cjs +0 -20
- package/components/en-BKBhKBXY.cjs +0 -20
- package/components/en-BOTjhwEc.js +0 -1488
- package/components/focusable-B3E_hQmm.cjs +0 -20
- package/components/funnel-chart-options.config-D7H7gFcx.cjs +0 -20
- package/components/heat-map-options.config-DVH-Bb5-.cjs +0 -20
- package/components/heat-table-options.config-B12JEYnp.cjs +0 -20
- package/components/helpers-DXQwEH1P.cjs +0 -20
- package/components/helpers-v1bPALRP.js +0 -91
- package/components/hexbin-map-options.config-DZERRhM8.cjs +0 -20
- package/components/index-BPN3bG9X.js +0 -1733
- package/components/index-CQ9ck-BO.cjs +0 -249
- package/components/index-CXn67vdn.cjs +0 -121
- package/components/index-cfj52IbK.cjs +0 -20
- package/components/line-chart-options.config-DSugoe0t.cjs +0 -20
- package/components/pivot-table-options.config-BiJXKSFR.cjs +0 -20
- package/components/pyramid-chart-options.config-C4zbFS26.cjs +0 -20
- package/components/radar-chart-options.config-EqQu6PTh.cjs +0 -20
- package/components/route-map-options.config-D7NJePTu.cjs +0 -20
- package/components/scatter-plot-options.config-CFfGJXsV.cjs +0 -20
- package/components/slicer-filter-options.config-DNI-XevE.cjs +0 -20
- package/components/speedometer-chart-options.config-BX9LTQBH.cjs +0 -20
- package/components/spike-map-options.config-DoBFXPmN.cjs +0 -20
- package/components/symbol-map-options.config-m-lwLTtu.cjs +0 -20
- package/components/treemap-chart-options.config-C0Q9aQ1Z.cjs +0 -20
|
@@ -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 e=require("./en
|
|
20
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./en--a5SfjnM.cjs"),t={...e.DEFAULT_LOCAL_FORMATS,currency:["£",""],date:"%d/%m/%Y"};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 t, a as o, b as a, c as n } from "./helpers-bR8Ibjqh.js";
|
|
21
21
|
const r = [
|
|
22
22
|
{
|
|
23
23
|
key: "general",
|
|
@@ -74,10 +74,10 @@ const r = [
|
|
|
74
74
|
control: {
|
|
75
75
|
type: "color-picker",
|
|
76
76
|
label: "Number color",
|
|
77
|
-
default: ({ theme: e }) =>
|
|
78
|
-
extraLabel: ({ options: e, theme: l }) =>
|
|
79
|
-
extraLabelHasClickAction: ({ options: e, theme: l }) =>
|
|
80
|
-
extraLabelClickAction: ({ options: e, theme: l }) =>
|
|
77
|
+
default: ({ theme: e }) => n(e),
|
|
78
|
+
extraLabel: ({ options: e, theme: l }) => a(e, l, "color"),
|
|
79
|
+
extraLabelHasClickAction: ({ options: e, theme: l }) => o(e, l, "color"),
|
|
80
|
+
extraLabelClickAction: ({ options: e, theme: l }) => t(e, l, "color")
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
]
|
|
@@ -136,7 +136,7 @@ const r = [
|
|
|
136
136
|
default: "area",
|
|
137
137
|
enum: ["area", "line"]
|
|
138
138
|
},
|
|
139
|
-
visibleIf: ({ options: e }) =>
|
|
139
|
+
visibleIf: ({ options: e }) => e?.evolutionGraphDisplay !== "none"
|
|
140
140
|
},
|
|
141
141
|
{
|
|
142
142
|
key: "evolutionGraphInterpolation",
|
|
@@ -146,7 +146,7 @@ const r = [
|
|
|
146
146
|
default: "linear",
|
|
147
147
|
enum: ["linear", "step-before", "step-after", "monotone"]
|
|
148
148
|
},
|
|
149
|
-
visibleIf: ({ options: e }) =>
|
|
149
|
+
visibleIf: ({ options: e }) => e?.evolutionGraphDisplay !== "none"
|
|
150
150
|
},
|
|
151
151
|
{
|
|
152
152
|
key: "missingValue.type",
|
|
@@ -156,7 +156,7 @@ const r = [
|
|
|
156
156
|
default: "no",
|
|
157
157
|
enum: ["no", "break", "manual"]
|
|
158
158
|
},
|
|
159
|
-
visibleIf: ({ options: e }) =>
|
|
159
|
+
visibleIf: ({ options: e }) => e?.evolutionGraphDisplay !== "none"
|
|
160
160
|
},
|
|
161
161
|
{
|
|
162
162
|
key: "missingValue.value",
|
|
@@ -165,10 +165,7 @@ const r = [
|
|
|
165
165
|
label: "Value",
|
|
166
166
|
default: 0
|
|
167
167
|
},
|
|
168
|
-
visibleIf: ({ options: e }) =>
|
|
169
|
-
var l;
|
|
170
|
-
return ((l = e == null ? void 0 : e.missingValue) == null ? void 0 : l.type) === "manual";
|
|
171
|
-
}
|
|
168
|
+
visibleIf: ({ options: e }) => e?.missingValue?.type === "manual"
|
|
172
169
|
},
|
|
173
170
|
{
|
|
174
171
|
key: "evolutionGraphOpacity",
|
|
@@ -180,7 +177,7 @@ const r = [
|
|
|
180
177
|
max: 100,
|
|
181
178
|
step: 1
|
|
182
179
|
},
|
|
183
|
-
visibleIf: ({ options: e }) =>
|
|
180
|
+
visibleIf: ({ options: e }) => e?.evolutionGraphDisplay !== "none"
|
|
184
181
|
},
|
|
185
182
|
{
|
|
186
183
|
key: "evolutionColor",
|
|
@@ -191,7 +188,7 @@ const r = [
|
|
|
191
188
|
parseValue: (e) => e === "inverse",
|
|
192
189
|
toValue: (e) => e ? "inverse" : "normal"
|
|
193
190
|
},
|
|
194
|
-
visibleIf: ({ options: e }) =>
|
|
191
|
+
visibleIf: ({ options: e }) => e?.evolutionGraphDisplay !== "none"
|
|
195
192
|
}
|
|
196
193
|
]
|
|
197
194
|
}
|
|
@@ -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 t=require("./helpers-9I0oLoUB.cjs"),o=[{key:"general",type:"group",label:"General",open:!0,children:[{key:"display.title",control:{type:"switch",label:"Title",default:!0}},{key:"showSubtitle",control:{type:"switch",label:"Subtitle",default:!1}},{key:"horizontalAlignment",control:{type:"action-button-group",label:"Horizontal alignment",default:["center"],values:{left:{iconName:"alignLeft",label:"align left"},center:{iconName:"alignCenter",label:"align center"},right:{iconName:"alignRight",label:"align right"}},selects:"single"}},{key:"verticalAlignment",control:{type:"action-button-group",label:"Vertical alignment",default:["middle"],values:{top:{iconName:"alignTop",label:"align top"},middle:{iconName:"alignMiddle",label:"align middle"},bottom:{iconName:"alignBottom",label:"align bottom"}},selects:"single"}},{key:"color",control:{type:"color-picker",label:"Number color",default:({theme:e})=>t.getThemeMainColor(e),extraLabel:({options:e,theme:l})=>t.getThemeMainColorResetLabel(e,l,"color"),extraLabelHasClickAction:({options:e,theme:l})=>t.getThemeMainColorExtraLabelHasClickAction(e,l,"color"),extraLabelClickAction:({options:e,theme:l})=>t.getThemeMainColorExtraLabelClickAction(e,l,"color")}}]},{key:"fontSizes",type:"group",label:"Font sizes",open:!1,children:[{key:"numberFontSize",control:{type:"number-field",label:"Number font size",default:86,min:10,max:200,step:1,unit:"px"}},{key:"titleFontSize",control:{type:"number-field",label:"Title font size",default:15,min:10,max:100,step:1,unit:"px"}}]},{key:"evolution",type:"group",open:!1,children:[{key:"evolutionGraphDisplay",control:{type:"picker",label:"Show evolution graph",default:"background",enum:["none","background","fixedbottom","belownumber"]}},{key:"evolutionGraphType",control:{type:"picker",label:"Graph type",default:"area",enum:["area","line"]},visibleIf:({options:e})=>e?.evolutionGraphDisplay!=="none"},{key:"evolutionGraphInterpolation",control:{type:"picker",label:"Graph interpolation",default:"linear",enum:["linear","step-before","step-after","monotone"]},visibleIf:({options:e})=>e?.evolutionGraphDisplay!=="none"},{key:"missingValue.type",control:{type:"picker",label:"Fill missing days",default:"no",enum:["no","break","manual"]},visibleIf:({options:e})=>e?.evolutionGraphDisplay!=="none"},{key:"missingValue.value",control:{type:"number-field",label:"Value",default:0},visibleIf:({options:e})=>e?.missingValue?.type==="manual"},{key:"evolutionGraphOpacity",control:{type:"slider",label:"Graph opacity",default:35,min:0,max:100,step:1},visibleIf:({options:e})=>e?.evolutionGraphDisplay!=="none"},{key:"evolutionColor",control:{type:"switch",label:"Lower is better",default:"normal",parseValue:e=>e==="inverse",toValue:e=>e?"inverse":"normal"},visibleIf:({options:e})=>e?.evolutionGraphDisplay!=="none"}]}];exports.default=o;
|
|
@@ -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";const e=require("./color-
|
|
20
|
+
"use strict";const e=require("./color-Czp4Im5q.cjs"),i=(o,s=.1)=>{if(o.length<2)return"#AAAAAA";const n=o.length,l=new e.Color(o[n-2]).to("oklab"),t=new e.Color(o[n-1]).to("oklab"),a=l.coords[0],r=t.coords[0],c=r>a?1:-1,h=Math.min(1,Math.max(0,r+c*s));return new e.Color("oklab",[h,t.coords[1],t.coords[2]],t.alpha).to("srgb").toString({format:"hex",precision:0})};exports.extrapolateNewColor=i;
|
|
@@ -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 { C as n } from "./color-
|
|
20
|
+
import { C as n } from "./color-B7m0j8lX.js";
|
|
21
21
|
const p = (o, r = 0.1) => {
|
|
22
22
|
if (o.length < 2)
|
|
23
23
|
return "#AAAAAA";
|
|
@@ -17,21 +17,21 @@
|
|
|
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/field-label");require("@luzmo/lucero/icon");require("@luzmo/lucero/menu");require("@luzmo/lucero/picker");const
|
|
20
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("@luzmo/lucero/field-label");require("@luzmo/lucero/icon");require("@luzmo/lucero/menu");require("@luzmo/lucero/picker");const m=require("lit"),f=require("@lit/localize"),p=require("@luzmo/lucero/utils"),I=require("../set-locale-BRRalqne.cjs"),r=require("lit/decorators.js"),y=require("../calculate-data-item-icon-CX4VW9Km.cjs"),z=require("../localize-C4zNlrwK.cjs"),D=":host{--var: blue}:host{font-family:var(--luzmo-font-family)}";var b=Object.defineProperty,L=Object.getOwnPropertyDescriptor,o=(h,e,a,s)=>{for(var i=s>1?void 0:s?L(e,a):e,t=h.length-1,l;t>=0;t--)(l=h[t])&&(i=(s?l(e,a,i):l(i))||i);return s&&i&&b(e,a,i),i};exports.LuzmoFilterDataItemPicker=class extends p.SizedMixin(p.LuzmoElement,{validSizes:Object.values(p.ElementSizes)}){constructor(){super(...arguments),this.language="en",this.contentLanguage="en",this.hasLabel=!1,this.icons="only-menu",this.allowEmpty=!1,this.placeholder="",this.dataItemId="",this.loading=!1,this.invalid=!1,this.datasetsDataItems=[]}static get styles(){return[m.unsafeCSS(D)]}_sendChangeEvent(){this.dispatchEvent(new CustomEvent("data-item-selected",{bubbles:!0,composed:!0,cancelable:!0,detail:{dataItem:this._dataItemSelected}}))}setDataItem(e){const a=e?.detail;for(const s of this.datasetsDataItems){const i=s.columns,t=s.formulas,l=i.find(c=>c.id===a),n=c=>{this._dataItemSelected=c,this.dataItemId=a,this._sendChangeEvent()};if(l){n(l);break}const d=t.find(c=>c.id===a);if(d){n(d);break}}}_findDataItemInDatasetsDataItems(e){for(const a of this.datasetsDataItems){const s=a.columns,i=a.formulas,t=s?.find(n=>n.id===e);if(t){this._dataItemSelected=t,this._dataItemSelected.datasetId=a.id,["hierarchy","datetime"].includes(t.type??"")&&(this._dataItemSelected.lowestLevel=t.lowestLevel);break}const l=i?.find(n=>n.id===e);if(l){this._dataItemSelected=l,this._dataItemSelected.isFormula=!0,this._dataItemSelected.datasetId=a.id,["hierarchy","datetime"].includes(l.type??"")&&(this._dataItemSelected.lowestLevel=l.lowestLevel);break}}}willUpdate(e){const a=e.has("language"),s=e.has("dataItemId"),i=e.has("datasetsDataItems");if(a&&this.language!==I.getLocale()&&([...I.targetLocales].includes(this.language??"en")||this.language==="en")&&I.setLocale(this.language),(s||i)&&(this._findDataItemInDatasetsDataItems(this.dataItemId),!this._dataItemSelected&&!this.allowEmpty&&!this.loading)){for(const t of this.datasetsDataItems)if(t?.columns?.length>0){this._dataItemSelected=t.columns[0];break}else if(t?.formulas?.length>0){this._dataItemSelected=t.formulas[0];break}this.dataItemId=this._dataItemSelected?.id,this._sendChangeEvent()}}render(){let e=m.html``;for(const i of this.datasetsDataItems??[]){const t=i?.columns??[],l=i?.formulas??[],n=u=>{const g=m.html`
|
|
21
21
|
<luzmo-icon
|
|
22
22
|
slot="icon"
|
|
23
23
|
.size=${this.size}
|
|
24
|
-
.icon=${y.calculateDataItemIcon(
|
|
24
|
+
.icon=${y.calculateDataItemIcon(u,this.size)}
|
|
25
25
|
>
|
|
26
26
|
</luzmo-icon>
|
|
27
|
-
`;return
|
|
27
|
+
`;return m.html`<luzmo-menu-item value=${u.id}>
|
|
28
28
|
${this.icons==="none"?"":g}
|
|
29
|
-
${z.localize(
|
|
30
|
-
</luzmo-menu-item>`},
|
|
29
|
+
${z.localize(u?.name??{},this.contentLanguage)}
|
|
30
|
+
</luzmo-menu-item>`},d=t.map(u=>n(u)),c=l.map(u=>n(u));e=m.html`${d} ${c}`}const a=m.html`${e}`,s=m.html`
|
|
31
31
|
<luzmo-field-label for="data-item" size=${this.size}
|
|
32
32
|
>${this.label??f.msg("Select...")}
|
|
33
33
|
</luzmo-field-label>
|
|
34
|
-
`;return
|
|
34
|
+
`;return m.html` ${this.hasLabel?s:""}
|
|
35
35
|
<luzmo-picker
|
|
36
36
|
label=${this.placeholder??f.msg("Select...")}
|
|
37
37
|
id="data-item"
|
|
@@ -44,4 +44,4 @@
|
|
|
44
44
|
@change=${this.setDataItem}
|
|
45
45
|
>
|
|
46
46
|
${a}
|
|
47
|
-
</luzmo-picker>`}};
|
|
47
|
+
</luzmo-picker>`}};o([r.property({type:String,reflect:!0})],exports.LuzmoFilterDataItemPicker.prototype,"language",2);o([r.property({type:String,attribute:"content-language",reflect:!0})],exports.LuzmoFilterDataItemPicker.prototype,"contentLanguage",2);o([r.property({type:Boolean,attribute:"has-label",reflect:!0})],exports.LuzmoFilterDataItemPicker.prototype,"hasLabel",2);o([r.property({type:String,reflect:!0})],exports.LuzmoFilterDataItemPicker.prototype,"label",2);o([r.property({type:String,reflect:!0})],exports.LuzmoFilterDataItemPicker.prototype,"icons",2);o([r.property({type:Boolean,attribute:"allow-empty",reflect:!0})],exports.LuzmoFilterDataItemPicker.prototype,"allowEmpty",2);o([r.property({type:String,attribute:"placeholder",reflect:!0})],exports.LuzmoFilterDataItemPicker.prototype,"placeholder",2);o([r.property({type:String,attribute:"data-item-id",reflect:!0})],exports.LuzmoFilterDataItemPicker.prototype,"dataItemId",2);o([r.property({type:Boolean,attribute:"loading",reflect:!0})],exports.LuzmoFilterDataItemPicker.prototype,"loading",2);o([r.property({type:Boolean,attribute:"invalid",reflect:!0})],exports.LuzmoFilterDataItemPicker.prototype,"invalid",2);o([r.property({type:Array,reflect:!1})],exports.LuzmoFilterDataItemPicker.prototype,"datasetsDataItems",2);exports.LuzmoFilterDataItemPicker=o([f.localized()],exports.LuzmoFilterDataItemPicker);customElements.get("luzmo-filter-data-item-picker")||customElements.define("luzmo-filter-data-item-picker",exports.LuzmoFilterDataItemPicker);
|
|
@@ -21,13 +21,13 @@ import "@luzmo/lucero/field-label";
|
|
|
21
21
|
import "@luzmo/lucero/icon";
|
|
22
22
|
import "@luzmo/lucero/menu";
|
|
23
23
|
import "@luzmo/lucero/picker";
|
|
24
|
-
import { unsafeCSS as g, html as
|
|
24
|
+
import { unsafeCSS as g, html as d } from "lit";
|
|
25
25
|
import { msg as z, localized as p } from "@lit/localize";
|
|
26
|
-
import { SizedMixin as b, LuzmoElement as
|
|
27
|
-
import { g as I, t as x, s as S } from "../set-locale-
|
|
28
|
-
import { property as
|
|
29
|
-
import { c as w } from "../calculate-data-item-icon-
|
|
30
|
-
import { l as _ } from "../localize-
|
|
26
|
+
import { SizedMixin as b, LuzmoElement as v, ElementSizes as y } from "@luzmo/lucero/utils";
|
|
27
|
+
import { g as I, t as x, s as S } from "../set-locale-hKTMz37h.js";
|
|
28
|
+
import { property as n } from "lit/decorators.js";
|
|
29
|
+
import { c as w } from "../calculate-data-item-icon-C8CbsMQf.js";
|
|
30
|
+
import { l as _ } from "../localize-CcDpq940.js";
|
|
31
31
|
(function() {
|
|
32
32
|
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
33
33
|
const o = document.createElement("style");
|
|
@@ -35,13 +35,13 @@ import { l as _ } from "../localize-BX7q0S0M.js";
|
|
|
35
35
|
}
|
|
36
36
|
})();
|
|
37
37
|
const D = ":host{--var: blue}:host{font-family:var(--luzmo-font-family)}";
|
|
38
|
-
var k = Object.defineProperty, $ = Object.getOwnPropertyDescriptor,
|
|
39
|
-
for (var
|
|
40
|
-
(
|
|
41
|
-
return
|
|
38
|
+
var k = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, m = (t, o, s, a) => {
|
|
39
|
+
for (var e = a > 1 ? void 0 : a ? $(o, s) : o, r = t.length - 1, i; r >= 0; r--)
|
|
40
|
+
(i = t[r]) && (e = (a ? i(o, s, e) : i(e)) || e);
|
|
41
|
+
return a && e && k(o, s, e), e;
|
|
42
42
|
};
|
|
43
|
-
let
|
|
44
|
-
validSizes: Object.values(
|
|
43
|
+
let l = class extends b(v, {
|
|
44
|
+
validSizes: Object.values(y)
|
|
45
45
|
}) {
|
|
46
46
|
constructor() {
|
|
47
47
|
super(...arguments), this.language = "en", this.contentLanguage = "en", this.hasLabel = !1, this.icons = "only-menu", this.allowEmpty = !1, this.placeholder = "", this.dataItemId = "", this.loading = !1, this.invalid = !1, this.datasetsDataItems = [];
|
|
@@ -61,57 +61,56 @@ let s = class extends b(y, {
|
|
|
61
61
|
})
|
|
62
62
|
);
|
|
63
63
|
}
|
|
64
|
-
setDataItem(
|
|
65
|
-
const o =
|
|
66
|
-
for (const
|
|
67
|
-
const
|
|
68
|
-
this._dataItemSelected =
|
|
64
|
+
setDataItem(t) {
|
|
65
|
+
const o = t?.detail;
|
|
66
|
+
for (const s of this.datasetsDataItems) {
|
|
67
|
+
const a = s.columns, e = s.formulas, r = a.find((u) => u.id === o), i = (u) => {
|
|
68
|
+
this._dataItemSelected = u, this.dataItemId = o, this._sendChangeEvent();
|
|
69
69
|
};
|
|
70
|
-
if (
|
|
71
|
-
r
|
|
70
|
+
if (r) {
|
|
71
|
+
i(r);
|
|
72
72
|
break;
|
|
73
73
|
}
|
|
74
|
-
const
|
|
75
|
-
if (
|
|
76
|
-
|
|
74
|
+
const f = e.find((u) => u.id === o);
|
|
75
|
+
if (f) {
|
|
76
|
+
i(f);
|
|
77
77
|
break;
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
_findDataItemInDatasetsDataItems(
|
|
81
|
+
_findDataItemInDatasetsDataItems(t) {
|
|
82
82
|
for (const o of this.datasetsDataItems) {
|
|
83
|
-
const
|
|
84
|
-
if (
|
|
85
|
-
this._dataItemSelected =
|
|
83
|
+
const s = o.columns, a = o.formulas, e = s?.find((i) => i.id === t);
|
|
84
|
+
if (e) {
|
|
85
|
+
this._dataItemSelected = e, this._dataItemSelected.datasetId = o.id, ["hierarchy", "datetime"].includes(e.type ?? "") && (this._dataItemSelected.lowestLevel = e.lowestLevel);
|
|
86
86
|
break;
|
|
87
87
|
}
|
|
88
|
-
const
|
|
89
|
-
if (
|
|
90
|
-
this._dataItemSelected =
|
|
88
|
+
const r = a?.find((i) => i.id === t);
|
|
89
|
+
if (r) {
|
|
90
|
+
this._dataItemSelected = r, this._dataItemSelected.isFormula = !0, this._dataItemSelected.datasetId = o.id, ["hierarchy", "datetime"].includes(r.type ?? "") && (this._dataItemSelected.lowestLevel = r.lowestLevel);
|
|
91
91
|
break;
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
-
willUpdate(
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
this._dataItemSelected = m.columns[0];
|
|
95
|
+
willUpdate(t) {
|
|
96
|
+
const o = t.has("language"), s = t.has("dataItemId"), a = t.has("datasetsDataItems");
|
|
97
|
+
if (o && this.language !== I() && ([...x].includes(this.language ?? "en") || this.language === "en") && S(this.language), (s || a) && (this._findDataItemInDatasetsDataItems(this.dataItemId), !this._dataItemSelected && !this.allowEmpty && !this.loading)) {
|
|
98
|
+
for (const e of this.datasetsDataItems)
|
|
99
|
+
if (e?.columns?.length > 0) {
|
|
100
|
+
this._dataItemSelected = e.columns[0];
|
|
102
101
|
break;
|
|
103
|
-
} else if (
|
|
104
|
-
this._dataItemSelected =
|
|
102
|
+
} else if (e?.formulas?.length > 0) {
|
|
103
|
+
this._dataItemSelected = e.formulas[0];
|
|
105
104
|
break;
|
|
106
105
|
}
|
|
107
|
-
this.dataItemId =
|
|
106
|
+
this.dataItemId = this._dataItemSelected?.id, this._sendChangeEvent();
|
|
108
107
|
}
|
|
109
108
|
}
|
|
110
109
|
render() {
|
|
111
|
-
let
|
|
112
|
-
for (const
|
|
113
|
-
const
|
|
114
|
-
const h =
|
|
110
|
+
let t = d``;
|
|
111
|
+
for (const a of this.datasetsDataItems ?? []) {
|
|
112
|
+
const e = a?.columns ?? [], r = a?.formulas ?? [], i = (c) => {
|
|
113
|
+
const h = d`
|
|
115
114
|
<luzmo-icon
|
|
116
115
|
slot="icon"
|
|
117
116
|
.size=${this.size}
|
|
@@ -119,19 +118,19 @@ let s = class extends b(y, {
|
|
|
119
118
|
>
|
|
120
119
|
</luzmo-icon>
|
|
121
120
|
`;
|
|
122
|
-
return
|
|
121
|
+
return d`<luzmo-menu-item value=${c.id}>
|
|
123
122
|
${this.icons === "none" ? "" : h}
|
|
124
|
-
${_(
|
|
123
|
+
${_(c?.name ?? {}, this.contentLanguage)}
|
|
125
124
|
</luzmo-menu-item>`;
|
|
126
|
-
},
|
|
127
|
-
|
|
125
|
+
}, f = e.map((c) => i(c)), u = r.map((c) => i(c));
|
|
126
|
+
t = d`${f} ${u}`;
|
|
128
127
|
}
|
|
129
|
-
const o =
|
|
128
|
+
const o = d`${t}`, s = d`
|
|
130
129
|
<luzmo-field-label for="data-item" size=${this.size}
|
|
131
130
|
>${this.label ?? z("Select...")}
|
|
132
131
|
</luzmo-field-label>
|
|
133
132
|
`;
|
|
134
|
-
return
|
|
133
|
+
return d` ${this.hasLabel ? s : ""}
|
|
135
134
|
<luzmo-picker
|
|
136
135
|
label=${this.placeholder ?? z("Select...")}
|
|
137
136
|
id="data-item"
|
|
@@ -147,46 +146,46 @@ let s = class extends b(y, {
|
|
|
147
146
|
</luzmo-picker>`;
|
|
148
147
|
}
|
|
149
148
|
};
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
],
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
],
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
],
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
],
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
],
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
],
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
],
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
],
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
],
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
],
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
],
|
|
183
|
-
|
|
149
|
+
m([
|
|
150
|
+
n({ type: String, reflect: !0 })
|
|
151
|
+
], l.prototype, "language", 2);
|
|
152
|
+
m([
|
|
153
|
+
n({ type: String, attribute: "content-language", reflect: !0 })
|
|
154
|
+
], l.prototype, "contentLanguage", 2);
|
|
155
|
+
m([
|
|
156
|
+
n({ type: Boolean, attribute: "has-label", reflect: !0 })
|
|
157
|
+
], l.prototype, "hasLabel", 2);
|
|
158
|
+
m([
|
|
159
|
+
n({ type: String, reflect: !0 })
|
|
160
|
+
], l.prototype, "label", 2);
|
|
161
|
+
m([
|
|
162
|
+
n({ type: String, reflect: !0 })
|
|
163
|
+
], l.prototype, "icons", 2);
|
|
164
|
+
m([
|
|
165
|
+
n({ type: Boolean, attribute: "allow-empty", reflect: !0 })
|
|
166
|
+
], l.prototype, "allowEmpty", 2);
|
|
167
|
+
m([
|
|
168
|
+
n({ type: String, attribute: "placeholder", reflect: !0 })
|
|
169
|
+
], l.prototype, "placeholder", 2);
|
|
170
|
+
m([
|
|
171
|
+
n({ type: String, attribute: "data-item-id", reflect: !0 })
|
|
172
|
+
], l.prototype, "dataItemId", 2);
|
|
173
|
+
m([
|
|
174
|
+
n({ type: Boolean, attribute: "loading", reflect: !0 })
|
|
175
|
+
], l.prototype, "loading", 2);
|
|
176
|
+
m([
|
|
177
|
+
n({ type: Boolean, attribute: "invalid", reflect: !0 })
|
|
178
|
+
], l.prototype, "invalid", 2);
|
|
179
|
+
m([
|
|
180
|
+
n({ type: Array, reflect: !1 })
|
|
181
|
+
], l.prototype, "datasetsDataItems", 2);
|
|
182
|
+
l = m([
|
|
184
183
|
p()
|
|
185
|
-
],
|
|
184
|
+
], l);
|
|
186
185
|
customElements.get("luzmo-filter-data-item-picker") || customElements.define(
|
|
187
186
|
"luzmo-filter-data-item-picker",
|
|
188
|
-
|
|
187
|
+
l
|
|
189
188
|
);
|
|
190
189
|
export {
|
|
191
|
-
|
|
190
|
+
l as LuzmoFilterDataItemPicker
|
|
192
191
|
};
|
|
@@ -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 e=require("../index-
|
|
20
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-BNAmjOkm.cjs");Object.defineProperty(exports,"LuzmoFilterExpressionPicker",{enumerable:!0,get:()=>e.LuzmoFilterExpressionPicker});
|
|
@@ -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 { L as u } from "../index-
|
|
20
|
+
import { L as u } from "../index-DdyZ2g5L.js";
|
|
21
21
|
(function() {
|
|
22
22
|
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
23
23
|
const o = document.createElement("style");
|
|
@@ -17,16 +17,16 @@
|
|
|
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 m=require("lit"),d=require("@lit/localize"),p=require("@luzmo/lucero/utils"),h=require("../set-locale-BRRalqne.cjs"),c=require("../index-D1Y5TRsH.cjs"),a=require("lit/decorators.js"),f=require("../index-BNAmjOkm.cjs");require("../filter-data-item-picker/index.cjs");require("../filter-value-picker/index.cjs");const g=":host{display:flex;flex-direction:row;gap:var(--luzmo-filter-item-gap, var(--filter-item-gap))}:host{--filter-item-gap: var(--luzmo-spacing-3)}:host([size=s]){--filter-item-gap: var(--luzmo-spacing-2)}:host([size=m]){--filter-item-gap: var(--luzmo-spacing-3)}:host([size=l]){--filter-item-gap: calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1))}:host([size=xl]){--filter-item-gap: var(--luzmo-spacing-4)}";var y=Object.defineProperty,I=Object.getOwnPropertyDescriptor,r=(u,t,e,s)=>{for(var i=s>1?void 0:s?I(t,e):t,l=u.length-1,n;l>=0;l--)(n=u[l])&&(i=(s?n(t,e,i):n(i))||i);return s&&i&&y(t,e,i),i};exports.LuzmoFilterItem=class extends p.SizedMixin(p.LuzmoElement,{validSizes:Object.values(p.ElementSizes)}){constructor(){super(...arguments),this.apiUrl="https://api.luzmo.com",this.language="en",this.contentLanguage="en",this.filter={},this._loading=!1,this._datasetsDataItems=[]}static get styles(){return[m.unsafeCSS(g)]}connectedCallback(){super.connectedCallback();const t={};this.apiUrl&&(t.apiUrl=this.apiUrl),this.cacheTime&&(t.staleTime=this.cacheTime,t.gcTime=this.cacheTime*2),this.authKey&&this.authToken&&(t.authKey=this.authKey,t.authToken=this.authToken),c.dataBroker.configure(t)}async _fetchDatasetDataItems(){if(!this.datasetIds||this.datasetIds.length===0){this._error="Missing dataset ids to fetch columns & formulas";return}this._loading=!0,this._error=null;try{const t=await c.dataBroker.fetchDatasetsWithColumnsAndFormulas(this.datasetIds);for(const e of t)for(const s of[...e.columns,...e.formulas])s.datasetId=e.id;this._datasetsDataItems=t}catch(t){console.error("Error fetching dataset columns & formulas:",t),this._error=t instanceof Error?t.message:"Unknown error",this._datasetsDataItems=[]}finally{this._loading=!1}}willUpdate(t){const e=t.has("filter"),s=t.has("language"),i=t.has("datasetIds"),l=t.has("_datasetsDataItems");if(s&&this.language!==h.getLocale()&&([...h.targetLocales].includes(this.language??"en")||this.language==="en")&&h.setLocale(this.language),e||i||l&&this.filter?.parameters?.[0]?.columnId&&(this.filter?.parameters?.[0]?.datasetId||this.filter?.parameters?.[0]?.formulaId)){const n=this._datasetsDataItems.find(o=>o.id===this.filter.parameters?.[0]?.datasetId);if(n){for(const o of[...n.columns||[],...n?.formulas||[]])if(o.id===this.filter.parameters?.[0]?.columnId||o.id===this.filter.parameters?.[0]?.formulaId){this._type=o.type,this._subType=o.subtype,this._isFormula=o.id===this.filter.parameters?.[0]?.formulaId;break}}}i&&this._fetchDatasetDataItems()}_sendChangeEvent(){this.dispatchEvent(new CustomEvent("filter-changed",{bubbles:!0,composed:!0,cancelable:!0,detail:{filter:this.filter}}))}setFilterDataItem(t){const e=this._type,s=this.filter?.parameters?.[0]?.columnId||this.filter?.parameters?.[0]?.formulaId,i=t.detail?.dataItem?.id;this._type=t.detail?.dataItem?.type,this._subType=t.detail?.dataItem?.subtype,this._isFormula=t.detail?.dataItem?.isFormula;const l=f.getValidExpressions(this._type,this._subType,this._isFormula);this.filter=structuredClone(this.filter??{}),l?.includes(this.filter?.expression)||(this.filter.expression=l?.[0]?.expression),this.filter.parameters=this.filter?.parameters??[],this.filter.parameters[0]={datasetId:t.detail?.dataItem?.datasetId},this._isFormula?this.filter.parameters[0].formulaId=t.detail?.dataItem?.id:this.filter.parameters[0].columnId=t.detail?.dataItem?.id,t.detail?.dataItem?.lowestLevel,e!==this._type?this._type==="hierarchy"?(this.filter.expression="? like ?",this.filter.parameters[1]=""):this._type==="numeric"?(this.filter.expression="? > ?",this.filter.parameters[1]=0):this._type==="datetime"?(this.filter.expression="? < ?",this.filter.parameters[1]=new Date().toISOString()):(this.filter.expression="? is not null",this.filter.parameters=[this.filter.parameters[0]]):s!==i&&this._type==="hierarchy"&&(this.filter.parameters[1]=["? in ?","? not in ?"].includes(this.filter.expression)?[]:""),this._sendChangeEvent()}setFilterExpression(t){const e=structuredClone(this.filter??{}),s=e.expression;if(e.expression=t.detail?.expression,s!==e.expression){if(["? is null","? is not null"].includes(e.expression))e.parameters=[e.parameters[0]];else if(this._type==="datetime")if(["YTD","QTD","MTD","WTD"].includes(e.expression)){const i=t?.detail?.unit;i&&(e.parameters[1]={unit:typeof i=="number"?i:1})}else if(["last_completed","next_full","to_date"].includes(e.expression)){const i=e?.parameters?.[1]?.unit;e.parameters[1]={unit:typeof i=="number"?i:1}}else if(["last_now","last_available","next_now"].includes(e.expression)){const i=e?.parameters?.[1]?.unit,l=e?.parameters?.[1]?.quantity;e.parameters[1]={unit:typeof i=="number"?i:1,quantity:typeof l=="number"?l:1}}else e.parameters[1]=new Date().toISOString();else this._type==="hierarchy"?["? in ?","? not in ?"].includes(e.expression)?["? = ?","? != ?"].includes(s)?e.parameters[1]=e.parameters[1]?[e.parameters[1]]:[]:e.parameters[1]=[]:["? = ?","? != ?"].includes(e.expression)?["? in ?","? not in ?"].includes(s)?e.parameters[1]=Array.isArray(e.parameters[1])&&e.parameters[1][0]?e.parameters[1][0]:"":e.parameters[1]="":e.parameters[1]=["? in ?","? not in ?"].includes(s)?"":e.parameters[1]??"":this._type==="numeric"&&(["? in ?","? not in ?"].includes(e.expression)&&["? in ?","? not in ?"].includes(s)?e.parameters[1]=e.parameters[1]??[]:["? in ?","? not in ?"].includes(e.expression)?e.parameters[1]=[]:e.parameters[1]=["? in ?","? not in ?"].includes(s)?0:e.parameters[1]??0);this.filter=e,this._sendChangeEvent()}}setFilterValue(t){this.filter.parameters[1]=t?.detail?.value,this._sendChangeEvent()}renderDataItemPicker(){return m.html`<luzmo-filter-data-item-picker
|
|
21
21
|
.language=${this.language}
|
|
22
22
|
.contentLanguage=${this.contentLanguage}
|
|
23
23
|
.size=${this.size}
|
|
24
|
-
.dataItemId=${this._loading?"":
|
|
24
|
+
.dataItemId=${this._loading?"":this.filter?.parameters?.[0]?.columnId||this.filter?.parameters?.[0]?.formulaId}
|
|
25
25
|
.datasetsDataItems=${this._datasetsDataItems}
|
|
26
26
|
.invalid=${!!this._error}
|
|
27
27
|
.loading=${this._loading}
|
|
28
28
|
@data-item-selected=${this.setFilterDataItem}
|
|
29
|
-
></luzmo-filter-data-item-picker>`}renderExpressionPicker(){
|
|
29
|
+
></luzmo-filter-data-item-picker>`}renderExpressionPicker(){const t=!this.filter?.parameters?.[0]?.datasetId||!this.filter?.parameters?.[0]?.columnId;return m.html`<luzmo-filter-expression-picker
|
|
30
30
|
.language=${this.language}
|
|
31
31
|
.size=${this.size}
|
|
32
32
|
.type=${this._type}
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
?isFormula=${this._isFormula}
|
|
36
36
|
?disabled=${t}
|
|
37
37
|
@expression-selected=${this.setFilterExpression}
|
|
38
|
-
></luzmo-filter-expression-picker>`}renderValuePicker(){
|
|
38
|
+
></luzmo-filter-expression-picker>`}renderValuePicker(){const t=!this.filter?.parameters?.[0]?.datasetId||!this.filter?.parameters?.[0]?.columnId;return m.html`<luzmo-filter-value-picker
|
|
39
39
|
.apiUrl=${this.apiUrl}
|
|
40
40
|
.authKey=${this.authKey}
|
|
41
41
|
.authToken=${this.authToken}
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
.valueType=${this._type}
|
|
49
49
|
?disabled=${t}
|
|
50
50
|
@filter-value-changed=${this.setFilterValue}
|
|
51
|
-
></luzmo-filter-value-picker>`}render(){return
|
|
52
|
-
${this.renderValuePicker()}`}};
|
|
51
|
+
></luzmo-filter-value-picker>`}render(){return m.html`${this.renderDataItemPicker()} ${this.renderExpressionPicker()}
|
|
52
|
+
${this.renderValuePicker()}`}};r([a.property({type:String,attribute:"api-url",reflect:!0})],exports.LuzmoFilterItem.prototype,"apiUrl",2);r([a.property({type:String,attribute:"auth-key",reflect:!0})],exports.LuzmoFilterItem.prototype,"authKey",2);r([a.property({type:String,attribute:"auth-token",reflect:!0})],exports.LuzmoFilterItem.prototype,"authToken",2);r([a.property({type:Number,attribute:"cache-time",reflect:!0})],exports.LuzmoFilterItem.prototype,"cacheTime",2);r([a.property({type:String,reflect:!0})],exports.LuzmoFilterItem.prototype,"language",2);r([a.property({type:String,reflect:!0})],exports.LuzmoFilterItem.prototype,"contentLanguage",2);r([a.property({type:String,attribute:"time-zone",reflect:!0})],exports.LuzmoFilterItem.prototype,"timeZone",2);r([a.property({type:Array,attribute:"dataset-ids",reflect:!0})],exports.LuzmoFilterItem.prototype,"datasetIds",2);r([a.property({type:Object,reflect:!1})],exports.LuzmoFilterItem.prototype,"filter",2);r([a.state()],exports.LuzmoFilterItem.prototype,"_type",2);r([a.state()],exports.LuzmoFilterItem.prototype,"_subType",2);r([a.state()],exports.LuzmoFilterItem.prototype,"_isFormula",2);r([a.state()],exports.LuzmoFilterItem.prototype,"_error",2);r([a.state()],exports.LuzmoFilterItem.prototype,"_loading",2);r([a.state()],exports.LuzmoFilterItem.prototype,"_datasetsDataItems",2);exports.LuzmoFilterItem=r([d.localized()],exports.LuzmoFilterItem);customElements.get("luzmo-filter-item")||customElements.define("luzmo-filter-item",exports.LuzmoFilterItem);
|