@luzmo/analytics-components-kit 1.0.1-alpha.85 → 1.0.1-alpha.86
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/ai-interaction-textarea.component.ts +2 -0
- package/angular/components/dataset-icon.component.ts +21 -0
- package/angular/components/dataset-selector-row.component.ts +2 -0
- package/angular/esm/components/ai-interaction-textarea.component.d.ts +2 -1
- package/angular/esm/components/ai-interaction-textarea.component.js +7 -2
- package/angular/esm/components/dataset-icon.component.d.ts +9 -0
- package/angular/esm/components/dataset-icon.component.js +36 -0
- package/angular/esm/components/dataset-selector-row.component.d.ts +2 -1
- package/angular/esm/components/dataset-selector-row.component.js +7 -2
- package/angular/esm/index.d.ts +3 -1
- package/angular/esm/index.js +3 -0
- package/angular/esm/types.d.ts +14 -0
- package/angular/index.ts +3 -0
- package/angular/types.ts +13 -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/ai-interaction-textarea.d.ts +7 -1
- package/components/ai-interaction-textarea/index.cjs +32 -28
- package/components/ai-interaction-textarea/index.js +62 -49
- 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-DZDqb3xu.js +139 -0
- package/components/{calculate-data-item-icon-CX4VW9Km.cjs → calculate-data-item-icon-DjW1_RI1.cjs} +1 -1
- 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/dataset-icon.d.ts +45 -0
- package/components/dataset-icon/index.cjs +60 -0
- package/components/dataset-icon/index.d.ts +7 -0
- package/components/dataset-icon/index.js +167 -0
- package/components/dataset-selector-list/dataset-selector-list.d.ts +1 -0
- package/components/dataset-selector-list/index.cjs +10 -8
- package/components/dataset-selector-list/index.js +68 -68
- package/components/dataset-selector-row/dataset-selector-row.d.ts +7 -0
- package/components/dataset-selector-row/index.cjs +21 -18
- package/components/dataset-selector-row/index.js +63 -57
- 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 +8 -8
- package/components/draggable-data-item/index.js +45 -44
- package/components/draggable-data-item-level/index.cjs +11 -11
- package/components/draggable-data-item-level/index.js +92 -89
- 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 +20 -20
- package/components/droppable-slot/index.js +181 -167
- 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-CbNfyZMo.js → en-GB-CEHEs8F2.js} +1 -1
- package/components/{en-GB-CXVKFWyH.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-CuDaWSjr.cjs → get-css-variable-DLiZYZEi.cjs} +2 -2
- package/components/{get-css-variable-DEf4GhTH.js → get-css-variable-YlLiVgo8.js} +4 -4
- package/components/grid/index.cjs +46 -46
- package/components/grid/index.js +1873 -2612
- 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-BPN3bG9X.js +1733 -0
- package/components/{index-BNAmjOkm.cjs → index-BPNsFiyq.cjs} +4 -4
- 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-3WsfvkZF.js → index-Do7O9azB.js} +123 -112
- package/components/{index-BDFBUGBc.js → index-PMDgRSzR.js} +104 -94
- package/components/index-cfj52IbK.cjs +20 -0
- package/components/index.cjs +1 -1
- package/components/index.js +90 -88
- 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-nv7fWEtl.js → set-locale-B-Tz2sdI.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 +65 -64
- 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/{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 +154 -20
- package/index.d.ts +1 -0
- package/package.json +6 -1
- package/types.d.ts +14 -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-C8CbsMQf.js +0 -139
- 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--a5SfjnM.cjs +0 -20
- package/components/en-CtCctD2c.js +0 -1483
- package/components/focusable-QLh-LlNt.cjs +0 -20
- package/components/funnel-chart-options.config-DrP4AFgk.cjs +0 -20
- 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-BGb_wRRW.js +0 -1766
- package/components/index-BUal0r_D.cjs +0 -121
- package/components/index-D1Y5TRsH.cjs +0 -20
- 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
|
@@ -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"});const a=require("@lit/localize");require("@luzmo/lucero/action-button");require("@luzmo/lucero/action-group");require("@luzmo/lucero/field-label");require("@luzmo/lucero/menu");require("@luzmo/lucero/number-field");require("@luzmo/lucero/picker");require("@luzmo/lucero/popover");const _=require("../decompose-numeric-format-B3rVVHpO.cjs"),s=require("lit"),c=require("@luzmo/icons"),$=require("@luzmo/lucero/overlay");require("@luzmo/lucero/tooltip");const f=require("../calculate-data-item-icon-CX4VW9Km.cjs"),y=require("../localize-C4zNlrwK.cjs"),r=require("lit/decorators.js"),D=require("../focusable-QLh-LlNt.cjs"),z=require("../sized-mixin-DcvJLFeo.cjs"),d=require("../set-locale-BRRalqne.cjs"),N=":host .settings-container{display:flex;flex-direction:column;gap:var(--luzmo-display-settings-vertical-gap, var(--luzmo-spacing-2))}:host .settings-row{display:flex;justify-content:flex-start;align-items:center;gap:var(--luzmo-display-settings-numeric-gap, var(--display-settings-numeric-gap))}.duration-angle-down-icon{margin-inline-start:var(--luzmo-numeric-duration-levels-dropdown-icon-margin-inline-start, var(--numeric-duration-levels-dropdown-icon-margin-inline-start))}.dataset-header{max-width:100%;font-weight:600;text-transform:uppercase;margin:.5rem 1rem;color:var(--luzmo-font-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:default}.no-weight-label{margin-left:1rem}.with-secondary-icon{clip-path:polygon(0 0,60% 0,65% 60%,100% 65%,100% 100%,0 100%)}.secondary-icon{position:absolute;bottom:45%;left:60%;width:auto;font-size:.75em;line-height:1}.data-icon-type{width:1.5rem;text-align:center;position:relative;display:inline-block}:host{--display-settings-numeric-gap: var(--luzmo-spacing-3);--numeric-duration-levels-dropdown-icon-margin-inline-start: var( --luzmo-spacing-2 )}:host([size=s]){--display-settings-numeric-gap: var(--luzmo-spacing-3);--numeric-duration-levels-dropdown-icon-margin-inline-start: var( --luzmo-spacing-1 )}:host([size=l]){--display-settings-numeric-gap: var(--luzmo-spacing-4);--numeric-duration-levels-dropdown-icon-margin-inline-start: var( --luzmo-spacing-3 )}:host([size=xl]){--display-settings-numeric-gap: var(--luzmo-spacing-5);--numeric-duration-levels-dropdown-icon-margin-inline-start: var( --luzmo-spacing-4 )}",w={sum:()=>a.msg("Sum",{desc:"Numeric Aggregation option"}),cumulativesum:()=>a.msg("Cumulative sum",{desc:"Numeric Aggregation option"}),average:()=>a.msg("Average",{desc:"Numeric Aggregation option"}),median:()=>a.msg("Median",{desc:"Numeric Aggregation option"}),count:()=>a.msg("Count rows",{desc:"Numeric Aggregation option"}),distinctcount:()=>a.msg("Count distinct",{desc:"Numeric Aggregation option"}),min:()=>a.msg("Minimum",{desc:"Numeric Aggregation option"}),max:()=>a.msg("Maximum",{desc:"Numeric Aggregation option"}),stddev:()=>a.msg("Standard deviation",{desc:"Numeric Aggregation option"}),rate:()=>a.msg("Rate",{desc:"Numeric Aggregation option"})},b={general:"123",percentage:"%",scientific:"SI"},L={time:()=>a.msg("Time",{desc:"Time format option"}),short:()=>a.msg("Short",{desc:"Short format option"}),long:()=>a.msg("Long",{desc:"Long format option"})},S={Auto:{auto:!0,label:()=>a.msg("Auto",{desc:"Automatic setting of the option"})},"1,000.00":{auto:!1,label:()=>"1,000.00",thousandSeparator:",",decimalSeparator:".",hiddenFor:"scientific"},"1.000,00":{auto:!1,label:()=>"1.000,00",thousandSeparator:".",decimalSeparator:",",hiddenFor:"scientific"},"1000.00":{auto:!1,label:()=>"1000.00",decimalSeparator:"."},"1000,00":{auto:!1,label:()=>"1000,00",decimalSeparator:","}},C={levels:[{level:1,label:"years"},{level:2,label:"quarters"},{level:3,label:"months"},{level:4,label:"weeks"},{level:5,label:"days"},{level:6,label:"hours"},{level:7,label:"minutes"},{level:8,label:"seconds"},{level:9,label:"milliseconds"}]};var q=Object.defineProperty,E=Object.getOwnPropertyDescriptor,n=(g,e,t,i)=>{for(var o=i>1?void 0:i?E(e,t):e,l=g.length-1,u;l>=0;l--)(u=g[l])&&(o=(i?u(e,t,o):u(o))||o);return i&&o&&q(e,t,o),o};exports.LuzmoDisplaySettingsNumeric=class extends z.SizedMixin(D.LuzmoElement,{validSizes:Object.values(z.ElementSizes)}){constructor(){super(...arguments),this.language="en",this.slotContent={},this.measureColumns=[],this._durationLevels=[],this._renderDurationLevelMenu=!1,this._sendEvent=()=>{const e={...this.slotContent};e.format=this._format,e.aggregationFunc=this._aggregationFunc,this._aggregationWeightColumn?e.aggregationWeight={...this._aggregationWeightColumn}:delete e.aggregationWeight,this._displayMode==="duration"?(e.duration=e.duration??{},e.duration.format=this._durationFormat,e.duration.levels=this._durationLevels):delete e.duration,this.dispatchEvent(new CustomEvent("slot-content-changed",{bubbles:!0,composed:!0,cancelable:!0,detail:{slotContent:e}}))}}static get styles(){return[s.unsafeCSS(N)]}_parseSavedNumericFormatSettings(){if(this._displayMode=this.slotContent?.subtype==="duration"?"duration":"numeric",this._durationFormat=this.slotContent?.duration?.format??"short",this._durationLevels=this.slotContent?.duration?.levels??[1],this._displayMode==="duration")this._precision=2,this._commaDecimals=!1,this._thousandSeparator=!1;else{this._format=this.slotContent?.format??".0f";const e=_.decomposeNumericFormat(this._format??".0f");this._isAuto=e.typeFormat?.includes("a")??!1,["%","a%","y","ay"].includes(e.typeFormat)?this._displayAs="percentage":["s","as","w","aw"].includes(e.typeFormat)?this._displayAs="scientific":this._displayAs="general",this._precision=e.precision?Number.parseInt(e.precision.replace(".",""),10):this._displayAs==="scientific"?1:0,this._commaDecimals=["z","az","y","ay","w","aw"].includes(e.typeFormat),this._thousandSeparator=e.comma===",",this._isAuto?this._numericFormatGroup="Auto":this._commaDecimals&&this._thousandSeparator?this._numericFormatGroup="1.000,00":!this._commaDecimals&&this._thousandSeparator?this._numericFormatGroup="1,000.00":this._commaDecimals&&!this._thousandSeparator?this._numericFormatGroup="1000,00":!this._commaDecimals&&!this._thousandSeparator&&(this._numericFormatGroup="1000.00")}}_setNumericDisplayAs(){this._displayAs=this._displayAsElement?.selected?.[0]??"general",this._displayAs==="scientific"&&(this._precision=Math.max(this._precision??0,1),this._thousandSeparator=!1),this._setNumericFormat(),this._sendEvent(),this.requestUpdate()}_setNumericSeparators(e){const t=S[e?.detail??"Auto"];this._thousandSeparator=[",","."].includes(t?.thousandSeparator??""),this._commaDecimals=t?.decimalSeparator===",",this._isAuto=t?.auto,this._setNumericFormat(),this._sendEvent()}_setPrecision(){this._precision=this._precisionElement.value,this._setNumericFormat(),this._sendEvent()}_setNumericFormat(){let e="f";const t=this.slotContent.subtype==="duration"?this._durationLevels&&this._durationLevels?.length===1?"numeric":"duration":"numeric";this._maxDurationLevel=Math.min(...this._durationLevels),t==="duration"?(!["time","short","long"].includes(this._durationFormat??"")||this._maxDurationLevel<6&&this._durationFormat==="time")&&(this._durationFormat="short"):(this._displayAs==="general"&&this._commaDecimals?e="z":this._displayAs==="percentage"&&this._commaDecimals?e="y":this._displayAs==="scientific"&&this._commaDecimals?e="w":this._displayAs==="percentage"?e="%":this._displayAs==="scientific"&&(e="s"),this._format=(this._thousandSeparator||this._isAuto?",":"")+"."+this._precision+(this._isAuto?"a":"")+e)}_setAggregationFunc(){const e=this._aggregationElement.value,t=this._aggregationFunc,i=this.slotContent.format;if(e!==(t==="weightedaverage"?"average":t)){if(this._aggregationFunc=e==="average"&&this._aggregationWeightColumn?.column?"weightedaverage":e,t==="rate"){const l=_.decomposeNumericFormat(i),u=["%","y","a%","ay"].includes(l.typeFormat);this.slotContent.subtype==="currency"&&u&&this._setNumericDisplayAs()}this._sendEvent(),(this._aggregationFunc==="rate"||t==="rate")&&this.requestUpdate()}}_setAggregationWeight(){const e=this._aggregationWeightElement.value,t=this._aggregationFunc;if(e==="none")this._aggregationWeightColumn=void 0,this._aggregationFunc==="weightedaverage"&&(this._aggregationFunc="average");else{let i,o;for(const l of this.measureColumns??[]){const u=l.columns?.find(m=>m.id===e);if(u){i=u,o=l.datasetId;break}}i&&(this._aggregationWeightColumn={column:i.id,set:o,columnSubType:i.subtype}),this._aggregationFunc==="average"&&(this._aggregationFunc="weightedaverage")}this._sendEvent(),this.requestUpdate(),(t==="weightedaverage"&&this._aggregationFunc==="average"||t==="average"&&this._aggregationFunc==="weightedaverage")&&this.requestUpdate()}_setDurationLevels(){const e=this._durationLevels,t=this._durationLevelsElement.value.split(",").filter(i=>i!=="").map(i=>Number.parseInt(i,10));this._durationLevels=(t?.length??0)>=1?t:e,this._maxDurationLevel=Math.min(...this._durationLevels),this._fillTimeDurationLevels(),this._setNumericFormat(),this._sendEvent(),this.requestUpdate()}_setDurationFormat(){this._durationFormat=this._durationFormatElement?.selected?.[0],this._fillTimeDurationLevels(),this._setNumericFormat(),this._sendEvent(),this.requestUpdate()}_fillTimeDurationLevels(){if(this._durationFormat==="time"){const e=this._durationLevels.sort().at(-1);if([7,8,9].includes(e)){const t={lev7:[6],lev8:[6,7],lev9:[6,7,8]};for(const i of t["lev"+e])this._durationLevels.includes(i)||this._durationLevels.push(i);this._durationLevels=[...this._durationLevels].sort()}}}willUpdate(e){e.has("slotContent")&&(this._parseSavedNumericFormatSettings(),this._aggregationFunc=this.slotContent?.aggregationFunc??(this.slotContent?.type==="numeric"?"sum":"count"),this._aggregationWeightColumn=this.slotContent?.aggregationWeight,this._isFormula=this.slotContent?.formula||this.slotContent?.formulaId),e.has("language")&&this.language!==d.getLocale()&&([...d.targetLocales].includes(this.language??"en")||this.language==="en")&&d.setLocale(this.language)}firstUpdated(){this.slotContent?.duration&&this._durationLevelsOverlay.addEventListener("slottable-request",e=>{this._renderDurationLevelMenu=e.data!==$.removeSlottableRequest})}_renderDurationLevelsSettings(){const e=C.levels.map(t=>{let i=!1;return this._durationFormat==="time"&&t.level>=6&&this._durationLevels.includes(t.level)&&t.level!==Math.max(...this._durationLevels)&&(i=!0),this._durationLevels.length===1&&this._durationLevels.includes(t.level)&&(i=!0),s.html`<luzmo-menu-item
|
|
21
|
-
value=${
|
|
22
|
-
?selected=${this._durationLevels.includes(
|
|
20
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("@lit/localize");require("@luzmo/lucero/action-button");require("@luzmo/lucero/action-group");require("@luzmo/lucero/field-label");require("@luzmo/lucero/menu");require("@luzmo/lucero/number-field");require("@luzmo/lucero/picker");require("@luzmo/lucero/popover");const f=require("../decompose-numeric-format-B3rVVHpO.cjs"),o=require("lit"),g=require("@luzmo/icons"),D=require("@luzmo/lucero/overlay");require("@luzmo/lucero/tooltip");const y=require("../calculate-data-item-icon-DjW1_RI1.cjs"),z=require("../localize-r7ALOUy_.cjs"),m=require("lit/decorators.js"),N=require("../focusable-B3E_hQmm.cjs"),b=require("../sized-mixin-DcvJLFeo.cjs"),h=require("../set-locale-BRRalqne.cjs"),w=":host .settings-container{display:flex;flex-direction:column;gap:var(--luzmo-display-settings-vertical-gap, var(--luzmo-spacing-2))}:host .settings-row{display:flex;justify-content:flex-start;align-items:center;gap:var(--luzmo-display-settings-numeric-gap, var(--display-settings-numeric-gap))}.duration-angle-down-icon{margin-inline-start:var(--luzmo-numeric-duration-levels-dropdown-icon-margin-inline-start, var(--numeric-duration-levels-dropdown-icon-margin-inline-start))}.dataset-header{max-width:100%;font-weight:600;text-transform:uppercase;margin:.5rem 1rem;color:var(--luzmo-font-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:default}.no-weight-label{margin-left:1rem}.with-secondary-icon{clip-path:polygon(0 0,60% 0,65% 60%,100% 65%,100% 100%,0 100%)}.secondary-icon{position:absolute;bottom:45%;left:60%;width:auto;font-size:.75em;line-height:1}.data-icon-type{width:1.5rem;text-align:center;position:relative;display:inline-block}:host{--display-settings-numeric-gap: var(--luzmo-spacing-3);--numeric-duration-levels-dropdown-icon-margin-inline-start: var( --luzmo-spacing-2 )}:host([size=s]){--display-settings-numeric-gap: var(--luzmo-spacing-3);--numeric-duration-levels-dropdown-icon-margin-inline-start: var( --luzmo-spacing-1 )}:host([size=l]){--display-settings-numeric-gap: var(--luzmo-spacing-4);--numeric-duration-levels-dropdown-icon-margin-inline-start: var( --luzmo-spacing-3 )}:host([size=xl]){--display-settings-numeric-gap: var(--luzmo-spacing-5);--numeric-duration-levels-dropdown-icon-margin-inline-start: var( --luzmo-spacing-4 )}",C={sum:()=>n.msg("Sum",{desc:"Numeric Aggregation option"}),cumulativesum:()=>n.msg("Cumulative sum",{desc:"Numeric Aggregation option"}),average:()=>n.msg("Average",{desc:"Numeric Aggregation option"}),median:()=>n.msg("Median",{desc:"Numeric Aggregation option"}),count:()=>n.msg("Count rows",{desc:"Numeric Aggregation option"}),distinctcount:()=>n.msg("Count distinct",{desc:"Numeric Aggregation option"}),min:()=>n.msg("Minimum",{desc:"Numeric Aggregation option"}),max:()=>n.msg("Maximum",{desc:"Numeric Aggregation option"}),stddev:()=>n.msg("Standard deviation",{desc:"Numeric Aggregation option"}),rate:()=>n.msg("Rate",{desc:"Numeric Aggregation option"})},L={general:"123",percentage:"%",scientific:"SI"},S={time:()=>n.msg("Time",{desc:"Time format option"}),short:()=>n.msg("Short",{desc:"Short format option"}),long:()=>n.msg("Long",{desc:"Long format option"})},A={Auto:{auto:!0,label:()=>n.msg("Auto",{desc:"Automatic setting of the option"})},"1,000.00":{auto:!1,label:()=>"1,000.00",thousandSeparator:",",decimalSeparator:".",hiddenFor:"scientific"},"1.000,00":{auto:!1,label:()=>"1.000,00",thousandSeparator:".",decimalSeparator:",",hiddenFor:"scientific"},"1000.00":{auto:!1,label:()=>"1000.00",decimalSeparator:"."},"1000,00":{auto:!1,label:()=>"1000,00",decimalSeparator:","}},q={levels:[{level:1,label:"years"},{level:2,label:"quarters"},{level:3,label:"months"},{level:4,label:"weeks"},{level:5,label:"days"},{level:6,label:"hours"},{level:7,label:"minutes"},{level:8,label:"seconds"},{level:9,label:"milliseconds"}]};var E=Object.defineProperty,I=Object.getOwnPropertyDescriptor,u=(d,t,e,i)=>{for(var s=i>1?void 0:i?I(t,e):t,a=d.length-1,r;a>=0;a--)(r=d[a])&&(s=(i?r(t,e,s):r(s))||s);return i&&s&&E(t,e,s),s};exports.LuzmoDisplaySettingsNumeric=class extends b.SizedMixin(N.LuzmoElement,{validSizes:Object.values(b.ElementSizes)}){constructor(){super(...arguments),this.language="en",this.slotContent={},this.measureColumns=[],this._durationLevels=[],this._renderDurationLevelMenu=!1,this._sendEvent=()=>{const t={...this.slotContent};t.format=this._format,t.aggregationFunc=this._aggregationFunc,this._aggregationWeightColumn?t.aggregationWeight={...this._aggregationWeightColumn}:delete t.aggregationWeight,this._displayMode==="duration"?(t.duration=t.duration??{},t.duration.format=this._durationFormat,t.duration.levels=this._durationLevels):delete t.duration,this.dispatchEvent(new CustomEvent("slot-content-changed",{bubbles:!0,composed:!0,cancelable:!0,detail:{slotContent:t}}))}}static get styles(){return[o.unsafeCSS(w)]}_parseSavedNumericFormatSettings(){var t,e,i,s,a,r,c;if(this._displayMode=((t=this.slotContent)==null?void 0:t.subtype)==="duration"?"duration":"numeric",this._durationFormat=((i=(e=this.slotContent)==null?void 0:e.duration)==null?void 0:i.format)??"short",this._durationLevels=((a=(s=this.slotContent)==null?void 0:s.duration)==null?void 0:a.levels)??[1],this._displayMode==="duration")this._precision=2,this._commaDecimals=!1,this._thousandSeparator=!1;else{this._format=((r=this.slotContent)==null?void 0:r.format)??".0f";const l=f.decomposeNumericFormat(this._format??".0f");this._isAuto=((c=l.typeFormat)==null?void 0:c.includes("a"))??!1,["%","a%","y","ay"].includes(l.typeFormat)?this._displayAs="percentage":["s","as","w","aw"].includes(l.typeFormat)?this._displayAs="scientific":this._displayAs="general",this._precision=l.precision?Number.parseInt(l.precision.replace(".",""),10):this._displayAs==="scientific"?1:0,this._commaDecimals=["z","az","y","ay","w","aw"].includes(l.typeFormat),this._thousandSeparator=l.comma===",",this._isAuto?this._numericFormatGroup="Auto":this._commaDecimals&&this._thousandSeparator?this._numericFormatGroup="1.000,00":!this._commaDecimals&&this._thousandSeparator?this._numericFormatGroup="1,000.00":this._commaDecimals&&!this._thousandSeparator?this._numericFormatGroup="1000,00":!this._commaDecimals&&!this._thousandSeparator&&(this._numericFormatGroup="1000.00")}}_setNumericDisplayAs(){var t,e;this._displayAs=((e=(t=this._displayAsElement)==null?void 0:t.selected)==null?void 0:e[0])??"general",this._displayAs==="scientific"&&(this._precision=Math.max(this._precision??0,1),this._thousandSeparator=!1),this._setNumericFormat(),this._sendEvent(),this.requestUpdate()}_setNumericSeparators(t){const e=A[(t==null?void 0:t.detail)??"Auto"];this._thousandSeparator=[",","."].includes((e==null?void 0:e.thousandSeparator)??""),this._commaDecimals=(e==null?void 0:e.decimalSeparator)===",",this._isAuto=e==null?void 0:e.auto,this._setNumericFormat(),this._sendEvent()}_setPrecision(){this._precision=this._precisionElement.value,this._setNumericFormat(),this._sendEvent()}_setNumericFormat(){var i;let t="f";const e=this.slotContent.subtype==="duration"?this._durationLevels&&((i=this._durationLevels)==null?void 0:i.length)===1?"numeric":"duration":"numeric";this._maxDurationLevel=Math.min(...this._durationLevels),e==="duration"?(!["time","short","long"].includes(this._durationFormat??"")||this._maxDurationLevel<6&&this._durationFormat==="time")&&(this._durationFormat="short"):(this._displayAs==="general"&&this._commaDecimals?t="z":this._displayAs==="percentage"&&this._commaDecimals?t="y":this._displayAs==="scientific"&&this._commaDecimals?t="w":this._displayAs==="percentage"?t="%":this._displayAs==="scientific"&&(t="s"),this._format=(this._thousandSeparator||this._isAuto?",":"")+"."+this._precision+(this._isAuto?"a":"")+t)}_setAggregationFunc(){var a;const t=this._aggregationElement.value,e=this._aggregationFunc,i=this.slotContent.format;if(t!==(e==="weightedaverage"?"average":e)){if(this._aggregationFunc=t==="average"&&((a=this._aggregationWeightColumn)!=null&&a.column)?"weightedaverage":t,e==="rate"){const r=f.decomposeNumericFormat(i),c=["%","y","a%","ay"].includes(r.typeFormat);this.slotContent.subtype==="currency"&&c&&this._setNumericDisplayAs()}this._sendEvent(),(this._aggregationFunc==="rate"||e==="rate")&&this.requestUpdate()}}_setAggregationWeight(){var i;const t=this._aggregationWeightElement.value,e=this._aggregationFunc;if(t==="none")this._aggregationWeightColumn=void 0,this._aggregationFunc==="weightedaverage"&&(this._aggregationFunc="average");else{let s,a;for(const r of this.measureColumns??[]){const c=(i=r.columns)==null?void 0:i.find(l=>l.id===t);if(c){s=c,a=r.datasetId;break}}s&&(this._aggregationWeightColumn={column:s.id,set:a,columnSubType:s.subtype}),this._aggregationFunc==="average"&&(this._aggregationFunc="weightedaverage")}this._sendEvent(),this.requestUpdate(),(e==="weightedaverage"&&this._aggregationFunc==="average"||e==="average"&&this._aggregationFunc==="weightedaverage")&&this.requestUpdate()}_setDurationLevels(){const t=this._durationLevels,e=this._durationLevelsElement.value.split(",").filter(i=>i!=="").map(i=>Number.parseInt(i,10));this._durationLevels=((e==null?void 0:e.length)??0)>=1?e:t,this._maxDurationLevel=Math.min(...this._durationLevels),this._fillTimeDurationLevels(),this._setNumericFormat(),this._sendEvent(),this.requestUpdate()}_setDurationFormat(){var t,e;this._durationFormat=(e=(t=this._durationFormatElement)==null?void 0:t.selected)==null?void 0:e[0],this._fillTimeDurationLevels(),this._setNumericFormat(),this._sendEvent(),this.requestUpdate()}_fillTimeDurationLevels(){if(this._durationFormat==="time"){const t=this._durationLevels.sort().at(-1);if([7,8,9].includes(t)){const e={lev7:[6],lev8:[6,7],lev9:[6,7,8]};for(const i of e["lev"+t])this._durationLevels.includes(i)||this._durationLevels.push(i);this._durationLevels=[...this._durationLevels].sort()}}}willUpdate(t){var e,i,s,a,r;t.has("slotContent")&&(this._parseSavedNumericFormatSettings(),this._aggregationFunc=((e=this.slotContent)==null?void 0:e.aggregationFunc)??(((i=this.slotContent)==null?void 0:i.type)==="numeric"?"sum":"count"),this._aggregationWeightColumn=(s=this.slotContent)==null?void 0:s.aggregationWeight,this._isFormula=((a=this.slotContent)==null?void 0:a.formula)||((r=this.slotContent)==null?void 0:r.formulaId)),t.has("language")&&this.language!==h.getLocale()&&([...h.targetLocales].includes(this.language??"en")||this.language==="en")&&h.setLocale(this.language)}firstUpdated(){var t;(t=this.slotContent)!=null&&t.duration&&this._durationLevelsOverlay.addEventListener("slottable-request",e=>{this._renderDurationLevelMenu=e.data!==D.removeSlottableRequest})}_renderDurationLevelsSettings(){const t=q.levels.map(e=>{let i=!1;return this._durationFormat==="time"&&e.level>=6&&this._durationLevels.includes(e.level)&&e.level!==Math.max(...this._durationLevels)&&(i=!0),this._durationLevels.length===1&&this._durationLevels.includes(e.level)&&(i=!0),o.html`<luzmo-menu-item
|
|
21
|
+
value=${e.level}
|
|
22
|
+
?selected=${this._durationLevels.includes(e.level)}
|
|
23
23
|
?disabled=${i}
|
|
24
24
|
>
|
|
25
|
-
${
|
|
26
|
-
</luzmo-menu-item>`});return
|
|
25
|
+
${e.label}
|
|
26
|
+
</luzmo-menu-item>`});return o.html` <div class="setting">
|
|
27
27
|
<luzmo-field-label for="duration-levels">
|
|
28
|
-
${
|
|
28
|
+
${n.msg("Duration levels",{desc:"Label for duration levels setting"})}
|
|
29
29
|
</luzmo-field-label>
|
|
30
30
|
<luzmo-action-button id="duration-levels-trigger" size=${this.size}>
|
|
31
31
|
${this._durationLevels.length}
|
|
32
32
|
${this._durationLevels.length===1?"level":"levels"} active
|
|
33
33
|
<span class="duration-angle-down-icon">
|
|
34
|
-
${
|
|
34
|
+
${g.luzmoIcon(g.luzmoAngleDown)}
|
|
35
35
|
</span>
|
|
36
36
|
</luzmo-action-button>
|
|
37
37
|
<luzmo-overlay
|
|
@@ -42,22 +42,22 @@
|
|
|
42
42
|
type="page"
|
|
43
43
|
>
|
|
44
44
|
<luzmo-popover style="position: relative">
|
|
45
|
-
${this._renderDurationLevelMenu?
|
|
45
|
+
${this._renderDurationLevelMenu?o.html` <luzmo-menu
|
|
46
46
|
id="duration-levels"
|
|
47
47
|
size=${this.size}
|
|
48
48
|
selects="multiple"
|
|
49
49
|
.value=${this._durationLevels.join(",")}
|
|
50
50
|
@change=${this._setDurationLevels}
|
|
51
51
|
>
|
|
52
|
-
${
|
|
52
|
+
${t}
|
|
53
53
|
</luzmo-menu>`:""}
|
|
54
54
|
</luzmo-popover>
|
|
55
55
|
</luzmo-overlay>
|
|
56
|
-
</div>`}_renderDurationFormatSettings(){const
|
|
57
|
-
${
|
|
58
|
-
</luzmo-action-button>`);return
|
|
56
|
+
</div>`}_renderDurationFormatSettings(){const t=Object.keys(S).map(e=>e==="time"&&(this._maxDurationLevel??1)<6?"":o.html`<luzmo-action-button value=${e}>
|
|
57
|
+
${S[e]()}
|
|
58
|
+
</luzmo-action-button>`);return o.html` <div class="setting">
|
|
59
59
|
<luzmo-field-label for="duration-format">
|
|
60
|
-
${
|
|
60
|
+
${n.msg("Format",{desc:"Label for format setting"})}
|
|
61
61
|
</luzmo-field-label>
|
|
62
62
|
<luzmo-action-group
|
|
63
63
|
emphasized
|
|
@@ -68,13 +68,13 @@
|
|
|
68
68
|
selects="single"
|
|
69
69
|
@change=${this._setDurationFormat}
|
|
70
70
|
>
|
|
71
|
-
${
|
|
71
|
+
${t}
|
|
72
72
|
</luzmo-action-group>
|
|
73
|
-
</div>`}_renderNumericDisplayAsSettings(){const
|
|
74
|
-
>${
|
|
75
|
-
>`);return
|
|
73
|
+
</div>`}_renderNumericDisplayAsSettings(){const t=Object.keys(L).filter(e=>{var i;return e!=="percentage"||(this.slotContent.subtype!=="currency"||this.slotContent.aggregationFunc==="rate")&&((i=this.slotContent.periodOverPeriod)==null?void 0:i.type)!=="percentageChange"}).map(e=>o.html`<luzmo-action-button value=${e}
|
|
74
|
+
>${L[e]}</luzmo-action-button
|
|
75
|
+
>`);return o.html`<div class="setting">
|
|
76
76
|
<luzmo-field-label for="display-as">
|
|
77
|
-
${
|
|
77
|
+
${n.msg("Display as",{desc:"Label for display as setting for the datetime field"})}
|
|
78
78
|
</luzmo-field-label>
|
|
79
79
|
<luzmo-action-group
|
|
80
80
|
emphasized
|
|
@@ -85,11 +85,11 @@
|
|
|
85
85
|
selects="single"
|
|
86
86
|
@change=${this._setNumericDisplayAs}
|
|
87
87
|
>
|
|
88
|
-
${
|
|
88
|
+
${t}
|
|
89
89
|
</luzmo-action-group>
|
|
90
|
-
</div>`}_renderNumericFormatSettings(){const
|
|
90
|
+
</div>`}_renderNumericFormatSettings(){const t=Object.entries(A).filter(([,{hiddenFor:e}])=>!e||e!==this._displayAs).map(([e,{label:i}])=>o.html`<luzmo-menu-item value=${e}>${i()}</luzmo-menu-item>`);return o.html` <div class="setting">
|
|
91
91
|
<luzmo-field-label for="format">
|
|
92
|
-
${
|
|
92
|
+
${n.msg("Format",{desc:"Label for format setting"})}
|
|
93
93
|
</luzmo-field-label>
|
|
94
94
|
<luzmo-picker
|
|
95
95
|
id="format"
|
|
@@ -98,12 +98,12 @@
|
|
|
98
98
|
value=${this._numericFormatGroup??"Auto"}
|
|
99
99
|
@change=${this._setNumericSeparators}
|
|
100
100
|
>
|
|
101
|
-
${
|
|
101
|
+
${t}
|
|
102
102
|
</luzmo-picker>
|
|
103
103
|
</div>
|
|
104
104
|
<div class="setting">
|
|
105
105
|
<luzmo-field-label for="precision" id="precision-label">
|
|
106
|
-
${this._displayAs==="scientific"?
|
|
106
|
+
${this._displayAs==="scientific"?n.msg("Precision",{desc:"Label for precision setting"}):n.msg("Decimals",{desc:"Label for decimals setting"})}
|
|
107
107
|
</luzmo-field-label>
|
|
108
108
|
<luzmo-number-field
|
|
109
109
|
id="precision"
|
|
@@ -113,57 +113,57 @@
|
|
|
113
113
|
value=${this._precision??(this._displayAs==="scientific"?1:0)}
|
|
114
114
|
@change=${this._setPrecision}
|
|
115
115
|
></luzmo-number-field>
|
|
116
|
-
</div>`}_renderAggregationSettings(){const
|
|
116
|
+
</div>`}_renderAggregationSettings(){var i;const t=Object.entries(C).filter(([s])=>{var a;return["count","distinctcount"].includes(s)||((a=this.slotContent)==null?void 0:a.type)==="numeric"}).filter(([s])=>s!=="cumulativesum"||this.isCumulativeSumEnabled).map(([s,a])=>o.html`<luzmo-menu-item value=${s}>${a()}</luzmo-menu-item>`),e=[o.html`<luzmo-menu-item value="none" class="no-weight">
|
|
117
117
|
<span class="no-weight-label">No weight</span>
|
|
118
|
-
</luzmo-menu-item>`,...(this.measureColumns??[]).flatMap(
|
|
119
|
-
${
|
|
118
|
+
</luzmo-menu-item>`,...(this.measureColumns??[]).flatMap(s=>{const a=typeof s.datasetName=="object"?z.localize(s.datasetName,this.language):s.datasetName,r=o.html`<div class="dataset-header">
|
|
119
|
+
${a}
|
|
120
120
|
<luzmo-tooltip self-managed placement="right" size=${this.size}>
|
|
121
|
-
${
|
|
121
|
+
${a}
|
|
122
122
|
</luzmo-tooltip>
|
|
123
|
-
</div>`,
|
|
124
|
-
>${
|
|
125
|
-
>`:
|
|
123
|
+
</div>`,c=(s.columns??[]).map(l=>{const p=typeof l.name=="object"?z.localize(l.name,this.language):l.name,F=g.luzmoIcon(y.calculateDataItemIcon(l,"s")),v=l.expression?y.calculateDataItemSecondaryIcon("derived","s"):void 0,_=!!v,$=_?o.html`<span class="secondary-icon"
|
|
124
|
+
>${g.luzmoIcon(v)}</span
|
|
125
|
+
>`:o.nothing;return o.html`<luzmo-menu-item value=${l.id}>
|
|
126
126
|
<span class="data-icon-type" slot="icon">
|
|
127
|
-
<span class=${
|
|
128
|
-
>${
|
|
127
|
+
<span class=${_?"with-secondary-icon":""}
|
|
128
|
+
>${F}</span
|
|
129
129
|
>
|
|
130
|
-
${
|
|
130
|
+
${$}
|
|
131
131
|
</span>
|
|
132
|
-
<span class="column-label text-truncate">${
|
|
132
|
+
<span class="column-label text-truncate">${p}</span>
|
|
133
133
|
<luzmo-tooltip self-managed placement="right" size=${this.size}>
|
|
134
|
-
${
|
|
134
|
+
${p}
|
|
135
135
|
</luzmo-tooltip>
|
|
136
|
-
</luzmo-menu-item>`});return[
|
|
136
|
+
</luzmo-menu-item>`});return[r,...c]})];return o.html`<div class="settings-row">
|
|
137
137
|
<div class="setting">
|
|
138
138
|
<luzmo-field-label for="aggregation">
|
|
139
|
-
${
|
|
139
|
+
${n.msg("Aggregation",{desc:"Label for aggregation setting"})}
|
|
140
140
|
</luzmo-field-label>
|
|
141
141
|
<luzmo-picker
|
|
142
142
|
id="aggregation"
|
|
143
143
|
size=${this.size}
|
|
144
144
|
variant="highlight"
|
|
145
|
-
value=${(()=>{const
|
|
145
|
+
value=${(()=>{var a;const s=((a=this.slotContent)==null?void 0:a.type)==="numeric"?"sum":"count";return this._aggregationFunc==="weightedaverage"?"average":this._aggregationFunc??s})()}
|
|
146
146
|
@change=${this._setAggregationFunc}
|
|
147
147
|
>
|
|
148
|
-
${
|
|
148
|
+
${t}
|
|
149
149
|
</luzmo-picker>
|
|
150
150
|
</div>
|
|
151
|
-
${["rate","average","weightedaverage"].includes(this._aggregationFunc??"")?
|
|
151
|
+
${["rate","average","weightedaverage"].includes(this._aggregationFunc??"")?o.html`<div class="setting">
|
|
152
152
|
<luzmo-field-label for="weighting-column">
|
|
153
153
|
${this._aggregationFunc==="rate"?"Denominator":"Weight"}
|
|
154
154
|
</luzmo-field-label>
|
|
155
|
-
${this.measureColumns.length>0?
|
|
155
|
+
${this.measureColumns.length>0?o.html`
|
|
156
156
|
<luzmo-picker
|
|
157
157
|
id="weighting-column"
|
|
158
158
|
size=${this.size}
|
|
159
159
|
variant="highlight"
|
|
160
160
|
icons="none"
|
|
161
|
-
value=${this._aggregationWeightColumn
|
|
161
|
+
value=${((i=this._aggregationWeightColumn)==null?void 0:i.column)??"none"}
|
|
162
162
|
@change=${this._setAggregationWeight}
|
|
163
163
|
>
|
|
164
|
-
${
|
|
164
|
+
${e}
|
|
165
165
|
</luzmo-picker>
|
|
166
|
-
`:
|
|
166
|
+
`:o.html`<luzmo-picker
|
|
167
167
|
id="weighting-column"
|
|
168
168
|
size=${this.size}
|
|
169
169
|
variant="highlight"
|
|
@@ -173,11 +173,11 @@
|
|
|
173
173
|
<luzmo-menu-item value="none">No weight</luzmo-menu-item>
|
|
174
174
|
</luzmo-picker>`}
|
|
175
175
|
</div>`:""}
|
|
176
|
-
</div>`}render(){return
|
|
176
|
+
</div>`}render(){var t;return o.html`<div class="settings-container">
|
|
177
177
|
<div class="settings-row">
|
|
178
178
|
${this._displayMode==="duration"?this._renderDurationLevelsSettings():this._renderNumericDisplayAsSettings()}
|
|
179
|
-
${this._durationLevels
|
|
179
|
+
${((t=this._durationLevels)==null?void 0:t.length)>1?this._renderDurationFormatSettings():this._renderNumericFormatSettings()}
|
|
180
180
|
</div>
|
|
181
|
-
${this._isFormula||this.isAggregationDisabled?
|
|
181
|
+
${this._isFormula||this.isAggregationDisabled?o.nothing:this._renderAggregationSettings()}
|
|
182
182
|
</div>
|
|
183
|
-
</div>`}};
|
|
183
|
+
</div>`}};u([m.property({type:String,reflect:!0})],exports.LuzmoDisplaySettingsNumeric.prototype,"language",2);u([m.property({type:Object,reflect:!0})],exports.LuzmoDisplaySettingsNumeric.prototype,"slotContent",2);u([m.property({type:Array,reflect:!1})],exports.LuzmoDisplaySettingsNumeric.prototype,"measureColumns",2);u([m.property({type:Boolean})],exports.LuzmoDisplaySettingsNumeric.prototype,"isAggregationDisabled",2);u([m.property({type:Boolean})],exports.LuzmoDisplaySettingsNumeric.prototype,"isCumulativeSumEnabled",2);u([m.query("#display-as")],exports.LuzmoDisplaySettingsNumeric.prototype,"_displayAsElement",2);u([m.query("#precision")],exports.LuzmoDisplaySettingsNumeric.prototype,"_precisionElement",2);u([m.query("#aggregation")],exports.LuzmoDisplaySettingsNumeric.prototype,"_aggregationElement",2);u([m.query("#weighting-column")],exports.LuzmoDisplaySettingsNumeric.prototype,"_aggregationWeightElement",2);u([m.query("#duration-levels")],exports.LuzmoDisplaySettingsNumeric.prototype,"_durationLevelsElement",2);u([m.query("#duration-format")],exports.LuzmoDisplaySettingsNumeric.prototype,"_durationFormatElement",2);u([m.query("#duration-levels-overlay")],exports.LuzmoDisplaySettingsNumeric.prototype,"_durationLevelsOverlay",2);u([m.state()],exports.LuzmoDisplaySettingsNumeric.prototype,"_renderDurationLevelMenu",2);exports.LuzmoDisplaySettingsNumeric=u([n.localized()],exports.LuzmoDisplaySettingsNumeric);customElements.get("luzmo-display-settings-numeric")||customElements.define("luzmo-display-settings-numeric",exports.LuzmoDisplaySettingsNumeric);
|