@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,15 @@
|
|
1
|
+
import '@luzmo/lucero/multi-language-field';
|
2
|
+
import { LuzmoEditOptionBase } from '../edit-option-base/edit-option-base';
|
3
|
+
export declare class LuzmoEditOptionMultiLangField extends LuzmoEditOptionBase {
|
4
|
+
static styles: import("lit").CSSResultArray[];
|
5
|
+
value: Record<string, string>;
|
6
|
+
invalid: boolean;
|
7
|
+
readonly: boolean;
|
8
|
+
language?: string;
|
9
|
+
placeholder?: Record<string, string>;
|
10
|
+
debounce: number;
|
11
|
+
private multiLangFieldElement;
|
12
|
+
debounceTimeout: any;
|
13
|
+
private _handleEvent;
|
14
|
+
protected renderController(): import("lit-html").TemplateResult<1>;
|
15
|
+
}
|
@@ -0,0 +1,31 @@
|
|
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";var c=Object.getPrototypeOf;var p=Reflect.get;var d=(u,t,o)=>p(c(u),o,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../index-gfU9TGd5.cjs");const l=require("../property-Su1Q6aME.cjs"),h=require("../query-D5qWDopr.cjs"),m=require("../edit-option-base-DnrerC_T.cjs");var g=Object.defineProperty,i=(u,t,o,f)=>{for(var n=void 0,a=u.length-1,s;a>=0;a--)(s=u[a])&&(n=s(t,o,n)||n);return n&&g(t,o,n),n};const r=class r extends m.LuzmoEditOptionBase{constructor(){super(...arguments),this.value={},this.invalid=!1,this.readonly=!1,this.language="en",this.debounce=200}_handleEvent(){this.debounceTimeout&&clearTimeout(this.debounceTimeout),this.debounceTimeout=setTimeout(()=>{var t;this.dispatchEvent(new CustomEvent("option-changed",{bubbles:!0,composed:!0,cancelable:!0,detail:{value:((t=this.multiLangFieldElement)==null?void 0:t.value)??{}}}))},this.debounce??200)}renderController(){return l.x`
|
21
|
+
<luzmo-multi-language-field
|
22
|
+
.value=${this.value}
|
23
|
+
.language=${this.language??"en"}
|
24
|
+
.disabled=${this.disabled}
|
25
|
+
.size=${this.size}
|
26
|
+
.i18nPlaceholder=${this.placeholder??{}}
|
27
|
+
.invalid=${this.invalid}
|
28
|
+
@change=${this._handleEvent}
|
29
|
+
>
|
30
|
+
</luzmo-multi-language-field>
|
31
|
+
`}};r.styles=[d(r,r,"styles")];let e=r;i([l.n({type:Object,reflect:!0})],e.prototype,"value");i([l.n({type:Boolean,reflect:!0})],e.prototype,"invalid");i([l.n({type:Boolean,reflect:!0})],e.prototype,"readonly");i([l.n({type:String,reflect:!0})],e.prototype,"language");i([l.n({type:Object,reflect:!0})],e.prototype,"placeholder");i([l.n({type:Number,reflect:!0})],e.prototype,"debounce");i([h.e("luzmo-multi-language-field")],e.prototype,"multiLangFieldElement");customElements.get("luzmo-edit-option-multi-language-field")||customElements.define("luzmo-edit-option-multi-language-field",e);exports.LuzmoEditOptionMultiLangField=e;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { LuzmoEditOptionMultiLangField } from './edit-option-multi-language-field';
|
2
|
+
declare global {
|
3
|
+
interface HTMLElementTagNameMap {
|
4
|
+
'luzmo-edit-option-multi-language-field': LuzmoEditOptionMultiLangField;
|
5
|
+
}
|
6
|
+
}
|
7
|
+
export { LuzmoEditOptionMultiLangField } from './edit-option-multi-language-field';
|
@@ -0,0 +1,102 @@
|
|
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
|
+
var s = Object.getPrototypeOf;
|
21
|
+
var d = Reflect.get;
|
22
|
+
var a = (e, l, i) => d(s(e), i, l);
|
23
|
+
import "../index-B2N_PZf3.js";
|
24
|
+
import { x as f, n as t } from "../property-CD3dwBJC.js";
|
25
|
+
import { e as g } from "../query-Ddbd72Um.js";
|
26
|
+
import { L as b } from "../edit-option-base-oIvlolV9.js";
|
27
|
+
const z = () => {
|
28
|
+
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
29
|
+
const e = document.createElement("style");
|
30
|
+
e.setAttribute("data-luzmo-vars", ""), e.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(e);
|
31
|
+
}
|
32
|
+
};
|
33
|
+
z();
|
34
|
+
var p = Object.defineProperty, r = (e, l, i, h) => {
|
35
|
+
for (var u = void 0, c = e.length - 1, n; c >= 0; c--)
|
36
|
+
(n = e[c]) && (u = n(l, i, u) || u);
|
37
|
+
return u && p(l, i, u), u;
|
38
|
+
};
|
39
|
+
const m = class m extends b {
|
40
|
+
constructor() {
|
41
|
+
super(...arguments), this.value = {}, this.invalid = !1, this.readonly = !1, this.language = "en", this.debounce = 200;
|
42
|
+
}
|
43
|
+
_handleEvent() {
|
44
|
+
this.debounceTimeout && clearTimeout(this.debounceTimeout), this.debounceTimeout = setTimeout(() => {
|
45
|
+
var l;
|
46
|
+
this.dispatchEvent(
|
47
|
+
new CustomEvent("option-changed", {
|
48
|
+
bubbles: !0,
|
49
|
+
composed: !0,
|
50
|
+
cancelable: !0,
|
51
|
+
detail: {
|
52
|
+
value: ((l = this.multiLangFieldElement) == null ? void 0 : l.value) ?? {}
|
53
|
+
}
|
54
|
+
})
|
55
|
+
);
|
56
|
+
}, this.debounce ?? 200);
|
57
|
+
}
|
58
|
+
renderController() {
|
59
|
+
return f`
|
60
|
+
<luzmo-multi-language-field
|
61
|
+
.value=${this.value}
|
62
|
+
.language=${this.language ?? "en"}
|
63
|
+
.disabled=${this.disabled}
|
64
|
+
.size=${this.size}
|
65
|
+
.i18nPlaceholder=${this.placeholder ?? {}}
|
66
|
+
.invalid=${this.invalid}
|
67
|
+
@change=${this._handleEvent}
|
68
|
+
>
|
69
|
+
</luzmo-multi-language-field>
|
70
|
+
`;
|
71
|
+
}
|
72
|
+
};
|
73
|
+
m.styles = [a(m, m, "styles")];
|
74
|
+
let o = m;
|
75
|
+
r([
|
76
|
+
t({ type: Object, reflect: !0 })
|
77
|
+
], o.prototype, "value");
|
78
|
+
r([
|
79
|
+
t({ type: Boolean, reflect: !0 })
|
80
|
+
], o.prototype, "invalid");
|
81
|
+
r([
|
82
|
+
t({ type: Boolean, reflect: !0 })
|
83
|
+
], o.prototype, "readonly");
|
84
|
+
r([
|
85
|
+
t({ type: String, reflect: !0 })
|
86
|
+
], o.prototype, "language");
|
87
|
+
r([
|
88
|
+
t({ type: Object, reflect: !0 })
|
89
|
+
], o.prototype, "placeholder");
|
90
|
+
r([
|
91
|
+
t({ type: Number, reflect: !0 })
|
92
|
+
], o.prototype, "debounce");
|
93
|
+
r([
|
94
|
+
g("luzmo-multi-language-field")
|
95
|
+
], o.prototype, "multiLangFieldElement");
|
96
|
+
customElements.get("luzmo-edit-option-multi-language-field") || customElements.define(
|
97
|
+
"luzmo-edit-option-multi-language-field",
|
98
|
+
o
|
99
|
+
);
|
100
|
+
export {
|
101
|
+
o as LuzmoEditOptionMultiLangField
|
102
|
+
};
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import '@luzmo/lucero/number-field';
|
2
|
+
import { LuzmoEditOptionBase } from '../edit-option-base/edit-option-base';
|
3
|
+
export declare class LuzmoEditOptionNumberField extends LuzmoEditOptionBase {
|
4
|
+
static styles: import("lit").CSSResultArray[];
|
5
|
+
disabled: boolean;
|
6
|
+
min?: number;
|
7
|
+
max?: number;
|
8
|
+
default?: number;
|
9
|
+
value?: number;
|
10
|
+
step: number;
|
11
|
+
unit: boolean;
|
12
|
+
debounce: number;
|
13
|
+
fromOptionValue?: (value?: string | number) => number;
|
14
|
+
toOptionValue?: (value?: number) => string | number | any;
|
15
|
+
private numberField;
|
16
|
+
debounceTimeout: any;
|
17
|
+
private _handleEvent;
|
18
|
+
protected renderController(): import("lit-html").TemplateResult<1>;
|
19
|
+
}
|
@@ -0,0 +1,32 @@
|
|
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";var f=Object.getPrototypeOf;var d=Reflect.get;var a=(s,i,u)=>d(f(s),u,i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../index-D9vzXhtJ.cjs");const t=require("../property-Su1Q6aME.cjs"),m=require("../query-D5qWDopr.cjs"),c=require("../edit-option-base-DnrerC_T.cjs");var h=Object.defineProperty,o=(s,i,u,b)=>{for(var r=void 0,l=s.length-1,p;l>=0;l--)(p=s[l])&&(r=p(i,u,r)||r);return r&&h(i,u,r),r};const n=class n extends c.LuzmoEditOptionBase{constructor(){super(...arguments),this.disabled=!1,this.step=1,this.unit=!1,this.debounce=200}_handleEvent(){this.debounceTimeout&&clearTimeout(this.debounceTimeout),this.debounceTimeout=setTimeout(()=>{this.dispatchEvent(new CustomEvent("option-changed",{bubbles:!0,composed:!0,cancelable:!0,detail:{value:typeof this.toOptionValue=="function"?this.toOptionValue(this.numberField.value):this.numberField.value}}))},this.debounce??200)}renderController(){const i=typeof this.fromOptionValue=="function"?this.fromOptionValue(this.value):this.value,u=typeof this.fromOptionValue=="function"?this.fromOptionValue(this.default):this.default;return t.x`
|
21
|
+
<luzmo-number-field
|
22
|
+
.value=${i??u??0}
|
23
|
+
.size=${this.size}
|
24
|
+
.step=${this.step}
|
25
|
+
.min=${this.min}
|
26
|
+
.max=${this.max}
|
27
|
+
.unit=${this.unit}
|
28
|
+
.disabled=${this.disabled}
|
29
|
+
@change=${this._handleEvent}
|
30
|
+
>
|
31
|
+
</luzmo-number-field>
|
32
|
+
`}};n.styles=[a(n,n,"styles")];let e=n;o([t.n({type:Boolean,reflect:!0})],e.prototype,"disabled");o([t.n({type:Number,reflect:!0})],e.prototype,"min");o([t.n({type:Number,reflect:!0})],e.prototype,"max");o([t.n({type:Number,reflect:!0})],e.prototype,"default");o([t.n({type:Number,reflect:!0})],e.prototype,"value");o([t.n({type:Number,reflect:!0})],e.prototype,"step");o([t.n({type:String,reflect:!0})],e.prototype,"unit");o([t.n({type:Number,reflect:!0})],e.prototype,"debounce");o([t.n()],e.prototype,"fromOptionValue");o([t.n()],e.prototype,"toOptionValue");o([m.e("luzmo-number-field")],e.prototype,"numberField");customElements.get("luzmo-edit-option-number-field")||customElements.define("luzmo-edit-option-number-field",e);exports.LuzmoEditOptionNumberField=e;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { LuzmoEditOptionNumberField } from './edit-option-number-field';
|
2
|
+
declare global {
|
3
|
+
interface HTMLElementTagNameMap {
|
4
|
+
'luzmo-edit-option-number-field': LuzmoEditOptionNumberField;
|
5
|
+
}
|
6
|
+
}
|
7
|
+
export { LuzmoEditOptionNumberField } from './edit-option-number-field';
|
@@ -0,0 +1,115 @@
|
|
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
|
+
var a = Object.getPrototypeOf;
|
21
|
+
var d = Reflect.get;
|
22
|
+
var s = (r, t, u) => d(a(r), u, t);
|
23
|
+
import "../index-DszPbTTD.js";
|
24
|
+
import { x as f, n as l } from "../property-CD3dwBJC.js";
|
25
|
+
import { e as p } from "../query-Ddbd72Um.js";
|
26
|
+
import { L as b } from "../edit-option-base-oIvlolV9.js";
|
27
|
+
const z = () => {
|
28
|
+
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
29
|
+
const r = document.createElement("style");
|
30
|
+
r.setAttribute("data-luzmo-vars", ""), r.textContent = 'html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: rgb(140, 140, 140);--luzmo-border-color-full-down: rgb(110, 110, 110);--luzmo-border-color-full-focus: rgb(140, 140, 140);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: #f0f0fc;--luzmo-background-color-down: #f1f1ff;--luzmo-background-color-focus: #f0f0fc;--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: rgb(225, 225, 225);--luzmo-background-color-highlight-down: rgb(215, 215, 215);--luzmo-background-color-highlight-focus: rgb(225, 225, 225);--luzmo-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(r);
|
31
|
+
}
|
32
|
+
};
|
33
|
+
z();
|
34
|
+
var h = Object.defineProperty, e = (r, t, u, g) => {
|
35
|
+
for (var i = void 0, n = r.length - 1, c; n >= 0; n--)
|
36
|
+
(c = r[n]) && (i = c(t, u, i) || i);
|
37
|
+
return i && h(t, u, i), i;
|
38
|
+
};
|
39
|
+
const m = class m extends b {
|
40
|
+
constructor() {
|
41
|
+
super(...arguments), this.disabled = !1, this.step = 1, this.unit = !1, this.debounce = 200;
|
42
|
+
}
|
43
|
+
_handleEvent() {
|
44
|
+
this.debounceTimeout && clearTimeout(this.debounceTimeout), this.debounceTimeout = setTimeout(() => {
|
45
|
+
this.dispatchEvent(
|
46
|
+
new CustomEvent("option-changed", {
|
47
|
+
bubbles: !0,
|
48
|
+
composed: !0,
|
49
|
+
cancelable: !0,
|
50
|
+
detail: {
|
51
|
+
value: typeof this.toOptionValue == "function" ? this.toOptionValue(this.numberField.value) : this.numberField.value
|
52
|
+
}
|
53
|
+
})
|
54
|
+
);
|
55
|
+
}, this.debounce ?? 200);
|
56
|
+
}
|
57
|
+
renderController() {
|
58
|
+
const t = typeof this.fromOptionValue == "function" ? this.fromOptionValue(this.value) : this.value, u = typeof this.fromOptionValue == "function" ? this.fromOptionValue(this.default) : this.default;
|
59
|
+
return f`
|
60
|
+
<luzmo-number-field
|
61
|
+
.value=${t ?? u ?? 0}
|
62
|
+
.size=${this.size}
|
63
|
+
.step=${this.step}
|
64
|
+
.min=${this.min}
|
65
|
+
.max=${this.max}
|
66
|
+
.unit=${this.unit}
|
67
|
+
.disabled=${this.disabled}
|
68
|
+
@change=${this._handleEvent}
|
69
|
+
>
|
70
|
+
</luzmo-number-field>
|
71
|
+
`;
|
72
|
+
}
|
73
|
+
};
|
74
|
+
m.styles = [s(m, m, "styles")];
|
75
|
+
let o = m;
|
76
|
+
e([
|
77
|
+
l({ type: Boolean, reflect: !0 })
|
78
|
+
], o.prototype, "disabled");
|
79
|
+
e([
|
80
|
+
l({ type: Number, reflect: !0 })
|
81
|
+
], o.prototype, "min");
|
82
|
+
e([
|
83
|
+
l({ type: Number, reflect: !0 })
|
84
|
+
], o.prototype, "max");
|
85
|
+
e([
|
86
|
+
l({ type: Number, reflect: !0 })
|
87
|
+
], o.prototype, "default");
|
88
|
+
e([
|
89
|
+
l({ type: Number, reflect: !0 })
|
90
|
+
], o.prototype, "value");
|
91
|
+
e([
|
92
|
+
l({ type: Number, reflect: !0 })
|
93
|
+
], o.prototype, "step");
|
94
|
+
e([
|
95
|
+
l({ type: String, reflect: !0 })
|
96
|
+
], o.prototype, "unit");
|
97
|
+
e([
|
98
|
+
l({ type: Number, reflect: !0 })
|
99
|
+
], o.prototype, "debounce");
|
100
|
+
e([
|
101
|
+
l()
|
102
|
+
], o.prototype, "fromOptionValue");
|
103
|
+
e([
|
104
|
+
l()
|
105
|
+
], o.prototype, "toOptionValue");
|
106
|
+
e([
|
107
|
+
p("luzmo-number-field")
|
108
|
+
], o.prototype, "numberField");
|
109
|
+
customElements.get("luzmo-edit-option-number-field") || customElements.define(
|
110
|
+
"luzmo-edit-option-number-field",
|
111
|
+
o
|
112
|
+
);
|
113
|
+
export {
|
114
|
+
o as LuzmoEditOptionNumberField
|
115
|
+
};
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { Placement } from '@luzmo/lucero';
|
2
|
+
import '@luzmo/lucero/menu';
|
3
|
+
import '@luzmo/lucero/picker';
|
4
|
+
import { TemplateResult } from 'lit';
|
5
|
+
import { LuzmoEditOptionBase } from '../edit-option-base/edit-option-base';
|
6
|
+
export declare class LuzmoEditOptionPicker extends LuzmoEditOptionBase {
|
7
|
+
static styles: import("lit").CSSResultArray[];
|
8
|
+
values: Record<string, string>;
|
9
|
+
disabled: boolean;
|
10
|
+
/**
|
11
|
+
* @type {"top" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end"}
|
12
|
+
* @attr
|
13
|
+
*/
|
14
|
+
placement: Placement;
|
15
|
+
value?: string;
|
16
|
+
fromOptionValue?: (value: string | number | any) => string;
|
17
|
+
toOptionValue?: (value: string) => string | number | any;
|
18
|
+
default?: string;
|
19
|
+
private _handleEvent;
|
20
|
+
private generateMenuItems;
|
21
|
+
protected renderController(): TemplateResult<1>;
|
22
|
+
}
|
@@ -0,0 +1,35 @@
|
|
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";var h=Object.getPrototypeOf;var c=Reflect.get;var p=(r,e,o)=>c(h(r),o,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../index-Bofs4Q2E.cjs");require("../index-Bjs6Yqet.cjs");const n=require("../property-Su1Q6aME.cjs"),d=require("../edit-option-base-DnrerC_T.cjs");var m=Object.defineProperty,i=(r,e,o,f)=>{for(var s=void 0,a=r.length-1,u;a>=0;a--)(u=r[a])&&(s=u(e,o,s)||s);return s&&m(e,o,s),s};const l=class l extends d.LuzmoEditOptionBase{constructor(){super(...arguments),this.values={},this.disabled=!1,this.placement="bottom-end"}_handleEvent(e){this.dispatchEvent(new CustomEvent("option-changed",{bubbles:!0,composed:!0,cancelable:!0,detail:{value:typeof this.toOptionValue=="function"?this.toOptionValue(e.detail):e.detail}}))}generateMenuItems(){return n.x`
|
21
|
+
${Object.entries(this.values).map(([e,o])=>n.x`
|
22
|
+
<luzmo-menu-item value=${e}> ${o} </luzmo-menu-item>
|
23
|
+
`)}
|
24
|
+
`}renderController(){const e=typeof this.fromOptionValue=="function"?this.fromOptionValue(this.value):this.value,o=typeof this.fromOptionValue=="function"?this.fromOptionValue(this.default):this.default;return n.x`
|
25
|
+
<luzmo-picker
|
26
|
+
.value=${e!=null&&e.length?e:o??""}
|
27
|
+
.size=${this.size}
|
28
|
+
variant="highlight"
|
29
|
+
.placement=${this.placement}
|
30
|
+
@change=${this._handleEvent}
|
31
|
+
.disabled=${this.disabled}
|
32
|
+
>
|
33
|
+
${this.generateMenuItems()}
|
34
|
+
</luzmo-picker>
|
35
|
+
`}};l.styles=[p(l,l,"styles")];let t=l;i([n.n({type:Object})],t.prototype,"values");i([n.n({type:Boolean,reflect:!0})],t.prototype,"disabled");i([n.n()],t.prototype,"placement");i([n.n({type:String,reflect:!0})],t.prototype,"value");i([n.n()],t.prototype,"fromOptionValue");i([n.n()],t.prototype,"toOptionValue");i([n.n({type:String})],t.prototype,"default");customElements.get("luzmo-edit-option-picker")||customElements.define("luzmo-edit-option-picker",t);exports.LuzmoEditOptionPicker=t;
|
@@ -0,0 +1,106 @@
|
|
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
|
+
var z = Object.getPrototypeOf;
|
21
|
+
var d = Reflect.get;
|
22
|
+
var s = (l, o, r) => d(z(l), r, o);
|
23
|
+
import "../index-BD3VxQBH.js";
|
24
|
+
import "../index-CkDDDzuJ.js";
|
25
|
+
import { x as c, n as t } from "../property-CD3dwBJC.js";
|
26
|
+
import { L as f } from "../edit-option-base-oIvlolV9.js";
|
27
|
+
const p = () => {
|
28
|
+
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
29
|
+
const l = document.createElement("style");
|
30
|
+
l.setAttribute("data-luzmo-vars", ""), l.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(l);
|
31
|
+
}
|
32
|
+
};
|
33
|
+
p();
|
34
|
+
var b = Object.defineProperty, u = (l, o, r, g) => {
|
35
|
+
for (var m = void 0, n = l.length - 1, a; n >= 0; n--)
|
36
|
+
(a = l[n]) && (m = a(o, r, m) || m);
|
37
|
+
return m && b(o, r, m), m;
|
38
|
+
};
|
39
|
+
const i = class i extends f {
|
40
|
+
constructor() {
|
41
|
+
super(...arguments), this.values = {}, this.disabled = !1, this.placement = "bottom-end";
|
42
|
+
}
|
43
|
+
_handleEvent(o) {
|
44
|
+
this.dispatchEvent(
|
45
|
+
new CustomEvent("option-changed", {
|
46
|
+
bubbles: !0,
|
47
|
+
composed: !0,
|
48
|
+
cancelable: !0,
|
49
|
+
detail: {
|
50
|
+
value: typeof this.toOptionValue == "function" ? this.toOptionValue(o.detail) : o.detail
|
51
|
+
}
|
52
|
+
})
|
53
|
+
);
|
54
|
+
}
|
55
|
+
generateMenuItems() {
|
56
|
+
return c`
|
57
|
+
${Object.entries(this.values).map(
|
58
|
+
([o, r]) => c`
|
59
|
+
<luzmo-menu-item value=${o}> ${r} </luzmo-menu-item>
|
60
|
+
`
|
61
|
+
)}
|
62
|
+
`;
|
63
|
+
}
|
64
|
+
renderController() {
|
65
|
+
const o = typeof this.fromOptionValue == "function" ? this.fromOptionValue(this.value) : this.value, r = typeof this.fromOptionValue == "function" ? this.fromOptionValue(this.default) : this.default;
|
66
|
+
return c`
|
67
|
+
<luzmo-picker
|
68
|
+
.value=${o != null && o.length ? o : r ?? ""}
|
69
|
+
.size=${this.size}
|
70
|
+
variant="highlight"
|
71
|
+
.placement=${this.placement}
|
72
|
+
@change=${this._handleEvent}
|
73
|
+
.disabled=${this.disabled}
|
74
|
+
>
|
75
|
+
${this.generateMenuItems()}
|
76
|
+
</luzmo-picker>
|
77
|
+
`;
|
78
|
+
}
|
79
|
+
};
|
80
|
+
i.styles = [s(i, i, "styles")];
|
81
|
+
let e = i;
|
82
|
+
u([
|
83
|
+
t({ type: Object })
|
84
|
+
], e.prototype, "values");
|
85
|
+
u([
|
86
|
+
t({ type: Boolean, reflect: !0 })
|
87
|
+
], e.prototype, "disabled");
|
88
|
+
u([
|
89
|
+
t()
|
90
|
+
], e.prototype, "placement");
|
91
|
+
u([
|
92
|
+
t({ type: String, reflect: !0 })
|
93
|
+
], e.prototype, "value");
|
94
|
+
u([
|
95
|
+
t()
|
96
|
+
], e.prototype, "fromOptionValue");
|
97
|
+
u([
|
98
|
+
t()
|
99
|
+
], e.prototype, "toOptionValue");
|
100
|
+
u([
|
101
|
+
t({ type: String })
|
102
|
+
], e.prototype, "default");
|
103
|
+
customElements.get("luzmo-edit-option-picker") || customElements.define("luzmo-edit-option-picker", e);
|
104
|
+
export {
|
105
|
+
e as LuzmoEditOptionPicker
|
106
|
+
};
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import '@luzmo/lucero/number-field';
|
2
|
+
import { CSSResultArray } from 'lit';
|
3
|
+
import { LuzmoEditOptionBase } from '../edit-option-base/edit-option-base';
|
4
|
+
export declare class LuzmoEditOptionPositionsNumberField extends LuzmoEditOptionBase {
|
5
|
+
static get styles(): CSSResultArray;
|
6
|
+
positions?: string[];
|
7
|
+
values?: Record<string, number>;
|
8
|
+
canSync?: boolean;
|
9
|
+
sync?: boolean;
|
10
|
+
positionConfiguration?: Record<string, {
|
11
|
+
min: number;
|
12
|
+
max: number;
|
13
|
+
step: number;
|
14
|
+
default: number;
|
15
|
+
}>;
|
16
|
+
invalid: boolean;
|
17
|
+
readonly: boolean;
|
18
|
+
debounce: number;
|
19
|
+
syncedValue?: number;
|
20
|
+
debounceTimeout: any;
|
21
|
+
_positions: string[][];
|
22
|
+
private _calculateSyncedValue;
|
23
|
+
toggleSync(): void;
|
24
|
+
private _handleEvent;
|
25
|
+
private _renderNumberField;
|
26
|
+
protected willUpdate(): void;
|
27
|
+
protected renderController(): import("lit-html").TemplateResult<1>;
|
28
|
+
}
|
@@ -0,0 +1,42 @@
|
|
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"});const b=require("../luzmo-icons-BrtBl3E5.cjs");require("../index-D9vzXhtJ.cjs");const i=require("../property-Su1Q6aME.cjs"),f=require("../state-ByiKNRhp.cjs"),v=require("../edit-option-base-DnrerC_T.cjs"),g=":host{--edit-option-positions-number-field-container-row-gap: var( --luzmo-spacing-2 );--edit-option-positions-number-field-container-column-gap: var( --luzmo-spacing-2 );--edit-option-positions-number-field-sync-height: calc( var(--luzmo-component-height) * 1.5 )}:host([size=s]){--edit-option-positions-number-field-sync-height: calc( var(--luzmo-component-height-s) * 1.5 )}:host([size=l]){--edit-option-positions-number-field-sync-height: calc( var(--luzmo-component-height-l) * 1.5 )}:host([size=xl]){--edit-option-positions-number-field-sync-height: calc( var(--luzmo-component-height-xl) * 1.5 )}:host{--var: test}.positions-container{max-width:var(--luzmo-edit-option-positions-number-field-container-max-width, var(--edit-option-positions-number-field-container-max-width));display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);row-gap:var(--luzmo-edit-option-positions-number-field-container-row-gap, var(--edit-option-positions-number-field-container-row-gap));column-gap:var(--luzmo-edit-option-positions-number-field-container-column-gap, var(--edit-option-positions-number-field-container-column-gap))}.position,.sync-button{display:flex;align-items:center;justify-content:center}.sync-button{cursor:pointer}.sync-button[position=center].sync{border:var(--luzmo-edit-option-positions-number-field-sync-border-width, var(--luzmo-border-width)) solid var(--luzmo-edit-option-positions-number-field-sync-border-color, var(--luzmo-primary));border-radius:var(--luzmo-edit-option-positions-number-field-sync-border-radius, var(--luzmo-border-radius));height:var(--luzmo-edit-option-positions-number-field-sync-height, var(--edit-option-positions-number-field-sync-height))}.no-sync-center{border:var(--luzmo-edit-option-positions-number-field-no-sync-center-border-width, var(--luzmo-border-width)) solid var(--luzmo-edit-option-positions-number-field-no-sync-center-border-color, var(--luzmo-border-color));border-radius:var(--luzmo-edit-option-positions-number-field-no-sync-center-border-radius, var(--luzmo-border-radius));height:var(--luzmo-edit-option-positions-number-field-sync-height, var(--edit-option-positions-number-field-sync-height));background-color:var(--luzmo-edit-option-positions-number-field-no-sync-center-background-color, var(--luzmo-background-color-highlight))}";var z=Object.defineProperty,u=(p,e,o,n)=>{for(var t=void 0,s=p.length-1,l;s>=0;s--)(l=p[s])&&(t=l(e,o,t)||t);return t&&z(e,o,t),t};class r extends v.LuzmoEditOptionBase{constructor(){super(...arguments),this.positions=["top","right","bottom","left"],this.invalid=!1,this.readonly=!1,this.debounce=200,this._positions=[["top-left","top","top-right"],["left","center","right"],["bottom-left","bottom","bottom-right"]]}static get styles(){return[i.r(g)]}_calculateSyncedValue(){var o;let e;return(o=this.positions)==null||o.forEach(n=>{var t,s,l;e=typeof e=="number"&&((t=this.values)!=null&&t[n])?Math.min(e,(s=this.values)==null?void 0:s[n]):(l=this.values)==null?void 0:l[n]}),e}toggleSync(){if(this.sync=!this.sync,this.sync&&(this.syncedValue=this._calculateSyncedValue(),typeof this.syncedValue=="number")){this.values={...this.values};for(const e of this.positions??[])this.values[e]=this.syncedValue}}_handleEvent(e){const o=e.target.getAttribute("position"),n=e.target.value;let t={};if(!(!o||typeof n!="number")){if(this.canSync&&this.sync&&o==="center"){this.syncedValue=n;for(const s of this.positions??[])t[s]=n}else t={...this.values,[o]:n};this.debounceTimeout&&clearTimeout(this.debounceTimeout),this.debounceTimeout=setTimeout(()=>{var c;const s=Object.keys(this.values??{}),l=Object.keys(t);let a=!0;s.length!==l.length&&(a=!1);for(const d of s)((c=this.values)==null?void 0:c[d])!==t[d]&&(a=!1);a||(this.dispatchEvent(new CustomEvent("option-changed",{bubbles:!0,composed:!0,cancelable:!0,detail:{values:{...t}}})),this.values=t)},this.debounce??200)}}_renderNumberField(e){var o,n,t,s,l,a,c,d,h,m,y;return(o=this.positions)!=null&&o.includes(e)||e==="center"?this.canSync&&(this.sync&&e!=="center"||!this.sync&&e==="center")?i.x`<div
|
21
|
+
class="sync-button ${this.sync?"":"sync"}"
|
22
|
+
position=${e}
|
23
|
+
@click=${this.toggleSync}
|
24
|
+
>
|
25
|
+
${b.O2(b.$1)}
|
26
|
+
</div>`:!this.canSync&&!((n=this.positions)!=null&&n.includes("center"))&&e==="center"?i.x`<div class="no-sync-center"></div>`:i.x`<div class="position">
|
27
|
+
<luzmo-number-field
|
28
|
+
position=${e}
|
29
|
+
.value=${this.sync&&this.canSync?this.syncedValue??0:((t=this.values)==null?void 0:t[e])??((l=(s=this.positionConfiguration)==null?void 0:s[e])==null?void 0:l.default)??0}
|
30
|
+
.disabled=${this.disabled}
|
31
|
+
.size=${this.size}
|
32
|
+
.min=${((c=(a=this.positionConfiguration)==null?void 0:a[e])==null?void 0:c.min)??0}
|
33
|
+
.max=${((h=(d=this.positionConfiguration)==null?void 0:d[e])==null?void 0:h.max)??100}
|
34
|
+
.step=${((y=(m=this.positionConfiguration)==null?void 0:m[e])==null?void 0:y.step)??1}
|
35
|
+
.invalid=${this.invalid}
|
36
|
+
@change=${this._handleEvent}
|
37
|
+
@input=${this._handleEvent}
|
38
|
+
>
|
39
|
+
</luzmo-number-field>
|
40
|
+
</div>`:i.x`<div class="position"></div>`}willUpdate(){!this.canSync&&this.sync&&(this.sync=!1)}renderController(){this._calculateSyncedValue();const e=this._positions.map(o=>{const n=o.map(t=>this._renderNumberField(t));return i.x`${n}`});return i.x`<div class="positions-container-wrapper">
|
41
|
+
<div class="positions-container">${e}</div>
|
42
|
+
</div>`}}u([i.n({type:Array,reflect:!0})],r.prototype,"positions");u([i.n({type:Object,reflect:!0})],r.prototype,"values");u([i.n({type:Boolean,reflect:!0,attribute:"can-sync"})],r.prototype,"canSync");u([i.n({type:Boolean,reflect:!0})],r.prototype,"sync");u([i.n({type:Object})],r.prototype,"positionConfiguration");u([i.n({type:Boolean,reflect:!0})],r.prototype,"invalid");u([i.n({type:Boolean,reflect:!0})],r.prototype,"readonly");u([i.n({type:Number,reflect:!0})],r.prototype,"debounce");u([f.r()],r.prototype,"syncedValue");customElements.get("luzmo-edit-option-positions-number-field")||customElements.define("luzmo-edit-option-positions-number-field",r);exports.LuzmoEditOptionPositionsNumberField=r;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { LuzmoEditOptionPositionsNumberField } from './edit-option-positions-number-field';
|
2
|
+
declare global {
|
3
|
+
interface HTMLElementTagNameMap {
|
4
|
+
'luzmo-edit-option-positions-number-field': LuzmoEditOptionPositionsNumberField;
|
5
|
+
}
|
6
|
+
}
|
7
|
+
export { LuzmoEditOptionPositionsNumberField } from './edit-option-positions-number-field';
|