bromcom-ui 2.7.38-rc.12 → 2.7.38-rc.14
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/dist/bromcom-ui/bromcom-ui.css +1 -1
- package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
- package/dist/bromcom-ui/{p-1a570aa8.entry.js → p-047c35b1.entry.js} +1 -1
- package/dist/bromcom-ui/p-0fb362d7.entry.js +5 -0
- package/dist/bromcom-ui/p-16b50160.js +1 -1
- package/dist/bromcom-ui/p-1ff8838d.entry.js +5 -0
- package/dist/bromcom-ui/p-27429bb5.entry.js +5 -0
- package/dist/bromcom-ui/{p-449e5749.entry.js → p-29866cdb.entry.js} +1 -1
- package/dist/bromcom-ui/p-2a1f44d8.entry.js +5 -0
- package/dist/bromcom-ui/p-2a5b5ecc.entry.js +5 -0
- package/dist/bromcom-ui/p-335dd2b5.entry.js +5 -0
- package/dist/bromcom-ui/p-3cbeb4dc.entry.js +5 -0
- package/dist/bromcom-ui/{p-4f019757.entry.js → p-3ed25f2b.entry.js} +2 -2
- package/dist/bromcom-ui/p-4487e8c2.js +1 -1
- package/dist/bromcom-ui/{p-379c63de.js → p-44f3ca76.js} +1 -1
- package/dist/bromcom-ui/p-468af02f.entry.js +5 -0
- package/dist/bromcom-ui/p-480024c3.js +5 -0
- package/dist/bromcom-ui/p-4b2852a8.entry.js +5 -0
- package/dist/bromcom-ui/p-4c91002a.js +5 -0
- package/dist/bromcom-ui/p-4debe197.entry.js +5 -0
- package/dist/bromcom-ui/p-4f5acd80.entry.js +5 -0
- package/dist/bromcom-ui/p-503a376b.entry.js +5 -0
- package/dist/bromcom-ui/p-56898932.js +1 -1
- package/dist/bromcom-ui/p-58c108a5.entry.js +5 -0
- package/dist/bromcom-ui/p-5b664dec.js +5 -0
- package/dist/bromcom-ui/p-5bf68f57.entry.js +5 -0
- package/dist/bromcom-ui/p-5d70f446.entry.js +5 -0
- package/dist/bromcom-ui/{p-a183a09f.entry.js → p-5de651cc.entry.js} +1 -1
- package/dist/bromcom-ui/p-5ebfa466.entry.js +5 -0
- package/dist/bromcom-ui/p-60947a22.entry.js +5 -0
- package/dist/bromcom-ui/p-67e6f5fe.entry.js +5 -0
- package/dist/bromcom-ui/p-687f8d9c.entry.js +5 -0
- package/dist/bromcom-ui/p-6d7be2d1.entry.js +5 -0
- package/dist/bromcom-ui/p-6e9e2e3b.entry.js +5 -0
- package/dist/bromcom-ui/{p-93812e5a.js → p-74bac994.js} +1 -1
- package/dist/bromcom-ui/p-882f8cb1.entry.js +5 -0
- package/dist/bromcom-ui/p-8b9d2bb3.entry.js +5 -0
- package/dist/bromcom-ui/p-9799c72f.entry.js +5 -0
- package/dist/bromcom-ui/p-98af14a9.entry.js +5 -0
- package/dist/bromcom-ui/p-a1c843ae.entry.js +5 -0
- package/dist/bromcom-ui/p-a373d8b6.entry.js +5 -0
- package/dist/bromcom-ui/p-a3b9fc0c.js +5 -0
- package/dist/bromcom-ui/p-a429e85b.js +1 -1
- package/dist/bromcom-ui/p-ab6d3082.entry.js +5 -0
- package/dist/bromcom-ui/p-ac1f9851.entry.js +5 -0
- package/dist/bromcom-ui/p-aff12492.entry.js +5 -0
- package/dist/bromcom-ui/p-b963626d.js +5 -0
- package/dist/bromcom-ui/p-ba73ad6b.entry.js +5 -0
- package/dist/bromcom-ui/{p-6a4cf91a.js → p-bd031390.js} +1 -1
- package/dist/bromcom-ui/p-bdb0dfda.entry.js +5 -0
- package/dist/bromcom-ui/p-bef9e2fe.entry.js +5 -0
- package/dist/bromcom-ui/p-c0f70afa.entry.js +5 -0
- package/dist/bromcom-ui/p-ce1f522e.entry.js +5 -0
- package/dist/bromcom-ui/p-cebefc96.entry.js +5 -0
- package/dist/bromcom-ui/p-d01e8312.entry.js +5 -0
- package/dist/bromcom-ui/p-d651e723.js +5 -0
- package/dist/bromcom-ui/p-d73e3d1d.entry.js +5 -0
- package/dist/bromcom-ui/p-d8fd3bbb.entry.js +5 -0
- package/dist/bromcom-ui/p-d9baf5e7.entry.js +5 -0
- package/dist/bromcom-ui/p-dda54e92.entry.js +5 -0
- package/dist/bromcom-ui/p-e34ad7a7.entry.js +5 -0
- package/dist/bromcom-ui/p-e38087d9.entry.js +5 -0
- package/dist/bromcom-ui/p-e3bfaffd.entry.js +5 -0
- package/dist/bromcom-ui/p-e74b4689.entry.js +5 -0
- package/dist/bromcom-ui/p-ea21c68d.entry.js +5 -0
- package/dist/bromcom-ui/p-ef787294.entry.js +5 -0
- package/dist/cjs/{bcm-ab921827.js → bcm-634604e3.js} +4 -4
- package/dist/cjs/bcm-accordion.cjs.entry.js +3 -1
- package/dist/cjs/bcm-alert.cjs.entry.js +4 -3
- package/dist/cjs/bcm-attendance.cjs.entry.js +3 -1
- package/dist/cjs/bcm-avatar_2.cjs.entry.js +12 -11
- package/dist/cjs/bcm-breadcrumb.cjs.entry.js +2 -1
- package/dist/cjs/bcm-button-group.cjs.entry.js +7 -6
- package/dist/cjs/bcm-button.cjs.entry.js +13 -12
- package/dist/cjs/bcm-card.cjs.entry.js +6 -5
- package/dist/cjs/bcm-checkbox-group.cjs.entry.js +25 -24
- package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +6 -5
- package/dist/cjs/bcm-checkbox_2.cjs.entry.js +11 -10
- package/dist/cjs/bcm-chip.cjs.entry.js +3 -2
- package/dist/cjs/bcm-collapse.cjs.entry.js +2 -1
- package/dist/cjs/bcm-color-input.cjs.entry.js +7 -6
- package/dist/cjs/bcm-colorful_2.cjs.entry.js +10 -9
- package/dist/cjs/bcm-date-picker.cjs.entry.js +4 -3
- package/dist/cjs/bcm-datetime-picker.cjs.entry.js +9 -8
- package/dist/cjs/bcm-default.cjs.entry.js +3 -1
- package/dist/cjs/bcm-drawer.cjs.entry.js +9 -8
- package/dist/cjs/bcm-dropdown.cjs.entry.js +7 -6
- package/dist/cjs/bcm-expansion-panel.cjs.entry.js +5 -4
- package/dist/cjs/bcm-form-2.cjs.entry.js +5 -4
- package/dist/cjs/bcm-form.cjs.entry.js +2 -2
- package/dist/cjs/{bcm-list.cjs.entry.js → bcm-icon_3.cjs.entry.js} +386 -115
- package/dist/cjs/bcm-input-custom.cjs.entry.js +73 -0
- package/dist/cjs/bcm-input.cjs.entry.js +12 -11
- package/dist/cjs/bcm-item.cjs.entry.js +5 -4
- package/dist/cjs/bcm-items.cjs.entry.js +4 -3
- package/dist/cjs/bcm-label_2.cjs.entry.js +39 -15
- package/dist/cjs/bcm-link.cjs.entry.js +3 -3
- package/dist/cjs/bcm-menu.cjs.entry.js +9 -8
- package/dist/cjs/bcm-modal.cjs.entry.js +7 -6
- package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +6 -5
- package/dist/cjs/bcm-popconfirm.cjs.entry.js +5 -4
- package/dist/cjs/bcm-popover.cjs.entry.js +88 -38
- package/dist/cjs/bcm-progress.cjs.entry.js +5 -4
- package/dist/cjs/bcm-radio-group.cjs.entry.js +77 -211
- package/dist/cjs/bcm-radio.cjs.entry.js +35 -76
- package/dist/cjs/bcm-range.cjs.entry.js +6 -5
- package/dist/cjs/bcm-select.cjs.entry.js +2 -2
- package/dist/cjs/bcm-skeleton.cjs.entry.js +3 -1
- package/dist/cjs/bcm-step.cjs.entry.js +3 -2
- package/dist/cjs/bcm-stepper.cjs.entry.js +54 -27
- package/dist/cjs/bcm-switch.cjs.entry.js +9 -8
- package/dist/cjs/bcm-tab-group.cjs.entry.js +160 -0
- package/dist/cjs/bcm-tab-item-header.cjs.entry.js +87 -0
- package/dist/cjs/bcm-tab-item.cjs.entry.js +104 -0
- package/dist/cjs/bcm-tag.cjs.entry.js +15 -14
- package/dist/cjs/bcm-text.cjs.entry.js +63 -0
- package/dist/cjs/bcm-textarea.cjs.entry.js +7 -6
- package/dist/cjs/bcm-time-picker.cjs.entry.js +4 -3
- package/dist/cjs/bromcom-ui.cjs.js +1 -1
- package/dist/cjs/color-helper-0e3e8ce5.js +86 -0
- package/dist/cjs/{color-helper-c9882bd8.js → colors-25c96ed6.js} +4 -81
- package/dist/cjs/{floating-ui-0ca84e74.js → floating-ui-c23acc6c.js} +2 -2
- package/dist/cjs/{generate-e8354325.js → generate-9739666b.js} +38 -1
- package/dist/cjs/{input-template-0c520e17.js → input-template-8307182a.js} +6 -6
- package/dist/cjs/{json-parse-decarator-c7342a6f.js → json-parse-decarator-7a7415e0.js} +1 -1
- package/dist/cjs/{label-template-e83fc65c.js → label-template-098a30a4.js} +3 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{number-helper-da6fbfb4.js → number-helper-063f8c7b.js} +1 -1
- package/dist/cjs/old-bcm-popover-box.cjs.entry.js +7 -6
- package/dist/cjs/old-bcm-popover.cjs.entry.js +5 -4
- package/dist/cjs/{popover-placement-5db8811b.js → popover-placement-69d37a5f.js} +1 -1
- package/dist/cjs/{slot-template-175c51fb.js → slot-template-7a07f865.js} +1 -1
- package/dist/cjs/{stepper-states-012f44b4.js → stepper-states-7dd1eab4.js} +1 -1
- package/dist/cjs/{string-helper-087a8134.js → string-helper-71b10c53.js} +2 -2
- package/dist/cjs/{tooltip-helper-aa6e37cc.js → tooltip-helper-01c69059.js} +43 -13
- package/dist/cjs/{validators-21a28841.js → validators-861b4246.js} +1 -1
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/external-source/bcm-toast-helper.js +20 -0
- package/dist/collection/components/external-source/test.js/bcm-toast-helper.js +20 -0
- package/dist/collection/components/molecules/popover/popover.js +106 -1
- package/dist/collection/components/molecules/radio/{group.js → radio-group.js} +163 -246
- package/dist/collection/components/molecules/radio/radio.js +42 -132
- package/dist/collection/components/molecules/search/search.js +20 -1
- package/dist/collection/components/molecules/stepper/stepper.js +55 -35
- package/dist/collection/components/molecules/tooltip/tooltip.js +108 -1
- package/dist/collection/components/organism/list/list.js +21 -2
- package/dist/collection/components/organism/states/bcm-list2.states.js +1 -1
- package/dist/collection/components/other/input-custom/input-custom.js +249 -0
- package/dist/collection/helper/generate.js +36 -0
- package/dist/collection/helper/popover-helper.js +57 -29
- package/dist/collection/helper/tooltip-helper.js +33 -4
- package/dist/collection/templates/list-template.js +2 -2
- package/dist/components/bcm-input-custom.d.ts +11 -0
- package/dist/components/bcm-input-custom.js +114 -0
- package/dist/components/bcm-list.js +9 -7
- package/dist/components/bcm-popover.js +82 -29
- package/dist/components/bcm-radio-group.js +88 -230
- package/dist/components/bcm-stepper.js +51 -33
- package/dist/components/bcm-tab.js +1 -1
- package/dist/components/bcm-tabs-content.js +1 -1
- package/dist/components/bcm-tabs.js +1 -1
- package/dist/components/bcm-tag.js +1 -1
- package/dist/components/color-helper.js +1 -405
- package/dist/{esm/color-helper-b5e9aa56.js → components/colors2.js} +2 -79
- package/dist/components/generate.js +37 -1
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +1 -0
- package/dist/components/input-template.js +1 -14
- package/dist/components/radio.js +38 -82
- package/dist/components/search.js +3 -1
- package/dist/components/tooltip-helper.js +33 -3
- package/dist/components/tooltip.js +28 -2
- package/dist/components/types.js +14 -27
- package/dist/components/types2.js +25 -25
- package/dist/components/types3.js +32 -0
- package/dist/esm/bcm-9f50af9c.js +1 -1
- package/dist/esm/bcm-accordion.entry.js +3 -1
- package/dist/esm/bcm-alert.entry.js +2 -1
- package/dist/esm/bcm-attendance.entry.js +3 -1
- package/dist/esm/bcm-avatar_2.entry.js +6 -5
- package/dist/esm/bcm-breadcrumb.entry.js +2 -1
- package/dist/esm/bcm-button-group.entry.js +3 -2
- package/dist/esm/bcm-button.entry.js +4 -3
- package/dist/esm/bcm-card.entry.js +3 -2
- package/dist/esm/bcm-checkbox-group.entry.js +9 -8
- package/dist/esm/bcm-checkbox-lite_9.entry.js +3 -2
- package/dist/esm/bcm-checkbox_2.entry.js +4 -3
- package/dist/esm/bcm-chip.entry.js +3 -2
- package/dist/esm/bcm-collapse.entry.js +2 -1
- package/dist/esm/bcm-color-input.entry.js +5 -4
- package/dist/esm/bcm-colorful_2.entry.js +6 -5
- package/dist/esm/bcm-date-picker.entry.js +3 -2
- package/dist/esm/bcm-datetime-picker.entry.js +3 -2
- package/dist/esm/bcm-default.entry.js +3 -1
- package/dist/esm/bcm-drawer.entry.js +6 -5
- package/dist/esm/bcm-dropdown.entry.js +4 -3
- package/dist/esm/bcm-expansion-panel.entry.js +3 -2
- package/dist/esm/bcm-form-2.entry.js +3 -2
- package/dist/esm/{bcm-list.entry.js → bcm-icon_3.entry.js} +319 -50
- package/dist/esm/bcm-input-custom.entry.js +69 -0
- package/dist/esm/bcm-input.entry.js +6 -5
- package/dist/esm/bcm-item.entry.js +4 -3
- package/dist/esm/bcm-items.entry.js +3 -2
- package/dist/esm/bcm-label_2.entry.js +32 -8
- package/dist/esm/bcm-link.entry.js +1 -1
- package/dist/esm/bcm-menu.entry.js +6 -5
- package/dist/esm/bcm-modal.entry.js +3 -2
- package/dist/esm/bcm-popconfirm-box.entry.js +3 -2
- package/dist/esm/bcm-popconfirm.entry.js +3 -2
- package/dist/esm/bcm-popover.entry.js +85 -35
- package/dist/esm/bcm-progress.entry.js +4 -3
- package/dist/esm/bcm-radio-group.entry.js +72 -206
- package/dist/esm/bcm-radio.entry.js +35 -76
- package/dist/esm/bcm-range.entry.js +3 -2
- package/dist/esm/bcm-skeleton.entry.js +3 -1
- package/dist/esm/bcm-step.entry.js +3 -2
- package/dist/esm/bcm-stepper.entry.js +54 -27
- package/dist/esm/bcm-switch.entry.js +3 -2
- package/dist/esm/bcm-tab-group.entry.js +156 -0
- package/dist/esm/bcm-tab-item-header.entry.js +83 -0
- package/dist/esm/bcm-tab-item.entry.js +100 -0
- package/dist/esm/bcm-tag.entry.js +4 -3
- package/dist/esm/bcm-text.entry.js +59 -0
- package/dist/esm/bcm-textarea.entry.js +4 -3
- package/dist/esm/bcm-time-picker.entry.js +3 -2
- package/dist/esm/bromcom-ui.js +1 -1
- package/dist/esm/color-helper-0277e11a.js +84 -0
- package/dist/esm/colors-fabca483.js +411 -0
- package/dist/esm/floating-ui-4a49ea46.js +1 -1
- package/dist/esm/{generate-6eac28ac.js → generate-0dc9b243.js} +38 -1
- package/dist/esm/{input-template-9b4ba80a.js → input-template-de00be57.js} +2 -2
- package/dist/esm/{json-parse-decarator-3dd0097d.js → json-parse-decarator-5b16dfec.js} +1 -1
- package/dist/esm/label-template-eed2dd69.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{number-helper-fa11a9ce.js → number-helper-282f0beb.js} +1 -1
- package/dist/esm/old-bcm-popover-box.entry.js +3 -2
- package/dist/esm/old-bcm-popover.entry.js +3 -2
- package/dist/esm/{stepper-states-ee109bb5.js → stepper-states-fdf47afe.js} +1 -1
- package/dist/esm/string-helper-0fb7ff20.js +1 -1
- package/dist/esm/{tooltip-helper-e6320e27.js → tooltip-helper-4e2db0c0.js} +38 -8
- package/dist/esm/{validators-285ba427.js → validators-089d15b9.js} +1 -1
- package/dist/types/components/external-source/bcm-toast-helper.d.ts +12 -0
- package/dist/types/components/external-source/test.js/bcm-toast-helper.d.ts +12 -0
- package/dist/types/components/molecules/popover/popover.d.ts +10 -1
- package/dist/types/components/molecules/radio/{group.d.ts → radio-group.d.ts} +19 -27
- package/dist/types/components/molecules/radio/radio.d.ts +5 -11
- package/dist/types/components/molecules/search/search.d.ts +1 -0
- package/dist/types/components/molecules/stepper/stepper.d.ts +3 -3
- package/dist/types/components/molecules/tooltip/tooltip.d.ts +10 -1
- package/dist/types/components/organism/list/list.d.ts +1 -0
- package/dist/types/components/other/input-custom/input-custom.d.ts +20 -0
- package/dist/types/components.d.ts +86 -39
- package/dist/types/helper/generate.d.ts +2 -0
- package/dist/types/helper/popover-helper.d.ts +13 -3
- package/dist/types/helper/tooltip-helper.d.ts +13 -3
- package/dist/types/templates/list-template.d.ts +1 -0
- package/package.json +1 -1
- package/dist/bromcom-ui/p-0a1803dc.entry.js +0 -5
- package/dist/bromcom-ui/p-0bc6e2f5.entry.js +0 -5
- package/dist/bromcom-ui/p-0fdfcace.entry.js +0 -5
- package/dist/bromcom-ui/p-137be1e1.entry.js +0 -5
- package/dist/bromcom-ui/p-14362c24.entry.js +0 -5
- package/dist/bromcom-ui/p-1a561023.entry.js +0 -5
- package/dist/bromcom-ui/p-1a70668b.entry.js +0 -5
- package/dist/bromcom-ui/p-1e26b3c2.entry.js +0 -5
- package/dist/bromcom-ui/p-2412bd5c.entry.js +0 -5
- package/dist/bromcom-ui/p-27b0f699.entry.js +0 -5
- package/dist/bromcom-ui/p-2b600fc7.entry.js +0 -5
- package/dist/bromcom-ui/p-2c41c19a.js +0 -5
- package/dist/bromcom-ui/p-2efec9cd.entry.js +0 -5
- package/dist/bromcom-ui/p-2f37531f.entry.js +0 -5
- package/dist/bromcom-ui/p-38b78279.entry.js +0 -5
- package/dist/bromcom-ui/p-3b792202.entry.js +0 -5
- package/dist/bromcom-ui/p-4404643e.entry.js +0 -5
- package/dist/bromcom-ui/p-46e84156.entry.js +0 -5
- package/dist/bromcom-ui/p-51a66321.entry.js +0 -5
- package/dist/bromcom-ui/p-591a3dc6.entry.js +0 -5
- package/dist/bromcom-ui/p-5ba939ca.entry.js +0 -5
- package/dist/bromcom-ui/p-5e1931dc.entry.js +0 -5
- package/dist/bromcom-ui/p-6af9e02c.entry.js +0 -5
- package/dist/bromcom-ui/p-6afcd65a.entry.js +0 -5
- package/dist/bromcom-ui/p-6ddfde20.entry.js +0 -5
- package/dist/bromcom-ui/p-789fc8e8.entry.js +0 -5
- package/dist/bromcom-ui/p-79bab05d.entry.js +0 -5
- package/dist/bromcom-ui/p-8fd763a3.entry.js +0 -5
- package/dist/bromcom-ui/p-9d53495c.entry.js +0 -5
- package/dist/bromcom-ui/p-9e703aee.entry.js +0 -5
- package/dist/bromcom-ui/p-a0a01753.entry.js +0 -5
- package/dist/bromcom-ui/p-a25c1b4d.entry.js +0 -5
- package/dist/bromcom-ui/p-a8d1397d.js +0 -5
- package/dist/bromcom-ui/p-bccbe379.entry.js +0 -5
- package/dist/bromcom-ui/p-bd743afa.entry.js +0 -5
- package/dist/bromcom-ui/p-bde01e0f.entry.js +0 -5
- package/dist/bromcom-ui/p-c5339964.entry.js +0 -5
- package/dist/bromcom-ui/p-c761de15.js +0 -5
- package/dist/bromcom-ui/p-cd9f99ce.entry.js +0 -5
- package/dist/bromcom-ui/p-cff1f0c2.entry.js +0 -5
- package/dist/bromcom-ui/p-d2449289.js +0 -5
- package/dist/bromcom-ui/p-d5f271e1.entry.js +0 -5
- package/dist/bromcom-ui/p-d76e5c47.entry.js +0 -5
- package/dist/bromcom-ui/p-d86f622a.entry.js +0 -5
- package/dist/bromcom-ui/p-d9d8f76b.entry.js +0 -5
- package/dist/bromcom-ui/p-e52a816b.js +0 -5
- package/dist/bromcom-ui/p-f30c13b4.entry.js +0 -5
- package/dist/bromcom-ui/p-fb24c0ec.entry.js +0 -5
- package/dist/bromcom-ui/p-fc1c823e.entry.js +0 -5
- package/dist/cjs/bcm-icon_5.cjs.entry.js +0 -378
- package/dist/cjs/bcm-search.cjs.entry.js +0 -257
- package/dist/collection/components/molecules/radio/group.css +0 -802
- package/dist/collection/components/molecules/radio/radio.css +0 -1287
- package/dist/collection/components/molecules/radio/types.js +0 -30
- package/dist/collection/components/molecules/states/radio-group.states.js +0 -107
- package/dist/esm/bcm-icon_5.entry.js +0 -370
- package/dist/esm/bcm-search.entry.js +0 -253
- package/dist/types/components/molecules/radio/types.d.ts +0 -29
- package/dist/types/components/molecules/states/radio-group.states.d.ts +0 -48
|
@@ -63,6 +63,7 @@ export class BcmList {
|
|
|
63
63
|
this.placeholder = 'Choose an option';
|
|
64
64
|
this.searchPlaceholder = 'Search';
|
|
65
65
|
this.searchIsOnlyChilds = false;
|
|
66
|
+
this.minSearchLength = 2;
|
|
66
67
|
this.clearable = false;
|
|
67
68
|
this.caption = undefined;
|
|
68
69
|
this.noCaption = false;
|
|
@@ -547,7 +548,7 @@ export class BcmList {
|
|
|
547
548
|
const checklist = (await this.getCheckedList()).nestedResult;
|
|
548
549
|
const filter = Generate.convertIdsToNestedData(ids, checklist);
|
|
549
550
|
this.returnFilterData = await listState.filterData(this._id, filter, null, true);
|
|
550
|
-
this.searchFound = ids.length || 0;
|
|
551
|
+
this.searchFound = (ids === null || ids === void 0 ? void 0 : ids.length) || 0;
|
|
551
552
|
this.limit = 500;
|
|
552
553
|
this.searchGetParents = null;
|
|
553
554
|
await delay(1000);
|
|
@@ -764,7 +765,7 @@ export class BcmList {
|
|
|
764
765
|
'--min-height': openedType ? 'inherit' : this.minHeight,
|
|
765
766
|
} }, h("div", { id: `bcm-list-label-${this._id}`, class: "bcm-list__label" }, label && (h("div", null, h(LabelTemplate, { size: this.size, type: this.captionType, value: label, required: required, htmlFor: this._id })))), this.type == 'select' && (h("div", { id: `bcm-list-input-${this._id}`, class: bcmListInput }, h("span", { class: cs('bcm-list__input-container', { 'type-single': !checkboxes, 'value-empty': !this.value }) }, this.checkboxes && h("span", { id: `bcm-list-input-tag-container-${this._id}`, class: "bcm-list__input-tag-container" }), this.checkboxes && !this.value && h("span", { class: "bcm-list__input-placeholder" }, this.placeholder), !this.checkboxes && (this.value ? this.inputText : h("span", { class: "bcm-list__input-placeholder" }, this.placeholder))), h("span", { class: cs('bcm-list__input-buttons', {
|
|
766
767
|
disabled: disabled,
|
|
767
|
-
}) }, this.clearable && this.value && (h("div", { class: "bcm-list__input-buttons-button" }, h("bcm-icon", { icon: "fal fa-times", onClick: e => !disabled && this.setClear(e) }))), h("div", { class: `bcm-list__input-buttons-button caret-is ${this.isOpen && this.calculatedViewport && 'caret-is-open'}` }, h("bcm-icon", { icon: `far fa-angle-down` }))))), this.type === 'autocomplete' && (h("div", { id: `bcm-list-input-${this._id}`, class: cs(bcmListInput, { 'bcm-list__input-autocomplete': this.type == 'autocomplete' }) }, h("span", { class: "bcm-list__input-container", id: `bcm-list-input-tag-container-${this._id}` }, this.checkboxes && h("span", { class: "bcm-list__input-tag-container", id: `bcm-list-input-tag-container-${this._id}-autocomplete` }), h("bcm-search", { id: `bcm-list-input-tag-container-${this._id}-autocomplete-input`, class: "bcm-list__autocomplete", data: this.data, clearable: true, "full-width": true, "no-caption": true, placeholder: this.placeholder })))), h(ListTemplate, { highlight: this.highlightText, searchable: this.type == 'autocomplete' ? false : searchable, bcmListContainer: bcmListContainer, checkboxes: checkboxes, treeview: treeview, infoFooter: this.infoFooter, value: this.value, totalData: this.totalData, searchFound: this.searchFound, variableText: this.variableText, searchPlaceholder: this.searchPlaceholder, searchIsOnlyChilds: this.searchIsOnlyChilds, _id: this._id, checkAll: this.checkAll, data: this.getItems(), width: this.width, height: this.height, size: this.size, selectAllItem: this.selectAllItem, onScrollEvent: e => this.dataScrollEvent(e), items: this.getLimitedItems(this.searchGetParents), selectedItem: itemId => this.selectedItem(itemId), checkedItem: itemId => this.checkedItem(itemId), openGroup: parentId => this.openGroup(parentId), focusItem: itemId => this.focusItem(itemId), emptyText: this.emptyText, emptyIcon: this.emptyIcon }), h(CaptionTemplate, { noCaption: this.noCaption, captionType: this.captionType, captionError: this.captionError, caption: this.caption })));
|
|
768
|
+
}) }, this.clearable && this.value && (h("div", { class: "bcm-list__input-buttons-button" }, h("bcm-icon", { icon: "fal fa-times", onClick: e => !disabled && this.setClear(e) }))), h("div", { class: `bcm-list__input-buttons-button caret-is ${this.isOpen && this.calculatedViewport && 'caret-is-open'}` }, h("bcm-icon", { icon: `far fa-angle-down` }))))), this.type === 'autocomplete' && (h("div", { id: `bcm-list-input-${this._id}`, class: cs(bcmListInput, { 'bcm-list__input-autocomplete': this.type == 'autocomplete' }) }, h("span", { class: "bcm-list__input-container", id: `bcm-list-input-tag-container-${this._id}` }, this.checkboxes && h("span", { class: "bcm-list__input-tag-container", id: `bcm-list-input-tag-container-${this._id}-autocomplete` }), h("bcm-search", { id: `bcm-list-input-tag-container-${this._id}-autocomplete-input`, class: "bcm-list__autocomplete", data: this.data, clearable: true, "full-width": true, "no-caption": true, placeholder: this.placeholder })))), h(ListTemplate, { highlight: this.highlightText, searchable: this.type == 'autocomplete' ? false : searchable, bcmListContainer: bcmListContainer, checkboxes: checkboxes, treeview: treeview, infoFooter: this.infoFooter, value: this.value, totalData: this.totalData, searchFound: this.searchFound, variableText: this.variableText, searchPlaceholder: this.searchPlaceholder, minSearchLength: this.minSearchLength, searchIsOnlyChilds: this.searchIsOnlyChilds, _id: this._id, checkAll: this.checkAll, data: this.getItems(), width: this.width, height: this.height, size: this.size, selectAllItem: this.selectAllItem, onScrollEvent: e => this.dataScrollEvent(e), items: this.getLimitedItems(this.searchGetParents), selectedItem: itemId => this.selectedItem(itemId), checkedItem: itemId => this.checkedItem(itemId), openGroup: parentId => this.openGroup(parentId), focusItem: itemId => this.focusItem(itemId), emptyText: this.emptyText, emptyIcon: this.emptyIcon }), h(CaptionTemplate, { noCaption: this.noCaption, captionType: this.captionType, captionError: this.captionError, caption: this.caption })));
|
|
768
769
|
}
|
|
769
770
|
static get is() { return "bcm-list"; }
|
|
770
771
|
static get originalStyleUrls() {
|
|
@@ -1342,6 +1343,24 @@ export class BcmList {
|
|
|
1342
1343
|
"reflect": false,
|
|
1343
1344
|
"defaultValue": "false"
|
|
1344
1345
|
},
|
|
1346
|
+
"minSearchLength": {
|
|
1347
|
+
"type": "number",
|
|
1348
|
+
"mutable": false,
|
|
1349
|
+
"complexType": {
|
|
1350
|
+
"original": "number",
|
|
1351
|
+
"resolved": "number",
|
|
1352
|
+
"references": {}
|
|
1353
|
+
},
|
|
1354
|
+
"required": false,
|
|
1355
|
+
"optional": false,
|
|
1356
|
+
"docs": {
|
|
1357
|
+
"tags": [],
|
|
1358
|
+
"text": ""
|
|
1359
|
+
},
|
|
1360
|
+
"attribute": "min-search-length",
|
|
1361
|
+
"reflect": false,
|
|
1362
|
+
"defaultValue": "2"
|
|
1363
|
+
},
|
|
1345
1364
|
"clearable": {
|
|
1346
1365
|
"type": "boolean",
|
|
1347
1366
|
"mutable": true,
|
|
@@ -188,7 +188,7 @@ const findItem = (id, itemId, items) => {
|
|
|
188
188
|
if (dataSource) {
|
|
189
189
|
dataSource.forEach(item => {
|
|
190
190
|
if (itemId.includes(item.id)) {
|
|
191
|
-
checkedProcess(id, item
|
|
191
|
+
checkedProcess(id, item);
|
|
192
192
|
if (item.parentId) {
|
|
193
193
|
indeterminateStatus(id, item.parentId);
|
|
194
194
|
}
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Stencil
|
|
3
|
+
* Copyright (c) Bromcom.
|
|
4
|
+
*/
|
|
5
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
6
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
7
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
8
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
9
|
+
else
|
|
10
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
11
|
+
if (d = decorators[i])
|
|
12
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
13
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
14
|
+
};
|
|
15
|
+
import { h, Host } from "@stencil/core";
|
|
16
|
+
import { IsLoad } from "../../../decorators/is-load-decorator";
|
|
17
|
+
import { Generate } from "../../../helper/generate";
|
|
18
|
+
import cs from "classnames";
|
|
19
|
+
export class BcmInputCustom {
|
|
20
|
+
constructor() {
|
|
21
|
+
this.handleFocus = () => {
|
|
22
|
+
this.hasFocus = true;
|
|
23
|
+
};
|
|
24
|
+
this.handleBlur = () => {
|
|
25
|
+
this.hasFocus = false;
|
|
26
|
+
};
|
|
27
|
+
this.handleChange = (e) => {
|
|
28
|
+
this.value = e.target.value;
|
|
29
|
+
console.log(e);
|
|
30
|
+
};
|
|
31
|
+
this.handleInput = (e) => {
|
|
32
|
+
// this.value = (e.target as HTMLInputElement).value;
|
|
33
|
+
console.log(e);
|
|
34
|
+
};
|
|
35
|
+
this._id = Generate.UID();
|
|
36
|
+
this.name = undefined;
|
|
37
|
+
this.value = undefined;
|
|
38
|
+
this.type = "text";
|
|
39
|
+
this.label = undefined;
|
|
40
|
+
this.required = false;
|
|
41
|
+
this.disabled = false;
|
|
42
|
+
this.readonly = false;
|
|
43
|
+
this.placeholder = undefined;
|
|
44
|
+
this.fullwidth = false;
|
|
45
|
+
this.hasFocus = false;
|
|
46
|
+
}
|
|
47
|
+
render() {
|
|
48
|
+
const { _id, type, name, value, label, required, fullwidth, placeholder, disabled, readonly } = this;
|
|
49
|
+
return (h(Host, { class: cs("tw-inline-flex tw-w-full tw-max-w-[256px] tw-flex-col", {
|
|
50
|
+
"tw-max-w-full": fullwidth,
|
|
51
|
+
}) }, label && h("bcm-label", { value: label, required: required, htmlFor: _id }), h("div", { class: cs("tw-relative tw-flex tw-w-full tw-flex-row tw-items-stretch tw-rounded tw-border tw-p-0 hover:tw-border-primary-600", {
|
|
52
|
+
"tw-cursor-not-allowed tw-bg-secondary-50": this.disabled,
|
|
53
|
+
"tw-cursor-text": !this.disabled,
|
|
54
|
+
"tw-cursor-default tw-bg-secondary-50": this.readonly,
|
|
55
|
+
"tw-border-primary-500 tw-bg-secondary-50": this.hasFocus,
|
|
56
|
+
"tw-border-secondary-300 tw-bg-white": !this.hasFocus,
|
|
57
|
+
}) }, h("input", { id: _id, name: name, type: type, value: value, "data-value": value, placeholder: placeholder, required: required, disabled: disabled, readonly: readonly, class: cs("tw-text-overflow-ellipsis", "tw-rounded-none", "tw-flex-1", "tw-cursor-inherit", "tw-w-full", "tw-appearance-none", "tw-overflow-hidden", "tw-whitespace-nowrap", "tw-border-none", "tw-bg-transparent", "tw-p-2", "tw-text-secondary-600", "tw-placeholder-secondary-300", "tw-outline-none"), onFocus: this.handleFocus, onBlur: this.handleBlur, onChange: e => this.handleChange(e), onInput: this.handleInput }))));
|
|
58
|
+
}
|
|
59
|
+
static get is() { return "bcm-input-custom"; }
|
|
60
|
+
static get properties() {
|
|
61
|
+
return {
|
|
62
|
+
"_id": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"mutable": true,
|
|
65
|
+
"complexType": {
|
|
66
|
+
"original": "string",
|
|
67
|
+
"resolved": "string",
|
|
68
|
+
"references": {}
|
|
69
|
+
},
|
|
70
|
+
"required": false,
|
|
71
|
+
"optional": false,
|
|
72
|
+
"docs": {
|
|
73
|
+
"tags": [],
|
|
74
|
+
"text": ""
|
|
75
|
+
},
|
|
76
|
+
"attribute": "id",
|
|
77
|
+
"reflect": true,
|
|
78
|
+
"defaultValue": "Generate.UID()"
|
|
79
|
+
},
|
|
80
|
+
"name": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"mutable": false,
|
|
83
|
+
"complexType": {
|
|
84
|
+
"original": "string",
|
|
85
|
+
"resolved": "string",
|
|
86
|
+
"references": {}
|
|
87
|
+
},
|
|
88
|
+
"required": false,
|
|
89
|
+
"optional": false,
|
|
90
|
+
"docs": {
|
|
91
|
+
"tags": [],
|
|
92
|
+
"text": ""
|
|
93
|
+
},
|
|
94
|
+
"attribute": "name",
|
|
95
|
+
"reflect": false
|
|
96
|
+
},
|
|
97
|
+
"value": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"mutable": true,
|
|
100
|
+
"complexType": {
|
|
101
|
+
"original": "string",
|
|
102
|
+
"resolved": "string",
|
|
103
|
+
"references": {}
|
|
104
|
+
},
|
|
105
|
+
"required": false,
|
|
106
|
+
"optional": false,
|
|
107
|
+
"docs": {
|
|
108
|
+
"tags": [],
|
|
109
|
+
"text": ""
|
|
110
|
+
},
|
|
111
|
+
"attribute": "value",
|
|
112
|
+
"reflect": false
|
|
113
|
+
},
|
|
114
|
+
"type": {
|
|
115
|
+
"type": "string",
|
|
116
|
+
"mutable": false,
|
|
117
|
+
"complexType": {
|
|
118
|
+
"original": "string",
|
|
119
|
+
"resolved": "string",
|
|
120
|
+
"references": {}
|
|
121
|
+
},
|
|
122
|
+
"required": false,
|
|
123
|
+
"optional": false,
|
|
124
|
+
"docs": {
|
|
125
|
+
"tags": [],
|
|
126
|
+
"text": ""
|
|
127
|
+
},
|
|
128
|
+
"attribute": "type",
|
|
129
|
+
"reflect": false,
|
|
130
|
+
"defaultValue": "\"text\""
|
|
131
|
+
},
|
|
132
|
+
"label": {
|
|
133
|
+
"type": "string",
|
|
134
|
+
"mutable": false,
|
|
135
|
+
"complexType": {
|
|
136
|
+
"original": "string",
|
|
137
|
+
"resolved": "string",
|
|
138
|
+
"references": {}
|
|
139
|
+
},
|
|
140
|
+
"required": false,
|
|
141
|
+
"optional": false,
|
|
142
|
+
"docs": {
|
|
143
|
+
"tags": [],
|
|
144
|
+
"text": ""
|
|
145
|
+
},
|
|
146
|
+
"attribute": "label",
|
|
147
|
+
"reflect": false
|
|
148
|
+
},
|
|
149
|
+
"required": {
|
|
150
|
+
"type": "boolean",
|
|
151
|
+
"mutable": false,
|
|
152
|
+
"complexType": {
|
|
153
|
+
"original": "boolean",
|
|
154
|
+
"resolved": "boolean",
|
|
155
|
+
"references": {}
|
|
156
|
+
},
|
|
157
|
+
"required": false,
|
|
158
|
+
"optional": false,
|
|
159
|
+
"docs": {
|
|
160
|
+
"tags": [],
|
|
161
|
+
"text": ""
|
|
162
|
+
},
|
|
163
|
+
"attribute": "required",
|
|
164
|
+
"reflect": false,
|
|
165
|
+
"defaultValue": "false"
|
|
166
|
+
},
|
|
167
|
+
"disabled": {
|
|
168
|
+
"type": "boolean",
|
|
169
|
+
"mutable": false,
|
|
170
|
+
"complexType": {
|
|
171
|
+
"original": "boolean",
|
|
172
|
+
"resolved": "boolean",
|
|
173
|
+
"references": {}
|
|
174
|
+
},
|
|
175
|
+
"required": false,
|
|
176
|
+
"optional": false,
|
|
177
|
+
"docs": {
|
|
178
|
+
"tags": [],
|
|
179
|
+
"text": ""
|
|
180
|
+
},
|
|
181
|
+
"attribute": "disabled",
|
|
182
|
+
"reflect": false,
|
|
183
|
+
"defaultValue": "false"
|
|
184
|
+
},
|
|
185
|
+
"readonly": {
|
|
186
|
+
"type": "boolean",
|
|
187
|
+
"mutable": false,
|
|
188
|
+
"complexType": {
|
|
189
|
+
"original": "boolean",
|
|
190
|
+
"resolved": "boolean",
|
|
191
|
+
"references": {}
|
|
192
|
+
},
|
|
193
|
+
"required": false,
|
|
194
|
+
"optional": false,
|
|
195
|
+
"docs": {
|
|
196
|
+
"tags": [],
|
|
197
|
+
"text": ""
|
|
198
|
+
},
|
|
199
|
+
"attribute": "readonly",
|
|
200
|
+
"reflect": false,
|
|
201
|
+
"defaultValue": "false"
|
|
202
|
+
},
|
|
203
|
+
"placeholder": {
|
|
204
|
+
"type": "string",
|
|
205
|
+
"mutable": false,
|
|
206
|
+
"complexType": {
|
|
207
|
+
"original": "string",
|
|
208
|
+
"resolved": "string",
|
|
209
|
+
"references": {}
|
|
210
|
+
},
|
|
211
|
+
"required": false,
|
|
212
|
+
"optional": false,
|
|
213
|
+
"docs": {
|
|
214
|
+
"tags": [],
|
|
215
|
+
"text": ""
|
|
216
|
+
},
|
|
217
|
+
"attribute": "placeholder",
|
|
218
|
+
"reflect": false
|
|
219
|
+
},
|
|
220
|
+
"fullwidth": {
|
|
221
|
+
"type": "boolean",
|
|
222
|
+
"mutable": false,
|
|
223
|
+
"complexType": {
|
|
224
|
+
"original": "boolean",
|
|
225
|
+
"resolved": "boolean",
|
|
226
|
+
"references": {}
|
|
227
|
+
},
|
|
228
|
+
"required": false,
|
|
229
|
+
"optional": false,
|
|
230
|
+
"docs": {
|
|
231
|
+
"tags": [],
|
|
232
|
+
"text": ""
|
|
233
|
+
},
|
|
234
|
+
"attribute": "fullwidth",
|
|
235
|
+
"reflect": false,
|
|
236
|
+
"defaultValue": "false"
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
static get states() {
|
|
241
|
+
return {
|
|
242
|
+
"hasFocus": {}
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
static get elementRef() { return "el"; }
|
|
246
|
+
}
|
|
247
|
+
__decorate([
|
|
248
|
+
IsLoad()
|
|
249
|
+
], BcmInputCustom.prototype, "el", void 0);
|
|
@@ -7,6 +7,7 @@ import { StatusProps } from "../components/molecules/alert/types";
|
|
|
7
7
|
import { version } from "../../package.json";
|
|
8
8
|
import { Build } from "@stencil/core";
|
|
9
9
|
import snq from "snq";
|
|
10
|
+
import colors from 'tailwindcss/colors';
|
|
10
11
|
const allowedDomains = ["localhost", "beta-regression.bromcomcloud.com", "beta-scrum.bromcomcloud.com", "beta-kanban.bromcomcloud.com"];
|
|
11
12
|
const isAllowedDomain = () => {
|
|
12
13
|
const hostname = window.location.hostname;
|
|
@@ -15,7 +16,42 @@ const isAllowedDomain = () => {
|
|
|
15
16
|
if (isAllowedDomain()) {
|
|
16
17
|
console.log(`%cbromcom ui%c version: ${version}-${Build.isDev ? "d" : "p"} `, `color: white; background:#1890FF; font-weight: 300; font-size:10px; padding:2px 6px; border-radius: 5px`, `font-size:10px;`);
|
|
17
18
|
}
|
|
19
|
+
(function checkTheme() {
|
|
20
|
+
const body = document.querySelector("body");
|
|
21
|
+
let theme = localStorage.getItem("bcm-theme");
|
|
22
|
+
if (!body.classList.contains("bcm-theme-*") && theme) {
|
|
23
|
+
body.classList.add(`bcm-theme-${theme}`);
|
|
24
|
+
}
|
|
25
|
+
})();
|
|
18
26
|
export class Generate {
|
|
27
|
+
static observeElementRemoval(element, callback) {
|
|
28
|
+
const observer = new MutationObserver((mutationsList, observer) => {
|
|
29
|
+
for (const mutation of mutationsList) {
|
|
30
|
+
if (mutation.type === "childList") {
|
|
31
|
+
const removedNodes = Array.from(mutation.removedNodes);
|
|
32
|
+
for (const removedNode of removedNodes) {
|
|
33
|
+
if (removedNode === element) {
|
|
34
|
+
callback();
|
|
35
|
+
observer.disconnect();
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
observer.observe(document.documentElement, { childList: true, subtree: true });
|
|
43
|
+
}
|
|
44
|
+
static getTwColor(color, variable = "--bcm-color-default") {
|
|
45
|
+
if (!color || !colors[color]) {
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
const colorObj = colors[color];
|
|
49
|
+
const result = {};
|
|
50
|
+
for (const [key, value] of Object.entries(colorObj)) {
|
|
51
|
+
result[`${variable}-${key}`] = value;
|
|
52
|
+
}
|
|
53
|
+
return result;
|
|
54
|
+
}
|
|
19
55
|
}
|
|
20
56
|
Generate.UID = (prefix = "bcm") => `${prefix}${Math.random().toString(36).substr(2, 9)}`;
|
|
21
57
|
Generate.getIconAttrWithStatusType = (status, loading = false) => {
|
|
@@ -2,31 +2,38 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import { FloatingUI } from
|
|
6
|
-
import { ColorHelper, Generate, StringHelper } from
|
|
5
|
+
import { delay, FloatingUI } from "@bcm/utils";
|
|
6
|
+
import { ColorHelper, Generate, StringHelper } from "@bcm/helpers";
|
|
7
7
|
export class Popover {
|
|
8
|
-
constructor({ content, message, targetId, placement =
|
|
8
|
+
constructor({ content, message, targetId, placement = "top", color = "slate-700", trigger = "none", openDelay = 0, closeDelay = 0, emitShow = () => { }, emitHide = () => { } }) {
|
|
9
|
+
this.destroy = () => {
|
|
10
|
+
this.el = document.getElementById(this.id);
|
|
11
|
+
if (this.el) {
|
|
12
|
+
this.el.remove();
|
|
13
|
+
this.emitHide();
|
|
14
|
+
}
|
|
15
|
+
this.removeListener();
|
|
16
|
+
};
|
|
9
17
|
this.bgColor = () => ColorHelper.twColor(this.color, 700);
|
|
10
18
|
this.exepcitonColors = {
|
|
11
|
-
white:
|
|
12
|
-
black:
|
|
19
|
+
white: "slate-300",
|
|
20
|
+
black: "slate-700",
|
|
13
21
|
};
|
|
14
22
|
this.target = () => document.getElementById(this.targetId);
|
|
15
23
|
this.init = () => {
|
|
16
|
-
console.log(this.content, this.message);
|
|
17
24
|
const inner = `<div class="tw-z-[1] tw-rounded tw-py-2 tw-bg-${this.bgColor()}">
|
|
18
|
-
${this.message ? `<div class="tw-font-medium tw-w-full tw-pb-1 tw-px-4">${StringHelper.trim(this.message)}</div>` :
|
|
19
|
-
${this.content ? `<div class="tw-font-normal tw-px-4">${StringHelper.trim(this.content)}</div>` :
|
|
25
|
+
${this.message ? `<div class="tw-font-medium tw-w-full tw-pb-1 tw-px-4">${StringHelper.trim(this.message)}</div>` : ""}
|
|
26
|
+
${this.content ? `<div class="tw-font-normal tw-px-4">${StringHelper.trim(this.content)}</div>` : ""}
|
|
20
27
|
</div>`;
|
|
21
|
-
this.el = Generate.createElement(
|
|
22
|
-
|
|
23
|
-
|
|
28
|
+
this.el = Generate.createElement("div", {
|
|
29
|
+
"id": `${this.targetId}-popover-box`,
|
|
30
|
+
"class": `
|
|
24
31
|
tw-whitespace-normal tw-break-words tw-block tw-font-sans tw-pointer-events-none tw-max-w-[256px] tw-rounded tw-bg-${this.bgColor()} tw-text-white tw-text-3 tw-absolute tw-top-0 tw-left-0 tw-z-tooltip tw-opacity-0 tw-transition-opacity tw-duration-300
|
|
25
32
|
tw-shadow`,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
33
|
+
"role": "popover",
|
|
34
|
+
"aria-hidden": "true",
|
|
35
|
+
"style": `color: ${ColorHelper.twColorReverse(this.bgColor())}`,
|
|
36
|
+
"innerHTML": inner,
|
|
30
37
|
});
|
|
31
38
|
};
|
|
32
39
|
this.update = () => {
|
|
@@ -37,21 +44,21 @@ export class Popover {
|
|
|
37
44
|
}
|
|
38
45
|
};
|
|
39
46
|
this.listener = () => {
|
|
40
|
-
window.addEventListener(
|
|
41
|
-
window.addEventListener(
|
|
42
|
-
window.addEventListener(
|
|
47
|
+
window.addEventListener("resize", this.calculatePosition.bind(this));
|
|
48
|
+
window.addEventListener("scroll", this.calculatePosition.bind(this), true);
|
|
49
|
+
window.addEventListener("wheel", this.calculatePosition.bind(this));
|
|
43
50
|
if (this.trigger && this.target()) {
|
|
44
51
|
switch (this.trigger) {
|
|
45
|
-
case
|
|
46
|
-
this.target().addEventListener(
|
|
52
|
+
case "click":
|
|
53
|
+
this.target().addEventListener("click", this.toggle.bind(this));
|
|
47
54
|
break;
|
|
48
|
-
case
|
|
49
|
-
this.target().addEventListener(
|
|
50
|
-
this.target().addEventListener(
|
|
55
|
+
case "hover":
|
|
56
|
+
this.target().addEventListener("mouseenter", this.show.bind(this));
|
|
57
|
+
this.target().addEventListener("mouseleave", this.hide.bind(this));
|
|
51
58
|
break;
|
|
52
|
-
case
|
|
53
|
-
this.target().addEventListener(
|
|
54
|
-
this.target().addEventListener(
|
|
59
|
+
case "focus":
|
|
60
|
+
this.target().addEventListener("focus", this.show.bind(this), true);
|
|
61
|
+
this.target().addEventListener("blur", this.hide.bind(this), true);
|
|
55
62
|
break;
|
|
56
63
|
default:
|
|
57
64
|
break;
|
|
@@ -59,6 +66,18 @@ export class Popover {
|
|
|
59
66
|
}
|
|
60
67
|
this.calculatePosition();
|
|
61
68
|
};
|
|
69
|
+
this.removeListener = () => {
|
|
70
|
+
window.removeEventListener("resize", this.calculatePosition.bind(this));
|
|
71
|
+
window.removeEventListener("scroll", this.calculatePosition.bind(this), true);
|
|
72
|
+
window.removeEventListener("wheel", this.calculatePosition.bind(this));
|
|
73
|
+
if (this.target()) {
|
|
74
|
+
this.target().removeEventListener("click", this.toggle.bind(this));
|
|
75
|
+
this.target().removeEventListener("mouseenter", this.show.bind(this));
|
|
76
|
+
this.target().removeEventListener("mouseleave", this.hide.bind(this));
|
|
77
|
+
this.target().removeEventListener("focus", this.show.bind(this), true);
|
|
78
|
+
this.target().removeEventListener("blur", this.hide.bind(this), true);
|
|
79
|
+
}
|
|
80
|
+
};
|
|
62
81
|
this.calculatePosition = () => {
|
|
63
82
|
this.el = document.getElementById(this.id);
|
|
64
83
|
if (this.el) {
|
|
@@ -72,19 +91,23 @@ export class Popover {
|
|
|
72
91
|
});
|
|
73
92
|
}
|
|
74
93
|
};
|
|
75
|
-
this.show = () => {
|
|
94
|
+
this.show = async () => {
|
|
76
95
|
if (this.message) {
|
|
77
96
|
this.init();
|
|
97
|
+
await delay(this.openDelay);
|
|
78
98
|
this.calculatePosition();
|
|
99
|
+
this.emitShow();
|
|
79
100
|
}
|
|
80
101
|
else {
|
|
81
102
|
this.hide();
|
|
82
103
|
}
|
|
83
104
|
};
|
|
84
|
-
this.hide = () => {
|
|
105
|
+
this.hide = async () => {
|
|
85
106
|
this.el = document.getElementById(this.id);
|
|
86
107
|
if (this.el) {
|
|
108
|
+
await delay(this.closeDelay);
|
|
87
109
|
this.el.remove();
|
|
110
|
+
this.emitHide();
|
|
88
111
|
}
|
|
89
112
|
};
|
|
90
113
|
this.toggle = () => {
|
|
@@ -102,6 +125,11 @@ export class Popover {
|
|
|
102
125
|
this.placement = placement;
|
|
103
126
|
this.color = color;
|
|
104
127
|
this.trigger = trigger;
|
|
105
|
-
this.id = targetId +
|
|
128
|
+
this.id = targetId + "-popover-box";
|
|
129
|
+
this.openDelay = openDelay;
|
|
130
|
+
this.closeDelay = closeDelay;
|
|
131
|
+
this.emitShow = emitShow;
|
|
132
|
+
this.emitHide = emitHide;
|
|
133
|
+
Generate.observeElementRemoval(document.getElementById(this.targetId), this.destroy.bind(this));
|
|
106
134
|
}
|
|
107
135
|
}
|
|
@@ -2,11 +2,19 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import { FloatingUI } from "@bcm/utils";
|
|
5
|
+
import { delay, FloatingUI } from "@bcm/utils";
|
|
6
6
|
import { ColorHelper, Generate, StringHelper } from "@bcm/helpers";
|
|
7
7
|
import { Bcm } from "@bcm/model";
|
|
8
8
|
export class Tooltip {
|
|
9
|
-
constructor({ message, targetId, placement = "top", color = "slate-700", trigger = "none", size = "medium" }) {
|
|
9
|
+
constructor({ message, targetId, placement = "top", color = "slate-700", trigger = "none", size = "medium", openDelay = 0, closeDelay = 0, emitShow = () => { }, emitHide = () => { }, }) {
|
|
10
|
+
this.destroy = () => {
|
|
11
|
+
this.el = document.getElementById(this.id);
|
|
12
|
+
if (this.el) {
|
|
13
|
+
this.el.remove();
|
|
14
|
+
this.emitHide();
|
|
15
|
+
}
|
|
16
|
+
this.removeListener();
|
|
17
|
+
};
|
|
10
18
|
this.bgColor = () => ColorHelper.twColor(this.color, 700);
|
|
11
19
|
this.target = () => document.getElementById(this.targetId);
|
|
12
20
|
this.sizeClass = () => {
|
|
@@ -62,6 +70,18 @@ export class Tooltip {
|
|
|
62
70
|
}
|
|
63
71
|
this.calculatePosition();
|
|
64
72
|
};
|
|
73
|
+
this.removeListener = () => {
|
|
74
|
+
window.removeEventListener("resize", this.calculatePosition.bind(this));
|
|
75
|
+
window.removeEventListener("scroll", this.calculatePosition.bind(this), true);
|
|
76
|
+
window.removeEventListener("wheel", this.calculatePosition.bind(this));
|
|
77
|
+
if (this.target()) {
|
|
78
|
+
this.target().removeEventListener("click", this.toggle.bind(this));
|
|
79
|
+
this.target().removeEventListener("mouseenter", this.show.bind(this));
|
|
80
|
+
this.target().removeEventListener("mouseleave", this.hide.bind(this));
|
|
81
|
+
this.target().removeEventListener("focus", this.show.bind(this), true);
|
|
82
|
+
this.target().removeEventListener("blur", this.hide.bind(this), true);
|
|
83
|
+
}
|
|
84
|
+
};
|
|
65
85
|
this.calculatePosition = () => {
|
|
66
86
|
this.el = document.getElementById(this.id);
|
|
67
87
|
if (this.el) {
|
|
@@ -75,19 +95,23 @@ export class Tooltip {
|
|
|
75
95
|
});
|
|
76
96
|
}
|
|
77
97
|
};
|
|
78
|
-
this.show = () => {
|
|
98
|
+
this.show = async () => {
|
|
79
99
|
if (this.message) {
|
|
80
100
|
this.init();
|
|
101
|
+
await delay(this.openDelay);
|
|
81
102
|
this.calculatePosition();
|
|
103
|
+
this.emitShow();
|
|
82
104
|
}
|
|
83
105
|
else {
|
|
84
106
|
this.hide();
|
|
85
107
|
}
|
|
86
108
|
};
|
|
87
|
-
this.hide = () => {
|
|
109
|
+
this.hide = async () => {
|
|
88
110
|
this.el = document.getElementById(this.id);
|
|
89
111
|
if (this.el) {
|
|
112
|
+
await delay(this.closeDelay);
|
|
90
113
|
this.el.remove();
|
|
114
|
+
this.emitHide();
|
|
91
115
|
}
|
|
92
116
|
};
|
|
93
117
|
this.toggle = () => {
|
|
@@ -106,5 +130,10 @@ export class Tooltip {
|
|
|
106
130
|
this.id = targetId + "-tooltip-box";
|
|
107
131
|
this.trigger = trigger;
|
|
108
132
|
this.size = size;
|
|
133
|
+
this.openDelay = openDelay;
|
|
134
|
+
this.closeDelay = closeDelay;
|
|
135
|
+
this.emitShow = emitShow;
|
|
136
|
+
this.emitHide = emitHide;
|
|
137
|
+
Generate.observeElementRemoval(document.getElementById(this.targetId), this.destroy.bind(this));
|
|
109
138
|
}
|
|
110
139
|
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { h } from '@stencil/core';
|
|
6
6
|
import { InfoFooterTemplate } from './info-footer-template';
|
|
7
7
|
import { ListItemTemplate } from './list-item-template';
|
|
8
|
-
export const ListTemplate = ({ highlight, selectAllItem, bcmListContainer, treeview, checkboxes, checkAll, infoFooter, value, totalData, searchFound, variableText, _id, data, width, height, size, searchPlaceholder, selectedItem, openGroup, checkedItem, onScrollEvent, focusItem, items, searchable, searchIsOnlyChilds, emptyText, emptyIcon, }) => {
|
|
8
|
+
export const ListTemplate = ({ highlight, selectAllItem, bcmListContainer, treeview, checkboxes, checkAll, infoFooter, value, totalData, searchFound, variableText, _id, data, width, height, size, searchPlaceholder, minSearchLength, selectedItem, openGroup, checkedItem, onScrollEvent, focusItem, items, searchable, searchIsOnlyChilds, emptyText, emptyIcon, }) => {
|
|
9
9
|
const showSelectAll = !(treeview && searchFound > 0) && !(searchFound > 0);
|
|
10
10
|
const setScrollHeight = () => {
|
|
11
11
|
const itemHeight = size === 'small' ? 28 : size === 'medium' ? 36 : 48;
|
|
@@ -19,5 +19,5 @@ export const ListTemplate = ({ highlight, selectAllItem, bcmListContainer, treev
|
|
|
19
19
|
'flex-direction': 'column',
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
-
return (h("div", { id: `bcm-list-${_id}`, class: bcmListContainer, style: { '--height': height, '--width': width } }, data && searchable && (h("section", { class: "bcm-list__container-search" }, h("bcm-search", { size: size, id: `bcm-list-${_id}-search`, data: data, clearable: true, placeholder: searchPlaceholder, searchIsOnlyChilds: searchIsOnlyChilds }))), h("main", { onScroll: e => onScrollEvent(e), class: "scrolling", style: { 'overscroll-behavior': 'none' } }, h("div", { style: setScrollHeight() }, checkAll && searchFound != 0 && items && items.length > 0 && checkboxes && showSelectAll && (h("section", { class: "bcm-list__container-select-all" }, h(ListItemTemplate, { size: size, item: selectAllItem, treeview: false, checkboxes: true, selectedItem: itemId => selectedItem(itemId), checkedItem: itemId => checkedItem(itemId), openGroup: parentId => openGroup(parentId), focusItem: itemId => focusItem(itemId) }))), items.map((item) => (h(ListItemTemplate, { highlight: highlight, size: size, item: item, searchIsOnlyChilds: searchIsOnlyChilds, treeview: treeview, checkboxes: checkboxes, selectedItem: itemId => selectedItem(itemId), checkedItem: itemId => checkedItem(itemId), openGroup: parentId => openGroup(parentId), focusItem: itemId => focusItem(itemId) }))), (!items || items.length === 0) && searchFound != 0 && (h("section", { class: "bcm-list__container-no-data" }, h("bcm-empty", { style: { height: 'auto' }, icon: emptyIcon }, h("span", { innerHTML: emptyText || 'No data' })))), searchFound == 0 && (h("section", { class: "bcm-list__container-no-data" }, h("bcm-empty", { style: { height: 'auto' }, icon: emptyIcon }, h("span", { innerHTML: emptyText || 'No Data Found' })))))), infoFooter && data && data.length > 0 && (h(InfoFooterTemplate, { selected: value === null || value === void 0 ? void 0 : value.length, total: totalData, found: searchFound, multiple: checkboxes, variableText: variableText }))));
|
|
22
|
+
return (h("div", { id: `bcm-list-${_id}`, class: bcmListContainer, style: { '--height': height, '--width': width } }, data && searchable && (h("section", { class: "bcm-list__container-search" }, h("bcm-search", { size: size, id: `bcm-list-${_id}-search`, data: data, clearable: true, placeholder: searchPlaceholder, "min-search-length": minSearchLength, searchIsOnlyChilds: searchIsOnlyChilds }))), h("main", { onScroll: e => onScrollEvent(e), class: "scrolling", style: { 'overscroll-behavior': 'none' } }, h("div", { style: setScrollHeight() }, checkAll && searchFound != 0 && items && items.length > 0 && checkboxes && showSelectAll && (h("section", { class: "bcm-list__container-select-all" }, h(ListItemTemplate, { size: size, item: selectAllItem, treeview: false, checkboxes: true, selectedItem: itemId => selectedItem(itemId), checkedItem: itemId => checkedItem(itemId), openGroup: parentId => openGroup(parentId), focusItem: itemId => focusItem(itemId) }))), items.map((item) => (h(ListItemTemplate, { highlight: highlight, size: size, item: item, searchIsOnlyChilds: searchIsOnlyChilds, treeview: treeview, checkboxes: checkboxes, selectedItem: itemId => selectedItem(itemId), checkedItem: itemId => checkedItem(itemId), openGroup: parentId => openGroup(parentId), focusItem: itemId => focusItem(itemId) }))), (!items || items.length === 0) && searchFound != 0 && (h("section", { class: "bcm-list__container-no-data" }, h("bcm-empty", { style: { height: 'auto' }, icon: emptyIcon }, h("span", { innerHTML: emptyText || 'No data' })))), searchFound == 0 && (h("section", { class: "bcm-list__container-no-data" }, h("bcm-empty", { style: { height: 'auto' }, icon: emptyIcon }, h("span", { innerHTML: emptyText || 'No Data Found' })))))), infoFooter && data && data.length > 0 && (h(InfoFooterTemplate, { selected: value === null || value === void 0 ? void 0 : value.length, total: totalData, found: searchFound, multiple: checkboxes, variableText: variableText }))));
|
|
23
23
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface BcmInputCustom extends Components.BcmInputCustom, HTMLElement {}
|
|
4
|
+
export const BcmInputCustom: {
|
|
5
|
+
prototype: BcmInputCustom;
|
|
6
|
+
new (): BcmInputCustom;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|