@luzmo/analytics-components-kit 1.0.1-alpha.3 → 1.0.1-alpha.5
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/LICENSE +18 -0
- package/components/area-chart-slots.config-BLxiYX05.cjs +20 -0
- package/components/area-chart-slots.config-C0c2ZzBh.js +52 -0
- package/components/async-directive-FGzMycjH-Bgeca09f.js +152 -0
- package/components/async-directive-FGzMycjH-CeG35vZ3.cjs +56 -0
- package/components/bar-chart-slots.config-GSSL7XVA.js +47 -0
- package/components/bar-chart-slots.config-Jx1PveTM.cjs +20 -0
- package/components/bar-chart.config-B57geUzJ.cjs +20 -0
- package/components/bar-chart.config-CQ6HAvs2.js +153 -0
- package/components/bar-chart.en-BqYbiHO3.cjs +20 -0
- package/components/bar-chart.en-FwT00qdU.js +69 -0
- package/components/bar-chart.fr-DGx9smEh.cjs +20 -0
- package/components/bar-chart.fr-DbxKiM0j.js +44 -0
- package/components/bar-chart.nl-BYzVExsz.cjs +20 -0
- package/components/bar-chart.nl-ahX1ARpH.js +44 -0
- package/components/base-BjTwmyRF.cjs +24 -0
- package/components/base-D76d76ww-BiajPmzU.cjs +40 -0
- package/components/base-D76d76ww-gf0ESLsU.js +45 -0
- package/components/base-D76d76ww.js +28 -0
- package/components/button-base-CDLQV7Vk-BXgdcJZo.cjs +43 -0
- package/components/button-base-CDLQV7Vk-C_3zTrbV.js +161 -0
- package/components/checkbox-mixin-DXUIwtea-DNISZS47.cjs +45 -0
- package/components/checkbox-mixin-DXUIwtea-wiCZr_KI.js +88 -0
- package/components/column-chart.config-B57geUzJ.cjs +20 -0
- package/components/column-chart.config-C9hP0kX7.js +153 -0
- package/components/cs-DVZ0Tapy.js +89 -0
- package/components/cs-I9E81keK.cjs +20 -0
- package/components/da-DHy05oSR.js +97 -0
- package/components/da-QkdvupDg.cjs +20 -0
- package/components/de-Dn5mUzha.cjs +20 -0
- package/components/de-iM39JlAt.js +109 -0
- package/components/decompose-numeric-format-B3rVVHpO.cjs +20 -0
- package/components/decompose-numeric-format-BuZcjH2k.js +39 -0
- package/components/directive-helpers-BLDZnGQv-DYFfxaqA.cjs +80 -0
- package/components/directive-helpers-BLDZnGQv-oKMCBvb2.js +115 -0
- package/components/display-settings/display-settings.d.ts +70 -0
- package/components/display-settings/index.cjs +105 -0
- package/components/display-settings/index.d.ts +7 -0
- package/components/display-settings/index.js +238 -0
- package/components/display-settings-binning/display-settings-binning.d.ts +32 -0
- package/components/display-settings-binning/index.cjs +51 -0
- package/components/display-settings-binning/index.d.ts +7 -0
- package/components/display-settings-binning/index.js +137 -0
- package/components/display-settings-datetime/display-settings-datetime.d.ts +85 -0
- package/components/display-settings-datetime/index.cjs +20 -0
- package/components/display-settings-datetime/index.d.ts +7 -0
- package/components/display-settings-datetime/index.js +30 -0
- package/components/display-settings-grand-totals/display-settings-grand-totals.d.ts +30 -0
- package/components/display-settings-grand-totals/index.cjs +41 -0
- package/components/display-settings-grand-totals/index.d.ts +7 -0
- package/components/display-settings-grand-totals/index.js +115 -0
- package/components/display-settings-numeric/display-settings-numeric.d.ts +73 -0
- package/components/display-settings-numeric/helpers/constants.d.ts +17 -0
- package/components/display-settings-numeric/index.cjs +146 -0
- package/components/display-settings-numeric/index.d.ts +7 -0
- package/components/display-settings-numeric/index.js +452 -0
- package/components/display-settings-period-over-period/display-settings-period-over-period.d.ts +44 -0
- package/components/display-settings-period-over-period/helpers/constants.d.ts +33 -0
- package/components/display-settings-period-over-period/index.cjs +103 -0
- package/components/display-settings-period-over-period/index.d.ts +7 -0
- package/components/display-settings-period-over-period/index.js +308 -0
- package/components/divider.module-DwOuLGU3-B19eHVg2.js +40 -0
- package/components/divider.module-DwOuLGU3-Bg8RrFkc.cjs +36 -0
- package/components/donut-chart-slots.config-BEwhfq27.js +39 -0
- package/components/donut-chart-slots.config-DIp-24lO.cjs +20 -0
- package/components/donut-chart.config-3DhKiSSM.js +177 -0
- package/components/donut-chart.config-DLWJUlHx.cjs +20 -0
- package/components/donut-chart.en-Blb9oSdU.cjs +20 -0
- package/components/donut-chart.en-CzjT4-XN.js +85 -0
- package/components/donut-chart.fr-BeTVa2wh.cjs +20 -0
- package/components/donut-chart.fr-DftPrKbG.js +39 -0
- package/components/donut-chart.nl-D9YGbOce.cjs +20 -0
- package/components/donut-chart.nl-NMatXfhK.js +39 -0
- package/components/draggable-data-item/draggable-data-item.d.ts +25 -0
- package/components/draggable-data-item/index.cjs +55 -0
- package/components/draggable-data-item/index.d.ts +7 -0
- package/components/draggable-data-item/index.js +140 -0
- package/components/draggable-data-item-level/draggable-data-item-level.d.ts +29 -0
- package/components/draggable-data-item-level/helpers/calculate-type-icon.d.ts +2 -0
- package/components/draggable-data-item-level/helpers/generate-preview.d.ts +1 -0
- package/components/draggable-data-item-level/index.cjs +36 -0
- package/components/draggable-data-item-level/index.d.ts +7 -0
- package/components/draggable-data-item-level/index.js +293 -0
- package/components/droppable-slot/droppable-slot.d.ts +49 -0
- package/components/droppable-slot/index.cjs +69 -0
- package/components/droppable-slot/index.d.ts +7 -0
- package/components/droppable-slot/index.js +255 -0
- package/components/droppable-slot/item-slots-configs/area-chart-slots.config.d.ts +44 -0
- package/components/droppable-slot/item-slots-configs/bar-chart-slots.config.d.ts +24 -0
- package/components/droppable-slot/item-slots-configs/donut-chart-slots.config.d.ts +20 -0
- package/components/edit-item/edit-item.d.ts +50 -0
- package/components/edit-item/index.cjs +85 -0
- package/components/edit-item/index.d.ts +7 -0
- package/components/edit-item/index.js +333 -0
- package/components/edit-option/edit-option.d.ts +22 -0
- package/components/edit-option/helpers/control-markup.d.ts +14 -0
- package/components/edit-option/helpers/control-templates/action-button-group-template.d.ts +2 -0
- package/components/edit-option/helpers/control-templates/color-picker-template.d.ts +2 -0
- package/components/edit-option/helpers/control-templates/multi-language-field-template.d.ts +8 -0
- package/components/edit-option/helpers/control-templates/number-field-template.d.ts +2 -0
- package/components/edit-option/helpers/control-templates/picker-template.d.ts +2 -0
- package/components/edit-option/helpers/control-templates/positions-number-field-template.d.ts +2 -0
- package/components/edit-option/helpers/control-templates/radio-button-group.d.ts +2 -0
- package/components/edit-option/helpers/control-templates/slider-template.d.ts +2 -0
- package/components/edit-option/helpers/control-templates/switch-template.d.ts +2 -0
- package/components/edit-option/helpers/control-templates/text-field-template.d.ts +7 -0
- package/components/edit-option/helpers/generate-callback.d.ts +1 -0
- package/components/edit-option/helpers/get-control-by-key.d.ts +1 -0
- package/components/edit-option/helpers/get-extra-label-values.d.ts +7 -0
- package/components/edit-option/helpers/get-value-by-key.d.ts +1 -0
- package/components/edit-option/index.cjs +176 -0
- package/components/edit-option/index.d.ts +7 -0
- package/components/edit-option/index.js +507 -0
- package/components/edit-option/item-configs/bar-chart.config.d.ts +108 -0
- package/components/edit-option/item-configs/column-chart.config.d.ts +108 -0
- package/components/edit-option/item-configs/donut-chart.config.d.ts +102 -0
- package/components/edit-option/item-configs/imageobject.config.d.ts +128 -0
- package/components/edit-option/item-configs/line-chart.config.d.ts +96 -0
- package/components/edit-option/item-configs/textobject.config.d.ts +13 -0
- package/components/edit-option/item-translations/bar-chart.en.d.ts +48 -0
- package/components/edit-option/item-translations/bar-chart.fr.d.ts +23 -0
- package/components/edit-option/item-translations/bar-chart.nl.d.ts +23 -0
- package/components/edit-option/item-translations/donut-chart.en.d.ts +64 -0
- package/components/edit-option/item-translations/donut-chart.fr.d.ts +18 -0
- package/components/edit-option/item-translations/donut-chart.nl.d.ts +18 -0
- package/components/edit-option-action-button-group/edit-option-action-button-group.d.ts +27 -0
- package/components/edit-option-action-button-group/index.cjs +44 -0
- package/components/edit-option-action-button-group/index.d.ts +7 -0
- package/components/edit-option-action-button-group/index.js +144 -0
- package/components/edit-option-base/edit-option-base.d.ts +22 -0
- package/components/edit-option-base-DnrerC_T.cjs +53 -0
- package/components/edit-option-base-oIvlolV9.js +120 -0
- package/components/edit-option-color-picker/edit-option-color-picker.d.ts +23 -0
- package/components/edit-option-color-picker/index.cjs +472 -0
- package/components/edit-option-color-picker/index.d.ts +7 -0
- package/components/edit-option-color-picker/index.js +2553 -0
- package/components/edit-option-multi-language-field/edit-option-multi-language-field.d.ts +15 -0
- package/components/edit-option-multi-language-field/index.cjs +31 -0
- package/components/edit-option-multi-language-field/index.d.ts +7 -0
- package/components/edit-option-multi-language-field/index.js +102 -0
- package/components/edit-option-number-field/edit-option-number-field.d.ts +19 -0
- package/components/edit-option-number-field/index.cjs +32 -0
- package/components/edit-option-number-field/index.d.ts +7 -0
- package/components/edit-option-number-field/index.js +115 -0
- package/components/edit-option-picker/edit-option-picker.d.ts +22 -0
- package/components/edit-option-picker/index.cjs +35 -0
- package/components/edit-option-picker/index.d.ts +7 -0
- package/components/edit-option-picker/index.js +106 -0
- package/components/edit-option-positions-number-field/edit-option-positions-number-field.d.ts +28 -0
- package/components/edit-option-positions-number-field/index.cjs +42 -0
- package/components/edit-option-positions-number-field/index.d.ts +7 -0
- package/components/edit-option-positions-number-field/index.js +170 -0
- package/components/edit-option-radio-button-group/edit-option-radio-button-group.d.ts +18 -0
- package/components/edit-option-radio-button-group/index.cjs +36 -0
- package/components/edit-option-radio-button-group/index.d.ts +7 -0
- package/components/edit-option-radio-button-group/index.js +113 -0
- package/components/edit-option-slider/edit-option-slider.d.ts +15 -0
- package/components/edit-option-slider/index.cjs +48 -0
- package/components/edit-option-slider/index.d.ts +7 -0
- package/components/edit-option-slider/index.js +1253 -0
- package/components/edit-option-switch/edit-option-switch.d.ts +11 -0
- package/components/edit-option-switch/index.cjs +50 -0
- package/components/edit-option-switch/index.d.ts +7 -0
- package/components/edit-option-switch/index.js +171 -0
- package/components/edit-option-text-field/edit-option-text-field.d.ts +15 -0
- package/components/edit-option-text-field/index.cjs +31 -0
- package/components/edit-option-text-field/index.d.ts +7 -0
- package/components/edit-option-text-field/index.js +100 -0
- package/components/element-resolution-FCUT-wql--7ctE626.js +163 -0
- package/components/element-resolution-FCUT-wql-DSTvdyds.cjs +68 -0
- package/components/en-BsAhbMzm.js +1979 -0
- package/components/en-CdROUdjt.cjs +202 -0
- package/components/en-GB-g8rSQSba.cjs +20 -0
- package/components/en-GB-qub-Kemt.js +28 -0
- package/components/es-CwyPlN5d.cjs +20 -0
- package/components/es-KhTq4jX8.js +305 -0
- package/components/fi-Dh_ebgpe.js +97 -0
- package/components/fi-rijeZE5V.cjs +20 -0
- package/components/focus-group-DHeTq18L-C9l9oHwM.cjs +36 -0
- package/components/focus-group-DHeTq18L-rNUu13eb.js +237 -0
- package/components/fr-BcgE-6S_.cjs +20 -0
- package/components/fr-CU727YF1.js +305 -0
- package/components/get-css-variable-Bhbr-Kr1.js +1413 -0
- package/components/get-css-variable-DLiZYZEi.cjs +24 -0
- package/components/he-Au3xg6lR.js +89 -0
- package/components/he-O6Ih8Bqh.cjs +20 -0
- package/components/hu-BnZ8y3xQ.cjs +20 -0
- package/components/hu-DNJ-P_MW.js +97 -0
- package/components/if-defined-CYpcjGCb-Bzbg7zmM.cjs +60 -0
- package/components/if-defined-CYpcjGCb-tXzyj9Dq.js +95 -0
- package/components/if-defined-Ch2dtEOS.js +29 -0
- package/components/if-defined-DMSuo5Qx.cjs +24 -0
- package/components/imageobject.config-B7ld9bj3.cjs +20 -0
- package/components/imageobject.config-DZLp9Elq.js +127 -0
- package/components/index-3ewegRbb.cjs +67 -0
- package/components/index-B0cBkCaq.cjs +39 -0
- package/components/index-B2N_PZf3.js +164 -0
- package/components/index-B2z7i1-X.js +77 -0
- package/components/index-B5VaT0lQ.js +145 -0
- package/components/index-BC-nmKjU.js +104 -0
- package/components/index-BD3VxQBH.js +44 -0
- package/components/index-BGaxFTL4.js +299 -0
- package/components/index-BRk42NQn.js +3171 -0
- package/components/index-Bjs6Yqet.cjs +185 -0
- package/components/index-Bofs4Q2E.cjs +36 -0
- package/components/index-BqTdFs1o.js +77 -0
- package/components/index-C2qG2Sm8-BQUlk-w0.js +935 -0
- package/components/index-C2qG2Sm8-CbVWlbag.cjs +95 -0
- package/components/index-CTPox3yS.cjs +54 -0
- package/components/index-C_3Ak4MQ.cjs +59 -0
- package/components/index-CayjvyyX.cjs +95 -0
- package/components/index-CkDDDzuJ.js +744 -0
- package/components/index-Cp-lHUlX.js +137 -0
- package/components/index-CtHO6VyI.cjs +42 -0
- package/components/index-D4x-O9Uc.cjs +192 -0
- package/components/index-D9vzXhtJ.cjs +95 -0
- package/components/index-DQiQXn8N.cjs +36 -0
- package/components/index-DVaeDCbe.js +48 -0
- package/components/index-DskAouD-.js +317 -0
- package/components/index-DszPbTTD.js +810 -0
- package/components/index-EQldC-LR.js +175 -0
- package/components/index-ON4x-yZ7.cjs +36 -0
- package/components/index-gfU9TGd5.cjs +57 -0
- package/components/index-liTHhAef.cjs +36 -0
- package/components/index.cjs +20 -0
- package/components/index.js +74 -0
- package/components/it-Bh5U73z6.js +305 -0
- package/components/it-PshtLMkq.cjs +20 -0
- package/components/ja-CCcHUL61.js +89 -0
- package/components/ja-KIS2HdaG.cjs +20 -0
- package/components/ko--l4qmjLV.cjs +20 -0
- package/components/ko-DhapsZMM.js +89 -0
- package/components/language-resolution-8yZa5r_P-CTSmbE1U.js +161 -0
- package/components/language-resolution-8yZa5r_P-DQ3rZzW5.cjs +52 -0
- package/components/line-chart.config-BZcvfO2c.cjs +20 -0
- package/components/line-chart.config-CIVN6uLI.js +115 -0
- package/components/localize-B6AsX_Zv.js +52 -0
- package/components/localize-DbobqcKs.cjs +20 -0
- package/components/luzmo-icons-BrtBl3E5.cjs +31 -0
- package/components/luzmo-icons-CZEpXpvy.js +613 -0
- package/components/mk-B9HPSuKa.js +97 -0
- package/components/mk-DZlj-edb.cjs +20 -0
- package/components/nl-BKlDqOXb.cjs +20 -0
- package/components/nl-BwSt5Bf4.js +109 -0
- package/components/no-D-DofYnx.js +109 -0
- package/components/no-D_SzxhTu.cjs +20 -0
- package/components/observe-slot-text-BG0H7bQK-C0wmc4DO.js +221 -0
- package/components/observe-slot-text-BG0H7bQK-CrkAqUMj.cjs +86 -0
- package/components/pl-D_L_0Boq.js +97 -0
- package/components/pl-PIK23rK_.cjs +20 -0
- package/components/popover-bg0EQQ8p-D4-hrhIx.js +86 -0
- package/components/popover-bg0EQQ8p-Dha09dhV.cjs +48 -0
- package/components/property-CD3dwBJC.js +1447 -0
- package/components/property-Su1Q6aME.cjs +124 -0
- package/components/pt-B0BBS5VB.js +89 -0
- package/components/pt-Dqlu4MS5.cjs +20 -0
- package/components/query-D5qWDopr.cjs +24 -0
- package/components/query-Ddbd72Um.js +39 -0
- package/components/query-assigned-nodes-C76XVPWY-BcyGjObB.cjs +40 -0
- package/components/query-assigned-nodes-C76XVPWY-DPC6kOmH.js +55 -0
- package/components/roving-tabindex-DOg4z6ZU-DmyYPRYY.cjs +36 -0
- package/components/roving-tabindex-DOg4z6ZU-dufnVmvL.js +85 -0
- package/components/ru-Vo-m3O_2.js +108 -0
- package/components/ru-zyNDTB04.cjs +20 -0
- package/components/sized-mixin-PyCYpyQq-B40Ek2UB.js +82 -0
- package/components/sized-mixin-PyCYpyQq-sKzDjc75.cjs +36 -0
- package/components/slot-menu/index.cjs +55 -0
- package/components/slot-menu/index.d.ts +7 -0
- package/components/slot-menu/index.js +188 -0
- package/components/slot-menu/slot-menu.d.ts +66 -0
- package/components/slot-menu-list/index.cjs +39 -0
- package/components/slot-menu-list/index.d.ts +7 -0
- package/components/slot-menu-list/index.js +351 -0
- package/components/slot-menu-list/slot-menu-list.d.ts +33 -0
- package/components/state-B1a8XIDm.js +31 -0
- package/components/state-ByiKNRhp.cjs +24 -0
- package/components/sv-1DPTltNQ.cjs +20 -0
- package/components/sv-CiozMaev.js +89 -0
- package/components/task-BPD0PyaQ.js +120 -0
- package/components/task-HFsHfTra.cjs +24 -0
- package/components/text-field-7ITo3Lac-CKXsSqJP.cjs +131 -0
- package/components/text-field-7ITo3Lac-DqVO04kR.js +412 -0
- package/components/textobject.config-C8opcGG4.js +52 -0
- package/components/textobject.config-DbAajFz8.cjs +20 -0
- package/components/tr-BkmWvOG2.cjs +20 -0
- package/components/tr-D_D4i5iv.js +109 -0
- package/components/utils.cjs +20 -0
- package/components/utils.js +20 -0
- package/components/when-CDK1Tt5Y-BN3qcTK0.cjs +40 -0
- package/components/when-CDK1Tt5Y-C6ViXC43.js +47 -0
- package/components/zh-CN-DTZ4OmdP.cjs +20 -0
- package/components/zh-CN-wsl7eFSd.js +89 -0
- package/components/zh-TW-DTZ4OmdP.cjs +20 -0
- package/components/zh-TW-wsl7eFSd.js +89 -0
- package/custom-elements.json +4228 -0
- package/index.d.ts +23 -0
- package/package.json +133 -14
- package/utils/formatter/calculate-duration.d.ts +2 -0
- package/utils/formatter/decompose-numeric-format.d.ts +11 -0
- package/utils/formatter/default-local-formats.d.ts +20 -0
- package/utils/formatter/formats/cs.d.ts +20 -0
- package/utils/formatter/formats/da.d.ts +20 -0
- package/utils/formatter/formats/de.d.ts +21 -0
- package/utils/formatter/formats/en-GB.d.ts +21 -0
- package/utils/formatter/formats/en-US.d.ts +1 -0
- package/utils/formatter/formats/en.d.ts +1 -0
- package/utils/formatter/formats/es.d.ts +54 -0
- package/utils/formatter/formats/fi.d.ts +20 -0
- package/utils/formatter/formats/fr.d.ts +54 -0
- package/utils/formatter/formats/he.d.ts +20 -0
- package/utils/formatter/formats/hu.d.ts +20 -0
- package/utils/formatter/formats/it.d.ts +54 -0
- package/utils/formatter/formats/ja.d.ts +20 -0
- package/utils/formatter/formats/ko.d.ts +20 -0
- package/utils/formatter/formats/mk.d.ts +20 -0
- package/utils/formatter/formats/nl.d.ts +21 -0
- package/utils/formatter/formats/no.d.ts +21 -0
- package/utils/formatter/formats/pl.d.ts +20 -0
- package/utils/formatter/formats/pt.d.ts +20 -0
- package/utils/formatter/formats/ru.d.ts +20 -0
- package/utils/formatter/formats/sv.d.ts +20 -0
- package/utils/formatter/formats/tr.d.ts +21 -0
- package/utils/formatter/formats/zh-CN.d.ts +20 -0
- package/utils/formatter/formats/zh-TW.d.ts +20 -0
- package/utils/formatter/formatter.d.ts +9 -0
- package/utils/formatter/localize.d.ts +3 -0
- package/utils/formatter/smart-datetime-formats.const.d.ts +36 -0
- package/utils/get-css-variable.d.ts +1 -0
- package/utils/index.d.ts +1 -0
- package/utils/time/formats.const.d.ts +8 -0
- package/utils/time/periods.const.d.ts +29 -0
- package/utils/types/column.types.d.ts +56 -0
- package/utils/types/type-check.d.ts +7 -0
- package/lib/37.js +0 -1
- package/lib/729.js +0 -1
- package/lib/common-31743c5a.js +0 -13
- package/lib/common-b02547a0.js +0 -1
- package/lib/common-b49d9a9d.js +0 -1
- package/lib/common-b5232813.js +0 -56
- package/lib/common-cefd4f4c.js +0 -1
- package/lib/common-d6cb565f.js +0 -1
- package/lib/common-fd868059.js +0 -1
- package/lib/common-fedaf338.js +0 -32
- package/lib/edit-option-picker/index.js +0 -314
- package/lib/edit-option-slider/index.js +0 -102
- package/lib/edit-option-toggle/index.js +0 -114
- package/lib/index.js +0 -346
- package/lib/vendors-93cc3efa.js +0 -1
- package/lib/vendors-bb3d84b5.js +0 -1
@@ -0,0 +1,146 @@
|
|
1
|
+
/*! * A kit of modern Luzmo Web Components for analytics in your web application.
|
2
|
+
*
|
3
|
+
* Copyright © 2024 Luzmo
|
4
|
+
* All rights reserved.
|
5
|
+
* Luzmo web components (“Luzmo Web Components”)
|
6
|
+
* must be used according to the Luzmo Terms of Service.
|
7
|
+
* This license allows users with a current active Luzmo account
|
8
|
+
* to use the Luzmo Web Components. This license terminates
|
9
|
+
* automatically if a user no longer has an active Luzmo account.
|
10
|
+
* Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
|
11
|
+
*
|
12
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
13
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
14
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
15
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
16
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
17
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
18
|
+
* SOFTWARE.
|
19
|
+
* */
|
20
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../index-CtHO6VyI.cjs");require("../index-CTPox3yS.cjs");require("../index-C_3Ak4MQ.cjs");require("../index-Bofs4Q2E.cjs");require("../index-D9vzXhtJ.cjs");require("../index-Bjs6Yqet.cjs");require("../index-DQiQXn8N.cjs");const s=require("../property-Su1Q6aME.cjs"),_=require("../sized-mixin-PyCYpyQq-sKzDjc75.cjs"),v=require("../decompose-numeric-format-B3rVVHpO.cjs"),f=require("../luzmo-icons-BrtBl3E5.cjs"),F=require("../index-D4x-O9Uc.cjs"),A=require("../state-ByiKNRhp.cjs"),m=require("../query-D5qWDopr.cjs"),L=":host .settings-container{display:flex;flex-direction:column;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))}: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 )}",$={sum:"Sum",cumulativesum:"Cumulative sum",average:"Average",weightedaverage:"Weighted average",median:"Median",count:"Count",distinctcount:"Distinct count",min:"Minimum",max:"Maximum",stddev:"Standard deviation",rate:"Rate"},y={general:"123",percentage:"%",scientific:"SI"},z={time:"Time",short:"Short",long:"Long"},b={Auto:{auto:!0},"1,000.00":{auto:!1,thousandSeparator:",",decimalSeparator:"."},"1.000,00":{auto:!1,thousandSeparator:".",decimalSeparator:","},"1000.00":{auto:!1,decimalSeparator:"."},"1000,00":{auto:!1,decimalSeparator:","}},S={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 D=Object.defineProperty,r=(g,t,e,i)=>{for(var n=void 0,a=g.length-1,l;a>=0;a--)(l=g[a])&&(n=l(t,e,n)||n);return n&&D(t,e,n),n};class o extends _.m(s.I,{validSizes:Object.values(_.d)}){constructor(){super(...arguments),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}:this._aggregationFunc==="rate"&&(t.aggregationFunc="average"),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[s.r(L)]}_parseSavedNumericFormatSettings(){var t,e,i,n,a,l,d,c,h,p;if(this._displayMode=((t=this.slotContent)==null?void 0:t.subtype)==="duration"?((n=(i=(e=this.slotContent)==null?void 0:e.duration)==null?void 0:i.levels)==null?void 0:n.length)===1?"numeric":"duration":"numeric",this._durationFormat=((l=(a=this.slotContent)==null?void 0:a.duration)==null?void 0:l.format)??"short",this._durationLevels=((c=(d=this.slotContent)==null?void 0:d.duration)==null?void 0:c.levels)??[1],this._displayMode==="duration")this._precision=2,this._commaDecimals=!1,this._thousandSeparator=!1;else{this._format=((h=this.slotContent)==null?void 0:h.format)??".0f";const u=v.decomposeNumericFormat(this._format??".0f");this._isAuto=((p=u.typeFormat)==null?void 0:p.includes("a"))??!1,["%","a%","y","ay"].includes(u.typeFormat)?this._displayAs="percentage":["s","as","w","aw"].includes(u.typeFormat)?this._displayAs="scientific":this._displayAs="general",this._precision=u.precision?Number.parseInt(u.precision.replace(".",""),10):this._displayAs==="scientific"?1:0,this._commaDecimals=["z","az","y","ay","w","aw"].includes(u.typeFormat),this._thousandSeparator=u.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=b[(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(){const t=this._aggregationFunc,e=this.slotContent.format;if(this._aggregationElement.value!==t){if(this._aggregationFunc=this._aggregationElement.value,t==="rate"){const i=v.decomposeNumericFormat(e),n=["%","y","a%","ay"].includes(i.typeFormat);this.slotContent.subtype==="currency"&&n&&this._setNumericDisplayAs()}this._sendEvent(),(this._aggregationFunc==="rate"||t==="rate")&&this.requestUpdate()}}_setAggregationWeight(){const t=this._aggregationWeightElement.value;if(t==="none")this._aggregationWeightColumn=void 0;else{const e=this.measureColumns.find(i=>i.columnId===t);this._aggregationWeightColumn={column:e==null?void 0:e.columnId,set:e==null?void 0:e.datasetId,columnSubType:e==null?void 0:e.subtype}}this._sendEvent()}_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,n;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=(n=this.slotContent)==null?void 0:n.aggregationWeight)}firstUpdated(){var t;(t=this.slotContent)!=null&&t.duration&&this._durationLevelsOverlay.addEventListener("slottable-request",e=>{this._renderDurationLevelMenu=e.data!==F.a})}_renderDurationLevelsSettings(){const t=S.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),s.x`<luzmo-menu-item
|
21
|
+
value=${e.level}
|
22
|
+
?selected=${this._durationLevels.includes(e.level)}
|
23
|
+
?disabled=${i}
|
24
|
+
>
|
25
|
+
${e.label}
|
26
|
+
</luzmo-menu-item>`});return s.x` <div class="setting">
|
27
|
+
<luzmo-field-label for="duration-levels">
|
28
|
+
Duration levels
|
29
|
+
</luzmo-field-label>
|
30
|
+
<luzmo-action-button id="trigger" size=${this.size}>
|
31
|
+
${this._durationLevels.length}
|
32
|
+
${this._durationLevels.length===1?"level":"levels"} active
|
33
|
+
<span class="duration-angle-down-icon">
|
34
|
+
${f.O2(f.T)}
|
35
|
+
</span>
|
36
|
+
</luzmo-action-button>
|
37
|
+
<luzmo-overlay
|
38
|
+
id="duration-levels-overlay"
|
39
|
+
trigger="trigger@click"
|
40
|
+
type="auto"
|
41
|
+
placement="bottom-start"
|
42
|
+
type="page"
|
43
|
+
>
|
44
|
+
<luzmo-popover style="position: relative">
|
45
|
+
${this._renderDurationLevelMenu?s.x` <luzmo-menu
|
46
|
+
id="duration-levels"
|
47
|
+
size=${this.size}
|
48
|
+
selects="multiple"
|
49
|
+
.value=${this._durationLevels.join(",")}
|
50
|
+
@change=${this._setDurationLevels}
|
51
|
+
>
|
52
|
+
${t}
|
53
|
+
</luzmo-menu>`:""}
|
54
|
+
</luzmo-popover>
|
55
|
+
</luzmo-overlay>
|
56
|
+
</div>`}_renderDurationFormatSettings(){const t=Object.keys(z).map(e=>e==="time"&&(this._maxDurationLevel??1)<6?"":s.x`<luzmo-action-button value=${e}>
|
57
|
+
${z[e]}
|
58
|
+
</luzmo-action-button>`);return s.x` <div class="setting">
|
59
|
+
<luzmo-field-label for="duration-format">Format</luzmo-field-label>
|
60
|
+
<luzmo-action-group
|
61
|
+
emphasized
|
62
|
+
id="duration-format"
|
63
|
+
size=${this.size}
|
64
|
+
compact=""
|
65
|
+
.selected=${[this._durationFormat??"short"]}
|
66
|
+
selects="single"
|
67
|
+
@change=${this._setDurationFormat}
|
68
|
+
>
|
69
|
+
${t}
|
70
|
+
</luzmo-action-group>
|
71
|
+
</div>`}_renderNumericDisplayAsSettings(){const t=Object.keys(y).map(e=>s.x`<luzmo-action-button value=${e}
|
72
|
+
>${y[e]}</luzmo-action-button
|
73
|
+
>`);return s.x`<div class="setting">
|
74
|
+
<luzmo-field-label for="display-as">Display as</luzmo-field-label>
|
75
|
+
<luzmo-action-group
|
76
|
+
emphasized
|
77
|
+
id="display-as"
|
78
|
+
size=${this.size}
|
79
|
+
compact=""
|
80
|
+
.selected=${[this._displayAs]}
|
81
|
+
selects="single"
|
82
|
+
@change=${this._setNumericDisplayAs}
|
83
|
+
>
|
84
|
+
${t}
|
85
|
+
</luzmo-action-group>
|
86
|
+
</div>`}_renderNumericFormatSettings(){const t=Object.keys(b).map(e=>s.x`<luzmo-menu-item value=${e}>${e}</luzmo-menu-item>`);return s.x` <div class="setting">
|
87
|
+
<luzmo-field-label for="format">Format</luzmo-field-label>
|
88
|
+
<luzmo-picker
|
89
|
+
id="format"
|
90
|
+
size=${this.size}
|
91
|
+
variant="highlight"
|
92
|
+
value=${this._numericFormatGroup??"Auto"}
|
93
|
+
@change=${this._setNumericSeparators}
|
94
|
+
>
|
95
|
+
${t}
|
96
|
+
</luzmo-picker>
|
97
|
+
</div>
|
98
|
+
<div class="setting">
|
99
|
+
<luzmo-field-label for="precision" id="precision-label"
|
100
|
+
>${this._displayAs==="scientific"?"Precision":"Decimals"}</luzmo-field-label
|
101
|
+
>
|
102
|
+
<luzmo-number-field
|
103
|
+
id="precision"
|
104
|
+
min=${this._displayAs==="scientific"?1:0}
|
105
|
+
max="22"
|
106
|
+
size=${this.size}
|
107
|
+
value=${this._precision??(this._displayAs==="scientific"?1:0)}
|
108
|
+
@change=${this._setPrecision}
|
109
|
+
></luzmo-number-field>
|
110
|
+
</div>`}_renderAggregationSettings(){var i,n;const t=Object.entries($).map(([a,l])=>s.x`<luzmo-menu-item value=${a}>${l}</luzmo-menu-item>`),e=[s.x`<luzmo-menu-item value="none">No weight</luzmo-menu-item>`,...this.measureColumns.map(a=>{var d,c,h;const l=((d=a==null?void 0:a.label)==null?void 0:d[this.language??"en"])??((h=a==null?void 0:a.label)==null?void 0:h[(c=Object.keys(a==null?void 0:a.label))==null?void 0:c[0]])??"Untitled";return s.x`<luzmo-menu-item value=${a.id}>
|
111
|
+
${l}
|
112
|
+
</luzmo-menu-item>`})];return s.x`<div class="settings-row">
|
113
|
+
<div class="setting">
|
114
|
+
<luzmo-field-label for="aggregation">Aggregation</luzmo-field-label>
|
115
|
+
<luzmo-picker
|
116
|
+
id="aggregation"
|
117
|
+
size=${this.size}
|
118
|
+
variant="highlight"
|
119
|
+
value=${this._aggregationFunc??(((i=this.slotContent)==null?void 0:i.type)==="numeric"?"sum":"count")}
|
120
|
+
@change=${this._setAggregationFunc}
|
121
|
+
>
|
122
|
+
${t}
|
123
|
+
</luzmo-picker>
|
124
|
+
</div>
|
125
|
+
${this._aggregationFunc==="rate"?s.x`<div class="setting">
|
126
|
+
<luzmo-field-label for="weighting-column">
|
127
|
+
Denominator
|
128
|
+
</luzmo-field-label>
|
129
|
+
<luzmo-picker
|
130
|
+
id="weighting-column"
|
131
|
+
size=${this.size}
|
132
|
+
variant="highlight"
|
133
|
+
value=${((n=this._aggregationWeightColumn)==null?void 0:n.column)??"none"}
|
134
|
+
@change=${this._setAggregationWeight}
|
135
|
+
>
|
136
|
+
${e}
|
137
|
+
</luzmo-picker>
|
138
|
+
</div>`:""}
|
139
|
+
</div>`}render(){var t;return s.x`<div class="settings-container">
|
140
|
+
<div class="settings-row">
|
141
|
+
${this._displayMode==="duration"?this._renderDurationLevelsSettings():this._renderNumericDisplayAsSettings()}
|
142
|
+
${((t=this._durationLevels)==null?void 0:t.length)>1?this._renderDurationFormatSettings():this._renderNumericFormatSettings()}
|
143
|
+
</div>
|
144
|
+
${this._renderAggregationSettings()}
|
145
|
+
</div>
|
146
|
+
</div>`}}r([s.n({type:String,reflect:!0})],o.prototype,"language");r([s.n({type:Object,reflect:!0})],o.prototype,"slotContent");r([s.n({type:Array,reflect:!1})],o.prototype,"measureColumns");r([m.e("#display-as")],o.prototype,"_displayAsElement");r([m.e("#precision")],o.prototype,"_precisionElement");r([m.e("#aggregation")],o.prototype,"_aggregationElement");r([m.e("#weighting-column")],o.prototype,"_aggregationWeightElement");r([m.e("#duration-levels")],o.prototype,"_durationLevelsElement");r([m.e("#duration-format")],o.prototype,"_durationFormatElement");r([m.e("#duration-levels-overlay")],o.prototype,"_durationLevelsOverlay");r([A.r()],o.prototype,"_renderDurationLevelMenu");customElements.get("luzmo-display-settings-numeric")||customElements.define("luzmo-display-settings-numeric",o);exports.LuzmoDisplaySettingsNumeric=o;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { LuzmoDisplaySettingsNumeric } from './display-settings-numeric';
|
2
|
+
declare global {
|
3
|
+
interface HTMLElementTagNameMap {
|
4
|
+
'luzmo-display-settings-numeric': LuzmoDisplaySettingsNumeric;
|
5
|
+
}
|
6
|
+
}
|
7
|
+
export { LuzmoDisplaySettingsNumeric } from './display-settings-numeric';
|
@@ -0,0 +1,452 @@
|
|
1
|
+
/*! * A kit of modern Luzmo Web Components for analytics in your web application.
|
2
|
+
*
|
3
|
+
* Copyright © 2024 Luzmo
|
4
|
+
* All rights reserved.
|
5
|
+
* Luzmo web components (“Luzmo Web Components”)
|
6
|
+
* must be used according to the Luzmo Terms of Service.
|
7
|
+
* This license allows users with a current active Luzmo account
|
8
|
+
* to use the Luzmo Web Components. This license terminates
|
9
|
+
* automatically if a user no longer has an active Luzmo account.
|
10
|
+
* Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
|
11
|
+
*
|
12
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
13
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
14
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
15
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
16
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
17
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
18
|
+
* SOFTWARE.
|
19
|
+
* */
|
20
|
+
import "../index-EQldC-LR.js";
|
21
|
+
import "../index-BGaxFTL4.js";
|
22
|
+
import "../index-B5VaT0lQ.js";
|
23
|
+
import "../index-BD3VxQBH.js";
|
24
|
+
import "../index-DszPbTTD.js";
|
25
|
+
import "../index-CkDDDzuJ.js";
|
26
|
+
import "../index-DVaeDCbe.js";
|
27
|
+
import { I as x, r as F, x as r, n as p } from "../property-CD3dwBJC.js";
|
28
|
+
import { m as A, d as S } from "../sized-mixin-PyCYpyQq-B40Ek2UB.js";
|
29
|
+
import { d as v } from "../decompose-numeric-format-BuZcjH2k.js";
|
30
|
+
import { O as $, T as L } from "../luzmo-icons-CZEpXpvy.js";
|
31
|
+
import { a as D } from "../index-BRk42NQn.js";
|
32
|
+
import { r as w } from "../state-B1a8XIDm.js";
|
33
|
+
import { e as c } from "../query-Ddbd72Um.js";
|
34
|
+
const y = () => {
|
35
|
+
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
36
|
+
const u = document.createElement("style");
|
37
|
+
u.setAttribute("data-luzmo-vars", ""), u.textContent = 'html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: rgb(140, 140, 140);--luzmo-border-color-full-down: rgb(110, 110, 110);--luzmo-border-color-full-focus: rgb(140, 140, 140);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: #f0f0fc;--luzmo-background-color-down: #f1f1ff;--luzmo-background-color-focus: #f0f0fc;--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: rgb(225, 225, 225);--luzmo-background-color-highlight-down: rgb(215, 215, 215);--luzmo-background-color-highlight-focus: rgb(225, 225, 225);--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-hard: #000;--luzmo-font-color-disabled: var(--luzmo-color-disabled);--luzmo-font-color-extra-dimmed: #888;--luzmo-font-color-hover: #333;--luzmo-font-color-down: #111;--luzmo-font-color-focus: #333;--luzmo-primary: #4434ff;--luzmo-primary-hover: #4234e4;--luzmo-primary-down: #392cc7;--luzmo-primary-focus: #4234e4;--luzmo-primary-inverse-color: #ffffff;--luzmo-primary-rgb: 68, 52, 255;--luzmo-secondary: #ff00ff;--luzmo-secondary-hover: #e309e3;--luzmo-secondary-down: #c711c7;--luzmo-secondary-focus: #e309e3;--luzmo-secondary-inverse-color: #ffffff;--luzmo-secondary-rgb: 255, 0, 255;--luzmo-color-negative: #ca221c;--luzmo-color-negative-hover: #b3241f;--luzmo-color-negative-down: #9f231f;--luzmo-color-negative-focus: #b3241f;--luzmo-color-negative-rgb: 202, 34, 28;--luzmo-color-positive: rgb(20, 150, 101);--luzmo-color-positive-hover: rgb(17, 128, 86);--luzmo-color-positive-down: rgb(16, 105, 71);--luzmo-color-positive-focus: rgb(17, 128, 86);--luzmo-color-positive-rgb: 20, 150, 101;--luzmo-color-selected: rgb(110, 110, 110);--luzmo-color-selected-hover: rgb(70, 70, 70);--luzmo-color-selected-down: rgb(40, 40, 40);--luzmo-color-selected-focus: rgb(70, 70, 70);--luzmo-color-selected-hard: #1e1e1e;--luzmo-color-selected-hard-hover: rgb(0, 0, 0);--luzmo-color-selected-hard-down: rgb(0, 0, 0);--luzmo-color-selected-hard-focus: rgb(0, 0, 0);--luzmo-color-informative: #1a77e9;--luzmo-color-informative-rgb: 26, 119, 233;--luzmo-color-disabled: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 12px;--luzmo-icon-size-xs: 14px;--luzmo-icon-size-s: 16px;--luzmo-icon-size-m: 18px;--luzmo-icon-size-l: 20px;--luzmo-icon-size-xl: 22px;--luzmo-icon-size-xxl: 32px}', document.head.appendChild(u);
|
38
|
+
}
|
39
|
+
};
|
40
|
+
y();
|
41
|
+
const C = ":host .settings-container{display:flex;flex-direction:column;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))}: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 )}", E = {
|
42
|
+
sum: "Sum",
|
43
|
+
cumulativesum: "Cumulative sum",
|
44
|
+
average: "Average",
|
45
|
+
weightedaverage: "Weighted average",
|
46
|
+
median: "Median",
|
47
|
+
count: "Count",
|
48
|
+
distinctcount: "Distinct count",
|
49
|
+
min: "Minimum",
|
50
|
+
max: "Maximum",
|
51
|
+
stddev: "Standard deviation",
|
52
|
+
rate: "Rate"
|
53
|
+
}, f = {
|
54
|
+
general: "123",
|
55
|
+
percentage: "%",
|
56
|
+
scientific: "SI"
|
57
|
+
}, _ = {
|
58
|
+
time: "Time",
|
59
|
+
short: "Short",
|
60
|
+
long: "Long"
|
61
|
+
}, b = {
|
62
|
+
Auto: { auto: !0 },
|
63
|
+
"1,000.00": {
|
64
|
+
auto: !1,
|
65
|
+
thousandSeparator: ",",
|
66
|
+
decimalSeparator: "."
|
67
|
+
},
|
68
|
+
"1.000,00": {
|
69
|
+
auto: !1,
|
70
|
+
thousandSeparator: ".",
|
71
|
+
decimalSeparator: ","
|
72
|
+
},
|
73
|
+
"1000.00": { auto: !1, decimalSeparator: "." },
|
74
|
+
"1000,00": { auto: !1, decimalSeparator: "," }
|
75
|
+
}, N = {
|
76
|
+
levels: [
|
77
|
+
{ level: 1, label: "years" },
|
78
|
+
{ level: 2, label: "quarters" },
|
79
|
+
{ level: 3, label: "months" },
|
80
|
+
{ level: 4, label: "weeks" },
|
81
|
+
{ level: 5, label: "days" },
|
82
|
+
{ level: 6, label: "hours" },
|
83
|
+
{ level: 7, label: "minutes" },
|
84
|
+
{ level: 8, label: "seconds" },
|
85
|
+
{ level: 9, label: "milliseconds" }
|
86
|
+
]
|
87
|
+
};
|
88
|
+
var k = Object.defineProperty, a = (u, t, e, i) => {
|
89
|
+
for (var s = void 0, o = u.length - 1, n; o >= 0; o--)
|
90
|
+
(n = u[o]) && (s = n(t, e, s) || s);
|
91
|
+
return s && k(t, e, s), s;
|
92
|
+
};
|
93
|
+
class l extends A(x, {
|
94
|
+
validSizes: Object.values(S)
|
95
|
+
}) {
|
96
|
+
constructor() {
|
97
|
+
super(...arguments), this.slotContent = {}, this.measureColumns = [], this._durationLevels = [], this._renderDurationLevelMenu = !1, this._sendEvent = () => {
|
98
|
+
const t = { ...this.slotContent };
|
99
|
+
t.format = this._format, t.aggregationFunc = this._aggregationFunc, this._aggregationWeightColumn ? t.aggregationWeight = { ...this._aggregationWeightColumn } : this._aggregationFunc === "rate" && (t.aggregationFunc = "average"), this._displayMode === "duration" ? (t.duration = t.duration ?? {}, t.duration.format = this._durationFormat, t.duration.levels = this._durationLevels) : delete t.duration, this.dispatchEvent(
|
100
|
+
new CustomEvent("slot-content-changed", {
|
101
|
+
bubbles: !0,
|
102
|
+
composed: !0,
|
103
|
+
cancelable: !0,
|
104
|
+
detail: {
|
105
|
+
slotContent: t
|
106
|
+
}
|
107
|
+
})
|
108
|
+
);
|
109
|
+
};
|
110
|
+
}
|
111
|
+
static get styles() {
|
112
|
+
return [F(C)];
|
113
|
+
}
|
114
|
+
_parseSavedNumericFormatSettings() {
|
115
|
+
var t, e, i, s, o, n, d, g, h, z;
|
116
|
+
if (this._displayMode = ((t = this.slotContent) == null ? void 0 : t.subtype) === "duration" ? ((s = (i = (e = this.slotContent) == null ? void 0 : e.duration) == null ? void 0 : i.levels) == null ? void 0 : s.length) === 1 ? "numeric" : "duration" : "numeric", this._durationFormat = ((n = (o = this.slotContent) == null ? void 0 : o.duration) == null ? void 0 : n.format) ?? "short", this._durationLevels = ((g = (d = this.slotContent) == null ? void 0 : d.duration) == null ? void 0 : g.levels) ?? [1], this._displayMode === "duration")
|
117
|
+
this._precision = 2, this._commaDecimals = !1, this._thousandSeparator = !1;
|
118
|
+
else {
|
119
|
+
this._format = ((h = this.slotContent) == null ? void 0 : h.format) ?? ".0f";
|
120
|
+
const m = v(this._format ?? ".0f");
|
121
|
+
this._isAuto = ((z = m.typeFormat) == null ? void 0 : z.includes("a")) ?? !1, ["%", "a%", "y", "ay"].includes(m.typeFormat) ? this._displayAs = "percentage" : ["s", "as", "w", "aw"].includes(m.typeFormat) ? this._displayAs = "scientific" : this._displayAs = "general", this._precision = m.precision ? Number.parseInt(m.precision.replace(".", ""), 10) : this._displayAs === "scientific" ? 1 : 0, this._commaDecimals = ["z", "az", "y", "ay", "w", "aw"].includes(
|
122
|
+
m.typeFormat
|
123
|
+
), this._thousandSeparator = m.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");
|
124
|
+
}
|
125
|
+
}
|
126
|
+
_setNumericDisplayAs() {
|
127
|
+
var t, e;
|
128
|
+
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();
|
129
|
+
}
|
130
|
+
_setNumericSeparators(t) {
|
131
|
+
const e = b[(t == null ? void 0 : t.detail) ?? "Auto"];
|
132
|
+
this._thousandSeparator = [",", "."].includes(
|
133
|
+
(e == null ? void 0 : e.thousandSeparator) ?? ""
|
134
|
+
), this._commaDecimals = (e == null ? void 0 : e.decimalSeparator) === ",", this._isAuto = e == null ? void 0 : e.auto, this._setNumericFormat(), this._sendEvent();
|
135
|
+
}
|
136
|
+
_setPrecision() {
|
137
|
+
this._precision = this._precisionElement.value, this._setNumericFormat(), this._sendEvent();
|
138
|
+
}
|
139
|
+
_setNumericFormat() {
|
140
|
+
var i;
|
141
|
+
let t = "f";
|
142
|
+
const e = this.slotContent.subtype === "duration" ? this._durationLevels && ((i = this._durationLevels) == null ? void 0 : i.length) === 1 ? "numeric" : "duration" : "numeric";
|
143
|
+
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);
|
144
|
+
}
|
145
|
+
_setAggregationFunc() {
|
146
|
+
const t = this._aggregationFunc, e = this.slotContent.format;
|
147
|
+
if (this._aggregationElement.value !== t) {
|
148
|
+
if (this._aggregationFunc = this._aggregationElement.value, t === "rate") {
|
149
|
+
const i = v(e), s = ["%", "y", "a%", "ay"].includes(
|
150
|
+
i.typeFormat
|
151
|
+
);
|
152
|
+
this.slotContent.subtype === "currency" && s && this._setNumericDisplayAs();
|
153
|
+
}
|
154
|
+
this._sendEvent(), (this._aggregationFunc === "rate" || t === "rate") && this.requestUpdate();
|
155
|
+
}
|
156
|
+
}
|
157
|
+
_setAggregationWeight() {
|
158
|
+
const t = this._aggregationWeightElement.value;
|
159
|
+
if (t === "none")
|
160
|
+
this._aggregationWeightColumn = void 0;
|
161
|
+
else {
|
162
|
+
const e = this.measureColumns.find(
|
163
|
+
(i) => i.columnId === t
|
164
|
+
);
|
165
|
+
this._aggregationWeightColumn = {
|
166
|
+
column: e == null ? void 0 : e.columnId,
|
167
|
+
set: e == null ? void 0 : e.datasetId,
|
168
|
+
columnSubType: e == null ? void 0 : e.subtype
|
169
|
+
};
|
170
|
+
}
|
171
|
+
this._sendEvent();
|
172
|
+
}
|
173
|
+
_setDurationLevels() {
|
174
|
+
const t = this._durationLevels, e = this._durationLevelsElement.value.split(",").filter((i) => i !== "").map((i) => Number.parseInt(i, 10));
|
175
|
+
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();
|
176
|
+
}
|
177
|
+
_setDurationFormat() {
|
178
|
+
var t, e;
|
179
|
+
this._durationFormat = (e = (t = this._durationFormatElement) == null ? void 0 : t.selected) == null ? void 0 : e[0], this._fillTimeDurationLevels(), this._setNumericFormat(), this._sendEvent(), this.requestUpdate();
|
180
|
+
}
|
181
|
+
_fillTimeDurationLevels() {
|
182
|
+
if (this._durationFormat === "time") {
|
183
|
+
const t = this._durationLevels.sort().at(-1);
|
184
|
+
if ([7, 8, 9].includes(t)) {
|
185
|
+
const e = {
|
186
|
+
lev7: [6],
|
187
|
+
lev8: [6, 7],
|
188
|
+
lev9: [6, 7, 8]
|
189
|
+
};
|
190
|
+
for (const i of e["lev" + t])
|
191
|
+
this._durationLevels.includes(i) || this._durationLevels.push(i);
|
192
|
+
this._durationLevels = [...this._durationLevels].sort();
|
193
|
+
}
|
194
|
+
}
|
195
|
+
}
|
196
|
+
// TODO set in upper level the same format for all measures remove this comment once implemented
|
197
|
+
/* private setMeasureNumericFormat(
|
198
|
+
slot: any,
|
199
|
+
changedContent: any,
|
200
|
+
changedFormatGroup: string
|
201
|
+
): void {
|
202
|
+
if (
|
203
|
+
slot.name === 'measure' &&
|
204
|
+
changedContent.type === 'numeric' &&
|
205
|
+
changedContent.subtype !== 'duration'
|
206
|
+
) {
|
207
|
+
slot.content.forEach((content: any) => {
|
208
|
+
if (
|
209
|
+
content.format !== changedContent.format &&
|
210
|
+
content.datasetId === changedContent.datasetId &&
|
211
|
+
((content.columnId && content.columnId === changedContent.columnId) ||
|
212
|
+
(content.formula && content.formula === changedContent.formula))
|
213
|
+
) {
|
214
|
+
let contentNumericFormatGroup = 'general';
|
215
|
+
const contentDecomp = decomposeNumericFormat(content.format);
|
216
|
+
|
217
|
+
if (['%', 'a%', 'y', 'ay'].includes(contentDecomp.typeFormat)) {
|
218
|
+
contentNumericFormatGroup = 'percentage';
|
219
|
+
} else if (
|
220
|
+
['s', 'as', 'w', 'aw'].includes(contentDecomp.typeFormat)
|
221
|
+
) {
|
222
|
+
contentNumericFormatGroup = 'scientific';
|
223
|
+
}
|
224
|
+
|
225
|
+
if (contentNumericFormatGroup === changedFormatGroup) {
|
226
|
+
content.format = changedContent.format;
|
227
|
+
}
|
228
|
+
}
|
229
|
+
});
|
230
|
+
}
|
231
|
+
} */
|
232
|
+
willUpdate(t) {
|
233
|
+
var e, i, s;
|
234
|
+
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);
|
235
|
+
}
|
236
|
+
firstUpdated() {
|
237
|
+
var t;
|
238
|
+
(t = this.slotContent) != null && t.duration && this._durationLevelsOverlay.addEventListener(
|
239
|
+
"slottable-request",
|
240
|
+
(e) => {
|
241
|
+
this._renderDurationLevelMenu = e.data !== D;
|
242
|
+
}
|
243
|
+
);
|
244
|
+
}
|
245
|
+
_renderDurationLevelsSettings() {
|
246
|
+
const t = N.levels.map((e) => {
|
247
|
+
let i = !1;
|
248
|
+
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), r`<luzmo-menu-item
|
249
|
+
value=${e.level}
|
250
|
+
?selected=${this._durationLevels.includes(e.level)}
|
251
|
+
?disabled=${i}
|
252
|
+
>
|
253
|
+
${e.label}
|
254
|
+
</luzmo-menu-item>`;
|
255
|
+
});
|
256
|
+
return r` <div class="setting">
|
257
|
+
<luzmo-field-label for="duration-levels">
|
258
|
+
Duration levels
|
259
|
+
</luzmo-field-label>
|
260
|
+
<luzmo-action-button id="trigger" size=${this.size}>
|
261
|
+
${this._durationLevels.length}
|
262
|
+
${this._durationLevels.length === 1 ? "level" : "levels"} active
|
263
|
+
<span class="duration-angle-down-icon">
|
264
|
+
${$(L)}
|
265
|
+
</span>
|
266
|
+
</luzmo-action-button>
|
267
|
+
<luzmo-overlay
|
268
|
+
id="duration-levels-overlay"
|
269
|
+
trigger="trigger@click"
|
270
|
+
type="auto"
|
271
|
+
placement="bottom-start"
|
272
|
+
type="page"
|
273
|
+
>
|
274
|
+
<luzmo-popover style="position: relative">
|
275
|
+
${this._renderDurationLevelMenu ? r` <luzmo-menu
|
276
|
+
id="duration-levels"
|
277
|
+
size=${this.size}
|
278
|
+
selects="multiple"
|
279
|
+
.value=${this._durationLevels.join(",")}
|
280
|
+
@change=${this._setDurationLevels}
|
281
|
+
>
|
282
|
+
${t}
|
283
|
+
</luzmo-menu>` : ""}
|
284
|
+
</luzmo-popover>
|
285
|
+
</luzmo-overlay>
|
286
|
+
</div>`;
|
287
|
+
}
|
288
|
+
_renderDurationFormatSettings() {
|
289
|
+
const t = Object.keys(_).map((e) => e === "time" && (this._maxDurationLevel ?? 1) < 6 ? "" : r`<luzmo-action-button value=${e}>
|
290
|
+
${_[e]}
|
291
|
+
</luzmo-action-button>`);
|
292
|
+
return r` <div class="setting">
|
293
|
+
<luzmo-field-label for="duration-format">Format</luzmo-field-label>
|
294
|
+
<luzmo-action-group
|
295
|
+
emphasized
|
296
|
+
id="duration-format"
|
297
|
+
size=${this.size}
|
298
|
+
compact=""
|
299
|
+
.selected=${[this._durationFormat ?? "short"]}
|
300
|
+
selects="single"
|
301
|
+
@change=${this._setDurationFormat}
|
302
|
+
>
|
303
|
+
${t}
|
304
|
+
</luzmo-action-group>
|
305
|
+
</div>`;
|
306
|
+
}
|
307
|
+
_renderNumericDisplayAsSettings() {
|
308
|
+
const t = Object.keys(f).map(
|
309
|
+
(e) => r`<luzmo-action-button value=${e}
|
310
|
+
>${f[e]}</luzmo-action-button
|
311
|
+
>`
|
312
|
+
);
|
313
|
+
return r`<div class="setting">
|
314
|
+
<luzmo-field-label for="display-as">Display as</luzmo-field-label>
|
315
|
+
<luzmo-action-group
|
316
|
+
emphasized
|
317
|
+
id="display-as"
|
318
|
+
size=${this.size}
|
319
|
+
compact=""
|
320
|
+
.selected=${[this._displayAs]}
|
321
|
+
selects="single"
|
322
|
+
@change=${this._setNumericDisplayAs}
|
323
|
+
>
|
324
|
+
${t}
|
325
|
+
</luzmo-action-group>
|
326
|
+
</div>`;
|
327
|
+
}
|
328
|
+
_renderNumericFormatSettings() {
|
329
|
+
const t = Object.keys(b).map(
|
330
|
+
(e) => r`<luzmo-menu-item value=${e}>${e}</luzmo-menu-item>`
|
331
|
+
);
|
332
|
+
return r` <div class="setting">
|
333
|
+
<luzmo-field-label for="format">Format</luzmo-field-label>
|
334
|
+
<luzmo-picker
|
335
|
+
id="format"
|
336
|
+
size=${this.size}
|
337
|
+
variant="highlight"
|
338
|
+
value=${this._numericFormatGroup ?? "Auto"}
|
339
|
+
@change=${this._setNumericSeparators}
|
340
|
+
>
|
341
|
+
${t}
|
342
|
+
</luzmo-picker>
|
343
|
+
</div>
|
344
|
+
<div class="setting">
|
345
|
+
<luzmo-field-label for="precision" id="precision-label"
|
346
|
+
>${this._displayAs === "scientific" ? "Precision" : "Decimals"}</luzmo-field-label
|
347
|
+
>
|
348
|
+
<luzmo-number-field
|
349
|
+
id="precision"
|
350
|
+
min=${this._displayAs === "scientific" ? 1 : 0}
|
351
|
+
max="22"
|
352
|
+
size=${this.size}
|
353
|
+
value=${this._precision ?? (this._displayAs === "scientific" ? 1 : 0)}
|
354
|
+
@change=${this._setPrecision}
|
355
|
+
></luzmo-number-field>
|
356
|
+
</div>`;
|
357
|
+
}
|
358
|
+
_renderAggregationSettings() {
|
359
|
+
var i, s;
|
360
|
+
const t = Object.entries(E).map(
|
361
|
+
([o, n]) => r`<luzmo-menu-item value=${o}>${n}</luzmo-menu-item>`
|
362
|
+
), e = [
|
363
|
+
r`<luzmo-menu-item value="none">No weight</luzmo-menu-item>`,
|
364
|
+
...this.measureColumns.map((o) => {
|
365
|
+
var d, g, h;
|
366
|
+
const n = ((d = o == null ? void 0 : o.label) == null ? void 0 : d[this.language ?? "en"]) ?? ((h = o == null ? void 0 : o.label) == null ? void 0 : h[(g = Object.keys(o == null ? void 0 : o.label)) == null ? void 0 : g[0]]) ?? "Untitled";
|
367
|
+
return r`<luzmo-menu-item value=${o.id}>
|
368
|
+
${n}
|
369
|
+
</luzmo-menu-item>`;
|
370
|
+
})
|
371
|
+
];
|
372
|
+
return r`<div class="settings-row">
|
373
|
+
<div class="setting">
|
374
|
+
<luzmo-field-label for="aggregation">Aggregation</luzmo-field-label>
|
375
|
+
<luzmo-picker
|
376
|
+
id="aggregation"
|
377
|
+
size=${this.size}
|
378
|
+
variant="highlight"
|
379
|
+
value=${this._aggregationFunc ?? (((i = this.slotContent) == null ? void 0 : i.type) === "numeric" ? "sum" : "count")}
|
380
|
+
@change=${this._setAggregationFunc}
|
381
|
+
>
|
382
|
+
${t}
|
383
|
+
</luzmo-picker>
|
384
|
+
</div>
|
385
|
+
${this._aggregationFunc === "rate" ? r`<div class="setting">
|
386
|
+
<luzmo-field-label for="weighting-column">
|
387
|
+
Denominator
|
388
|
+
</luzmo-field-label>
|
389
|
+
<luzmo-picker
|
390
|
+
id="weighting-column"
|
391
|
+
size=${this.size}
|
392
|
+
variant="highlight"
|
393
|
+
value=${((s = this._aggregationWeightColumn) == null ? void 0 : s.column) ?? "none"}
|
394
|
+
@change=${this._setAggregationWeight}
|
395
|
+
>
|
396
|
+
${e}
|
397
|
+
</luzmo-picker>
|
398
|
+
</div>` : ""}
|
399
|
+
</div>`;
|
400
|
+
}
|
401
|
+
render() {
|
402
|
+
var t;
|
403
|
+
return r`<div class="settings-container">
|
404
|
+
<div class="settings-row">
|
405
|
+
${this._displayMode === "duration" ? this._renderDurationLevelsSettings() : this._renderNumericDisplayAsSettings()}
|
406
|
+
${((t = this._durationLevels) == null ? void 0 : t.length) > 1 ? this._renderDurationFormatSettings() : this._renderNumericFormatSettings()}
|
407
|
+
</div>
|
408
|
+
${this._renderAggregationSettings()}
|
409
|
+
</div>
|
410
|
+
</div>`;
|
411
|
+
}
|
412
|
+
}
|
413
|
+
a([
|
414
|
+
p({ type: String, reflect: !0 })
|
415
|
+
], l.prototype, "language");
|
416
|
+
a([
|
417
|
+
p({ type: Object, reflect: !0 })
|
418
|
+
], l.prototype, "slotContent");
|
419
|
+
a([
|
420
|
+
p({ type: Array, reflect: !1 })
|
421
|
+
], l.prototype, "measureColumns");
|
422
|
+
a([
|
423
|
+
c("#display-as")
|
424
|
+
], l.prototype, "_displayAsElement");
|
425
|
+
a([
|
426
|
+
c("#precision")
|
427
|
+
], l.prototype, "_precisionElement");
|
428
|
+
a([
|
429
|
+
c("#aggregation")
|
430
|
+
], l.prototype, "_aggregationElement");
|
431
|
+
a([
|
432
|
+
c("#weighting-column")
|
433
|
+
], l.prototype, "_aggregationWeightElement");
|
434
|
+
a([
|
435
|
+
c("#duration-levels")
|
436
|
+
], l.prototype, "_durationLevelsElement");
|
437
|
+
a([
|
438
|
+
c("#duration-format")
|
439
|
+
], l.prototype, "_durationFormatElement");
|
440
|
+
a([
|
441
|
+
c("#duration-levels-overlay")
|
442
|
+
], l.prototype, "_durationLevelsOverlay");
|
443
|
+
a([
|
444
|
+
w()
|
445
|
+
], l.prototype, "_renderDurationLevelMenu");
|
446
|
+
customElements.get("luzmo-display-settings-numeric") || customElements.define(
|
447
|
+
"luzmo-display-settings-numeric",
|
448
|
+
l
|
449
|
+
);
|
450
|
+
export {
|
451
|
+
l as LuzmoDisplaySettingsNumeric
|
452
|
+
};
|