bromcom-ui 2.7.37-rc.2 → 2.7.37-rc.4-0
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.esm.js +1 -1
- package/dist/bromcom-ui/p-02d75af2.js +5 -0
- package/dist/bromcom-ui/{p-f374395b.entry.js → p-03b55cfb.entry.js} +1 -1
- package/dist/bromcom-ui/{p-75f864ae.entry.js → p-05702e53.entry.js} +1 -1
- package/dist/bromcom-ui/{p-93010f03.js → p-0a9b00a9.js} +1 -1
- package/dist/bromcom-ui/{p-ef923122.entry.js → p-0d778313.entry.js} +1 -1
- package/dist/bromcom-ui/{p-8595742c.entry.js → p-17a333df.entry.js} +1 -1
- package/dist/bromcom-ui/{p-13ed55a9.entry.js → p-1b51a1a5.entry.js} +1 -1
- package/dist/bromcom-ui/{p-1dab0ebb.entry.js → p-1e286e48.entry.js} +1 -1
- package/dist/bromcom-ui/{p-b3a57653.entry.js → p-22a0e65d.entry.js} +1 -1
- package/dist/bromcom-ui/{p-35bd1307.entry.js → p-2462b461.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a63ba9a2.entry.js → p-26931df9.entry.js} +1 -1
- package/dist/bromcom-ui/{p-27d06f30.entry.js → p-26f3fdba.entry.js} +1 -1
- package/dist/bromcom-ui/p-273f91af.entry.js +5 -0
- package/dist/bromcom-ui/{p-db11376b.entry.js → p-2ab6e327.entry.js} +1 -1
- package/dist/bromcom-ui/{p-2b7cb17c.entry.js → p-2bc9235f.entry.js} +1 -1
- package/dist/bromcom-ui/{p-0aec8d73.entry.js → p-32145a6a.entry.js} +1 -1
- package/dist/bromcom-ui/{p-75a92b4c.entry.js → p-36506817.entry.js} +1 -1
- package/dist/bromcom-ui/{p-fcaba9dd.entry.js → p-3971afee.entry.js} +1 -1
- package/dist/bromcom-ui/{p-2806e672.entry.js → p-4b318405.entry.js} +1 -1
- package/dist/bromcom-ui/{p-d8f95e30.entry.js → p-4e8fe53f.entry.js} +1 -1
- package/dist/bromcom-ui/{p-4e0c990d.js → p-576c9e1a.js} +1 -1
- package/dist/bromcom-ui/{p-d87118f3.entry.js → p-5c33bc24.entry.js} +1 -1
- package/dist/bromcom-ui/{p-4f99361a.js → p-650d0075.js} +1 -1
- package/dist/bromcom-ui/{p-a8073fed.entry.js → p-65605e2b.entry.js} +1 -1
- package/dist/bromcom-ui/{p-1a7873c8.entry.js → p-70214600.entry.js} +1 -1
- package/dist/bromcom-ui/{p-b47e5352.entry.js → p-71869daf.entry.js} +1 -1
- package/dist/bromcom-ui/{p-af93c8e6.entry.js → p-74cb5833.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ea4f2618.entry.js → p-75bd9b2e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-9a78235b.entry.js → p-76be0458.entry.js} +1 -1
- package/dist/bromcom-ui/{p-6caa9460.entry.js → p-82f2ad3d.entry.js} +1 -1
- package/dist/bromcom-ui/{p-573647ab.entry.js → p-87065fd4.entry.js} +1 -1
- package/dist/bromcom-ui/{p-3455ec3e.entry.js → p-8a1ad072.entry.js} +1 -1
- package/dist/bromcom-ui/{p-50c7a3cd.entry.js → p-8e1f99b0.entry.js} +1 -1
- package/dist/bromcom-ui/{p-2b479251.entry.js → p-94594729.entry.js} +1 -1
- package/dist/bromcom-ui/{p-8b72bce1.js → p-959303e6.js} +1 -1
- package/dist/bromcom-ui/{p-f2caf9d3.entry.js → p-97ab8650.entry.js} +1 -1
- package/dist/bromcom-ui/{p-f1b1bb76.entry.js → p-9c80f257.entry.js} +1 -1
- package/dist/bromcom-ui/{p-b2bae44d.entry.js → p-a0f75665.entry.js} +1 -1
- package/dist/bromcom-ui/{p-b265dd24.entry.js → p-a1d8b2f0.entry.js} +1 -1
- package/dist/bromcom-ui/{p-4c75beb3.entry.js → p-a6d7b8ff.entry.js} +1 -1
- package/dist/bromcom-ui/{p-043f3a0d.entry.js → p-a8ad2743.entry.js} +1 -1
- package/dist/bromcom-ui/{p-b2ea4774.entry.js → p-c9b1cee9.entry.js} +1 -1
- package/dist/bromcom-ui/{p-41f2ef93.entry.js → p-cfcd67d2.entry.js} +1 -1
- package/dist/bromcom-ui/{p-2b346de3.entry.js → p-d3401faf.entry.js} +1 -1
- package/dist/bromcom-ui/{p-60cee147.entry.js → p-d6899b4a.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c9a20860.entry.js → p-da77656a.entry.js} +1 -1
- package/dist/bromcom-ui/p-de448df0.js +5 -0
- package/dist/bromcom-ui/{p-053962ad.entry.js → p-de89f82d.entry.js} +1 -1
- package/dist/bromcom-ui/{p-405441b2.entry.js → p-ea1352b5.entry.js} +1 -1
- package/dist/bromcom-ui/{p-355e259c.entry.js → p-f6e52a9b.entry.js} +1 -1
- package/dist/bromcom-ui/{p-bc868e9e.js → p-fa8fd0b1.js} +1 -1
- package/dist/bromcom-ui/{p-40aeceda.entry.js → p-fac43984.entry.js} +1 -1
- package/dist/cjs/bcm-accordion.cjs.entry.js +1 -1
- package/dist/cjs/bcm-alert.cjs.entry.js +1 -1
- package/dist/cjs/bcm-attendance.cjs.entry.js +2 -2
- package/dist/cjs/bcm-avatar_2.cjs.entry.js +3 -3
- package/dist/cjs/bcm-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/bcm-button-group.cjs.entry.js +1 -1
- package/dist/cjs/bcm-button_4.cjs.entry.js +5 -3
- package/dist/cjs/bcm-card.cjs.entry.js +1 -1
- package/dist/cjs/bcm-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +1 -1
- package/dist/cjs/bcm-checkbox_2.cjs.entry.js +1 -1
- package/dist/cjs/bcm-chip.cjs.entry.js +1 -1
- package/dist/cjs/bcm-collapse.cjs.entry.js +1 -1
- package/dist/cjs/bcm-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/bcm-datetime-picker.cjs.entry.js +1 -1
- package/dist/cjs/bcm-default.cjs.entry.js +1 -1
- package/dist/cjs/bcm-drawer.cjs.entry.js +3 -3
- package/dist/cjs/bcm-dropdown.cjs.entry.js +2 -2
- package/dist/cjs/bcm-expansion-panel.cjs.entry.js +1 -1
- package/dist/cjs/bcm-form-2.cjs.entry.js +1 -1
- package/dist/cjs/bcm-input.cjs.entry.js +4 -4
- package/dist/cjs/bcm-item.cjs.entry.js +1 -1
- package/dist/cjs/bcm-items.cjs.entry.js +1 -1
- package/dist/cjs/bcm-label_2.cjs.entry.js +4 -4
- package/dist/cjs/bcm-linked.cjs.entry.js +3 -3
- package/dist/cjs/bcm-list.cjs.entry.js +5 -5
- package/dist/cjs/bcm-menu.cjs.entry.js +5 -5
- package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +1 -1
- package/dist/cjs/bcm-popconfirm.cjs.entry.js +1 -1
- package/dist/cjs/bcm-popover.cjs.entry.js +3 -3
- package/dist/cjs/bcm-progress.cjs.entry.js +1 -1
- package/dist/cjs/bcm-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/bcm-radio.cjs.entry.js +1 -1
- package/dist/cjs/bcm-range.cjs.entry.js +1 -1
- package/dist/cjs/bcm-search.cjs.entry.js +3 -3
- package/dist/cjs/bcm-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/bcm-step.cjs.entry.js +2 -2
- package/dist/cjs/bcm-stepper.cjs.entry.js +3 -3
- package/dist/cjs/bcm-switch.cjs.entry.js +1 -1
- package/dist/cjs/bcm-tab-group.cjs.entry.js +1 -1
- package/dist/cjs/bcm-tag.cjs.entry.js +2 -2
- package/dist/cjs/bcm-textarea.cjs.entry.js +2 -2
- package/dist/cjs/bcm-time-picker.cjs.entry.js +1 -1
- package/dist/cjs/bromcom-ui.cjs.js +1 -1
- package/dist/cjs/{generate-716a328d.js → generate-29f6c671.js} +1 -1
- package/dist/cjs/{input-template-4747050f.js → input-template-8d49a61c.js} +1 -1
- package/dist/cjs/{json-parse-decarator-b8a37140.js → json-parse-decarator-5d872ae7.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{number-helper-e62c32d5.js → number-helper-288bbac7.js} +1 -1
- package/dist/cjs/old-bcm-popover-box.cjs.entry.js +2 -2
- package/dist/cjs/old-bcm-popover.cjs.entry.js +1 -1
- package/dist/cjs/{stepper-states-1be09180.js → stepper-states-902494d8.js} +1 -1
- package/dist/cjs/{tooltip-helper-a192b748.js → tooltip-helper-4be3d320.js} +3 -3
- package/dist/cjs/{validators-8f5537d4.js → validators-9af1100c.js} +1 -1
- package/dist/collection/components/atoms/button/button.css +15 -0
- package/dist/collection/components/atoms/button/button.js +3 -1
- package/dist/collection/components/molecules/modal/modal.js +4 -9
- package/dist/collection/templates/button-template.js +1 -1
- package/dist/components/_commonjsHelpers.js +25 -0
- package/dist/components/avatar.js +124 -0
- package/dist/components/badge.js +95 -0
- package/dist/components/bcm-accordion.d.ts +11 -0
- package/dist/components/bcm-accordion.js +101 -0
- package/dist/components/bcm-alert.d.ts +11 -0
- package/dist/components/bcm-alert.js +140 -0
- package/dist/components/bcm-attendance.d.ts +11 -0
- package/dist/components/bcm-attendance.js +72 -0
- package/dist/components/bcm-autocomplete.d.ts +11 -0
- package/dist/components/bcm-autocomplete.js +293 -0
- package/dist/components/bcm-avatar.d.ts +11 -0
- package/dist/components/bcm-avatar.js +10 -0
- package/dist/components/bcm-badge.d.ts +11 -0
- package/dist/components/bcm-badge.js +10 -0
- package/dist/components/bcm-box.d.ts +11 -0
- package/dist/components/bcm-box.js +48 -0
- package/dist/components/bcm-breadcrumb.d.ts +11 -0
- package/dist/components/bcm-breadcrumb.js +96 -0
- package/dist/components/bcm-button-group.d.ts +11 -0
- package/dist/components/bcm-button-group.js +121 -0
- package/dist/components/bcm-button.d.ts +11 -0
- package/dist/components/bcm-button.js +10 -0
- package/dist/components/bcm-card.d.ts +11 -0
- package/dist/components/bcm-card.js +91 -0
- package/dist/components/bcm-checkbox-group.d.ts +11 -0
- package/dist/components/bcm-checkbox-group.js +474 -0
- package/dist/components/bcm-checkbox-lite.d.ts +11 -0
- package/dist/components/bcm-checkbox-lite.js +10 -0
- package/dist/components/bcm-checkbox.d.ts +11 -0
- package/dist/components/bcm-checkbox.js +10 -0
- package/dist/components/bcm-chip.d.ts +11 -0
- package/dist/components/bcm-chip.js +106 -0
- package/dist/components/bcm-collapse-group.d.ts +11 -0
- package/dist/components/bcm-collapse-group.js +75 -0
- package/dist/components/bcm-collapse.d.ts +11 -0
- package/dist/components/bcm-collapse.js +77 -0
- package/dist/components/bcm-colorpicker.d.ts +11 -0
- package/dist/components/bcm-colorpicker.js +491 -0
- package/dist/components/bcm-date-picker.d.ts +11 -0
- package/dist/components/bcm-date-picker.js +249 -0
- package/dist/components/bcm-datetime-picker.d.ts +11 -0
- package/dist/components/bcm-datetime-picker.js +10 -0
- package/dist/components/bcm-default.d.ts +11 -0
- package/dist/components/bcm-default.js +61 -0
- package/dist/components/bcm-divider.d.ts +11 -0
- package/dist/components/bcm-divider.js +10 -0
- package/dist/components/bcm-drawer.d.ts +11 -0
- package/dist/components/bcm-drawer.js +141 -0
- package/dist/components/bcm-dropdown.d.ts +11 -0
- package/dist/components/bcm-dropdown.js +306 -0
- package/dist/components/bcm-empty.d.ts +11 -0
- package/dist/components/bcm-empty.js +10 -0
- package/dist/components/bcm-error-layout.d.ts +11 -0
- package/dist/components/bcm-error-layout.js +98 -0
- package/dist/components/bcm-expansion-panel.d.ts +11 -0
- package/dist/components/bcm-expansion-panel.js +159 -0
- package/dist/components/bcm-form-2.d.ts +11 -0
- package/dist/components/bcm-form-2.js +226 -0
- package/dist/components/bcm-form-group.d.ts +11 -0
- package/dist/components/bcm-form-group.js +65 -0
- package/dist/components/bcm-form.d.ts +11 -0
- package/dist/components/bcm-form.js +510 -0
- package/dist/components/bcm-icon.d.ts +11 -0
- package/dist/components/bcm-icon.js +10 -0
- package/dist/components/bcm-input.d.ts +11 -0
- package/dist/components/bcm-input.js +404 -0
- package/dist/components/bcm-item.d.ts +11 -0
- package/dist/components/bcm-item.js +98 -0
- package/dist/components/bcm-items.d.ts +11 -0
- package/dist/components/bcm-items.js +74 -0
- package/dist/components/bcm-label.d.ts +11 -0
- package/dist/components/bcm-label.js +10 -0
- package/dist/components/bcm-link.d.ts +11 -0
- package/dist/components/bcm-link.js +10 -0
- package/dist/components/bcm-linked.d.ts +11 -0
- package/dist/components/bcm-linked.js +201 -0
- package/dist/components/bcm-list.d.ts +11 -0
- package/dist/components/bcm-list.js +1859 -0
- package/dist/components/bcm-listbox-group.d.ts +11 -0
- package/dist/components/bcm-listbox-group.js +10 -0
- package/dist/components/bcm-listbox-item.d.ts +11 -0
- package/dist/components/bcm-listbox-item.js +10 -0
- package/dist/components/bcm-listbox.d.ts +11 -0
- package/dist/components/bcm-listbox.js +10 -0
- package/dist/components/bcm-menu.d.ts +11 -0
- package/dist/components/bcm-menu.js +10 -0
- package/dist/components/bcm-message.d.ts +11 -0
- package/dist/components/bcm-message.js +126 -0
- package/dist/components/bcm-modal.d.ts +11 -0
- package/dist/components/bcm-modal.js +166 -0
- package/dist/components/bcm-notification.d.ts +11 -0
- package/dist/components/bcm-notification.js +136 -0
- package/dist/components/bcm-old-input.d.ts +11 -0
- package/dist/components/bcm-old-input.js +10 -0
- package/dist/components/bcm-old-search.d.ts +11 -0
- package/dist/components/bcm-old-search.js +10 -0
- package/dist/components/bcm-old-tag.d.ts +11 -0
- package/dist/components/bcm-old-tag.js +10 -0
- package/dist/components/bcm-popconfirm-box.d.ts +11 -0
- package/dist/components/bcm-popconfirm-box.js +10 -0
- package/dist/components/bcm-popconfirm.d.ts +11 -0
- package/dist/components/bcm-popconfirm.js +160 -0
- package/dist/components/bcm-popover.d.ts +11 -0
- package/dist/components/bcm-popover.js +203 -0
- package/dist/components/bcm-progress.d.ts +11 -0
- package/dist/components/bcm-progress.js +205 -0
- package/dist/components/bcm-radio-group.d.ts +11 -0
- package/dist/components/bcm-radio-group.js +334 -0
- package/dist/components/bcm-radio.d.ts +11 -0
- package/dist/components/bcm-radio.js +10 -0
- package/dist/components/bcm-range.d.ts +11 -0
- package/dist/components/bcm-range.js +220 -0
- package/dist/components/bcm-result.d.ts +11 -0
- package/dist/components/bcm-result.js +105 -0
- package/dist/components/bcm-search.d.ts +11 -0
- package/dist/components/bcm-search.js +10 -0
- package/dist/components/bcm-select-box.d.ts +11 -0
- package/dist/components/bcm-select-box.js +10 -0
- package/dist/components/bcm-select-group.d.ts +11 -0
- package/dist/components/bcm-select-group.js +48 -0
- package/dist/components/bcm-select-option.d.ts +11 -0
- package/dist/components/bcm-select-option.js +57 -0
- package/dist/components/bcm-select.d.ts +11 -0
- package/dist/components/bcm-select.js +1385 -0
- package/dist/components/bcm-skeleton.d.ts +11 -0
- package/dist/components/bcm-skeleton.js +10 -0
- package/dist/components/bcm-step.d.ts +11 -0
- package/dist/components/bcm-step.js +10 -0
- package/dist/components/bcm-stepper.d.ts +11 -0
- package/dist/components/bcm-stepper.js +249 -0
- package/dist/components/bcm-switch.d.ts +11 -0
- package/dist/components/bcm-switch.js +201 -0
- package/dist/components/bcm-tab-group.d.ts +11 -0
- package/dist/components/bcm-tab-group.js +190 -0
- package/dist/components/bcm-tab-pane.d.ts +11 -0
- package/dist/components/bcm-tab-pane.js +89 -0
- package/dist/components/bcm-tab.d.ts +11 -0
- package/dist/components/bcm-tab.js +125 -0
- package/dist/components/bcm-table.d.ts +11 -0
- package/dist/components/bcm-table.js +93 -0
- package/dist/components/bcm-tabs-content.d.ts +11 -0
- package/dist/components/bcm-tabs-content.js +80 -0
- package/dist/components/bcm-tabs.d.ts +11 -0
- package/dist/components/bcm-tabs.js +430 -0
- package/dist/components/bcm-tag.d.ts +11 -0
- package/dist/components/bcm-tag.js +132 -0
- package/dist/components/bcm-text.d.ts +11 -0
- package/dist/components/bcm-text.js +10 -0
- package/dist/components/bcm-textarea.d.ts +11 -0
- package/dist/components/bcm-textarea.js +212 -0
- package/dist/components/bcm-time-picker.d.ts +11 -0
- package/dist/components/bcm-time-picker.js +209 -0
- package/dist/components/bcm-timeline-item.d.ts +11 -0
- package/dist/components/bcm-timeline-item.js +81 -0
- package/dist/components/bcm-timeline.d.ts +11 -0
- package/dist/components/bcm-timeline.js +91 -0
- package/dist/components/bcm-tooltip.d.ts +11 -0
- package/dist/components/bcm-tooltip.js +10 -0
- package/dist/components/bcm-treeview-group.d.ts +11 -0
- package/dist/components/bcm-treeview-group.js +37 -0
- package/dist/components/bcm-treeview-item.d.ts +11 -0
- package/dist/components/bcm-treeview-item.js +10 -0
- package/dist/components/bcm-treeview.d.ts +11 -0
- package/dist/components/bcm-treeview.js +10 -0
- package/dist/components/bcm-typography.d.ts +11 -0
- package/dist/components/bcm-typography.js +10 -0
- package/dist/components/bcm.js +446 -0
- package/dist/components/button.js +403 -0
- package/dist/components/caption-template.js +32 -0
- package/dist/components/checkbox-lite.js +97 -0
- package/dist/components/checkbox.js +231 -0
- package/dist/components/color-helper.js +488 -0
- package/dist/components/colors.js +222 -0
- package/dist/components/datetime-picker.js +1509 -0
- package/dist/components/divider.js +59 -0
- package/dist/components/element-dragger.js +277 -0
- package/dist/components/empty.js +53 -0
- package/dist/components/floating-ui.js +1453 -0
- package/dist/components/generate.js +202 -0
- package/dist/components/icon.js +53 -0
- package/dist/components/index.d.ts +105 -0
- package/dist/components/index.js +99 -0
- package/dist/components/index2.js +62 -0
- package/dist/components/index3.js +191 -0
- package/dist/components/input-template.js +97 -0
- package/dist/components/is-load-decorator.js +54 -0
- package/dist/components/json-parse-decarator.js +38 -0
- package/dist/components/label-template.js +21 -0
- package/dist/components/label.js +83 -0
- package/dist/components/link.js +84 -0
- package/dist/components/listbox-group.js +55 -0
- package/dist/components/listbox-item.js +217 -0
- package/dist/components/listbox.js +1116 -0
- package/dist/components/menu.js +274 -0
- package/dist/{esm/number-helper-f34393b1.js → components/number-helper.js} +1 -1
- package/dist/components/old-bcm-popover-box.d.ts +11 -0
- package/dist/components/old-bcm-popover-box.js +10 -0
- package/dist/components/old-bcm-popover.d.ts +11 -0
- package/dist/components/old-bcm-popover.js +132 -0
- package/dist/components/old-input.js +470 -0
- package/dist/components/old-popover-box.js +184 -0
- package/dist/components/old-search.js +235 -0
- package/dist/components/old-tag.js +153 -0
- package/dist/components/popconfirm-box.js +160 -0
- package/dist/components/popover-placement.js +95 -0
- package/dist/components/property-decorators.js +31 -0
- package/dist/components/radio.js +119 -0
- package/dist/components/search.js +286 -0
- package/dist/components/select-box.js +165 -0
- package/dist/components/skeleton.js +69 -0
- package/dist/components/slot-template.js +13 -0
- package/dist/components/step.js +188 -0
- package/dist/components/string-helper.js +132 -0
- package/dist/components/text.js +72 -0
- package/dist/components/tooltip-helper.js +101 -0
- package/dist/components/tooltip.js +96 -0
- package/dist/components/treeview-item.js +419 -0
- package/dist/components/treeview.js +956 -0
- package/dist/components/types.js +32 -0
- package/dist/components/types2.js +32 -0
- package/dist/components/typography.js +45 -0
- package/dist/components/utils.js +123 -0
- package/dist/components/validators.js +35 -0
- package/dist/esm/bcm-accordion.entry.js +1 -1
- package/dist/esm/bcm-alert.entry.js +1 -1
- package/dist/esm/bcm-attendance.entry.js +2 -2
- package/dist/esm/bcm-avatar_2.entry.js +3 -3
- package/dist/esm/bcm-breadcrumb.entry.js +1 -1
- package/dist/esm/bcm-button-group.entry.js +1 -1
- package/dist/esm/bcm-button_4.entry.js +5 -3
- package/dist/esm/bcm-card.entry.js +1 -1
- package/dist/esm/bcm-checkbox-group.entry.js +1 -1
- package/dist/esm/bcm-checkbox-lite_9.entry.js +1 -1
- package/dist/esm/bcm-checkbox_2.entry.js +1 -1
- package/dist/esm/bcm-chip.entry.js +1 -1
- package/dist/esm/bcm-collapse.entry.js +1 -1
- package/dist/esm/bcm-date-picker.entry.js +1 -1
- package/dist/esm/bcm-datetime-picker.entry.js +1 -1
- package/dist/esm/bcm-default.entry.js +1 -1
- package/dist/esm/bcm-drawer.entry.js +3 -3
- package/dist/esm/bcm-dropdown.entry.js +2 -2
- package/dist/esm/bcm-expansion-panel.entry.js +1 -1
- package/dist/esm/bcm-form-2.entry.js +1 -1
- package/dist/esm/bcm-input.entry.js +4 -4
- package/dist/esm/bcm-item.entry.js +1 -1
- package/dist/esm/bcm-items.entry.js +1 -1
- package/dist/esm/bcm-label_2.entry.js +4 -4
- package/dist/esm/bcm-linked.entry.js +3 -3
- package/dist/esm/bcm-list.entry.js +5 -5
- package/dist/esm/bcm-menu.entry.js +5 -5
- package/dist/esm/bcm-popconfirm-box.entry.js +1 -1
- package/dist/esm/bcm-popconfirm.entry.js +1 -1
- package/dist/esm/bcm-popover.entry.js +3 -3
- package/dist/esm/bcm-progress.entry.js +1 -1
- package/dist/esm/bcm-radio-group.entry.js +1 -1
- package/dist/esm/bcm-radio.entry.js +1 -1
- package/dist/esm/bcm-range.entry.js +1 -1
- package/dist/esm/bcm-search.entry.js +3 -3
- package/dist/esm/bcm-skeleton.entry.js +1 -1
- package/dist/esm/bcm-step.entry.js +2 -2
- package/dist/esm/bcm-stepper.entry.js +3 -3
- package/dist/esm/bcm-switch.entry.js +1 -1
- package/dist/esm/bcm-tab-group.entry.js +1 -1
- package/dist/esm/bcm-tag.entry.js +2 -2
- package/dist/esm/bcm-textarea.entry.js +2 -2
- package/dist/esm/bcm-time-picker.entry.js +1 -1
- package/dist/esm/bromcom-ui.js +1 -1
- package/dist/esm/{generate-4e9309bd.js → generate-d766aaed.js} +1 -1
- package/dist/esm/{input-template-6a8e4cc6.js → input-template-c1019025.js} +1 -1
- package/dist/esm/{json-parse-decarator-87ac1cd9.js → json-parse-decarator-31a154cf.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/number-helper-02ea488e.js +18 -0
- package/dist/esm/old-bcm-popover-box.entry.js +2 -2
- package/dist/esm/old-bcm-popover.entry.js +1 -1
- package/dist/esm/{stepper-states-12a190b4.js → stepper-states-b515fe3a.js} +1 -1
- package/dist/esm/{tooltip-helper-ae137bee.js → tooltip-helper-7bb60a6c.js} +3 -3
- package/dist/esm/{validators-0e0c76db.js → validators-6d1beb42.js} +1 -1
- package/dist/types/components/atoms/avatar/avatar.d.ts +1 -1
- package/dist/types/components/atoms/button/button.d.ts +1 -1
- package/dist/types/components/molecules/drawer/drawer.d.ts +1 -1
- package/dist/types/components/molecules/linked/linked.d.ts +1 -1
- package/dist/types/components/molecules/modal/modal.d.ts +1 -2
- package/dist/types/components/molecules/popover/popover.d.ts +2 -2
- package/dist/types/components/molecules/tooltip/tooltip.d.ts +2 -2
- package/dist/types/components/organism/list/list.d.ts +1 -1
- package/dist/types/components.d.ts +4 -4
- package/package.json +7 -4
- package/dist/bromcom-ui/p-2cca68b4.js +0 -5
- package/dist/bromcom-ui/p-444235f5.js +0 -5
- package/dist/bromcom-ui/p-705d248e.entry.js +0 -5
|
@@ -0,0 +1,1116 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Stencil
|
|
3
|
+
* Copyright (c) Bromcom.
|
|
4
|
+
*/
|
|
5
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
6
|
+
import { b as getChilds, d as delay } from './utils.js';
|
|
7
|
+
import { c as classnames } from './index2.js';
|
|
8
|
+
import { I as IsLoad } from './is-load-decorator.js';
|
|
9
|
+
import { d as defineCustomElement$h } from './avatar.js';
|
|
10
|
+
import { d as defineCustomElement$g } from './badge.js';
|
|
11
|
+
import { d as defineCustomElement$f } from './checkbox.js';
|
|
12
|
+
import { d as defineCustomElement$e } from './checkbox-lite.js';
|
|
13
|
+
import { d as defineCustomElement$d } from './divider.js';
|
|
14
|
+
import { d as defineCustomElement$c } from './empty.js';
|
|
15
|
+
import { d as defineCustomElement$b } from './icon.js';
|
|
16
|
+
import { d as defineCustomElement$a } from './label.js';
|
|
17
|
+
import { d as defineCustomElement$9 } from './listbox-group.js';
|
|
18
|
+
import { d as defineCustomElement$8 } from './listbox-item.js';
|
|
19
|
+
import { d as defineCustomElement$7 } from './old-input.js';
|
|
20
|
+
import { d as defineCustomElement$6 } from './old-search.js';
|
|
21
|
+
import { d as defineCustomElement$5 } from './text.js';
|
|
22
|
+
import { d as defineCustomElement$4 } from './tooltip.js';
|
|
23
|
+
import { d as defineCustomElement$3 } from './treeview.js';
|
|
24
|
+
import { d as defineCustomElement$2 } from './treeview-item.js';
|
|
25
|
+
import { d as defineCustomElement$1 } from './typography.js';
|
|
26
|
+
|
|
27
|
+
const listboxCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}:host{display:block;width:fit-content;height:fit-content;background-color:#ffffff}:host(.hidden){display:none}:host(.flex){width:100%;height:100%}:host(.flex) .bcm-listbox{max-height:100%;max-width:100%;height:100%;min-width:100%}:host(.full-width){width:100%}:host(.full-width) .bcm-listbox{max-width:100%;min-width:100%}.bcm-listbox{flex:1;background-color:var(--bcm-color-grey-1);width:fit-content;display:flex;flex-direction:column;height:100%;width:100%;min-width:256px;max-width:256px;min-height:auto;max-height:300px;box-sizing:border-box;border:1px solid var(--bcm-color-grey-5)}.bcm-listbox-list{flex:1;display:flex;flex-direction:column;overflow-x:hidden;overflow-y:auto;border-bottom:none}.bcm-listbox-list.loading{min-height:150px;position:relative;margin:0 8px 8px 8px}.bcm-listbox-list .loading{display:none;align-items:center;justify-content:center;height:100%;width:100%;position:absolute;background-color:rgba(255, 255, 255, 0.03)}.bcm-listbox-list .loading.show{display:flex}.bcm-listbox-list .list-container.hidden{display:none}.bcm-listbox .search{padding:8px;padding-bottom:0}.bcm-listbox .search.hidden{display:none !important}.bcm-listbox .empty{display:none;align-items:center;justify-content:center;flex:1;height:100%}.bcm-listbox .empty.show{display:flex}.bcm-listbox-footer{text-align:right;padding:4px 8px;background-color:var(--bcm-color-grey-3)}.label{display:block;color:var(--bcm-color-grey-9);margin-bottom:4px}.listbox-item{display:flex;align-items:stretch;justify-content:flex-start;flex-direction:column;color:var(--bcm-color-grey-8);user-select:none;background-color:var(--bcm-color-grey-1)}.listbox-item.hidden{display:none}.listbox-item .divider{padding:0 8px}.listbox-item-container{display:flex;align-items:center;justify-content:flex-start;flex-direction:row;padding-left:8px;width:100%}.listbox-item-container .check-content{display:flex;align-items:center;justify-content:flex-start;width:16px;min-width:16px;margin-right:4px}.listbox-item-container .check-content .indeterminate{width:16px;height:16px;position:relative;display:block;padding-right:8px;cursor:pointer}.listbox-item-container .check-content .indeterminate:after{content:\"\";position:absolute;top:50%;left:9px;width:10px;height:10px;background-color:var(--bcm-color-prime-blue-6);transform:translate(-50%, -50%);opacity:1;z-index:1}.listbox-item-container .check-content .indeterminate:before{content:\"\";position:absolute;top:-1px;left:0px;width:16px;height:100%;border-radius:2px;background-color:transparent;border:1px solid var(--bcm-color-grey-5);opacity:1;z-index:2}.listbox-item-container .check-content .indeterminate:hover:before{border-color:var(--bcm-color-prime-blue-6);box-shadow:0px 2px 4px rgba(54, 121, 171, 0.5)}.listbox-item-container-text-content{display:flex;align-items:center;justify-content:flex-start;flex-direction:row;cursor:pointer;width:100%;padding:4px 8px 4px 4px}.listbox-item-container.disabled{color:var(--bcm-color-grey-6)}.listbox-item-container.selected{color:var(--bcm-color-prime-blue-6)}.listbox-item-container.selected:hover:not(.disabled){color:var(--bcm-color-prime-blue-6);background-color:var(--bcm-color-prime-blue-1)}.listbox-item-container:hover:not(.disabled),.listbox-item-container:active:not(.disabled){color:var(--bcm-color-prime-blue-6);background-color:var(--bcm-color-prime-blue-1)}.caption-area{margin-bottom:8px;min-height:20px}.input-caption{display:block}.error.label{color:var(--bcm-color-red-6) !important}.error.bcm-listbox{border:1px solid var(--bcm-color-red-6) !important}.caption-default{color:#8C8C8C}.caption-primary{color:#4293CF}.caption-success{color:#52C41A}.caption-warning{color:#FA8C16}.caption-error{color:#F5222D}.input-large{height:38px}.input-medium{height:30px}.input-small{height:20px}";
|
|
28
|
+
|
|
29
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
30
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
31
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
32
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
33
|
+
else
|
|
34
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
35
|
+
if (d = decorators[i])
|
|
36
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
37
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* @desc
|
|
41
|
+
* @param str
|
|
42
|
+
*/
|
|
43
|
+
const lowercase = (str) => str.toLowerCase();
|
|
44
|
+
const BcmListbox = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
45
|
+
constructor() {
|
|
46
|
+
super();
|
|
47
|
+
this.__registerHost();
|
|
48
|
+
this.__attachShadow();
|
|
49
|
+
this.listboxItemSelected = createEvent(this, "bcm-listbox-item-selected", 7);
|
|
50
|
+
this.listboxClearSelected = createEvent(this, "bcm-listbox-clear-selecteds", 7);
|
|
51
|
+
this.listboxSendCheck = createEvent(this, "bcm-listbox-send-check", 7);
|
|
52
|
+
this.listboxSendUncheck = createEvent(this, "bcm-listbox-send-uncheck", 7);
|
|
53
|
+
this.listboxChecklist = createEvent(this, "bcm-listbox-checklist", 7);
|
|
54
|
+
this.listboxChange = createEvent(this, "bcm-listbox-change", 7);
|
|
55
|
+
this.listboxChecked = createEvent(this, "bcm-listbox-checked", 7);
|
|
56
|
+
this.change = createEvent(this, "bcm-change", 7);
|
|
57
|
+
this.objectMapping = {
|
|
58
|
+
'id': "id",
|
|
59
|
+
'text': "text",
|
|
60
|
+
'icon': "icon",
|
|
61
|
+
'avatar': "avatar",
|
|
62
|
+
'avatarName': "avatarName",
|
|
63
|
+
'avatarImage': "avatarImage",
|
|
64
|
+
'secondaryText': "secondaryText",
|
|
65
|
+
'tooltipText': "tooltipText",
|
|
66
|
+
'selected': "selected",
|
|
67
|
+
'checked': "checked",
|
|
68
|
+
'disabled': "disabled",
|
|
69
|
+
};
|
|
70
|
+
this.checkedObjectList = [];
|
|
71
|
+
this.cacheCheckedObjectList = [];
|
|
72
|
+
this.allChilds = [];
|
|
73
|
+
this.onlyChilds = [];
|
|
74
|
+
this.firstRun = true;
|
|
75
|
+
this.firstCheck = false;
|
|
76
|
+
this.onFocus = false;
|
|
77
|
+
this.isSetData = false;
|
|
78
|
+
this.isGroupArray = [];
|
|
79
|
+
this.intersection = [];
|
|
80
|
+
/**
|
|
81
|
+
* Component Properties
|
|
82
|
+
*/
|
|
83
|
+
this.innerComponent = false;
|
|
84
|
+
this.checkboxes = false;
|
|
85
|
+
this.required = false;
|
|
86
|
+
this.value = null;
|
|
87
|
+
this.search = false;
|
|
88
|
+
this.infoFooter = false;
|
|
89
|
+
this.showIcon = false;
|
|
90
|
+
this.size = 'medium';
|
|
91
|
+
this.checkedList = [];
|
|
92
|
+
this.updateCheckedList = [];
|
|
93
|
+
this._items = [];
|
|
94
|
+
this.fullWidth = false;
|
|
95
|
+
this.searchFields = ['text', 'secondaryText', 'tooltipText'];
|
|
96
|
+
this.hidden = false;
|
|
97
|
+
this.returnField = "id";
|
|
98
|
+
this.searchSub = "items";
|
|
99
|
+
this.searchText = "";
|
|
100
|
+
this.treeview = false;
|
|
101
|
+
this.searchPlaceholder = "Search";
|
|
102
|
+
this.numberOfColumns = 1;
|
|
103
|
+
this.height = null;
|
|
104
|
+
this.maxHeight = null;
|
|
105
|
+
this.template = null;
|
|
106
|
+
this.highlight = false;
|
|
107
|
+
this.loading = true;
|
|
108
|
+
this.noCaption = false;
|
|
109
|
+
this.captionType = 'default';
|
|
110
|
+
this._internal_id = (Math.random() * 4).toString(16).replace('.', '');
|
|
111
|
+
/**
|
|
112
|
+
* Component States
|
|
113
|
+
*/
|
|
114
|
+
this.searchResults = [];
|
|
115
|
+
this.totalSearch = 0;
|
|
116
|
+
this.showSearch = true;
|
|
117
|
+
this.empty = false;
|
|
118
|
+
this.runClearAndSelect = false;
|
|
119
|
+
this.total = 0;
|
|
120
|
+
this.items = [];
|
|
121
|
+
this.checklist = [];
|
|
122
|
+
this.sortedChecklist = [];
|
|
123
|
+
this.indeterminateState = 'uncheck';
|
|
124
|
+
this.checked = false;
|
|
125
|
+
this.checklistSorted = [];
|
|
126
|
+
}
|
|
127
|
+
async setClear() {
|
|
128
|
+
this.listboxChecklist.emit([]);
|
|
129
|
+
this.value = null;
|
|
130
|
+
this.selectedId = null;
|
|
131
|
+
this.listboxClearSelected.emit([]);
|
|
132
|
+
// this.checkedObjectList.forEach(item => {
|
|
133
|
+
// this.listboxUncheckedMethod(String(item[this.objectMapping['id']]), this._internal_id)
|
|
134
|
+
// });
|
|
135
|
+
let isItem = getChilds(this.el, 'bcm-listbox-item');
|
|
136
|
+
let elementStatuses = [];
|
|
137
|
+
if (isItem) {
|
|
138
|
+
isItem.map(element => {
|
|
139
|
+
elementStatuses.push(element.checked = false);
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
// console.log("uncheck")
|
|
143
|
+
await Promise.all(elementStatuses);
|
|
144
|
+
// if ( allStatuses ){
|
|
145
|
+
// console.log("bitti")
|
|
146
|
+
// }
|
|
147
|
+
this.checklist = [];
|
|
148
|
+
this.sortedChecklist = [];
|
|
149
|
+
this.checklistSorted = [];
|
|
150
|
+
this.checkedObjectList = [];
|
|
151
|
+
await delay(10);
|
|
152
|
+
return Promise.resolve();
|
|
153
|
+
}
|
|
154
|
+
async resetCaption() {
|
|
155
|
+
await delay(10);
|
|
156
|
+
this.caption = this.captionCache;
|
|
157
|
+
this.captionType = this.captionTypeCache;
|
|
158
|
+
this.captionError = null;
|
|
159
|
+
await delay(10);
|
|
160
|
+
return Promise.resolve();
|
|
161
|
+
}
|
|
162
|
+
connectedCallback() {
|
|
163
|
+
this.captionCache = this.caption;
|
|
164
|
+
this.captionTypeCache = this.captionType;
|
|
165
|
+
}
|
|
166
|
+
async getValue() {
|
|
167
|
+
if (this.checkboxes) {
|
|
168
|
+
return this.checkedObjectList;
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
return this.value;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
async getChecklist() {
|
|
175
|
+
return this.checkedObjectList;
|
|
176
|
+
}
|
|
177
|
+
async showSearchMethod(val = true) {
|
|
178
|
+
if (this.treeview == false && this.search == true) {
|
|
179
|
+
this.showSearch = val;
|
|
180
|
+
var search = null;
|
|
181
|
+
if (search = this.el.shadowRoot.getElementById("search")) {
|
|
182
|
+
if (val) {
|
|
183
|
+
search.classList.remove('hidden');
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
search.classList.add('hidden');
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
async selected(id) {
|
|
192
|
+
this.selectedId = String(id);
|
|
193
|
+
if (this.treeview === true) {
|
|
194
|
+
setTimeout(async () => {
|
|
195
|
+
const bcmTreeview = this.el.shadowRoot.querySelector("bcm-treeview");
|
|
196
|
+
if (bcmTreeview) {
|
|
197
|
+
await bcmTreeview.selected(this.selectedId);
|
|
198
|
+
}
|
|
199
|
+
}, 100);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
async clearAndSelectSearch(select = true) {
|
|
203
|
+
this.runClearAndSelect = true;
|
|
204
|
+
if (this.search == true) {
|
|
205
|
+
setTimeout(() => {
|
|
206
|
+
var searchInput = null;
|
|
207
|
+
searchInput = this.el.shadowRoot.querySelector("bcm-old-search");
|
|
208
|
+
if (searchInput) {
|
|
209
|
+
searchInput.setClear();
|
|
210
|
+
if (select == true) {
|
|
211
|
+
searchInput.select();
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}, 100);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
async addChecked(items) {
|
|
218
|
+
await this.setClear();
|
|
219
|
+
if (items) {
|
|
220
|
+
if (typeof items != 'string') {
|
|
221
|
+
await delay(50);
|
|
222
|
+
if (sessionStorage.getItem(this._internal_id + "-config")) {
|
|
223
|
+
this.config(JSON.parse(sessionStorage.getItem(this._internal_id + "-config")));
|
|
224
|
+
}
|
|
225
|
+
this.checkedList = items;
|
|
226
|
+
this.checkedList.forEach((item) => {
|
|
227
|
+
this.handleListboxChecked({ detail: String(item) }, this._internal_id);
|
|
228
|
+
});
|
|
229
|
+
this.updateCheckedList = [];
|
|
230
|
+
if (this.treeview === true) {
|
|
231
|
+
setTimeout(async () => {
|
|
232
|
+
await customElements.whenDefined("bcm-treeview");
|
|
233
|
+
const bcmTreeview = this.el.shadowRoot.querySelector("bcm-treeview");
|
|
234
|
+
if (bcmTreeview) {
|
|
235
|
+
await bcmTreeview.addChecked(items);
|
|
236
|
+
}
|
|
237
|
+
}, 50);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
async updateChecked(items) {
|
|
243
|
+
this.setClear();
|
|
244
|
+
this.checkedList = [];
|
|
245
|
+
this.updateCheckedList = items;
|
|
246
|
+
this.updateCheckedList.forEach((item) => {
|
|
247
|
+
this.handleListboxChecked({ detail: item });
|
|
248
|
+
});
|
|
249
|
+
setTimeout(async () => {
|
|
250
|
+
if (this.treeview === true) {
|
|
251
|
+
await customElements.whenDefined("bcm-treeview");
|
|
252
|
+
const bcmTreeview = this.el.shadowRoot.querySelector("bcm-treeview");
|
|
253
|
+
if (bcmTreeview) {
|
|
254
|
+
await bcmTreeview.updateChecked(items);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}, 100);
|
|
258
|
+
}
|
|
259
|
+
async config(_config) {
|
|
260
|
+
if (_config['treeview'] && _config['treeview'] === true) {
|
|
261
|
+
typeof _config['treeview'] == 'boolean'
|
|
262
|
+
? this.treeview = _config['treeview']
|
|
263
|
+
: this.treeview = false;
|
|
264
|
+
}
|
|
265
|
+
setTimeout(async () => {
|
|
266
|
+
if (this.treeview === true) {
|
|
267
|
+
await customElements.whenDefined("bcm-treeview");
|
|
268
|
+
const bcmTreeview = this.el.shadowRoot.querySelector("bcm-treeview");
|
|
269
|
+
if (bcmTreeview) {
|
|
270
|
+
await bcmTreeview.config(_config);
|
|
271
|
+
if (this.selectedId) {
|
|
272
|
+
await bcmTreeview.selected(this.selectedId);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}, 300);
|
|
277
|
+
if (_config['searchFields']) {
|
|
278
|
+
if (Array.isArray(_config['searchFields'])) {
|
|
279
|
+
this.searchFields = _config['searchFields'];
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
if (_config['searchPlaceholder']) {
|
|
283
|
+
typeof _config['searchPlaceholder'] == 'string'
|
|
284
|
+
? this.searchPlaceholder = _config['searchPlaceholder']
|
|
285
|
+
: this.searchPlaceholder = null;
|
|
286
|
+
}
|
|
287
|
+
if (_config['maxHeight']) {
|
|
288
|
+
typeof _config['maxHeight'] == 'string'
|
|
289
|
+
? this.maxHeight = _config['maxHeight']
|
|
290
|
+
: this.maxHeight = "100%";
|
|
291
|
+
}
|
|
292
|
+
if (_config['height']) {
|
|
293
|
+
typeof _config['height'] == 'string'
|
|
294
|
+
? this.height = _config['height']
|
|
295
|
+
: this.height = "100%";
|
|
296
|
+
}
|
|
297
|
+
if (_config['template']) {
|
|
298
|
+
typeof _config['template'] == 'string'
|
|
299
|
+
? this.template = _config['template']
|
|
300
|
+
: this.template = null;
|
|
301
|
+
}
|
|
302
|
+
if (_config['searchable']) {
|
|
303
|
+
typeof _config['searchable'] == 'boolean'
|
|
304
|
+
? this.search = _config['searchable']
|
|
305
|
+
: this.search = false;
|
|
306
|
+
}
|
|
307
|
+
if (_config['highlight']) {
|
|
308
|
+
typeof _config['highlight'] == 'boolean'
|
|
309
|
+
? this.highlight = _config['highlight']
|
|
310
|
+
: this.highlight = false;
|
|
311
|
+
}
|
|
312
|
+
if (_config['fullWidth']) {
|
|
313
|
+
typeof _config['fullWidth'] == 'boolean'
|
|
314
|
+
? this.fullWidth = _config['fullWidth']
|
|
315
|
+
: this.fullWidth = false;
|
|
316
|
+
}
|
|
317
|
+
if (_config['numberOfColumns']) {
|
|
318
|
+
typeof _config['numberOfColumns'] == 'number'
|
|
319
|
+
? this.numberOfColumns = _config['numberOfColumns']
|
|
320
|
+
: this.numberOfColumns = 1;
|
|
321
|
+
}
|
|
322
|
+
if (_config['infoFooter']) {
|
|
323
|
+
typeof _config['infoFooter'] == 'boolean'
|
|
324
|
+
? this.infoFooter = _config['infoFooter']
|
|
325
|
+
: this.infoFooter = false;
|
|
326
|
+
}
|
|
327
|
+
if (_config['checkable']) {
|
|
328
|
+
typeof _config['checkable'] == 'boolean'
|
|
329
|
+
? this.checkboxes = _config['checkable']
|
|
330
|
+
: this.checkboxes = false;
|
|
331
|
+
}
|
|
332
|
+
if (_config['showIcon']) {
|
|
333
|
+
typeof _config['showIcon'] == 'boolean'
|
|
334
|
+
? this.showIcon = _config['showIcon']
|
|
335
|
+
: this.showIcon = false;
|
|
336
|
+
}
|
|
337
|
+
if (_config['size']) {
|
|
338
|
+
(["small", "medium", "large"].indexOf(_config['size']) >= 0)
|
|
339
|
+
? this.size = _config['size']
|
|
340
|
+
: this.size = 'medium';
|
|
341
|
+
}
|
|
342
|
+
this.searchSub = this.objectMapping['items'];
|
|
343
|
+
if (_config['mapping']) {
|
|
344
|
+
if (_config['mapping']['id']) {
|
|
345
|
+
this.objectMapping['id'] = String(_config['mapping']['id']);
|
|
346
|
+
this.returnField = this.objectMapping['id'];
|
|
347
|
+
}
|
|
348
|
+
if (_config['mapping']['text']) {
|
|
349
|
+
this.objectMapping['text'] = _config['mapping']['text'];
|
|
350
|
+
}
|
|
351
|
+
if (_config['mapping']['icon']) {
|
|
352
|
+
this.objectMapping['icon'] = _config['mapping']['icon'];
|
|
353
|
+
}
|
|
354
|
+
if (_config['mapping']['avatar']) {
|
|
355
|
+
this.objectMapping['avatar'] = _config['mapping']['avatar'];
|
|
356
|
+
}
|
|
357
|
+
if (_config['mapping']['avatarName']) {
|
|
358
|
+
this.objectMapping['avatarName'] = _config['mapping']['avatarName'];
|
|
359
|
+
}
|
|
360
|
+
if (_config['mapping']['avatarImage']) {
|
|
361
|
+
this.objectMapping['avatarImage'] = _config['mapping']['avatarImage'];
|
|
362
|
+
}
|
|
363
|
+
if (_config['mapping']['secondaryText']) {
|
|
364
|
+
this.objectMapping['secondaryText'] = _config['mapping']['secondaryText'];
|
|
365
|
+
}
|
|
366
|
+
if (_config['mapping']['tooltipText']) {
|
|
367
|
+
this.objectMapping['tooltipText'] = _config['mapping']['tooltipText'];
|
|
368
|
+
}
|
|
369
|
+
if (_config['mapping']['disabled']) {
|
|
370
|
+
this.objectMapping['disabled'] = _config['mapping']['disabled'];
|
|
371
|
+
}
|
|
372
|
+
if (_config['mapping']['checked']) {
|
|
373
|
+
this.objectMapping['checked'] = _config['mapping']['checked'];
|
|
374
|
+
}
|
|
375
|
+
if (_config['mapping']['selected']) {
|
|
376
|
+
this.objectMapping['selected'] = _config['mapping']['selected'];
|
|
377
|
+
}
|
|
378
|
+
if (_config['mapping']['items']) {
|
|
379
|
+
this.objectMapping['items'] = _config['mapping']['items'];
|
|
380
|
+
this.searchSub = this.objectMapping['items'];
|
|
381
|
+
}
|
|
382
|
+
// if ( this.treeview ) {
|
|
383
|
+
// }else{
|
|
384
|
+
// this.searchSub = this.objectMapping['items']
|
|
385
|
+
// }
|
|
386
|
+
}
|
|
387
|
+
sessionStorage.setItem(this._internal_id + "-config", JSON.stringify(_config));
|
|
388
|
+
// forceUpdate(this.el)
|
|
389
|
+
return Promise.resolve(true);
|
|
390
|
+
}
|
|
391
|
+
async setData(_data = []) {
|
|
392
|
+
this.clearAndSelectSearch(false);
|
|
393
|
+
this.isLoading(true);
|
|
394
|
+
this._items = _data;
|
|
395
|
+
this.searchData = JSON.parse(_data);
|
|
396
|
+
this.isSetData = true;
|
|
397
|
+
// this.isEmpty(false)
|
|
398
|
+
setTimeout(async () => {
|
|
399
|
+
if (this.treeview === true) {
|
|
400
|
+
const bcmTreeview = this.el.shadowRoot.querySelector("bcm-treeview");
|
|
401
|
+
if (bcmTreeview) {
|
|
402
|
+
await bcmTreeview.setData(_data);
|
|
403
|
+
if (this.searchData.length > 0) {
|
|
404
|
+
this.isEmpty(false);
|
|
405
|
+
this.isLoading(false);
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
}, 100);
|
|
410
|
+
}
|
|
411
|
+
// componentDidLoad(){
|
|
412
|
+
// console.log("kilitle")
|
|
413
|
+
// setTimeout(() => {
|
|
414
|
+
// if(this.isSetData) {
|
|
415
|
+
// this.isLoading(true)
|
|
416
|
+
// this.isEmpty(false)
|
|
417
|
+
// }else{
|
|
418
|
+
// this.isLoading(false)
|
|
419
|
+
// this.isEmpty(true)
|
|
420
|
+
// }
|
|
421
|
+
// }, 100);
|
|
422
|
+
// }
|
|
423
|
+
componentWillRender() {
|
|
424
|
+
if (this.isSetData) {
|
|
425
|
+
this.onlyChilds = this.getAllGroup(this.el, true);
|
|
426
|
+
this.allChilds = this.getAllGroup();
|
|
427
|
+
if (this.onlyChilds.length != this.total) {
|
|
428
|
+
this.total = this.onlyChilds.length;
|
|
429
|
+
}
|
|
430
|
+
if (this.checkboxes === true) {
|
|
431
|
+
this.setIndeterminateState();
|
|
432
|
+
if (this.checklistSorted.length > 0) {
|
|
433
|
+
this.checkedObjectList = [];
|
|
434
|
+
this.getAllGroup(this.el).forEach(element => {
|
|
435
|
+
element.checked == true && (this.firstCheck = true,
|
|
436
|
+
this.checkedObjectList.indexOf(element.itemObject) == -1 && (this.checkedObjectList.push(element.itemObject)));
|
|
437
|
+
});
|
|
438
|
+
if (JSON.stringify(this.cacheCheckedObjectList) !== JSON.stringify(this.checkedObjectList)) {
|
|
439
|
+
this.listboxChecklist.emit(this.checkedObjectList);
|
|
440
|
+
this.cacheCheckedObjectList = this.checkedObjectList;
|
|
441
|
+
this.value = this.checkedObjectList;
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
else {
|
|
445
|
+
if (this.firstCheck) {
|
|
446
|
+
this.listboxChecklist.emit([]);
|
|
447
|
+
this.cacheCheckedObjectList = [];
|
|
448
|
+
if (this.value != null) {
|
|
449
|
+
this.value = null;
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
componentDidRender() {
|
|
457
|
+
// this.isEmpty(true)
|
|
458
|
+
// this.isLoading(true)
|
|
459
|
+
// if(this.total > 0) {
|
|
460
|
+
// this.isLoading(false)
|
|
461
|
+
// this.isEmpty(false)
|
|
462
|
+
// }
|
|
463
|
+
// this.isEmpty(true)
|
|
464
|
+
if (this.isSetData) {
|
|
465
|
+
if (this.total > 0) {
|
|
466
|
+
this.isEmpty(false);
|
|
467
|
+
this.isLoading(false);
|
|
468
|
+
}
|
|
469
|
+
else {
|
|
470
|
+
this.isEmpty(true);
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
/**
|
|
475
|
+
* @desc
|
|
476
|
+
* @returns {void}
|
|
477
|
+
*/
|
|
478
|
+
setIndeterminateState() {
|
|
479
|
+
let state = 'uncheck';
|
|
480
|
+
let allChecked = true;
|
|
481
|
+
let allUnchecked = true;
|
|
482
|
+
this.getAllGroup(this.el, true).map((item) => {
|
|
483
|
+
item.checked && (allUnchecked = false);
|
|
484
|
+
!item.checked && (allChecked = false);
|
|
485
|
+
});
|
|
486
|
+
!allChecked && !allUnchecked
|
|
487
|
+
? state = 'indeterminate'
|
|
488
|
+
: allChecked
|
|
489
|
+
? state = 'determinate'
|
|
490
|
+
: state = 'uncheck';
|
|
491
|
+
this.indeterminateState = state;
|
|
492
|
+
this.checked = state == 'determinate' ? true : false;
|
|
493
|
+
// this.listboxChecklist.emit(this.sortedChecklist)
|
|
494
|
+
}
|
|
495
|
+
getAllGroup(element = this.el, onlyItem = false) {
|
|
496
|
+
let returnAllItems = [];
|
|
497
|
+
let isGroup = getChilds(element, 'bcm-listbox-group');
|
|
498
|
+
let isItem = getChilds(element, 'bcm-listbox-item');
|
|
499
|
+
if (isGroup.length > 0) {
|
|
500
|
+
isGroup.forEach(group => {
|
|
501
|
+
if (this.isGroupArray.indexOf(Number(group.id)) === -1) {
|
|
502
|
+
this.isGroupArray.push(Number(group.id));
|
|
503
|
+
}
|
|
504
|
+
if (onlyItem == false) {
|
|
505
|
+
returnAllItems = [...returnAllItems,
|
|
506
|
+
group
|
|
507
|
+
];
|
|
508
|
+
}
|
|
509
|
+
getChilds(group, 'bcm-listbox-item').forEach(items => {
|
|
510
|
+
if (!(returnAllItems.indexOf(items) >= 0)) {
|
|
511
|
+
returnAllItems = [...returnAllItems,
|
|
512
|
+
items
|
|
513
|
+
];
|
|
514
|
+
}
|
|
515
|
+
});
|
|
516
|
+
});
|
|
517
|
+
}
|
|
518
|
+
if (isItem.length > 0) {
|
|
519
|
+
isItem.forEach(items => {
|
|
520
|
+
if (!(returnAllItems.indexOf(items) >= 0)) {
|
|
521
|
+
returnAllItems = [...returnAllItems,
|
|
522
|
+
items
|
|
523
|
+
];
|
|
524
|
+
}
|
|
525
|
+
});
|
|
526
|
+
}
|
|
527
|
+
return returnAllItems;
|
|
528
|
+
}
|
|
529
|
+
getAllChilds(element = this.el, type = null) {
|
|
530
|
+
let returnAllItems = [];
|
|
531
|
+
let oldItems = [];
|
|
532
|
+
if (!this._items || type === "slot") {
|
|
533
|
+
getChilds(element, 'bcm-listbox-item').forEach(items => {
|
|
534
|
+
returnAllItems = [...returnAllItems,
|
|
535
|
+
items
|
|
536
|
+
];
|
|
537
|
+
});
|
|
538
|
+
}
|
|
539
|
+
else if (this._items && this._items.length > 0) {
|
|
540
|
+
oldItems = JSON.parse(this._items);
|
|
541
|
+
oldItems.map((item) => (((item.type === 'group') ? (item.items.map((item) => ((returnAllItems = [...returnAllItems, item])))) :
|
|
542
|
+
(returnAllItems = [...returnAllItems, item]))));
|
|
543
|
+
}
|
|
544
|
+
return returnAllItems;
|
|
545
|
+
}
|
|
546
|
+
/**
|
|
547
|
+
* @desc
|
|
548
|
+
*/
|
|
549
|
+
handleCheckList(process = 'add', checkId) {
|
|
550
|
+
checkId = String(checkId);
|
|
551
|
+
if (this.checkboxes) {
|
|
552
|
+
if (this.items && this.items.find(e => e[this.objectMapping['id']] == checkId)) {
|
|
553
|
+
// checkId = Number(checkId)
|
|
554
|
+
switch (process) {
|
|
555
|
+
case 'add':
|
|
556
|
+
if (this.checklist.length > 0) {
|
|
557
|
+
if (!this.checklist.includes(checkId)) {
|
|
558
|
+
this.checklist = [...this.checklist, checkId];
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
else {
|
|
562
|
+
this.checklist = [checkId];
|
|
563
|
+
}
|
|
564
|
+
break;
|
|
565
|
+
case 'remove':
|
|
566
|
+
this.checklist = this.checklist.filter(item => item !== checkId);
|
|
567
|
+
break;
|
|
568
|
+
}
|
|
569
|
+
let sorted = this.checklist.sort(function (a, b) { return a - b; });
|
|
570
|
+
this.sortedChecklist = this.checklist;
|
|
571
|
+
this.checklistSorted = sorted;
|
|
572
|
+
// forceUpdate(this.el)
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
handleIndeterminateClick() {
|
|
577
|
+
let state = 'uncheck';
|
|
578
|
+
let allChecked = true;
|
|
579
|
+
let allUnchecked = true;
|
|
580
|
+
let visibleItem = [];
|
|
581
|
+
this.getAllGroup(this.el, true).map((item) => {
|
|
582
|
+
if (item.hidden === false) {
|
|
583
|
+
visibleItem.push(item);
|
|
584
|
+
item.checked && (allUnchecked = false);
|
|
585
|
+
!item.checked && (allChecked = false);
|
|
586
|
+
}
|
|
587
|
+
});
|
|
588
|
+
!allChecked && !allUnchecked
|
|
589
|
+
? state = 'indeterminate'
|
|
590
|
+
: allChecked
|
|
591
|
+
? state = 'determinate'
|
|
592
|
+
: state = 'uncheck';
|
|
593
|
+
visibleItem.map((item) => {
|
|
594
|
+
if (state !== 'uncheck') {
|
|
595
|
+
item.checked = false;
|
|
596
|
+
this.handleCheckList('remove', String(item.id));
|
|
597
|
+
}
|
|
598
|
+
else {
|
|
599
|
+
item.checked = true;
|
|
600
|
+
this.handleCheckList('add', String(item.id));
|
|
601
|
+
}
|
|
602
|
+
});
|
|
603
|
+
this.setIndeterminateState();
|
|
604
|
+
}
|
|
605
|
+
handleCheckboxClick(e) {
|
|
606
|
+
e.preventDefault();
|
|
607
|
+
}
|
|
608
|
+
/**
|
|
609
|
+
* @desc
|
|
610
|
+
* @param item
|
|
611
|
+
*/
|
|
612
|
+
itemRenderer(item) {
|
|
613
|
+
if (item[this.objectMapping['id']] && String(this.selectedId) == String(item[this.objectMapping['id']])) {
|
|
614
|
+
this.listboxItemSelected.emit(item);
|
|
615
|
+
}
|
|
616
|
+
// if(item[this.objectMapping['selected']] && item[this.objectMapping['selected']] === true){
|
|
617
|
+
// this.listboxItemSelected.emit(item)
|
|
618
|
+
// }
|
|
619
|
+
// var checkedListCache = this.checkedList;
|
|
620
|
+
// if(checkedListCache && checkedListCache.find(e => e == item[this.objectMapping['id']])){
|
|
621
|
+
// this.handleListboxChecked({detail: item[this.objectMapping['id']]})
|
|
622
|
+
// }
|
|
623
|
+
// const index = checkedListCache.indexOf(item[this.objectMapping['id']]);
|
|
624
|
+
// if (index > -1) {
|
|
625
|
+
// checkedListCache.splice(index, 1);
|
|
626
|
+
// }
|
|
627
|
+
// if(this.updateCheckedList.length > 0 ){
|
|
628
|
+
// if( this.updateCheckedList.find(e => e == item[this.objectMapping['id']]) ){
|
|
629
|
+
// const index = this.updateCheckedList.indexOf(item[this.objectMapping['id']]);
|
|
630
|
+
// if (index > -1) {
|
|
631
|
+
// this.updateCheckedList.splice(index, 1);
|
|
632
|
+
// }
|
|
633
|
+
// this.listboxChecked.emit(item[this.objectMapping['id']])
|
|
634
|
+
// }
|
|
635
|
+
// }
|
|
636
|
+
return (h("bcm-listbox-item", Object.assign({ _internal_id: this._internal_id, id: String(item[this.objectMapping['id']]), text: item[this.objectMapping['text']] }, (item[this.objectMapping['icon']] && { icon: item[this.objectMapping['icon']] }), (item[this.objectMapping['avatar']] && { avatar: item[this.objectMapping['avatar']] }), (item[this.objectMapping['avatarName']] && { avatarName: item[this.objectMapping['avatarName']] }), (item[this.objectMapping['avatarImage']] && { avatarImage: item[this.objectMapping['avatarImage']] }), (item[this.objectMapping['secondaryText']] && { secondaryText: item[this.objectMapping['secondaryText']] }), (item[this.objectMapping['tooltipText']] && { tooltipText: item[this.objectMapping['tooltipText']] }), (Boolean(item[this.objectMapping['checked']]) === Boolean(true) && { checked: Boolean(item[this.objectMapping['checked']]) }), (item[this.objectMapping['disabled']] === true && { disabled: true }), (Boolean(item[this.objectMapping['selected']]) === Boolean(true) && this.checkboxes == false && { selected: Boolean(item[this.objectMapping['selected']]) }), (this.template && { template: this.template }), (this.checkboxes && { checkboxes: true }), (this.size && { size: this.size }), { itemObject: item, objectMapping: this.objectMapping })));
|
|
637
|
+
}
|
|
638
|
+
/**
|
|
639
|
+
* @desc
|
|
640
|
+
* @param group
|
|
641
|
+
*/
|
|
642
|
+
recursiveGroupRenderer(group) {
|
|
643
|
+
return (h("bcm-listbox-group", { id: group[this.objectMapping['id']], text: group[this.objectMapping['text']] }, group.items.map((item) => ((item.type === 'group' ? this.recursiveGroupRenderer(item) : this.itemRenderer(item))))));
|
|
644
|
+
}
|
|
645
|
+
async searchResultMethod(items = []) {
|
|
646
|
+
if (this.treeview == true) {
|
|
647
|
+
const bcmtreeview = this.el.shadowRoot.querySelector("bcm-treeview");
|
|
648
|
+
// await bcmListbox.config(this._config)
|
|
649
|
+
if (bcmtreeview) {
|
|
650
|
+
bcmtreeview.searchResultMethod({ detail: (items.length > 0 ? items : true) });
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
else {
|
|
654
|
+
this.listenSearchResult({ detail: (items.length > 0 ? items : true), isEvent: true });
|
|
655
|
+
}
|
|
656
|
+
// return true
|
|
657
|
+
}
|
|
658
|
+
handleListboxSelected(event) {
|
|
659
|
+
this.listboxItemSelected.emit(event.detail);
|
|
660
|
+
}
|
|
661
|
+
/**
|
|
662
|
+
* @desc
|
|
663
|
+
*/
|
|
664
|
+
// @Listen('bcm-treeview-checklist')
|
|
665
|
+
// handleListboxCheckedList(e) {
|
|
666
|
+
// this.listboxChecklist.emit(e.detail)
|
|
667
|
+
// }
|
|
668
|
+
isLoading(val) {
|
|
669
|
+
var listContainer = this.el.shadowRoot.getElementById("bcm-listbox-list");
|
|
670
|
+
var loading = this.el.shadowRoot.getElementById("loading");
|
|
671
|
+
var searchInput = this.el.shadowRoot.querySelector("bcm-old-search");
|
|
672
|
+
// var listcontainer = this.el.shadowRoot.getElementById("list-container")
|
|
673
|
+
if (val) {
|
|
674
|
+
if (searchInput) {
|
|
675
|
+
searchInput.disabled = true;
|
|
676
|
+
}
|
|
677
|
+
listContainer && listContainer.classList.add('loading');
|
|
678
|
+
loading && loading.classList.add('show');
|
|
679
|
+
// listcontainer && listcontainer.classList.add('hidden')
|
|
680
|
+
}
|
|
681
|
+
else {
|
|
682
|
+
if (searchInput) {
|
|
683
|
+
searchInput.disabled = false;
|
|
684
|
+
}
|
|
685
|
+
listContainer && listContainer.classList.remove('loading');
|
|
686
|
+
loading && loading.classList.remove('show');
|
|
687
|
+
// listcontainer && listcontainer.classList.remove('hidden')
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
isEmpty(val) {
|
|
691
|
+
var empty = this.el.shadowRoot.getElementById("empty");
|
|
692
|
+
var listcontainer = this.el.shadowRoot.getElementById("list-container");
|
|
693
|
+
var checkall = this.el.shadowRoot.getElementById("checkall");
|
|
694
|
+
if (val) {
|
|
695
|
+
empty && empty.classList.add('show');
|
|
696
|
+
listcontainer && listcontainer.classList.add('hidden');
|
|
697
|
+
checkall && checkall.classList.add('hidden');
|
|
698
|
+
}
|
|
699
|
+
else {
|
|
700
|
+
empty && empty.classList.remove('show');
|
|
701
|
+
listcontainer && listcontainer.classList.remove('hidden');
|
|
702
|
+
checkall && checkall.classList.remove('hidden');
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
isSearchCount(val = false) {
|
|
706
|
+
if (this.infoFooter) {
|
|
707
|
+
var inSearch = this.el.shadowRoot.getElementById("in-search");
|
|
708
|
+
var inTotal = this.el.shadowRoot.getElementById("in-total");
|
|
709
|
+
if (val !== false && val >= 0 && val != null && inSearch && inTotal) {
|
|
710
|
+
inSearch.innerHTML = val;
|
|
711
|
+
inTotal.style.display = "none";
|
|
712
|
+
}
|
|
713
|
+
else {
|
|
714
|
+
inTotal.style.display = "inline";
|
|
715
|
+
inSearch.innerHTML = "";
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
listenSearchResult(event) {
|
|
720
|
+
var path = event.path || (event.composedPath && event.composedPath());
|
|
721
|
+
if (event.isEvent == undefined) {
|
|
722
|
+
if (path && path.filter((input) => input['_internal_id'] == this._internal_id)[0] != undefined) {
|
|
723
|
+
var searchValue = '';
|
|
724
|
+
if (this.treeview == false) {
|
|
725
|
+
// var checkall = null
|
|
726
|
+
// this.checkboxes && (checkall = this.el.shadowRoot.getElementById("checkall"))
|
|
727
|
+
var totalSearch = event.detail.length;
|
|
728
|
+
// this.empty = false
|
|
729
|
+
this.isEmpty(false);
|
|
730
|
+
this.intersection = [];
|
|
731
|
+
if (event.detail.length > 0) {
|
|
732
|
+
if (event.detail[0] == -1) {
|
|
733
|
+
totalSearch = 0;
|
|
734
|
+
this.empty = true;
|
|
735
|
+
this.isEmpty(true);
|
|
736
|
+
}
|
|
737
|
+
if (this.allChilds.length > 0) {
|
|
738
|
+
// this.checkboxes && ( checkall && checkall.classList.add('hidden') )
|
|
739
|
+
this.allChilds.map((item) => {
|
|
740
|
+
if (this.highlight) {
|
|
741
|
+
event.target.addEventListener('bcm-on-search-value', async (e) => {
|
|
742
|
+
var inputText = item.shadowRoot.getElementById("text");
|
|
743
|
+
if (inputText) {
|
|
744
|
+
searchValue = await e.detail;
|
|
745
|
+
inputText = (inputText === null || inputText === void 0 ? void 0 : inputText.textContent) || (inputText === null || inputText === void 0 ? void 0 : inputText.innerText) || "";
|
|
746
|
+
if (searchValue) {
|
|
747
|
+
var cacheInputText = lowercase(inputText);
|
|
748
|
+
var cacheSearchValue = lowercase(searchValue);
|
|
749
|
+
var index = cacheInputText.indexOf(cacheSearchValue);
|
|
750
|
+
if (index >= 0) {
|
|
751
|
+
inputText = inputText.substring(0, index) + "<span class='highlight'>" + inputText.substring(index, index + searchValue.length) + "</span>" + inputText.substring(index + searchValue.length);
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
item.shadowRoot.getElementById("text").innerHTML = inputText;
|
|
755
|
+
}
|
|
756
|
+
});
|
|
757
|
+
}
|
|
758
|
+
item.hidden = true;
|
|
759
|
+
var _ids = String(item.id);
|
|
760
|
+
if (event.detail.indexOf(_ids) >= 0) {
|
|
761
|
+
item.hidden = false;
|
|
762
|
+
}
|
|
763
|
+
else {
|
|
764
|
+
item.hidden = true;
|
|
765
|
+
}
|
|
766
|
+
});
|
|
767
|
+
}
|
|
768
|
+
this.intersection = event.detail[0] == -1 ? [0] : event.detail.filter(x => this.isGroupArray.includes(x));
|
|
769
|
+
}
|
|
770
|
+
else {
|
|
771
|
+
if (this.allChilds.length > 0) {
|
|
772
|
+
this.allChilds.map((item) => {
|
|
773
|
+
item.hidden = false;
|
|
774
|
+
});
|
|
775
|
+
// this.checkboxes && ( checkall && checkall.classList.remove('hidden') )
|
|
776
|
+
}
|
|
777
|
+
// this.isEmpty(true)
|
|
778
|
+
}
|
|
779
|
+
if (this.search || this.checkboxes) {
|
|
780
|
+
setTimeout(() => {
|
|
781
|
+
if (totalSearch >= 0) {
|
|
782
|
+
var totals = totalSearch;
|
|
783
|
+
this.isSearchCount(totals);
|
|
784
|
+
}
|
|
785
|
+
else {
|
|
786
|
+
this.isSearchCount(0);
|
|
787
|
+
}
|
|
788
|
+
if (event.detail[0] === -1) {
|
|
789
|
+
this.isSearchCount(0);
|
|
790
|
+
}
|
|
791
|
+
if (event.detail === true) {
|
|
792
|
+
this.isSearchCount();
|
|
793
|
+
}
|
|
794
|
+
}, 100);
|
|
795
|
+
}
|
|
796
|
+
if (event.detail === true) {
|
|
797
|
+
this.isEmpty(false);
|
|
798
|
+
}
|
|
799
|
+
if (this.runClearAndSelect) {
|
|
800
|
+
this.runClearAndSelect = false;
|
|
801
|
+
this.isSearchCount(true);
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
/**
|
|
808
|
+
* @desc
|
|
809
|
+
* @param newValue
|
|
810
|
+
* @returns {void}
|
|
811
|
+
*/
|
|
812
|
+
parseItems(newValue) {
|
|
813
|
+
if (newValue) {
|
|
814
|
+
typeof newValue == 'string'
|
|
815
|
+
? this.items = JSON.parse(newValue)
|
|
816
|
+
: this.items = newValue;
|
|
817
|
+
}
|
|
818
|
+
this.handleChildProcess();
|
|
819
|
+
}
|
|
820
|
+
handleChange(newValue) {
|
|
821
|
+
this.change.emit(newValue);
|
|
822
|
+
this.listboxChange.emit(newValue);
|
|
823
|
+
}
|
|
824
|
+
handleChildProcess() {
|
|
825
|
+
setTimeout(() => {
|
|
826
|
+
this.onlyChilds = this.getAllGroup(this.el, true);
|
|
827
|
+
this.total = this.onlyChilds.length;
|
|
828
|
+
// console.log(this.total)
|
|
829
|
+
// this.allChilds = this.getAllChilds()
|
|
830
|
+
// this.total = this.allChilds.filter((v, i, a) => a.indexOf(v) === i).length
|
|
831
|
+
if (this.total > 0) {
|
|
832
|
+
// setTimeout(() => {
|
|
833
|
+
this.isLoading(false);
|
|
834
|
+
// }, 100);
|
|
835
|
+
this.isEmpty(false);
|
|
836
|
+
}
|
|
837
|
+
else {
|
|
838
|
+
// setTimeout(() => {
|
|
839
|
+
this.isLoading(false);
|
|
840
|
+
this.isEmpty(true);
|
|
841
|
+
// }, 100);
|
|
842
|
+
}
|
|
843
|
+
}, 100);
|
|
844
|
+
}
|
|
845
|
+
/**
|
|
846
|
+
* @desc
|
|
847
|
+
*/
|
|
848
|
+
handleListboxClearSelected(event) {
|
|
849
|
+
var path = event.path || (event.composedPath && event.composedPath());
|
|
850
|
+
if (this.checkboxes == false && path && path.filter((input) => input['_internal_id'] == this._internal_id)[0] != undefined) {
|
|
851
|
+
this.value = event.detail;
|
|
852
|
+
this.selectedId = String(event.detail[this.objectMapping['id']]);
|
|
853
|
+
this.listboxClearSelected.emit(event.detail);
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
/**
|
|
857
|
+
* @desc
|
|
858
|
+
*/
|
|
859
|
+
handleListboxChecked(event, _internal_id = this._internal_id) {
|
|
860
|
+
var path = event.path || (event.composedPath && event.composedPath());
|
|
861
|
+
if ((path && path.filter((input) => input['_internal_id'] == this._internal_id)[0] != undefined) || _internal_id == this._internal_id) {
|
|
862
|
+
this.listboxSendCheck.emit(event.detail);
|
|
863
|
+
this.handleCheckList('add', event.detail);
|
|
864
|
+
this.setIndeterminateState();
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
/**
|
|
868
|
+
* @desc
|
|
869
|
+
*/
|
|
870
|
+
handleListboxUnchecked(event, _internal_id = this._internal_id) {
|
|
871
|
+
var path = event.path || (event.composedPath && event.composedPath());
|
|
872
|
+
if ((path && path.filter((input) => input['_internal_id'] == this._internal_id)[0] != undefined) || _internal_id == this._internal_id) {
|
|
873
|
+
this.listboxSendUncheck.emit(event.detail);
|
|
874
|
+
this.handleCheckList('remove', event.detail);
|
|
875
|
+
this.setIndeterminateState();
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
async listboxUncheckedMethod(item, internal_id = this._internal_id) {
|
|
879
|
+
if (this.treeview) {
|
|
880
|
+
await customElements.whenDefined("bcm-treeview");
|
|
881
|
+
const bcmTreeview = this.el.shadowRoot.querySelector("bcm-treeview");
|
|
882
|
+
if (bcmTreeview) {
|
|
883
|
+
await bcmTreeview.treeviewUncheckedMethod(item);
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
else {
|
|
887
|
+
this.handleListboxUnchecked({ "detail": item }, internal_id);
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
handleFocus(focusEvent = false) {
|
|
891
|
+
this.onFocus = focusEvent;
|
|
892
|
+
}
|
|
893
|
+
render() {
|
|
894
|
+
const { innerComponent, label, required, treeview, searchText, checkboxes, search, size, fullWidth, total, indeterminateState, checked, checklist, searchData, searchFields, _flex, returnField, searchSub, infoFooter, showSearch, noCaption, caption, captionError, captionType } = this;
|
|
895
|
+
const bcmListbox = classnames('bcm-listbox', {
|
|
896
|
+
'error': captionType == 'error' ? true : false,
|
|
897
|
+
'full-width': fullWidth,
|
|
898
|
+
'flex': _flex
|
|
899
|
+
});
|
|
900
|
+
const classes = classnames('listbox-item', {
|
|
901
|
+
'hidden': this.totalSearch > 0
|
|
902
|
+
});
|
|
903
|
+
const classesContainer = classnames('listbox-item-container');
|
|
904
|
+
const textContent = classnames('listbox-item-container-text-content', size, {
|
|
905
|
+
'size-2': size === 'small' || size === 'medium',
|
|
906
|
+
'size-3': size === 'large',
|
|
907
|
+
});
|
|
908
|
+
const listContainer = classnames('list-container', {
|
|
909
|
+
'column-1': this.numberOfColumns <= 1,
|
|
910
|
+
'column-2': this.numberOfColumns == 2,
|
|
911
|
+
'column-3': this.numberOfColumns >= 3,
|
|
912
|
+
});
|
|
913
|
+
const listContainerStyle = {
|
|
914
|
+
'grid-template-columns': this.numberOfColumns <= 1 ? '1fr' : 'repeat(' + this.numberOfColumns + ', ' + (210 - (this.numberOfColumns * 10)) + 'px)'
|
|
915
|
+
};
|
|
916
|
+
const hostClasses = classnames(this.hidden ? 'hidden' : null,
|
|
917
|
+
// this.totalSearch > 0 ? 'hidden' : null,
|
|
918
|
+
{
|
|
919
|
+
'flex': _flex,
|
|
920
|
+
'full-width': fullWidth
|
|
921
|
+
});
|
|
922
|
+
var customStyles = {
|
|
923
|
+
'max-height': this.maxHeight
|
|
924
|
+
};
|
|
925
|
+
const customStylesList = {
|
|
926
|
+
'min-height': this.height ? "inherit" : this.maxHeight ? "auto" : "200px"
|
|
927
|
+
};
|
|
928
|
+
if (this.height) {
|
|
929
|
+
customStyles = Object.assign(Object.assign({}, customStyles), { 'height': this.height });
|
|
930
|
+
}
|
|
931
|
+
const captionClasses = classnames('size-1', 'input-caption', 'caption-' + captionType);
|
|
932
|
+
return (h(Host, { class: hostClasses, style: customStyles, "bcm-internal-id": this._internal_id }, !innerComponent && label && h("div", null, h("bcm-label", { tooltip: this.tooltip, type: captionType, value: label, required: required })), treeview === true && (h("bcm-treeview", { _internal_id: this._internal_id })), treeview == false && (h("div", { class: bcmListbox, style: customStyles }, search && (h("div", { class: "search", id: "search", style: { 'display': String(showSearch) == 'false' ? 'none' : 'block' } }, h("bcm-old-search", { _internal_id: this._internal_id, searchPlaceholder: this.searchPlaceholder, searchValue: searchText, "on-bcm-focus": () => this.handleFocus(true), "on-bcm-blur": () => this.handleFocus(false), data: searchData, returnField: returnField, searchFields: searchFields, searchSub: searchSub, clearable: true }), h("bcm-divider", null))), h("div", { id: "bcm-listbox-list", class: "bcm-listbox-list loading", style: customStylesList }, checkboxes && (h("div", { class: classes, id: "checkall" }, h("div", { class: classesContainer, onClick: () => this.handleIndeterminateClick() }, h("div", { class: "check-content" }, indeterminateState == 'indeterminate' && (h("span", { class: "indeterminate" })) || (h("bcm-checkbox-lite", { onClick: (e) => this.handleCheckboxClick(e), checked: checked, "no-caption": true }))), h("div", { class: textContent }, "Select All")), h("div", { class: "divider" }, h("bcm-divider", null)))),
|
|
933
|
+
// this.empty == false && (
|
|
934
|
+
h("div", { id: "list-container", class: listContainer, style: listContainerStyle }, this.items.length !== 0 && this.items.map((item) => ((item.type === 'group' ? this.recursiveGroupRenderer(item) : this.itemRenderer(item)))))
|
|
935
|
+
// )
|
|
936
|
+
,
|
|
937
|
+
// this.loading && (
|
|
938
|
+
h("div", { id: "loading", class: "loading show" }, h("bcm-icon", { class: "prefix", icon: "far fa-spinner-third fa-spin" }))
|
|
939
|
+
// )
|
|
940
|
+
,
|
|
941
|
+
// ( this.empty || total == 0 ) && (
|
|
942
|
+
h("div", { id: "empty", class: "empty" }, h("bcm-empty", null, "No Data"))
|
|
943
|
+
// )
|
|
944
|
+
), infoFooter == true && (h("div", { class: "bcm-listbox-footer" }, h("bcm-text", { scale: "size-1", color: "grey-8" }, checklist.length > 0 && (' ( ' + checklist.length + ' selected ) '), "Total ", h("span", { id: "in-search" }), " ", h("span", { id: "in-total" }, total), " items found."))))), !noCaption && (h("div", { class: "caption-area" }, captionType == "error"
|
|
945
|
+
? h("span", { class: captionClasses }, " ", captionError, " ")
|
|
946
|
+
: caption && h("span", { class: captionClasses }, " ", caption, " ")))));
|
|
947
|
+
}
|
|
948
|
+
get el() { return this; }
|
|
949
|
+
static get watchers() { return {
|
|
950
|
+
"_items": ["parseItems"],
|
|
951
|
+
"value": ["handleChange"]
|
|
952
|
+
}; }
|
|
953
|
+
static get style() { return listboxCss; }
|
|
954
|
+
}, [1, "bcm-listbox", {
|
|
955
|
+
"innerComponent": [1028, "inner-component"],
|
|
956
|
+
"checkboxes": [1028],
|
|
957
|
+
"label": [1025],
|
|
958
|
+
"required": [1028],
|
|
959
|
+
"value": [1032],
|
|
960
|
+
"search": [1028],
|
|
961
|
+
"infoFooter": [1028, "info-footer"],
|
|
962
|
+
"showIcon": [1028, "show-icon"],
|
|
963
|
+
"size": [1025],
|
|
964
|
+
"selectedId": [1025, "selected-id"],
|
|
965
|
+
"checkedList": [1040],
|
|
966
|
+
"updateCheckedList": [1040],
|
|
967
|
+
"_items": [1025, "data"],
|
|
968
|
+
"fullWidth": [1028, "full-width"],
|
|
969
|
+
"searchFields": [1040],
|
|
970
|
+
"_flex": [1025, "flex"],
|
|
971
|
+
"hidden": [1028],
|
|
972
|
+
"returnField": [1025, "return-field"],
|
|
973
|
+
"searchSub": [1025, "search-sub"],
|
|
974
|
+
"searchText": [1025, "searchtext"],
|
|
975
|
+
"treeview": [1028],
|
|
976
|
+
"searchPlaceholder": [1025, "searchplaceholder"],
|
|
977
|
+
"numberOfColumns": [1026, "number-of-columns"],
|
|
978
|
+
"height": [1025],
|
|
979
|
+
"maxHeight": [1025, "max-height"],
|
|
980
|
+
"template": [1025],
|
|
981
|
+
"highlight": [1028],
|
|
982
|
+
"loading": [1028],
|
|
983
|
+
"noCaption": [1028, "no-caption"],
|
|
984
|
+
"caption": [1025],
|
|
985
|
+
"captionError": [1025, "caption-error"],
|
|
986
|
+
"captionType": [1025, "caption-type"],
|
|
987
|
+
"_internal_id": [1537],
|
|
988
|
+
"tooltip": [1025],
|
|
989
|
+
"total": [32],
|
|
990
|
+
"items": [32],
|
|
991
|
+
"checklist": [32],
|
|
992
|
+
"sortedChecklist": [32],
|
|
993
|
+
"indeterminateState": [32],
|
|
994
|
+
"checked": [32],
|
|
995
|
+
"jsonItem": [32],
|
|
996
|
+
"searchData": [32],
|
|
997
|
+
"captionCache": [32],
|
|
998
|
+
"captionTypeCache": [32],
|
|
999
|
+
"checklistSorted": [32],
|
|
1000
|
+
"setClear": [64],
|
|
1001
|
+
"resetCaption": [64],
|
|
1002
|
+
"getValue": [64],
|
|
1003
|
+
"getChecklist": [64],
|
|
1004
|
+
"showSearchMethod": [64],
|
|
1005
|
+
"selected": [64],
|
|
1006
|
+
"clearAndSelectSearch": [64],
|
|
1007
|
+
"addChecked": [64],
|
|
1008
|
+
"updateChecked": [64],
|
|
1009
|
+
"config": [64],
|
|
1010
|
+
"setData": [64],
|
|
1011
|
+
"searchResultMethod": [64],
|
|
1012
|
+
"listboxUncheckedMethod": [64]
|
|
1013
|
+
}, [[2, "bcm-treeview-item-selected", "handleListboxSelected"], [0, "bcm-on-search", "listenSearchResult"], [0, "bcm-listbox-item-selected", "handleListboxClearSelected"], [0, "bcm-listbox-checked", "handleListboxChecked"], [0, "bcm-listbox-unchecked", "handleListboxUnchecked"]]]);
|
|
1014
|
+
__decorate([
|
|
1015
|
+
IsLoad()
|
|
1016
|
+
], BcmListbox.prototype, "el", void 0);
|
|
1017
|
+
function defineCustomElement() {
|
|
1018
|
+
if (typeof customElements === "undefined") {
|
|
1019
|
+
return;
|
|
1020
|
+
}
|
|
1021
|
+
const components = ["bcm-listbox", "bcm-avatar", "bcm-badge", "bcm-checkbox", "bcm-checkbox-lite", "bcm-divider", "bcm-empty", "bcm-icon", "bcm-label", "bcm-listbox-group", "bcm-listbox-item", "bcm-old-input", "bcm-old-search", "bcm-text", "bcm-tooltip", "bcm-treeview", "bcm-treeview-item", "bcm-typography"];
|
|
1022
|
+
components.forEach(tagName => { switch (tagName) {
|
|
1023
|
+
case "bcm-listbox":
|
|
1024
|
+
if (!customElements.get(tagName)) {
|
|
1025
|
+
customElements.define(tagName, BcmListbox);
|
|
1026
|
+
}
|
|
1027
|
+
break;
|
|
1028
|
+
case "bcm-avatar":
|
|
1029
|
+
if (!customElements.get(tagName)) {
|
|
1030
|
+
defineCustomElement$h();
|
|
1031
|
+
}
|
|
1032
|
+
break;
|
|
1033
|
+
case "bcm-badge":
|
|
1034
|
+
if (!customElements.get(tagName)) {
|
|
1035
|
+
defineCustomElement$g();
|
|
1036
|
+
}
|
|
1037
|
+
break;
|
|
1038
|
+
case "bcm-checkbox":
|
|
1039
|
+
if (!customElements.get(tagName)) {
|
|
1040
|
+
defineCustomElement$f();
|
|
1041
|
+
}
|
|
1042
|
+
break;
|
|
1043
|
+
case "bcm-checkbox-lite":
|
|
1044
|
+
if (!customElements.get(tagName)) {
|
|
1045
|
+
defineCustomElement$e();
|
|
1046
|
+
}
|
|
1047
|
+
break;
|
|
1048
|
+
case "bcm-divider":
|
|
1049
|
+
if (!customElements.get(tagName)) {
|
|
1050
|
+
defineCustomElement$d();
|
|
1051
|
+
}
|
|
1052
|
+
break;
|
|
1053
|
+
case "bcm-empty":
|
|
1054
|
+
if (!customElements.get(tagName)) {
|
|
1055
|
+
defineCustomElement$c();
|
|
1056
|
+
}
|
|
1057
|
+
break;
|
|
1058
|
+
case "bcm-icon":
|
|
1059
|
+
if (!customElements.get(tagName)) {
|
|
1060
|
+
defineCustomElement$b();
|
|
1061
|
+
}
|
|
1062
|
+
break;
|
|
1063
|
+
case "bcm-label":
|
|
1064
|
+
if (!customElements.get(tagName)) {
|
|
1065
|
+
defineCustomElement$a();
|
|
1066
|
+
}
|
|
1067
|
+
break;
|
|
1068
|
+
case "bcm-listbox-group":
|
|
1069
|
+
if (!customElements.get(tagName)) {
|
|
1070
|
+
defineCustomElement$9();
|
|
1071
|
+
}
|
|
1072
|
+
break;
|
|
1073
|
+
case "bcm-listbox-item":
|
|
1074
|
+
if (!customElements.get(tagName)) {
|
|
1075
|
+
defineCustomElement$8();
|
|
1076
|
+
}
|
|
1077
|
+
break;
|
|
1078
|
+
case "bcm-old-input":
|
|
1079
|
+
if (!customElements.get(tagName)) {
|
|
1080
|
+
defineCustomElement$7();
|
|
1081
|
+
}
|
|
1082
|
+
break;
|
|
1083
|
+
case "bcm-old-search":
|
|
1084
|
+
if (!customElements.get(tagName)) {
|
|
1085
|
+
defineCustomElement$6();
|
|
1086
|
+
}
|
|
1087
|
+
break;
|
|
1088
|
+
case "bcm-text":
|
|
1089
|
+
if (!customElements.get(tagName)) {
|
|
1090
|
+
defineCustomElement$5();
|
|
1091
|
+
}
|
|
1092
|
+
break;
|
|
1093
|
+
case "bcm-tooltip":
|
|
1094
|
+
if (!customElements.get(tagName)) {
|
|
1095
|
+
defineCustomElement$4();
|
|
1096
|
+
}
|
|
1097
|
+
break;
|
|
1098
|
+
case "bcm-treeview":
|
|
1099
|
+
if (!customElements.get(tagName)) {
|
|
1100
|
+
defineCustomElement$3();
|
|
1101
|
+
}
|
|
1102
|
+
break;
|
|
1103
|
+
case "bcm-treeview-item":
|
|
1104
|
+
if (!customElements.get(tagName)) {
|
|
1105
|
+
defineCustomElement$2();
|
|
1106
|
+
}
|
|
1107
|
+
break;
|
|
1108
|
+
case "bcm-typography":
|
|
1109
|
+
if (!customElements.get(tagName)) {
|
|
1110
|
+
defineCustomElement$1();
|
|
1111
|
+
}
|
|
1112
|
+
break;
|
|
1113
|
+
} });
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
export { BcmListbox as B, defineCustomElement as d };
|