bromcom-ui 2.7.36-rc.11 → 2.7.36-rc.12
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-7386f0eb.entry.js → p-043fadc2.entry.js} +1 -1
- package/dist/bromcom-ui/{p-50d9b950.entry.js → p-07990577.entry.js} +1 -1
- package/dist/bromcom-ui/{p-0505b430.entry.js → p-10b6faa4.entry.js} +1 -1
- package/dist/bromcom-ui/{p-febeb28c.entry.js → p-1e15f9e2.entry.js} +1 -1
- package/dist/bromcom-ui/{p-fcd2ded4.entry.js → p-208ecb7e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-bddecc0e.js → p-2900dc18.js} +1 -1
- package/dist/bromcom-ui/{p-eefa89b6.entry.js → p-2e9f7f67.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c00cbc3c.js → p-2ed0035c.js} +1 -1
- package/dist/bromcom-ui/{p-7d21bcdb.entry.js → p-33da36fe.entry.js} +1 -1
- package/dist/bromcom-ui/{p-d2d00b45.entry.js → p-427d4cfe.entry.js} +1 -1
- package/dist/bromcom-ui/{p-8a189e31.entry.js → p-45f4c48d.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a7f8e8af.entry.js → p-4cffee4c.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c8dae4b7.entry.js → p-4f425a06.entry.js} +1 -1
- package/dist/bromcom-ui/{p-d2101bab.entry.js → p-5562a6f8.entry.js} +1 -1
- package/dist/bromcom-ui/{p-b339c2f1.entry.js → p-5cfa60d9.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ae8f263e.entry.js → p-5dbd14ee.entry.js} +1 -1
- package/dist/bromcom-ui/{p-8a66f4e1.entry.js → p-66ca7f5c.entry.js} +1 -1
- package/dist/bromcom-ui/{p-cef328d2.entry.js → p-73a5514c.entry.js} +1 -1
- package/dist/bromcom-ui/{p-1e4c4c89.entry.js → p-7a1590ef.entry.js} +1 -1
- package/dist/bromcom-ui/{p-1c211b1a.entry.js → p-7aa7ba95.entry.js} +1 -1
- package/dist/bromcom-ui/{p-4595d534.entry.js → p-7afaa032.entry.js} +1 -1
- package/dist/bromcom-ui/{p-89241a6e.entry.js → p-85b66c30.entry.js} +1 -1
- package/dist/bromcom-ui/{p-3330b325.js → p-8737b92d.js} +1 -1
- package/dist/bromcom-ui/{p-1aa2c6f1.entry.js → p-8e30c3ab.entry.js} +1 -1
- package/dist/bromcom-ui/{p-36168a4c.entry.js → p-8fc020d6.entry.js} +1 -1
- package/dist/bromcom-ui/p-923d0d7b.js +5 -0
- package/dist/bromcom-ui/{p-ed6d2390.entry.js → p-95506f91.entry.js} +1 -1
- package/dist/bromcom-ui/{p-950af117.js → p-971036f3.js} +1 -1
- package/dist/bromcom-ui/{p-00028e84.entry.js → p-99f802df.entry.js} +1 -1
- package/dist/bromcom-ui/{p-b0ecb69b.entry.js → p-9a843ddf.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ed8e6005.entry.js → p-9cca42a9.entry.js} +1 -1
- package/dist/bromcom-ui/{p-81dff515.entry.js → p-a855cd39.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ab7bb0f5.entry.js → p-a9838689.entry.js} +1 -1
- package/dist/bromcom-ui/{p-d7189ee1.entry.js → p-abedcdee.entry.js} +1 -1
- package/dist/bromcom-ui/{p-d8ef8c9d.entry.js → p-b5c23d92.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c5c60034.entry.js → p-bf52d000.entry.js} +1 -1
- package/dist/bromcom-ui/{p-49be07bc.entry.js → p-c67b5116.entry.js} +1 -1
- package/dist/bromcom-ui/{p-01951e92.entry.js → p-ce62e9f4.entry.js} +1 -1
- package/dist/bromcom-ui/{p-16f3143c.entry.js → p-cf1e59a8.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c5dcbc05.entry.js → p-dc5789ce.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c268491e.entry.js → p-dc94fe09.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ae99e107.entry.js → p-ddce2fc7.entry.js} +1 -1
- package/dist/bromcom-ui/{p-d2f22f4b.js → p-df8fe884.js} +1 -1
- package/dist/bromcom-ui/{p-97a630d5.entry.js → p-e43c47dc.entry.js} +1 -1
- package/dist/bromcom-ui/p-ee265d02.js +5 -0
- package/package.json +1 -1
- package/dist/bromcom-ui/p-940d3fc3.js +0 -5
- package/dist/bromcom-ui/p-a6fb1b6f.js +0 -5
- package/dist/cjs/_commonjsHelpers-bd20f4c0.js +0 -29
- package/dist/cjs/bcm-2c51bf0c.js +0 -448
- package/dist/cjs/bcm-accordion.cjs.entry.js +0 -85
- package/dist/cjs/bcm-alert.cjs.entry.js +0 -112
- package/dist/cjs/bcm-attendance.cjs.entry.js +0 -50
- package/dist/cjs/bcm-autocomplete.cjs.entry.js +0 -155
- package/dist/cjs/bcm-avatar_2.cjs.entry.js +0 -156
- package/dist/cjs/bcm-box.cjs.entry.js +0 -35
- package/dist/cjs/bcm-breadcrumb.cjs.entry.js +0 -67
- package/dist/cjs/bcm-button-group.cjs.entry.js +0 -102
- package/dist/cjs/bcm-button_13.cjs.entry.js +0 -1981
- package/dist/cjs/bcm-card.cjs.entry.js +0 -76
- package/dist/cjs/bcm-checkbox-group.cjs.entry.js +0 -409
- package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +0 -2570
- package/dist/cjs/bcm-checkbox_2.cjs.entry.js +0 -203
- package/dist/cjs/bcm-chip.cjs.entry.js +0 -70
- package/dist/cjs/bcm-collapse-group.cjs.entry.js +0 -57
- package/dist/cjs/bcm-collapse.cjs.entry.js +0 -58
- package/dist/cjs/bcm-colorpicker.cjs.entry.js +0 -433
- package/dist/cjs/bcm-date-picker.cjs.entry.js +0 -171
- package/dist/cjs/bcm-datetime-picker.cjs.entry.js +0 -1432
- package/dist/cjs/bcm-default.cjs.entry.js +0 -40
- package/dist/cjs/bcm-drawer.cjs.entry.js +0 -111
- package/dist/cjs/bcm-error-layout.cjs.entry.js +0 -78
- package/dist/cjs/bcm-expansion-panel.cjs.entry.js +0 -127
- package/dist/cjs/bcm-form-2.cjs.entry.js +0 -205
- package/dist/cjs/bcm-form-group.cjs.entry.js +0 -45
- package/dist/cjs/bcm-input.cjs.entry.js +0 -324
- package/dist/cjs/bcm-link.cjs.entry.js +0 -62
- package/dist/cjs/bcm-linked.cjs.entry.js +0 -83
- package/dist/cjs/bcm-list.cjs.entry.js +0 -1761
- package/dist/cjs/bcm-message.cjs.entry.js +0 -99
- package/dist/cjs/bcm-modal.cjs.entry.js +0 -137
- package/dist/cjs/bcm-notification.cjs.entry.js +0 -103
- package/dist/cjs/bcm-old-input.cjs.entry.js +0 -398
- package/dist/cjs/bcm-old-tag_2.cjs.entry.js +0 -157
- package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +0 -122
- package/dist/cjs/bcm-popconfirm.cjs.entry.js +0 -112
- package/dist/cjs/bcm-progress.cjs.entry.js +0 -174
- package/dist/cjs/bcm-radio-group.cjs.entry.js +0 -267
- package/dist/cjs/bcm-radio.cjs.entry.js +0 -104
- package/dist/cjs/bcm-range.cjs.entry.js +0 -189
- package/dist/cjs/bcm-result.cjs.entry.js +0 -79
- package/dist/cjs/bcm-search.cjs.entry.js +0 -256
- package/dist/cjs/bcm-select-group.cjs.entry.js +0 -31
- package/dist/cjs/bcm-select-option.cjs.entry.js +0 -37
- package/dist/cjs/bcm-select.cjs.entry.js +0 -1181
- package/dist/cjs/bcm-skeleton.cjs.entry.js +0 -56
- package/dist/cjs/bcm-step.cjs.entry.js +0 -93
- package/dist/cjs/bcm-stepper.cjs.entry.js +0 -211
- package/dist/cjs/bcm-tab-group.cjs.entry.js +0 -172
- package/dist/cjs/bcm-tab-pane.cjs.entry.js +0 -70
- package/dist/cjs/bcm-tab.cjs.entry.js +0 -89
- package/dist/cjs/bcm-table.cjs.entry.js +0 -78
- package/dist/cjs/bcm-tabs-content.cjs.entry.js +0 -62
- package/dist/cjs/bcm-tabs.cjs.entry.js +0 -390
- package/dist/cjs/bcm-tag.cjs.entry.js +0 -101
- package/dist/cjs/bcm-textarea.cjs.entry.js +0 -150
- package/dist/cjs/bcm-time-picker.cjs.entry.js +0 -139
- package/dist/cjs/bcm-timeline-item.cjs.entry.js +0 -55
- package/dist/cjs/bcm-timeline.cjs.entry.js +0 -73
- package/dist/cjs/bcm-treeview-group.cjs.entry.js +0 -23
- package/dist/cjs/bromcom-ui.cjs.js +0 -24
- package/dist/cjs/caption-template-abc6b8bd.js +0 -34
- package/dist/cjs/color-helper-c9882bd8.js +0 -490
- package/dist/cjs/colors-56282b00.js +0 -224
- package/dist/cjs/datetime-helper-eaf4fadb.js +0 -11
- package/dist/cjs/element-dragger-a8562f82.js +0 -279
- package/dist/cjs/generate-f31baeb2.js +0 -198
- package/dist/cjs/global-b0d21446.js +0 -15
- package/dist/cjs/index-53637125.js +0 -1864
- package/dist/cjs/index-89682d55.js +0 -193
- package/dist/cjs/index-a2b50e51.js +0 -64
- package/dist/cjs/index.cjs.js +0 -6
- package/dist/cjs/input-template-9d262873.js +0 -86
- package/dist/cjs/is-load-decorator-20a4687b.js +0 -56
- package/dist/cjs/json-parse-decarator-c3596560.js +0 -40
- package/dist/cjs/label-template-b35d7e8e.js +0 -23
- package/dist/cjs/loader.cjs.js +0 -26
- package/dist/cjs/number-helper-0975436a.js +0 -20
- package/dist/cjs/old-bcm-popover.cjs.entry.js +0 -104
- package/dist/cjs/popover-placement-87901bb3.js +0 -98
- package/dist/cjs/property-decorators-b0cb1a50.js +0 -33
- package/dist/cjs/slot-template-546b0f5a.js +0 -15
- package/dist/cjs/stepper-states-0a54437d.js +0 -83
- package/dist/cjs/string-helper-df40a475.js +0 -134
- package/dist/cjs/tooltip-helper-6b5d41a4.js +0 -1449
- package/dist/cjs/types-3871235f.js +0 -32
- package/dist/cjs/types-6eb7e028.js +0 -32
- package/dist/cjs/types-cc4adee7.js +0 -19
- package/dist/cjs/utils-fc077139.js +0 -131
- package/dist/cjs/validators-f572960b.js +0 -33
- package/dist/collection/collection-manifest.json +0 -95
- package/dist/collection/components/atoms/avatar/avatar.css +0 -448
- package/dist/collection/components/atoms/avatar/avatar.js +0 -259
- package/dist/collection/components/atoms/badge/badge.css +0 -481
- package/dist/collection/components/atoms/badge/badge.js +0 -224
- package/dist/collection/components/atoms/box/box.js +0 -23
- package/dist/collection/components/atoms/button/button.css +0 -637
- package/dist/collection/components/atoms/button/button.js +0 -525
- package/dist/collection/components/atoms/button/types.js +0 -170
- package/dist/collection/components/atoms/chip/chip.css +0 -453
- package/dist/collection/components/atoms/chip/chip.js +0 -187
- package/dist/collection/components/atoms/divider/divider.css +0 -142
- package/dist/collection/components/atoms/divider/divider.js +0 -83
- package/dist/collection/components/atoms/icon/icon.css +0 -127
- package/dist/collection/components/atoms/icon/icon.js +0 -70
- package/dist/collection/components/atoms/label/label.css +0 -408
- package/dist/collection/components/atoms/label/label.js +0 -216
- package/dist/collection/components/atoms/link/link.css +0 -419
- package/dist/collection/components/atoms/link/link.js +0 -176
- package/dist/collection/components/atoms/states/button.states.js +0 -31
- package/dist/collection/components/atoms/tag/tag.js +0 -334
- package/dist/collection/components/atoms/tag/types.js +0 -30
- package/dist/collection/components/atoms/typography/typography.js +0 -23
- package/dist/collection/components/molecules/accordion/accordion.css +0 -127
- package/dist/collection/components/molecules/accordion/accordion.js +0 -129
- package/dist/collection/components/molecules/alert/alert.css +0 -191
- package/dist/collection/components/molecules/alert/alert.js +0 -298
- package/dist/collection/components/molecules/alert/types.js +0 -23
- package/dist/collection/components/molecules/breadcrumb/breadcrumb.css +0 -201
- package/dist/collection/components/molecules/breadcrumb/breadcrumb.js +0 -155
- package/dist/collection/components/molecules/breadcrumb/types.js +0 -5
- package/dist/collection/components/molecules/button-group/button-group.css +0 -423
- package/dist/collection/components/molecules/button-group/button-group.js +0 -235
- package/dist/collection/components/molecules/card/card.css +0 -408
- package/dist/collection/components/molecules/card/card.js +0 -128
- package/dist/collection/components/molecules/checkbox/checkbox-lite.js +0 -237
- package/dist/collection/components/molecules/checkbox/checkbox.css +0 -1280
- package/dist/collection/components/molecules/checkbox/checkbox.js +0 -688
- package/dist/collection/components/molecules/checkbox/group.css +0 -156
- package/dist/collection/components/molecules/checkbox/group.js +0 -779
- package/dist/collection/components/molecules/drawer/drawer.css +0 -502
- package/dist/collection/components/molecules/drawer/drawer.js +0 -272
- package/dist/collection/components/molecules/dropdown/dropdown.css +0 -419
- package/dist/collection/components/molecules/dropdown/dropdown.js +0 -839
- package/dist/collection/components/molecules/empty/empty.js +0 -44
- package/dist/collection/components/molecules/error-layout/error-layout.css +0 -396
- package/dist/collection/components/molecules/error-layout/error-layout.js +0 -177
- package/dist/collection/components/molecules/error-layout/types.js +0 -5
- package/dist/collection/components/molecules/expansion-panel/expansion-panel.css +0 -488
- package/dist/collection/components/molecules/expansion-panel/expansion-panel.js +0 -322
- package/dist/collection/components/molecules/input/input.css +0 -1208
- package/dist/collection/components/molecules/input/input.js +0 -1170
- package/dist/collection/components/molecules/input/types.js +0 -17
- package/dist/collection/components/molecules/item/item.css +0 -446
- package/dist/collection/components/molecules/item/item.js +0 -151
- package/dist/collection/components/molecules/items/items.js +0 -84
- package/dist/collection/components/molecules/linked/linked.js +0 -179
- package/dist/collection/components/molecules/menu/menu.css +0 -718
- package/dist/collection/components/molecules/menu/menu.js +0 -618
- package/dist/collection/components/molecules/message/message.css +0 -165
- package/dist/collection/components/molecules/message/message.js +0 -222
- package/dist/collection/components/molecules/message/types.js +0 -14
- package/dist/collection/components/molecules/modal/modal.css +0 -526
- package/dist/collection/components/molecules/modal/modal.js +0 -379
- package/dist/collection/components/molecules/notification/notification.css +0 -183
- package/dist/collection/components/molecules/notification/notification.js +0 -244
- package/dist/collection/components/molecules/notification/types.js +0 -15
- package/dist/collection/components/molecules/popconfirm/popconfirm-box.css +0 -563
- package/dist/collection/components/molecules/popconfirm/popconfirm-box.js +0 -396
- package/dist/collection/components/molecules/popconfirm/popconfirm.css +0 -127
- package/dist/collection/components/molecules/popconfirm/popconfirm.js +0 -382
- package/dist/collection/components/molecules/popover/popover.js +0 -254
- package/dist/collection/components/molecules/progress/progress.css +0 -486
- package/dist/collection/components/molecules/progress/progress.js +0 -404
- package/dist/collection/components/molecules/progress/types.js +0 -28
- package/dist/collection/components/molecules/radio/group.css +0 -798
- package/dist/collection/components/molecules/radio/group.js +0 -652
- package/dist/collection/components/molecules/radio/radio.css +0 -1280
- package/dist/collection/components/molecules/radio/radio.js +0 -291
- package/dist/collection/components/molecules/radio/types.js +0 -30
- package/dist/collection/components/molecules/range/range.css +0 -570
- package/dist/collection/components/molecules/range/range.js +0 -472
- package/dist/collection/components/molecules/result/result.css +0 -164
- package/dist/collection/components/molecules/result/result.js +0 -143
- package/dist/collection/components/molecules/result/types.js +0 -22
- package/dist/collection/components/molecules/search/search.css +0 -1208
- package/dist/collection/components/molecules/search/search.js +0 -406
- package/dist/collection/components/molecules/skeleton/skeleton.js +0 -94
- package/dist/collection/components/molecules/states/alert.states.js +0 -25
- package/dist/collection/components/molecules/states/checkbox-group.states.js +0 -199
- package/dist/collection/components/molecules/states/radio-group.states.js +0 -107
- package/dist/collection/components/molecules/states/search.states.js +0 -137
- package/dist/collection/components/molecules/states/stepper-states.js +0 -79
- package/dist/collection/components/molecules/stepper/step.js +0 -346
- package/dist/collection/components/molecules/stepper/stepper.css +0 -617
- package/dist/collection/components/molecules/stepper/stepper.js +0 -484
- package/dist/collection/components/molecules/switch/switch.css +0 -1272
- package/dist/collection/components/molecules/switch/switch.js +0 -716
- package/dist/collection/components/molecules/tab-group/tab-group.js +0 -280
- package/dist/collection/components/molecules/textarea/textarea.css +0 -1208
- package/dist/collection/components/molecules/textarea/textarea.js +0 -731
- package/dist/collection/components/molecules/textarea/types.js +0 -13
- package/dist/collection/components/molecules/timeline/timeline-item.css +0 -254
- package/dist/collection/components/molecules/timeline/timeline-item.js +0 -159
- package/dist/collection/components/molecules/timeline/timeline.css +0 -205
- package/dist/collection/components/molecules/timeline/timeline.js +0 -125
- package/dist/collection/components/molecules/tooltip/tooltip.js +0 -232
- package/dist/collection/components/organism/autocomplete/autocomplete.css +0 -168
- package/dist/collection/components/organism/autocomplete/autocomplete.js +0 -399
- package/dist/collection/components/organism/colorpicker/colorpicker.css +0 -313
- package/dist/collection/components/organism/colorpicker/colorpicker.js +0 -774
- package/dist/collection/components/organism/colorpicker/static/chess.png +0 -0
- package/dist/collection/components/organism/colorpicker/static/color.svg +0 -14
- package/dist/collection/components/organism/colorpicker/static/colors.svg +0 -16
- package/dist/collection/components/organism/date-picker/date-picker.css +0 -141
- package/dist/collection/components/organism/date-picker/date-picker.js +0 -780
- package/dist/collection/components/organism/datetime-picker/datetime-picker.css +0 -1429
- package/dist/collection/components/organism/datetime-picker/datetime-picker.js +0 -2166
- package/dist/collection/components/organism/datetime-picker/types.js +0 -39
- package/dist/collection/components/organism/form/form-group.css +0 -131
- package/dist/collection/components/organism/form/form-group.js +0 -131
- package/dist/collection/components/organism/form/form.css +0 -132
- package/dist/collection/components/organism/form/form.js +0 -680
- package/dist/collection/components/organism/form-2/bcm-form-components.js +0 -26
- package/dist/collection/components/organism/form-2/form-2.css +0 -127
- package/dist/collection/components/organism/form-2/form-2.js +0 -328
- package/dist/collection/components/organism/list/list-key-control.js +0 -125
- package/dist/collection/components/organism/list/list-tag-control.js +0 -172
- package/dist/collection/components/organism/list/list.css +0 -2047
- package/dist/collection/components/organism/list/list.js +0 -1860
- package/dist/collection/components/organism/states/bcm-list2.states.js +0 -532
- package/dist/collection/components/organism/time-picker/time-picker.css +0 -141
- package/dist/collection/components/organism/time-picker/time-picker.js +0 -627
- package/dist/collection/components/other/attendance/attendance.css +0 -433
- package/dist/collection/components/other/attendance/attendance.js +0 -87
- package/dist/collection/components/other/data-table/table.css +0 -130
- package/dist/collection/components/other/data-table/table.js +0 -92
- package/dist/collection/components/other/default/default.css +0 -127
- package/dist/collection/components/other/default/default.js +0 -54
- package/dist/collection/components/other_deprecated/collapse/collapse.css +0 -177
- package/dist/collection/components/other_deprecated/collapse/collapse.js +0 -163
- package/dist/collection/components/other_deprecated/collapse/group.js +0 -128
- package/dist/collection/components/other_deprecated/listbox/listbox-group.css +0 -139
- package/dist/collection/components/other_deprecated/listbox/listbox-group.js +0 -93
- package/dist/collection/components/other_deprecated/listbox/listbox-item.css +0 -269
- package/dist/collection/components/other_deprecated/listbox/listbox-item.js +0 -641
- package/dist/collection/components/other_deprecated/listbox/listbox.css +0 -365
- package/dist/collection/components/other_deprecated/listbox/listbox.js +0 -1999
- package/dist/collection/components/other_deprecated/listbox/types.js +0 -11
- package/dist/collection/components/other_deprecated/old-input/old-input.css +0 -1360
- package/dist/collection/components/other_deprecated/old-input/old-input.js +0 -1154
- package/dist/collection/components/other_deprecated/old-input/types.js +0 -17
- package/dist/collection/components/other_deprecated/old-popover/old-popover-box.css +0 -582
- package/dist/collection/components/other_deprecated/old-popover/old-popover-box.js +0 -411
- package/dist/collection/components/other_deprecated/old-popover/old-popover.css +0 -127
- package/dist/collection/components/other_deprecated/old-popover/old-popover.js +0 -296
- package/dist/collection/components/other_deprecated/old-search/old-search.css +0 -131
- package/dist/collection/components/other_deprecated/old-search/old-search.js +0 -496
- package/dist/collection/components/other_deprecated/old-tag/old-tag.css +0 -305
- package/dist/collection/components/other_deprecated/old-tag/old-tag.js +0 -326
- package/dist/collection/components/other_deprecated/old-tag/types.js +0 -30
- package/dist/collection/components/other_deprecated/select/group.css +0 -144
- package/dist/collection/components/other_deprecated/select/group.js +0 -88
- package/dist/collection/components/other_deprecated/select/option.css +0 -164
- package/dist/collection/components/other_deprecated/select/option.js +0 -142
- package/dist/collection/components/other_deprecated/select/select-box.css +0 -143
- package/dist/collection/components/other_deprecated/select/select-box.js +0 -104
- package/dist/collection/components/other_deprecated/select/select.css +0 -364
- package/dist/collection/components/other_deprecated/select/select.js +0 -2229
- package/dist/collection/components/other_deprecated/tabs/tab-pane.css +0 -142
- package/dist/collection/components/other_deprecated/tabs/tab-pane.js +0 -168
- package/dist/collection/components/other_deprecated/tabs/tab.css +0 -587
- package/dist/collection/components/other_deprecated/tabs/tab.js +0 -303
- package/dist/collection/components/other_deprecated/tabs/tabs-content.css +0 -136
- package/dist/collection/components/other_deprecated/tabs/tabs-content.js +0 -147
- package/dist/collection/components/other_deprecated/tabs/tabs.css +0 -212
- package/dist/collection/components/other_deprecated/tabs/tabs.js +0 -806
- package/dist/collection/components/other_deprecated/tabs/types.js +0 -30
- package/dist/collection/components/other_deprecated/text/text.css +0 -429
- package/dist/collection/components/other_deprecated/text/text.js +0 -159
- package/dist/collection/components/other_deprecated/treeview/treeview-group.css +0 -0
- package/dist/collection/components/other_deprecated/treeview/treeview-group.js +0 -18
- package/dist/collection/components/other_deprecated/treeview/treeview-item.css +0 -318
- package/dist/collection/components/other_deprecated/treeview/treeview-item.js +0 -977
- package/dist/collection/components/other_deprecated/treeview/treeview.css +0 -190
- package/dist/collection/components/other_deprecated/treeview/treeview.js +0 -1699
- package/dist/collection/components/other_deprecated/treeview/types.js +0 -11
- package/dist/collection/decorators/id-decorator.js +0 -18
- package/dist/collection/decorators/index.js +0 -8
- package/dist/collection/decorators/is-load-decorator.js +0 -51
- package/dist/collection/decorators/json-parse-decarator.js +0 -35
- package/dist/collection/decorators/property-decorators.js +0 -28
- package/dist/collection/global/components/_checkbox.css +0 -627
- package/dist/collection/global/config.js +0 -45
- package/dist/collection/global/global.js +0 -43
- package/dist/collection/global/variables/colors.js +0 -220
- package/dist/collection/helper/color-helper.js +0 -81
- package/dist/collection/helper/content-helper.js +0 -63
- package/dist/collection/helper/datetime-helper.js +0 -7
- package/dist/collection/helper/generate.js +0 -163
- package/dist/collection/helper/index.js +0 -13
- package/dist/collection/helper/number-helper.js +0 -15
- package/dist/collection/helper/popover-helper.js +0 -104
- package/dist/collection/helper/string-helper.js +0 -65
- package/dist/collection/helper/tooltip-helper.js +0 -93
- package/dist/collection/helper/validators.js +0 -28
- package/dist/collection/index.js +0 -5
- package/dist/collection/models/abstract-classes/abstract-key-control.js +0 -97
- package/dist/collection/models/bcm-types.js +0 -5
- package/dist/collection/models/bcm.js +0 -466
- package/dist/collection/models/index.js +0 -6
- package/dist/collection/models/states/atoms/bcm-atoms-state.js +0 -5
- package/dist/collection/models/states/molecules/bcm-molecules-state.js +0 -5
- package/dist/collection/models/states/organisms/bcm-organisms-state.js +0 -5
- package/dist/collection/templates/button-template.js +0 -22
- package/dist/collection/templates/caption-template.js +0 -29
- package/dist/collection/templates/checkbox-group-template.js +0 -10
- package/dist/collection/templates/checkbox-template.js +0 -31
- package/dist/collection/templates/icon-template.js +0 -24
- package/dist/collection/templates/index.js +0 -17
- package/dist/collection/templates/info-footer-template.js +0 -16
- package/dist/collection/templates/input-template.js +0 -81
- package/dist/collection/templates/label-template.js +0 -18
- package/dist/collection/templates/list-item-template.js +0 -58
- package/dist/collection/templates/list-template.js +0 -24
- package/dist/collection/templates/slot-template.js +0 -10
- package/dist/collection/templates/step-template.js +0 -26
- package/dist/collection/templates/tag-template.js +0 -45
- package/dist/collection/types/index.js +0 -5
- package/dist/collection/utils/element-dragger.js +0 -274
- package/dist/collection/utils/floating-ui.js +0 -62
- package/dist/collection/utils/index.js +0 -9
- package/dist/collection/utils/popover-placement.js +0 -96
- package/dist/collection/utils/utils.js +0 -223
- package/dist/collection/utils/validation.js +0 -47
- package/dist/esm/_commonjsHelpers-3016b722.js +0 -25
- package/dist/esm/bcm-accordion.entry.js +0 -81
- package/dist/esm/bcm-alert.entry.js +0 -108
- package/dist/esm/bcm-attendance.entry.js +0 -46
- package/dist/esm/bcm-autocomplete.entry.js +0 -151
- package/dist/esm/bcm-avatar_2.entry.js +0 -151
- package/dist/esm/bcm-b8d8a236.js +0 -446
- package/dist/esm/bcm-box.entry.js +0 -31
- package/dist/esm/bcm-breadcrumb.entry.js +0 -63
- package/dist/esm/bcm-button-group.entry.js +0 -98
- package/dist/esm/bcm-button_13.entry.js +0 -1965
- package/dist/esm/bcm-card.entry.js +0 -72
- package/dist/esm/bcm-checkbox-group.entry.js +0 -405
- package/dist/esm/bcm-checkbox-lite_9.entry.js +0 -2558
- package/dist/esm/bcm-checkbox_2.entry.js +0 -198
- package/dist/esm/bcm-chip.entry.js +0 -66
- package/dist/esm/bcm-collapse-group.entry.js +0 -53
- package/dist/esm/bcm-collapse.entry.js +0 -54
- package/dist/esm/bcm-colorpicker.entry.js +0 -429
- package/dist/esm/bcm-date-picker.entry.js +0 -167
- package/dist/esm/bcm-datetime-picker.entry.js +0 -1428
- package/dist/esm/bcm-default.entry.js +0 -36
- package/dist/esm/bcm-drawer.entry.js +0 -107
- package/dist/esm/bcm-error-layout.entry.js +0 -74
- package/dist/esm/bcm-expansion-panel.entry.js +0 -123
- package/dist/esm/bcm-form-2.entry.js +0 -201
- package/dist/esm/bcm-form-group.entry.js +0 -41
- package/dist/esm/bcm-input.entry.js +0 -320
- package/dist/esm/bcm-link.entry.js +0 -58
- package/dist/esm/bcm-linked.entry.js +0 -79
- package/dist/esm/bcm-list.entry.js +0 -1757
- package/dist/esm/bcm-message.entry.js +0 -95
- package/dist/esm/bcm-modal.entry.js +0 -133
- package/dist/esm/bcm-notification.entry.js +0 -99
- package/dist/esm/bcm-old-input.entry.js +0 -394
- package/dist/esm/bcm-old-tag_2.entry.js +0 -152
- package/dist/esm/bcm-popconfirm-box.entry.js +0 -118
- package/dist/esm/bcm-popconfirm.entry.js +0 -108
- package/dist/esm/bcm-progress.entry.js +0 -170
- package/dist/esm/bcm-radio-group.entry.js +0 -263
- package/dist/esm/bcm-radio.entry.js +0 -100
- package/dist/esm/bcm-range.entry.js +0 -185
- package/dist/esm/bcm-result.entry.js +0 -75
- package/dist/esm/bcm-search.entry.js +0 -252
- package/dist/esm/bcm-select-group.entry.js +0 -27
- package/dist/esm/bcm-select-option.entry.js +0 -33
- package/dist/esm/bcm-select.entry.js +0 -1177
- package/dist/esm/bcm-skeleton.entry.js +0 -52
- package/dist/esm/bcm-step.entry.js +0 -89
- package/dist/esm/bcm-stepper.entry.js +0 -207
- package/dist/esm/bcm-tab-group.entry.js +0 -168
- package/dist/esm/bcm-tab-pane.entry.js +0 -66
- package/dist/esm/bcm-tab.entry.js +0 -85
- package/dist/esm/bcm-table.entry.js +0 -74
- package/dist/esm/bcm-tabs-content.entry.js +0 -58
- package/dist/esm/bcm-tabs.entry.js +0 -386
- package/dist/esm/bcm-tag.entry.js +0 -97
- package/dist/esm/bcm-textarea.entry.js +0 -146
- package/dist/esm/bcm-time-picker.entry.js +0 -135
- package/dist/esm/bcm-timeline-item.entry.js +0 -51
- package/dist/esm/bcm-timeline.entry.js +0 -69
- package/dist/esm/bcm-treeview-group.entry.js +0 -19
- package/dist/esm/bromcom-ui.js +0 -22
- package/dist/esm/caption-template-3dc68282.js +0 -32
- package/dist/esm/color-helper-7e202fd8.js +0 -488
- package/dist/esm/colors-1d7854ea.js +0 -222
- package/dist/esm/datetime-helper-df25808a.js +0 -9
- package/dist/esm/element-dragger-89bb52fd.js +0 -277
- package/dist/esm/generate-fb5ddb87.js +0 -195
- package/dist/esm/global-4fad925b.js +0 -13
- package/dist/esm/index-36ae55c5.js +0 -191
- package/dist/esm/index-ba2edd32.js +0 -62
- package/dist/esm/index-bd33e7be.js +0 -1833
- package/dist/esm/index.js +0 -4
- package/dist/esm/input-template-0c47abf5.js +0 -84
- package/dist/esm/is-load-decorator-73e33bee.js +0 -54
- package/dist/esm/json-parse-decarator-7b411846.js +0 -38
- package/dist/esm/label-template-c83a04a3.js +0 -21
- package/dist/esm/loader.js +0 -22
- package/dist/esm/number-helper-42be449e.js +0 -18
- package/dist/esm/old-bcm-popover.entry.js +0 -100
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/esm/popover-placement-9864294b.js +0 -95
- package/dist/esm/property-decorators-61be220d.js +0 -31
- package/dist/esm/slot-template-24f1e66e.js +0 -13
- package/dist/esm/stepper-states-b8e9888d.js +0 -81
- package/dist/esm/string-helper-74a1648f.js +0 -132
- package/dist/esm/tooltip-helper-427dd3f5.js +0 -1446
- package/dist/esm/types-6f06fa1a.js +0 -19
- package/dist/esm/types-b211a5eb.js +0 -32
- package/dist/esm/types-bfc3bba1.js +0 -32
- package/dist/esm/utils-57652744.js +0 -123
- package/dist/esm/validators-6f23b54f.js +0 -31
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- package/dist/types/components/atoms/avatar/avatar.d.ts +0 -23
- package/dist/types/components/atoms/badge/badge.d.ts +0 -17
- package/dist/types/components/atoms/box/box.d.ts +0 -5
- package/dist/types/components/atoms/button/button.d.ts +0 -33
- package/dist/types/components/atoms/button/types.d.ts +0 -166
- package/dist/types/components/atoms/chip/chip.d.ts +0 -24
- package/dist/types/components/atoms/divider/divider.d.ts +0 -7
- package/dist/types/components/atoms/icon/icon.d.ts +0 -6
- package/dist/types/components/atoms/label/label.d.ts +0 -16
- package/dist/types/components/atoms/link/link.d.ts +0 -13
- package/dist/types/components/atoms/states/button.states.d.ts +0 -7
- package/dist/types/components/atoms/tag/tag.d.ts +0 -24
- package/dist/types/components/atoms/tag/types.d.ts +0 -29
- package/dist/types/components/atoms/typography/typography.d.ts +0 -5
- package/dist/types/components/molecules/accordion/accordion.d.ts +0 -11
- package/dist/types/components/molecules/alert/alert.d.ts +0 -21
- package/dist/types/components/molecules/alert/types.d.ts +0 -25
- package/dist/types/components/molecules/breadcrumb/breadcrumb.d.ts +0 -14
- package/dist/types/components/molecules/breadcrumb/types.d.ts +0 -10
- package/dist/types/components/molecules/button-group/button-group.d.ts +0 -21
- package/dist/types/components/molecules/card/card.d.ts +0 -11
- package/dist/types/components/molecules/checkbox/checkbox-lite.d.ts +0 -14
- package/dist/types/components/molecules/checkbox/checkbox.d.ts +0 -56
- package/dist/types/components/molecules/checkbox/group.d.ts +0 -56
- package/dist/types/components/molecules/drawer/drawer.d.ts +0 -21
- package/dist/types/components/molecules/dropdown/dropdown.d.ts +0 -54
- package/dist/types/components/molecules/empty/empty.d.ts +0 -5
- package/dist/types/components/molecules/error-layout/error-layout.d.ts +0 -25
- package/dist/types/components/molecules/error-layout/types.d.ts +0 -4
- package/dist/types/components/molecules/expansion-panel/expansion-panel.d.ts +0 -31
- package/dist/types/components/molecules/input/input.d.ts +0 -82
- package/dist/types/components/molecules/input/types.d.ts +0 -13
- package/dist/types/components/molecules/item/item.d.ts +0 -13
- package/dist/types/components/molecules/items/items.d.ts +0 -10
- package/dist/types/components/molecules/linked/linked.d.ts +0 -14
- package/dist/types/components/molecules/menu/menu.d.ts +0 -41
- package/dist/types/components/molecules/message/message.d.ts +0 -32
- package/dist/types/components/molecules/message/types.d.ts +0 -13
- package/dist/types/components/molecules/modal/modal.d.ts +0 -26
- package/dist/types/components/molecules/notification/notification.d.ts +0 -42
- package/dist/types/components/molecules/notification/types.d.ts +0 -14
- package/dist/types/components/molecules/popconfirm/popconfirm-box.d.ts +0 -29
- package/dist/types/components/molecules/popconfirm/popconfirm.d.ts +0 -28
- package/dist/types/components/molecules/popover/popover.d.ts +0 -20
- package/dist/types/components/molecules/progress/progress.d.ts +0 -25
- package/dist/types/components/molecules/progress/types.d.ts +0 -14
- package/dist/types/components/molecules/radio/group.d.ts +0 -54
- package/dist/types/components/molecules/radio/radio.d.ts +0 -21
- package/dist/types/components/molecules/radio/types.d.ts +0 -29
- package/dist/types/components/molecules/range/range.d.ts +0 -36
- package/dist/types/components/molecules/result/result.d.ts +0 -13
- package/dist/types/components/molecules/result/types.d.ts +0 -19
- package/dist/types/components/molecules/search/search.d.ts +0 -35
- package/dist/types/components/molecules/skeleton/skeleton.d.ts +0 -8
- package/dist/types/components/molecules/states/alert.states.d.ts +0 -7
- package/dist/types/components/molecules/states/checkbox-group.states.d.ts +0 -53
- package/dist/types/components/molecules/states/radio-group.states.d.ts +0 -48
- package/dist/types/components/molecules/states/search.states.d.ts +0 -14
- package/dist/types/components/molecules/states/stepper-states.d.ts +0 -13
- package/dist/types/components/molecules/stepper/step.d.ts +0 -25
- package/dist/types/components/molecules/stepper/stepper.d.ts +0 -34
- package/dist/types/components/molecules/switch/switch.d.ts +0 -46
- package/dist/types/components/molecules/tab-group/tab-group.d.ts +0 -18
- package/dist/types/components/molecules/textarea/textarea.d.ts +0 -53
- package/dist/types/components/molecules/textarea/types.d.ts +0 -9
- package/dist/types/components/molecules/timeline/timeline-item.d.ts +0 -16
- package/dist/types/components/molecules/timeline/timeline.d.ts +0 -25
- package/dist/types/components/molecules/tooltip/tooltip.d.ts +0 -19
- package/dist/types/components/organism/autocomplete/autocomplete.d.ts +0 -31
- package/dist/types/components/organism/colorpicker/colorpicker.d.ts +0 -176
- package/dist/types/components/organism/date-picker/date-picker.d.ts +0 -77
- package/dist/types/components/organism/datetime-picker/datetime-picker.d.ts +0 -438
- package/dist/types/components/organism/datetime-picker/types.d.ts +0 -54
- package/dist/types/components/organism/form/form-group.d.ts +0 -10
- package/dist/types/components/organism/form/form.d.ts +0 -34
- package/dist/types/components/organism/form-2/bcm-form-components.d.ts +0 -2
- package/dist/types/components/organism/form-2/form-2.d.ts +0 -25
- package/dist/types/components/organism/list/list-key-control.d.ts +0 -18
- package/dist/types/components/organism/list/list-tag-control.d.ts +0 -18
- package/dist/types/components/organism/list/list.d.ts +0 -138
- package/dist/types/components/organism/states/bcm-list2.states.d.ts +0 -28
- package/dist/types/components/organism/time-picker/time-picker.d.ts +0 -69
- package/dist/types/components/other/attendance/attendance.d.ts +0 -7
- package/dist/types/components/other/data-table/table.d.ts +0 -8
- package/dist/types/components/other/default/default.d.ts +0 -6
- package/dist/types/components/other_deprecated/collapse/collapse.d.ts +0 -12
- package/dist/types/components/other_deprecated/collapse/group.d.ts +0 -15
- package/dist/types/components/other_deprecated/listbox/listbox-group.d.ts +0 -7
- package/dist/types/components/other_deprecated/listbox/listbox-item.d.ts +0 -58
- package/dist/types/components/other_deprecated/listbox/listbox.d.ts +0 -152
- package/dist/types/components/other_deprecated/listbox/types.d.ts +0 -11
- package/dist/types/components/other_deprecated/old-input/old-input.d.ts +0 -80
- package/dist/types/components/other_deprecated/old-input/types.d.ts +0 -13
- package/dist/types/components/other_deprecated/old-popover/old-popover-box.d.ts +0 -25
- package/dist/types/components/other_deprecated/old-popover/old-popover.d.ts +0 -22
- package/dist/types/components/other_deprecated/old-search/old-search.d.ts +0 -32
- package/dist/types/components/other_deprecated/old-tag/old-tag.d.ts +0 -27
- package/dist/types/components/other_deprecated/old-tag/types.d.ts +0 -29
- package/dist/types/components/other_deprecated/select/group.d.ts +0 -6
- package/dist/types/components/other_deprecated/select/option.d.ts +0 -10
- package/dist/types/components/other_deprecated/select/select-box.d.ts +0 -15
- package/dist/types/components/other_deprecated/select/select.d.ts +0 -131
- package/dist/types/components/other_deprecated/tabs/tab-pane.d.ts +0 -19
- package/dist/types/components/other_deprecated/tabs/tab.d.ts +0 -36
- package/dist/types/components/other_deprecated/tabs/tabs-content.d.ts +0 -18
- package/dist/types/components/other_deprecated/tabs/tabs.d.ts +0 -112
- package/dist/types/components/other_deprecated/tabs/types.d.ts +0 -39
- package/dist/types/components/other_deprecated/text/text.d.ts +0 -11
- package/dist/types/components/other_deprecated/treeview/treeview-group.d.ts +0 -3
- package/dist/types/components/other_deprecated/treeview/treeview-item.d.ts +0 -119
- package/dist/types/components/other_deprecated/treeview/treeview.d.ts +0 -181
- package/dist/types/components/other_deprecated/treeview/types.d.ts +0 -11
- package/dist/types/components.d.ts +0 -3517
- package/dist/types/decorators/id-decorator.d.ts +0 -4
- package/dist/types/decorators/index.d.ts +0 -4
- package/dist/types/decorators/is-load-decorator.d.ts +0 -7
- package/dist/types/decorators/json-parse-decarator.d.ts +0 -4
- package/dist/types/decorators/property-decorators.d.ts +0 -4
- package/dist/types/global/variables/colors.d.ts +0 -217
- package/dist/types/helper/color-helper.d.ts +0 -16
- package/dist/types/helper/content-helper.d.ts +0 -18
- package/dist/types/helper/datetime-helper.d.ts +0 -3
- package/dist/types/helper/generate.d.ts +0 -21
- package/dist/types/helper/index.d.ts +0 -9
- package/dist/types/helper/number-helper.d.ts +0 -10
- package/dist/types/helper/popover-helper.d.ts +0 -31
- package/dist/types/helper/string-helper.d.ts +0 -27
- package/dist/types/helper/tooltip-helper.d.ts +0 -25
- package/dist/types/helper/validators.d.ts +0 -10
- package/dist/types/index.d.ts +0 -1
- package/dist/types/models/abstract-classes/abstract-key-control.d.ts +0 -31
- package/dist/types/models/bcm-types.d.ts +0 -21
- package/dist/types/models/bcm.d.ts +0 -456
- package/dist/types/models/index.d.ts +0 -2
- package/dist/types/models/states/atoms/bcm-atoms-state.d.ts +0 -34
- package/dist/types/models/states/molecules/bcm-molecules-state.d.ts +0 -90
- package/dist/types/models/states/organisms/bcm-organisms-state.d.ts +0 -78
- package/dist/types/stencil-public-runtime.d.ts +0 -1565
- package/dist/types/templates/button-template.d.ts +0 -18
- package/dist/types/templates/caption-template.d.ts +0 -14
- package/dist/types/templates/checkbox-group-template.d.ts +0 -10
- package/dist/types/templates/checkbox-template.d.ts +0 -13
- package/dist/types/templates/icon-template.d.ts +0 -7
- package/dist/types/templates/index.d.ts +0 -13
- package/dist/types/templates/info-footer-template.d.ts +0 -10
- package/dist/types/templates/input-template.d.ts +0 -34
- package/dist/types/templates/label-template.d.ts +0 -12
- package/dist/types/templates/list-item-template.d.ts +0 -13
- package/dist/types/templates/list-template.d.ts +0 -29
- package/dist/types/templates/slot-template.d.ts +0 -8
- package/dist/types/templates/step-template.d.ts +0 -17
- package/dist/types/templates/tag-template.d.ts +0 -21
- package/dist/types/types/index.d.ts +0 -12
- package/dist/types/utils/element-dragger.d.ts +0 -146
- package/dist/types/utils/floating-ui.d.ts +0 -6
- package/dist/types/utils/index.d.ts +0 -5
- package/dist/types/utils/popover-placement.d.ts +0 -3
- package/dist/types/utils/utils.d.ts +0 -55
- package/dist/types/utils/validation.d.ts +0 -19
|
@@ -1,2570 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Stencil
|
|
3
|
-
* Copyright (c) Bromcom.
|
|
4
|
-
*/
|
|
5
|
-
'use strict';
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
8
|
-
|
|
9
|
-
const index = require('./index-53637125.js');
|
|
10
|
-
const index$1 = require('./index-a2b50e51.js');
|
|
11
|
-
const generate = require('./generate-f31baeb2.js');
|
|
12
|
-
const bcm = require('./bcm-2c51bf0c.js');
|
|
13
|
-
const isLoadDecorator = require('./is-load-decorator-20a4687b.js');
|
|
14
|
-
const utils = require('./utils-fc077139.js');
|
|
15
|
-
require('./_commonjsHelpers-bd20f4c0.js');
|
|
16
|
-
|
|
17
|
-
const checkboxCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");@import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap\"); .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}:root{--bcm-new-ds-color-inherit:inherit;--bcm-new-ds-color-current:currentColor;--bcm-new-ds-color-transparent:transparent;--bcm-new-ds-color-black:#000;--bcm-new-ds-color-white:#fff;--bcm-new-ds-color-slate:#64748b;--bcm-new-ds-color-slate-50:#f8fafc;--bcm-new-ds-color-slate-100:#f1f5f9;--bcm-new-ds-color-slate-200:#e2e8f0;--bcm-new-ds-color-slate-300:#cbd5e1;--bcm-new-ds-color-slate-400:#94a3b8;--bcm-new-ds-color-slate-500:#64748b;--bcm-new-ds-color-slate-600:#475569;--bcm-new-ds-color-slate-700:#334155;--bcm-new-ds-color-slate-800:#1e293b;--bcm-new-ds-color-slate-900:#0f172a;--bcm-new-ds-color-gray:#6b7280;--bcm-new-ds-color-gray-50:#f9fafb;--bcm-new-ds-color-gray-100:#f3f4f6;--bcm-new-ds-color-gray-200:#e5e7eb;--bcm-new-ds-color-gray-300:#d1d5db;--bcm-new-ds-color-gray-400:#9ca3af;--bcm-new-ds-color-gray-500:#6b7280;--bcm-new-ds-color-gray-600:#4b5563;--bcm-new-ds-color-gray-700:#374151;--bcm-new-ds-color-gray-800:#1f2937;--bcm-new-ds-color-gray-900:#111827;--bcm-new-ds-color-zinc:#71717a;--bcm-new-ds-color-zinc-50:#fafafa;--bcm-new-ds-color-zinc-100:#f4f4f5;--bcm-new-ds-color-zinc-200:#e4e4e7;--bcm-new-ds-color-zinc-300:#d4d4d8;--bcm-new-ds-color-zinc-400:#a1a1aa;--bcm-new-ds-color-zinc-500:#71717a;--bcm-new-ds-color-zinc-600:#52525b;--bcm-new-ds-color-zinc-700:#3f3f46;--bcm-new-ds-color-zinc-800:#27272a;--bcm-new-ds-color-zinc-900:#18181b;--bcm-new-ds-color-neutral:#737373;--bcm-new-ds-color-neutral-50:#fafafa;--bcm-new-ds-color-neutral-100:#f5f5f5;--bcm-new-ds-color-neutral-200:#e5e5e5;--bcm-new-ds-color-neutral-300:#d4d4d4;--bcm-new-ds-color-neutral-400:#a3a3a3;--bcm-new-ds-color-neutral-500:#737373;--bcm-new-ds-color-neutral-600:#525252;--bcm-new-ds-color-neutral-700:#404040;--bcm-new-ds-color-neutral-800:#262626;--bcm-new-ds-color-neutral-900:#171717;--bcm-new-ds-color-stone:#78716c;--bcm-new-ds-color-stone-50:#fafaf9;--bcm-new-ds-color-stone-100:#f5f5f4;--bcm-new-ds-color-stone-200:#e7e5e4;--bcm-new-ds-color-stone-300:#d6d3d1;--bcm-new-ds-color-stone-400:#a8a29e;--bcm-new-ds-color-stone-500:#78716c;--bcm-new-ds-color-stone-600:#57534e;--bcm-new-ds-color-stone-700:#44403c;--bcm-new-ds-color-stone-800:#292524;--bcm-new-ds-color-stone-900:#1c1917;--bcm-new-ds-color-red:#ef4444;--bcm-new-ds-color-red-50:#fef2f2;--bcm-new-ds-color-red-100:#fee2e2;--bcm-new-ds-color-red-200:#fecaca;--bcm-new-ds-color-red-300:#fca5a5;--bcm-new-ds-color-red-400:#f87171;--bcm-new-ds-color-red-500:#ef4444;--bcm-new-ds-color-red-600:#dc2626;--bcm-new-ds-color-red-700:#b91c1c;--bcm-new-ds-color-red-800:#991b1b;--bcm-new-ds-color-red-900:#7f1d1d;--bcm-new-ds-color-orange:#f97316;--bcm-new-ds-color-orange-50:#fff7ed;--bcm-new-ds-color-orange-100:#ffedd5;--bcm-new-ds-color-orange-200:#fed7aa;--bcm-new-ds-color-orange-300:#fdba74;--bcm-new-ds-color-orange-400:#fb923c;--bcm-new-ds-color-orange-500:#f97316;--bcm-new-ds-color-orange-600:#ea580c;--bcm-new-ds-color-orange-700:#c2410c;--bcm-new-ds-color-orange-800:#9a3412;--bcm-new-ds-color-orange-900:#7c2d12;--bcm-new-ds-color-amber:#f59e0b;--bcm-new-ds-color-amber-50:#fffbeb;--bcm-new-ds-color-amber-100:#fef3c7;--bcm-new-ds-color-amber-200:#fde68a;--bcm-new-ds-color-amber-300:#fcd34d;--bcm-new-ds-color-amber-400:#fbbf24;--bcm-new-ds-color-amber-500:#f59e0b;--bcm-new-ds-color-amber-600:#d97706;--bcm-new-ds-color-amber-700:#b45309;--bcm-new-ds-color-amber-800:#92400e;--bcm-new-ds-color-amber-900:#78350f;--bcm-new-ds-color-yellow:#eab308;--bcm-new-ds-color-yellow-50:#fefce8;--bcm-new-ds-color-yellow-100:#fef9c3;--bcm-new-ds-color-yellow-200:#fef08a;--bcm-new-ds-color-yellow-300:#fde047;--bcm-new-ds-color-yellow-400:#facc15;--bcm-new-ds-color-yellow-500:#eab308;--bcm-new-ds-color-yellow-600:#ca8a04;--bcm-new-ds-color-yellow-700:#a16207;--bcm-new-ds-color-yellow-800:#854d0e;--bcm-new-ds-color-yellow-900:#713f12;--bcm-new-ds-color-lime:#84cc16;--bcm-new-ds-color-lime-50:#f7fee7;--bcm-new-ds-color-lime-100:#ecfccb;--bcm-new-ds-color-lime-200:#d9f99d;--bcm-new-ds-color-lime-300:#bef264;--bcm-new-ds-color-lime-400:#a3e635;--bcm-new-ds-color-lime-500:#84cc16;--bcm-new-ds-color-lime-600:#65a30d;--bcm-new-ds-color-lime-700:#4d7c0f;--bcm-new-ds-color-lime-800:#3f6212;--bcm-new-ds-color-lime-900:#365314;--bcm-new-ds-color-green:#22c55e;--bcm-new-ds-color-green-50:#f0fdf4;--bcm-new-ds-color-green-100:#dcfce7;--bcm-new-ds-color-green-200:#bbf7d0;--bcm-new-ds-color-green-300:#86efac;--bcm-new-ds-color-green-400:#4ade80;--bcm-new-ds-color-green-500:#22c55e;--bcm-new-ds-color-green-600:#16a34a;--bcm-new-ds-color-green-700:#15803d;--bcm-new-ds-color-green-800:#166534;--bcm-new-ds-color-green-900:#14532d;--bcm-new-ds-color-emerald:#10b981;--bcm-new-ds-color-emerald-50:#ecfdf5;--bcm-new-ds-color-emerald-100:#d1fae5;--bcm-new-ds-color-emerald-200:#a7f3d0;--bcm-new-ds-color-emerald-300:#6ee7b7;--bcm-new-ds-color-emerald-400:#34d399;--bcm-new-ds-color-emerald-500:#10b981;--bcm-new-ds-color-emerald-600:#059669;--bcm-new-ds-color-emerald-700:#047857;--bcm-new-ds-color-emerald-800:#065f46;--bcm-new-ds-color-emerald-900:#064e3b;--bcm-new-ds-color-teal:#14b8a6;--bcm-new-ds-color-teal-50:#f0fdfa;--bcm-new-ds-color-teal-100:#ccfbf1;--bcm-new-ds-color-teal-200:#99f6e4;--bcm-new-ds-color-teal-300:#5eead4;--bcm-new-ds-color-teal-400:#2dd4bf;--bcm-new-ds-color-teal-500:#14b8a6;--bcm-new-ds-color-teal-600:#0d9488;--bcm-new-ds-color-teal-700:#0f766e;--bcm-new-ds-color-teal-800:#115e59;--bcm-new-ds-color-teal-900:#134e4a;--bcm-new-ds-color-cyan:#06b6d4;--bcm-new-ds-color-cyan-50:#ecfeff;--bcm-new-ds-color-cyan-100:#cffafe;--bcm-new-ds-color-cyan-200:#a5f3fc;--bcm-new-ds-color-cyan-300:#67e8f9;--bcm-new-ds-color-cyan-400:#22d3ee;--bcm-new-ds-color-cyan-500:#06b6d4;--bcm-new-ds-color-cyan-600:#0891b2;--bcm-new-ds-color-cyan-700:#0e7490;--bcm-new-ds-color-cyan-800:#155e75;--bcm-new-ds-color-cyan-900:#164e63;--bcm-new-ds-color-sky:#0ea5e9;--bcm-new-ds-color-sky-50:#f0f9ff;--bcm-new-ds-color-sky-100:#e0f2fe;--bcm-new-ds-color-sky-200:#bae6fd;--bcm-new-ds-color-sky-300:#7dd3fc;--bcm-new-ds-color-sky-400:#38bdf8;--bcm-new-ds-color-sky-500:#0ea5e9;--bcm-new-ds-color-sky-600:#0284c7;--bcm-new-ds-color-sky-700:#0369a1;--bcm-new-ds-color-sky-800:#075985;--bcm-new-ds-color-sky-900:#0c4a6e;--bcm-new-ds-color-blue:#3b82f6;--bcm-new-ds-color-blue-50:#eff6ff;--bcm-new-ds-color-blue-100:#dbeafe;--bcm-new-ds-color-blue-200:#bfdbfe;--bcm-new-ds-color-blue-300:#93c5fd;--bcm-new-ds-color-blue-400:#60a5fa;--bcm-new-ds-color-blue-500:#3b82f6;--bcm-new-ds-color-blue-600:#2563eb;--bcm-new-ds-color-blue-700:#1d4ed8;--bcm-new-ds-color-blue-800:#1e40af;--bcm-new-ds-color-blue-900:#1e3a8a;--bcm-new-ds-color-indigo:#6366f1;--bcm-new-ds-color-indigo-50:#eef2ff;--bcm-new-ds-color-indigo-100:#e0e7ff;--bcm-new-ds-color-indigo-200:#c7d2fe;--bcm-new-ds-color-indigo-300:#a5b4fc;--bcm-new-ds-color-indigo-400:#818cf8;--bcm-new-ds-color-indigo-500:#6366f1;--bcm-new-ds-color-indigo-600:#4f46e5;--bcm-new-ds-color-indigo-700:#4338ca;--bcm-new-ds-color-indigo-800:#3730a3;--bcm-new-ds-color-indigo-900:#312e81;--bcm-new-ds-color-violet:#8b5cf6;--bcm-new-ds-color-violet-50:#f5f3ff;--bcm-new-ds-color-violet-100:#ede9fe;--bcm-new-ds-color-violet-200:#ddd6fe;--bcm-new-ds-color-violet-300:#c4b5fd;--bcm-new-ds-color-violet-400:#a78bfa;--bcm-new-ds-color-violet-500:#8b5cf6;--bcm-new-ds-color-violet-600:#7c3aed;--bcm-new-ds-color-violet-700:#6d28d9;--bcm-new-ds-color-violet-800:#5b21b6;--bcm-new-ds-color-violet-900:#4c1d95;--bcm-new-ds-color-purple:#a855f7;--bcm-new-ds-color-purple-50:#faf5ff;--bcm-new-ds-color-purple-100:#f3e8ff;--bcm-new-ds-color-purple-200:#e9d5ff;--bcm-new-ds-color-purple-300:#d8b4fe;--bcm-new-ds-color-purple-400:#c084fc;--bcm-new-ds-color-purple-500:#a855f7;--bcm-new-ds-color-purple-600:#9333ea;--bcm-new-ds-color-purple-700:#7e22ce;--bcm-new-ds-color-purple-800:#6b21a8;--bcm-new-ds-color-purple-900:#581c87;--bcm-new-ds-color-fuchsia:#d946ef;--bcm-new-ds-color-fuchsia-50:#fdf4ff;--bcm-new-ds-color-fuchsia-100:#fae8ff;--bcm-new-ds-color-fuchsia-200:#f5d0fe;--bcm-new-ds-color-fuchsia-300:#f0abfc;--bcm-new-ds-color-fuchsia-400:#e879f9;--bcm-new-ds-color-fuchsia-500:#d946ef;--bcm-new-ds-color-fuchsia-600:#c026d3;--bcm-new-ds-color-fuchsia-700:#a21caf;--bcm-new-ds-color-fuchsia-800:#86198f;--bcm-new-ds-color-fuchsia-900:#701a75;--bcm-new-ds-color-pink:#ec4899;--bcm-new-ds-color-pink-50:#fdf2f8;--bcm-new-ds-color-pink-100:#fce7f3;--bcm-new-ds-color-pink-200:#fbcfe8;--bcm-new-ds-color-pink-300:#f9a8d4;--bcm-new-ds-color-pink-400:#f472b6;--bcm-new-ds-color-pink-500:#ec4899;--bcm-new-ds-color-pink-600:#db2777;--bcm-new-ds-color-pink-700:#be185d;--bcm-new-ds-color-pink-800:#9d174d;--bcm-new-ds-color-pink-900:#831843;--bcm-new-ds-color-rose:#f43f5e;--bcm-new-ds-color-rose-50:#fff1f2;--bcm-new-ds-color-rose-100:#ffe4e6;--bcm-new-ds-color-rose-200:#fecdd3;--bcm-new-ds-color-rose-300:#fda4af;--bcm-new-ds-color-rose-400:#fb7185;--bcm-new-ds-color-rose-500:#f43f5e;--bcm-new-ds-color-rose-600:#e11d48;--bcm-new-ds-color-rose-700:#be123c;--bcm-new-ds-color-rose-800:#9f1239;--bcm-new-ds-color-rose-900:#881337}*{box-sizing:border-box}.bcm-checkbox{outline:none;border:none;--bcm-checkbox-primary-color-default:var(--bcm-new-ds-color-blue-500);--bcm-checkbox-secondary-color-default:var(--bcm-new-ds-color-white);--bcm-checkbox-primary-color-hover:var(--bcm-new-ds-color-blue-600);--bcm-checkbox-secondary-color-hover:var(--bcm-new-ds-color-slate-50);--bcm-checkbox-primary-color-focus-visible:var(--bcm-new-ds-color-blue-800);--bcm-checkbox-secondary-color-focus-visible:var(--bcm-new-ds-color-slate-50);--bcm-checkbox-primary-color-active:var(--bcm-new-ds-color-blue-700);--bcm-checkbox-secondary-color-active:var(--bcm-new-ds-color-slate-50);--bcm-checkbox-primary-color-disabled:var(--bcm-new-ds-color-slate-300);--bcm-checkbox-secondary-color-disabled:var(--bcm-new-ds-color-slate-200);display:inline-flex;width:fit-content;flex-direction:column;margin-bottom:8px}.bcm-checkbox:focus,.bcm-checkbox:hover,.bcm-checkbox:active{outline:none;border:none}.bcm-checkbox *{box-sizing:border-box}.bcm-checkbox input[type=radio],.bcm-checkbox input[type=checkbox]{-webkit-appearance:none;appearance:none;background-color:#fff;margin:0}.bcm-checkbox__input{display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap;padding-top:4px}.bcm-checkbox.hidden{display:none}.bcm-checkbox :hover{cursor:pointer}.bcm-checkbox[disabled] :hover,.bcm-checkbox.disabled :hover{cursor:not-allowed}.bcm-checkbox .slot{font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;font-weight:500;color:var(--bcm-new-ds-color-slate-600)}.bcm-checkbox .slot:not(:empty){margin-left:8px;margin-right:8px}.bcm-checkbox-size-small .slot{font-size:12px;line-height:calc(12px + 8px);margin-top:-2.5px}.bcm-checkbox-size-small .bcm-checkbox__input{min-height:calc(24px - 4px)}.bcm-checkbox-size-small .bcm-checkbox__label-icon{width:14px;height:14px;min-width:14px;font-size:calc(10px - 2px)}.bcm-checkbox-size-medium .slot{font-size:calc(12px + 1px);line-height:calc(12px + 8px);margin-top:-1.5px}.bcm-checkbox-size-medium .bcm-checkbox__input{min-height:calc(32px - 4px)}.bcm-checkbox-size-medium .bcm-checkbox__label-icon{width:16px;height:16px;min-width:16px;font-size:10px}.bcm-checkbox-size-large .slot{font-size:16px;line-height:calc(16px + 8px);margin-top:-1.5px}.bcm-checkbox-size-large .bcm-checkbox__input{min-height:calc(32px - 4px)}.bcm-checkbox-size-large .bcm-checkbox__label-icon{width:18px;height:18px;min-width:18px;font-size:12px}.bcm-checkbox__label{display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap}.bcm-checkbox__label-icon{display:flex;flex-direction:column;align-items:center;justify-content:center;flex-wrap:nowrap;border-width:1px;border-style:solid;border-radius:2px}.bcm-checkbox__label-icon-indeterminate{position:relative}.bcm-checkbox__label-icon-indeterminate:after{content:\"\";display:block;position:absolute;width:70%;height:1.5px;background:var(--bcm-new-ds-color-white)}.bcm-checkbox__label-icon.bcm-radio__icon{width:16px;height:16px;box-sizing:border-box;border-radius:100px}.bcm-checkbox__label-icon.bcm-radio__icon .bcm-radio__icon-inner{width:10px;height:10px;border-radius:100px;background-color:var(--bcm-new-ds-color-white)}.bcm-checkbox .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-default);color:var(--bcm-checkbox-secondary-color-default);border-color:var(--bcm-new-ds-color-slate-300)}.bcm-checkbox .bcm-checkbox__label-icon-checked,.bcm-checkbox .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-default);border-color:var(--bcm-checkbox-primary-color-default)}.bcm-checkbox .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-default);background-color:var(--bcm-checkbox-secondary-color-default)}.bcm-checkbox .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-default)}.bcm-checkbox .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-default)}.bcm-checkbox:hover .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-hover);color:var(--bcm-checkbox-secondary-color-hover);border-color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-checked,.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-hover);border-color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-hover);background-color:var(--bcm-checkbox-secondary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-focus-visible);color:var(--bcm-checkbox-secondary-color-focus-visible);border-color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-checked,.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-focus-visible);border-color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-focus-visible);background-color:var(--bcm-checkbox-secondary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:active .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-active);color:var(--bcm-checkbox-secondary-color-active);border-color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-checked,.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-active);border-color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-active);background-color:var(--bcm-checkbox-secondary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon,.bcm-checkbox.disabled .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-disabled);color:var(--bcm-checkbox-secondary-color-disabled);border-color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-checked,.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate,.bcm-checkbox.disabled .bcm-checkbox__label-icon-checked,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-disabled);border-color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon,.bcm-checkbox.disabled .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-disabled);background-color:var(--bcm-checkbox-secondary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox.disabled .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[no-margin] .bcm-checkbox__input{margin:0;min-height:0;padding:0}";
|
|
18
|
-
|
|
19
|
-
const BcmCheckboxLite = class {
|
|
20
|
-
constructor(hostRef) {
|
|
21
|
-
index.registerInstance(this, hostRef);
|
|
22
|
-
this._id = generate.Generate.UID();
|
|
23
|
-
this.checked = true;
|
|
24
|
-
this.indeterminate = null;
|
|
25
|
-
this.disabled = false;
|
|
26
|
-
this.hidden = false;
|
|
27
|
-
this.required = false;
|
|
28
|
-
this.readOnly = false;
|
|
29
|
-
this.captionType = bcm.Bcm.Status.default;
|
|
30
|
-
}
|
|
31
|
-
render() {
|
|
32
|
-
const { disabled, checked, readOnly, required, indeterminate, hidden, captionType, _id } = this;
|
|
33
|
-
// const hostClasses = cs(
|
|
34
|
-
// 'bcm-checkbox',
|
|
35
|
-
// 'bcm-checkbox__type-default',
|
|
36
|
-
// {
|
|
37
|
-
// 'error': captionType == Bcm.Status.error,
|
|
38
|
-
// hidden,
|
|
39
|
-
// checked,
|
|
40
|
-
// disabled,
|
|
41
|
-
// required,
|
|
42
|
-
// readOnly,
|
|
43
|
-
// }
|
|
44
|
-
// )
|
|
45
|
-
// const bcmCheckboxIconClass = cs(
|
|
46
|
-
// 'bcm-checkbox__icon',
|
|
47
|
-
// 'bcm-checkbox__icon-lite',
|
|
48
|
-
// 'bcm-checkbox__icon-' + indeterminate,
|
|
49
|
-
// {
|
|
50
|
-
// checked
|
|
51
|
-
// }
|
|
52
|
-
// )
|
|
53
|
-
// const bcmCheckboxLabelClass = cs(
|
|
54
|
-
// 'bcm-checkbox__label'
|
|
55
|
-
// )
|
|
56
|
-
const bcmCheckboxClass = index$1.classnames('bcm-checkbox', `bcm-checkbox-size-medium`, {
|
|
57
|
-
'error': captionType == bcm.Bcm.Status.error,
|
|
58
|
-
hidden,
|
|
59
|
-
checked,
|
|
60
|
-
disabled,
|
|
61
|
-
required
|
|
62
|
-
});
|
|
63
|
-
const bcmCheckboxIconClass = index$1.classnames('bcm-checkbox__label-icon', 'bcm-checkbox__label-icon-lite', 'bcm-checkbox__label-icon-' + indeterminate, {
|
|
64
|
-
'bcm-checkbox__label-icon-checked': checked,
|
|
65
|
-
});
|
|
66
|
-
const bcmCheckboxLabelClass = index$1.classnames('bcm-checkbox__label');
|
|
67
|
-
const bcmCheckboxInputClass = index$1.classnames('bcm-checkbox__input');
|
|
68
|
-
return (index.h(index.Host, { class: bcmCheckboxClass, style: { 'margin': '0' } }, index.h("div", { class: bcmCheckboxInputClass, style: {
|
|
69
|
-
'padding-top': '5px'
|
|
70
|
-
} }, index.h("input", { id: _id, type: "checkbox", checked: checked, disabled: disabled, required: required, readOnly: readOnly }), index.h("label", { class: bcmCheckboxLabelClass, htmlFor: _id }, index.h("span", { class: bcmCheckboxIconClass }, index.h("div", { style: {
|
|
71
|
-
'height': '12px',
|
|
72
|
-
'min-height': '12px',
|
|
73
|
-
'width': '12px',
|
|
74
|
-
'min-width': '12px'
|
|
75
|
-
} }, index.h("svg", { class: "bcm-icon-lite", width: "100%", height: "100%", viewBox: "0 0 11 9", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { d: "M1.91308 4.03516H1.91326C1.99256 4.03525 2.07081 4.05331 2.14213 4.08798C2.21341 4.12262 2.27591 4.17295 2.32497 4.2352L1.91308 4.03516ZM1.91308 4.03516H1.09394C0.890308 4.03516 0.776602 4.26975 0.902321 4.4292L0.902371 4.42927L4.11214 8.49567L4.11218 8.49573C4.32247 8.76188 4.72568 8.76114 4.93667 8.49617L4.93708 8.49566L10.6597 1.24398C10.6598 1.24378 10.66 1.24358 10.6602 1.24338C10.7884 1.08295 10.6699 0.85 10.4689 0.85H9.6498C9.48941 0.85 9.33668 0.9235 9.2376 1.05044C9.23751 1.05055 9.23742 1.05066 9.23734 1.05077L4.52403 7.02157M1.91308 4.03516L4.52403 7.02157M4.52403 7.02157L2.32506 4.23531L4.52403 7.02157Z", fill: "#ffffff" }))))))));
|
|
76
|
-
}
|
|
77
|
-
get el() { return index.getElement(this); }
|
|
78
|
-
};
|
|
79
|
-
BcmCheckboxLite.style = checkboxCss;
|
|
80
|
-
|
|
81
|
-
const dividerCss = "@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}.bcm-divider{display:block}.bcm-divider.hidden{display:none}.bcm-divider__direction-horizontal{width:100%;height:1px;margin:4px auto;border-top:1px solid var(--bcm-color-grey-5)}.bcm-divider__direction-vertical{height:auto;width:1px;margin:0 4px;border-left:1px solid var(--bcm-color-grey-5)}";
|
|
82
|
-
|
|
83
|
-
var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
84
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
85
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
86
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
87
|
-
else
|
|
88
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
89
|
-
if (d = decorators[i])
|
|
90
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
91
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
92
|
-
};
|
|
93
|
-
const BcmDivider = class {
|
|
94
|
-
constructor(hostRef) {
|
|
95
|
-
index.registerInstance(this, hostRef);
|
|
96
|
-
this.hidden = false;
|
|
97
|
-
this.direction = bcm.Bcm.Direction.horizontal;
|
|
98
|
-
}
|
|
99
|
-
render() {
|
|
100
|
-
const { hidden, direction } = this;
|
|
101
|
-
const hostClasses = index$1.classnames('bcm-divider', 'bcm-divider__direction-' + direction, {
|
|
102
|
-
'hidden': hidden
|
|
103
|
-
});
|
|
104
|
-
return (index.h(index.Host, { class: hostClasses }, index.h("span", { hidden: true }, index.h("slot", null))));
|
|
105
|
-
}
|
|
106
|
-
get el() { return index.getElement(this); }
|
|
107
|
-
};
|
|
108
|
-
__decorate$4([
|
|
109
|
-
isLoadDecorator.IsLoad()
|
|
110
|
-
], BcmDivider.prototype, "el", void 0);
|
|
111
|
-
BcmDivider.style = dividerCss;
|
|
112
|
-
|
|
113
|
-
var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
114
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
115
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
116
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
117
|
-
else
|
|
118
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
119
|
-
if (d = decorators[i])
|
|
120
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
121
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
122
|
-
};
|
|
123
|
-
const BcmEmpty = class {
|
|
124
|
-
constructor(hostRef) {
|
|
125
|
-
index.registerInstance(this, hostRef);
|
|
126
|
-
}
|
|
127
|
-
render() {
|
|
128
|
-
return (index.h(index.Host, { class: "tw-h-full tw-flex tw-flex-col tw-items-center tw-justify-center tw-w-full tw-flex-1 tw-bg-slate-50 tw-text-center tw-rounded tw-gap-3" }, this.icon && index.h("i", { class: `tw-text-8 tw-text-amber-400 ${this.icon}` }), index.h("bcm-typography", { class: "tw-text-slate-400 tw-text-2" }, index.h("slot", null))));
|
|
129
|
-
}
|
|
130
|
-
get el() { return index.getElement(this); }
|
|
131
|
-
};
|
|
132
|
-
__decorate$3([
|
|
133
|
-
isLoadDecorator.IsLoad()
|
|
134
|
-
], BcmEmpty.prototype, "el", void 0);
|
|
135
|
-
|
|
136
|
-
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}";
|
|
137
|
-
|
|
138
|
-
var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
139
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
140
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
141
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
142
|
-
else
|
|
143
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
144
|
-
if (d = decorators[i])
|
|
145
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
146
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
147
|
-
};
|
|
148
|
-
/**
|
|
149
|
-
* @desc
|
|
150
|
-
* @param str
|
|
151
|
-
*/
|
|
152
|
-
const lowercase$2 = (str) => str.toLowerCase();
|
|
153
|
-
const BcmListbox = class {
|
|
154
|
-
constructor(hostRef) {
|
|
155
|
-
index.registerInstance(this, hostRef);
|
|
156
|
-
this.listboxItemSelected = index.createEvent(this, "bcm-listbox-item-selected", 7);
|
|
157
|
-
this.listboxClearSelected = index.createEvent(this, "bcm-listbox-clear-selecteds", 7);
|
|
158
|
-
this.listboxSendCheck = index.createEvent(this, "bcm-listbox-send-check", 7);
|
|
159
|
-
this.listboxSendUncheck = index.createEvent(this, "bcm-listbox-send-uncheck", 7);
|
|
160
|
-
this.listboxChecklist = index.createEvent(this, "bcm-listbox-checklist", 7);
|
|
161
|
-
this.listboxChange = index.createEvent(this, "bcm-listbox-change", 7);
|
|
162
|
-
this.listboxChecked = index.createEvent(this, "bcm-listbox-checked", 7);
|
|
163
|
-
this.change = index.createEvent(this, "bcm-change", 7);
|
|
164
|
-
this.objectMapping = {
|
|
165
|
-
'id': "id",
|
|
166
|
-
'text': "text",
|
|
167
|
-
'icon': "icon",
|
|
168
|
-
'avatar': "avatar",
|
|
169
|
-
'avatarName': "avatarName",
|
|
170
|
-
'avatarImage': "avatarImage",
|
|
171
|
-
'secondaryText': "secondaryText",
|
|
172
|
-
'tooltipText': "tooltipText",
|
|
173
|
-
'selected': "selected",
|
|
174
|
-
'checked': "checked",
|
|
175
|
-
'disabled': "disabled",
|
|
176
|
-
};
|
|
177
|
-
this.checkedObjectList = [];
|
|
178
|
-
this.cacheCheckedObjectList = [];
|
|
179
|
-
this.allChilds = [];
|
|
180
|
-
this.onlyChilds = [];
|
|
181
|
-
this.firstRun = true;
|
|
182
|
-
this.firstCheck = false;
|
|
183
|
-
this.onFocus = false;
|
|
184
|
-
this.isSetData = false;
|
|
185
|
-
this.isGroupArray = [];
|
|
186
|
-
this.intersection = [];
|
|
187
|
-
/**
|
|
188
|
-
* Component Properties
|
|
189
|
-
*/
|
|
190
|
-
this.innerComponent = false;
|
|
191
|
-
this.checkboxes = false;
|
|
192
|
-
this.required = false;
|
|
193
|
-
this.value = null;
|
|
194
|
-
this.search = false;
|
|
195
|
-
this.infoFooter = false;
|
|
196
|
-
this.showIcon = false;
|
|
197
|
-
this.size = 'medium';
|
|
198
|
-
this.checkedList = [];
|
|
199
|
-
this.updateCheckedList = [];
|
|
200
|
-
this._items = [];
|
|
201
|
-
this.fullWidth = false;
|
|
202
|
-
this.searchFields = ['text', 'secondaryText', 'tooltipText'];
|
|
203
|
-
this.hidden = false;
|
|
204
|
-
this.returnField = "id";
|
|
205
|
-
this.searchSub = "items";
|
|
206
|
-
this.searchText = "";
|
|
207
|
-
this.treeview = false;
|
|
208
|
-
this.searchPlaceholder = "Search";
|
|
209
|
-
this.numberOfColumns = 1;
|
|
210
|
-
this.height = null;
|
|
211
|
-
this.maxHeight = null;
|
|
212
|
-
this.template = null;
|
|
213
|
-
this.highlight = false;
|
|
214
|
-
this.loading = true;
|
|
215
|
-
this.noCaption = false;
|
|
216
|
-
this.captionType = 'default';
|
|
217
|
-
this._internal_id = (Math.random() * 4).toString(16).replace('.', '');
|
|
218
|
-
/**
|
|
219
|
-
* Component States
|
|
220
|
-
*/
|
|
221
|
-
this.searchResults = [];
|
|
222
|
-
this.totalSearch = 0;
|
|
223
|
-
this.showSearch = true;
|
|
224
|
-
this.empty = false;
|
|
225
|
-
this.runClearAndSelect = false;
|
|
226
|
-
this.total = 0;
|
|
227
|
-
this.items = [];
|
|
228
|
-
this.checklist = [];
|
|
229
|
-
this.sortedChecklist = [];
|
|
230
|
-
this.indeterminateState = 'uncheck';
|
|
231
|
-
this.checked = false;
|
|
232
|
-
this.checklistSorted = [];
|
|
233
|
-
}
|
|
234
|
-
async setClear() {
|
|
235
|
-
this.listboxChecklist.emit([]);
|
|
236
|
-
this.value = null;
|
|
237
|
-
this.selectedId = null;
|
|
238
|
-
this.listboxClearSelected.emit([]);
|
|
239
|
-
// this.checkedObjectList.forEach(item => {
|
|
240
|
-
// this.listboxUncheckedMethod(String(item[this.objectMapping['id']]), this._internal_id)
|
|
241
|
-
// });
|
|
242
|
-
let isItem = utils.getChilds(this.el, 'bcm-listbox-item');
|
|
243
|
-
let elementStatuses = [];
|
|
244
|
-
if (isItem) {
|
|
245
|
-
isItem.map(element => {
|
|
246
|
-
elementStatuses.push(element.checked = false);
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
// console.log("uncheck")
|
|
250
|
-
await Promise.all(elementStatuses);
|
|
251
|
-
// if ( allStatuses ){
|
|
252
|
-
// console.log("bitti")
|
|
253
|
-
// }
|
|
254
|
-
this.checklist = [];
|
|
255
|
-
this.sortedChecklist = [];
|
|
256
|
-
this.checklistSorted = [];
|
|
257
|
-
this.checkedObjectList = [];
|
|
258
|
-
await utils.delay(10);
|
|
259
|
-
return Promise.resolve();
|
|
260
|
-
}
|
|
261
|
-
async resetCaption() {
|
|
262
|
-
await utils.delay(10);
|
|
263
|
-
this.caption = this.captionCache;
|
|
264
|
-
this.captionType = this.captionTypeCache;
|
|
265
|
-
this.captionError = null;
|
|
266
|
-
await utils.delay(10);
|
|
267
|
-
return Promise.resolve();
|
|
268
|
-
}
|
|
269
|
-
connectedCallback() {
|
|
270
|
-
this.captionCache = this.caption;
|
|
271
|
-
this.captionTypeCache = this.captionType;
|
|
272
|
-
}
|
|
273
|
-
async getValue() {
|
|
274
|
-
if (this.checkboxes) {
|
|
275
|
-
return this.checkedObjectList;
|
|
276
|
-
}
|
|
277
|
-
else {
|
|
278
|
-
return this.value;
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
async getChecklist() {
|
|
282
|
-
return this.checkedObjectList;
|
|
283
|
-
}
|
|
284
|
-
async showSearchMethod(val = true) {
|
|
285
|
-
if (this.treeview == false && this.search == true) {
|
|
286
|
-
this.showSearch = val;
|
|
287
|
-
var search = null;
|
|
288
|
-
if (search = this.el.shadowRoot.getElementById("search")) {
|
|
289
|
-
if (val) {
|
|
290
|
-
search.classList.remove('hidden');
|
|
291
|
-
}
|
|
292
|
-
else {
|
|
293
|
-
search.classList.add('hidden');
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
async selected(id) {
|
|
299
|
-
this.selectedId = String(id);
|
|
300
|
-
if (this.treeview === true) {
|
|
301
|
-
setTimeout(async () => {
|
|
302
|
-
const bcmTreeview = this.el.shadowRoot.querySelector("bcm-treeview");
|
|
303
|
-
if (bcmTreeview) {
|
|
304
|
-
await bcmTreeview.selected(this.selectedId);
|
|
305
|
-
}
|
|
306
|
-
}, 100);
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
async clearAndSelectSearch(select = true) {
|
|
310
|
-
this.runClearAndSelect = true;
|
|
311
|
-
if (this.search == true) {
|
|
312
|
-
setTimeout(() => {
|
|
313
|
-
var searchInput = null;
|
|
314
|
-
searchInput = this.el.shadowRoot.querySelector("bcm-old-search");
|
|
315
|
-
if (searchInput) {
|
|
316
|
-
searchInput.setClear();
|
|
317
|
-
if (select == true) {
|
|
318
|
-
searchInput.select();
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
}, 100);
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
async addChecked(items) {
|
|
325
|
-
await this.setClear();
|
|
326
|
-
if (items) {
|
|
327
|
-
if (typeof items != 'string') {
|
|
328
|
-
await utils.delay(50);
|
|
329
|
-
if (sessionStorage.getItem(this._internal_id + "-config")) {
|
|
330
|
-
this.config(JSON.parse(sessionStorage.getItem(this._internal_id + "-config")));
|
|
331
|
-
}
|
|
332
|
-
this.checkedList = items;
|
|
333
|
-
this.checkedList.forEach((item) => {
|
|
334
|
-
this.handleListboxChecked({ detail: String(item) }, this._internal_id);
|
|
335
|
-
});
|
|
336
|
-
this.updateCheckedList = [];
|
|
337
|
-
if (this.treeview === true) {
|
|
338
|
-
setTimeout(async () => {
|
|
339
|
-
await customElements.whenDefined("bcm-treeview");
|
|
340
|
-
const bcmTreeview = this.el.shadowRoot.querySelector("bcm-treeview");
|
|
341
|
-
if (bcmTreeview) {
|
|
342
|
-
await bcmTreeview.addChecked(items);
|
|
343
|
-
}
|
|
344
|
-
}, 50);
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
async updateChecked(items) {
|
|
350
|
-
this.setClear();
|
|
351
|
-
this.checkedList = [];
|
|
352
|
-
this.updateCheckedList = items;
|
|
353
|
-
this.updateCheckedList.forEach((item) => {
|
|
354
|
-
this.handleListboxChecked({ detail: item });
|
|
355
|
-
});
|
|
356
|
-
setTimeout(async () => {
|
|
357
|
-
if (this.treeview === true) {
|
|
358
|
-
await customElements.whenDefined("bcm-treeview");
|
|
359
|
-
const bcmTreeview = this.el.shadowRoot.querySelector("bcm-treeview");
|
|
360
|
-
if (bcmTreeview) {
|
|
361
|
-
await bcmTreeview.updateChecked(items);
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
}, 100);
|
|
365
|
-
}
|
|
366
|
-
async config(_config) {
|
|
367
|
-
if (_config['treeview'] && _config['treeview'] === true) {
|
|
368
|
-
typeof _config['treeview'] == 'boolean'
|
|
369
|
-
? this.treeview = _config['treeview']
|
|
370
|
-
: this.treeview = false;
|
|
371
|
-
}
|
|
372
|
-
setTimeout(async () => {
|
|
373
|
-
if (this.treeview === true) {
|
|
374
|
-
await customElements.whenDefined("bcm-treeview");
|
|
375
|
-
const bcmTreeview = this.el.shadowRoot.querySelector("bcm-treeview");
|
|
376
|
-
if (bcmTreeview) {
|
|
377
|
-
await bcmTreeview.config(_config);
|
|
378
|
-
if (this.selectedId) {
|
|
379
|
-
await bcmTreeview.selected(this.selectedId);
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
}, 300);
|
|
384
|
-
if (_config['searchFields']) {
|
|
385
|
-
if (Array.isArray(_config['searchFields'])) {
|
|
386
|
-
this.searchFields = _config['searchFields'];
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
if (_config['searchPlaceholder']) {
|
|
390
|
-
typeof _config['searchPlaceholder'] == 'string'
|
|
391
|
-
? this.searchPlaceholder = _config['searchPlaceholder']
|
|
392
|
-
: this.searchPlaceholder = null;
|
|
393
|
-
}
|
|
394
|
-
if (_config['maxHeight']) {
|
|
395
|
-
typeof _config['maxHeight'] == 'string'
|
|
396
|
-
? this.maxHeight = _config['maxHeight']
|
|
397
|
-
: this.maxHeight = "100%";
|
|
398
|
-
}
|
|
399
|
-
if (_config['height']) {
|
|
400
|
-
typeof _config['height'] == 'string'
|
|
401
|
-
? this.height = _config['height']
|
|
402
|
-
: this.height = "100%";
|
|
403
|
-
}
|
|
404
|
-
if (_config['template']) {
|
|
405
|
-
typeof _config['template'] == 'string'
|
|
406
|
-
? this.template = _config['template']
|
|
407
|
-
: this.template = null;
|
|
408
|
-
}
|
|
409
|
-
if (_config['searchable']) {
|
|
410
|
-
typeof _config['searchable'] == 'boolean'
|
|
411
|
-
? this.search = _config['searchable']
|
|
412
|
-
: this.search = false;
|
|
413
|
-
}
|
|
414
|
-
if (_config['highlight']) {
|
|
415
|
-
typeof _config['highlight'] == 'boolean'
|
|
416
|
-
? this.highlight = _config['highlight']
|
|
417
|
-
: this.highlight = false;
|
|
418
|
-
}
|
|
419
|
-
if (_config['fullWidth']) {
|
|
420
|
-
typeof _config['fullWidth'] == 'boolean'
|
|
421
|
-
? this.fullWidth = _config['fullWidth']
|
|
422
|
-
: this.fullWidth = false;
|
|
423
|
-
}
|
|
424
|
-
if (_config['numberOfColumns']) {
|
|
425
|
-
typeof _config['numberOfColumns'] == 'number'
|
|
426
|
-
? this.numberOfColumns = _config['numberOfColumns']
|
|
427
|
-
: this.numberOfColumns = 1;
|
|
428
|
-
}
|
|
429
|
-
if (_config['infoFooter']) {
|
|
430
|
-
typeof _config['infoFooter'] == 'boolean'
|
|
431
|
-
? this.infoFooter = _config['infoFooter']
|
|
432
|
-
: this.infoFooter = false;
|
|
433
|
-
}
|
|
434
|
-
if (_config['checkable']) {
|
|
435
|
-
typeof _config['checkable'] == 'boolean'
|
|
436
|
-
? this.checkboxes = _config['checkable']
|
|
437
|
-
: this.checkboxes = false;
|
|
438
|
-
}
|
|
439
|
-
if (_config['showIcon']) {
|
|
440
|
-
typeof _config['showIcon'] == 'boolean'
|
|
441
|
-
? this.showIcon = _config['showIcon']
|
|
442
|
-
: this.showIcon = false;
|
|
443
|
-
}
|
|
444
|
-
if (_config['size']) {
|
|
445
|
-
(["small", "medium", "large"].indexOf(_config['size']) >= 0)
|
|
446
|
-
? this.size = _config['size']
|
|
447
|
-
: this.size = 'medium';
|
|
448
|
-
}
|
|
449
|
-
this.searchSub = this.objectMapping['items'];
|
|
450
|
-
if (_config['mapping']) {
|
|
451
|
-
if (_config['mapping']['id']) {
|
|
452
|
-
this.objectMapping['id'] = String(_config['mapping']['id']);
|
|
453
|
-
this.returnField = this.objectMapping['id'];
|
|
454
|
-
}
|
|
455
|
-
if (_config['mapping']['text']) {
|
|
456
|
-
this.objectMapping['text'] = _config['mapping']['text'];
|
|
457
|
-
}
|
|
458
|
-
if (_config['mapping']['icon']) {
|
|
459
|
-
this.objectMapping['icon'] = _config['mapping']['icon'];
|
|
460
|
-
}
|
|
461
|
-
if (_config['mapping']['avatar']) {
|
|
462
|
-
this.objectMapping['avatar'] = _config['mapping']['avatar'];
|
|
463
|
-
}
|
|
464
|
-
if (_config['mapping']['avatarName']) {
|
|
465
|
-
this.objectMapping['avatarName'] = _config['mapping']['avatarName'];
|
|
466
|
-
}
|
|
467
|
-
if (_config['mapping']['avatarImage']) {
|
|
468
|
-
this.objectMapping['avatarImage'] = _config['mapping']['avatarImage'];
|
|
469
|
-
}
|
|
470
|
-
if (_config['mapping']['secondaryText']) {
|
|
471
|
-
this.objectMapping['secondaryText'] = _config['mapping']['secondaryText'];
|
|
472
|
-
}
|
|
473
|
-
if (_config['mapping']['tooltipText']) {
|
|
474
|
-
this.objectMapping['tooltipText'] = _config['mapping']['tooltipText'];
|
|
475
|
-
}
|
|
476
|
-
if (_config['mapping']['disabled']) {
|
|
477
|
-
this.objectMapping['disabled'] = _config['mapping']['disabled'];
|
|
478
|
-
}
|
|
479
|
-
if (_config['mapping']['checked']) {
|
|
480
|
-
this.objectMapping['checked'] = _config['mapping']['checked'];
|
|
481
|
-
}
|
|
482
|
-
if (_config['mapping']['selected']) {
|
|
483
|
-
this.objectMapping['selected'] = _config['mapping']['selected'];
|
|
484
|
-
}
|
|
485
|
-
if (_config['mapping']['items']) {
|
|
486
|
-
this.objectMapping['items'] = _config['mapping']['items'];
|
|
487
|
-
this.searchSub = this.objectMapping['items'];
|
|
488
|
-
}
|
|
489
|
-
// if ( this.treeview ) {
|
|
490
|
-
// }else{
|
|
491
|
-
// this.searchSub = this.objectMapping['items']
|
|
492
|
-
// }
|
|
493
|
-
}
|
|
494
|
-
sessionStorage.setItem(this._internal_id + "-config", JSON.stringify(_config));
|
|
495
|
-
// forceUpdate(this.el)
|
|
496
|
-
return Promise.resolve(true);
|
|
497
|
-
}
|
|
498
|
-
async setData(_data = []) {
|
|
499
|
-
this.clearAndSelectSearch(false);
|
|
500
|
-
this.isLoading(true);
|
|
501
|
-
this._items = _data;
|
|
502
|
-
this.searchData = JSON.parse(_data);
|
|
503
|
-
this.isSetData = true;
|
|
504
|
-
// this.isEmpty(false)
|
|
505
|
-
setTimeout(async () => {
|
|
506
|
-
if (this.treeview === true) {
|
|
507
|
-
const bcmTreeview = this.el.shadowRoot.querySelector("bcm-treeview");
|
|
508
|
-
if (bcmTreeview) {
|
|
509
|
-
await bcmTreeview.setData(_data);
|
|
510
|
-
if (this.searchData.length > 0) {
|
|
511
|
-
this.isEmpty(false);
|
|
512
|
-
this.isLoading(false);
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
}, 100);
|
|
517
|
-
}
|
|
518
|
-
// componentDidLoad(){
|
|
519
|
-
// console.log("kilitle")
|
|
520
|
-
// setTimeout(() => {
|
|
521
|
-
// if(this.isSetData) {
|
|
522
|
-
// this.isLoading(true)
|
|
523
|
-
// this.isEmpty(false)
|
|
524
|
-
// }else{
|
|
525
|
-
// this.isLoading(false)
|
|
526
|
-
// this.isEmpty(true)
|
|
527
|
-
// }
|
|
528
|
-
// }, 100);
|
|
529
|
-
// }
|
|
530
|
-
componentWillRender() {
|
|
531
|
-
if (this.isSetData) {
|
|
532
|
-
this.onlyChilds = this.getAllGroup(this.el, true);
|
|
533
|
-
this.allChilds = this.getAllGroup();
|
|
534
|
-
if (this.onlyChilds.length != this.total) {
|
|
535
|
-
this.total = this.onlyChilds.length;
|
|
536
|
-
}
|
|
537
|
-
if (this.checkboxes === true) {
|
|
538
|
-
this.setIndeterminateState();
|
|
539
|
-
if (this.checklistSorted.length > 0) {
|
|
540
|
-
this.checkedObjectList = [];
|
|
541
|
-
this.getAllGroup(this.el).forEach(element => {
|
|
542
|
-
element.checked == true && (this.firstCheck = true,
|
|
543
|
-
this.checkedObjectList.indexOf(element.itemObject) == -1 && (this.checkedObjectList.push(element.itemObject)));
|
|
544
|
-
});
|
|
545
|
-
if (JSON.stringify(this.cacheCheckedObjectList) !== JSON.stringify(this.checkedObjectList)) {
|
|
546
|
-
this.listboxChecklist.emit(this.checkedObjectList);
|
|
547
|
-
this.cacheCheckedObjectList = this.checkedObjectList;
|
|
548
|
-
this.value = this.checkedObjectList;
|
|
549
|
-
}
|
|
550
|
-
}
|
|
551
|
-
else {
|
|
552
|
-
if (this.firstCheck) {
|
|
553
|
-
this.listboxChecklist.emit([]);
|
|
554
|
-
this.cacheCheckedObjectList = [];
|
|
555
|
-
if (this.value != null) {
|
|
556
|
-
this.value = null;
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
}
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
componentDidRender() {
|
|
564
|
-
// this.isEmpty(true)
|
|
565
|
-
// this.isLoading(true)
|
|
566
|
-
// if(this.total > 0) {
|
|
567
|
-
// this.isLoading(false)
|
|
568
|
-
// this.isEmpty(false)
|
|
569
|
-
// }
|
|
570
|
-
// this.isEmpty(true)
|
|
571
|
-
if (this.isSetData) {
|
|
572
|
-
if (this.total > 0) {
|
|
573
|
-
this.isEmpty(false);
|
|
574
|
-
this.isLoading(false);
|
|
575
|
-
}
|
|
576
|
-
else {
|
|
577
|
-
this.isEmpty(true);
|
|
578
|
-
}
|
|
579
|
-
}
|
|
580
|
-
}
|
|
581
|
-
/**
|
|
582
|
-
* @desc
|
|
583
|
-
* @returns {void}
|
|
584
|
-
*/
|
|
585
|
-
setIndeterminateState() {
|
|
586
|
-
let state = 'uncheck';
|
|
587
|
-
let allChecked = true;
|
|
588
|
-
let allUnchecked = true;
|
|
589
|
-
this.getAllGroup(this.el, true).map((item) => {
|
|
590
|
-
item.checked && (allUnchecked = false);
|
|
591
|
-
!item.checked && (allChecked = false);
|
|
592
|
-
});
|
|
593
|
-
!allChecked && !allUnchecked
|
|
594
|
-
? state = 'indeterminate'
|
|
595
|
-
: allChecked
|
|
596
|
-
? state = 'determinate'
|
|
597
|
-
: state = 'uncheck';
|
|
598
|
-
this.indeterminateState = state;
|
|
599
|
-
this.checked = state == 'determinate' ? true : false;
|
|
600
|
-
// this.listboxChecklist.emit(this.sortedChecklist)
|
|
601
|
-
}
|
|
602
|
-
getAllGroup(element = this.el, onlyItem = false) {
|
|
603
|
-
let returnAllItems = [];
|
|
604
|
-
let isGroup = utils.getChilds(element, 'bcm-listbox-group');
|
|
605
|
-
let isItem = utils.getChilds(element, 'bcm-listbox-item');
|
|
606
|
-
if (isGroup.length > 0) {
|
|
607
|
-
isGroup.forEach(group => {
|
|
608
|
-
if (this.isGroupArray.indexOf(Number(group.id)) === -1) {
|
|
609
|
-
this.isGroupArray.push(Number(group.id));
|
|
610
|
-
}
|
|
611
|
-
if (onlyItem == false) {
|
|
612
|
-
returnAllItems = [...returnAllItems,
|
|
613
|
-
group
|
|
614
|
-
];
|
|
615
|
-
}
|
|
616
|
-
utils.getChilds(group, 'bcm-listbox-item').forEach(items => {
|
|
617
|
-
if (!(returnAllItems.indexOf(items) >= 0)) {
|
|
618
|
-
returnAllItems = [...returnAllItems,
|
|
619
|
-
items
|
|
620
|
-
];
|
|
621
|
-
}
|
|
622
|
-
});
|
|
623
|
-
});
|
|
624
|
-
}
|
|
625
|
-
if (isItem.length > 0) {
|
|
626
|
-
isItem.forEach(items => {
|
|
627
|
-
if (!(returnAllItems.indexOf(items) >= 0)) {
|
|
628
|
-
returnAllItems = [...returnAllItems,
|
|
629
|
-
items
|
|
630
|
-
];
|
|
631
|
-
}
|
|
632
|
-
});
|
|
633
|
-
}
|
|
634
|
-
return returnAllItems;
|
|
635
|
-
}
|
|
636
|
-
getAllChilds(element = this.el, type = null) {
|
|
637
|
-
let returnAllItems = [];
|
|
638
|
-
let oldItems = [];
|
|
639
|
-
if (!this._items || type === "slot") {
|
|
640
|
-
utils.getChilds(element, 'bcm-listbox-item').forEach(items => {
|
|
641
|
-
returnAllItems = [...returnAllItems,
|
|
642
|
-
items
|
|
643
|
-
];
|
|
644
|
-
});
|
|
645
|
-
}
|
|
646
|
-
else if (this._items && this._items.length > 0) {
|
|
647
|
-
oldItems = JSON.parse(this._items);
|
|
648
|
-
oldItems.map((item) => (((item.type === 'group') ? (item.items.map((item) => ((returnAllItems = [...returnAllItems, item])))) :
|
|
649
|
-
(returnAllItems = [...returnAllItems, item]))));
|
|
650
|
-
}
|
|
651
|
-
return returnAllItems;
|
|
652
|
-
}
|
|
653
|
-
/**
|
|
654
|
-
* @desc
|
|
655
|
-
*/
|
|
656
|
-
handleCheckList(process = 'add', checkId) {
|
|
657
|
-
checkId = String(checkId);
|
|
658
|
-
if (this.checkboxes) {
|
|
659
|
-
if (this.items && this.items.find(e => e[this.objectMapping['id']] == checkId)) {
|
|
660
|
-
// checkId = Number(checkId)
|
|
661
|
-
switch (process) {
|
|
662
|
-
case 'add':
|
|
663
|
-
if (this.checklist.length > 0) {
|
|
664
|
-
if (!this.checklist.includes(checkId)) {
|
|
665
|
-
this.checklist = [...this.checklist, checkId];
|
|
666
|
-
}
|
|
667
|
-
}
|
|
668
|
-
else {
|
|
669
|
-
this.checklist = [checkId];
|
|
670
|
-
}
|
|
671
|
-
break;
|
|
672
|
-
case 'remove':
|
|
673
|
-
this.checklist = this.checklist.filter(item => item !== checkId);
|
|
674
|
-
break;
|
|
675
|
-
}
|
|
676
|
-
let sorted = this.checklist.sort(function (a, b) { return a - b; });
|
|
677
|
-
this.sortedChecklist = this.checklist;
|
|
678
|
-
this.checklistSorted = sorted;
|
|
679
|
-
// forceUpdate(this.el)
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
}
|
|
683
|
-
handleIndeterminateClick() {
|
|
684
|
-
let state = 'uncheck';
|
|
685
|
-
let allChecked = true;
|
|
686
|
-
let allUnchecked = true;
|
|
687
|
-
let visibleItem = [];
|
|
688
|
-
this.getAllGroup(this.el, true).map((item) => {
|
|
689
|
-
if (item.hidden === false) {
|
|
690
|
-
visibleItem.push(item);
|
|
691
|
-
item.checked && (allUnchecked = false);
|
|
692
|
-
!item.checked && (allChecked = false);
|
|
693
|
-
}
|
|
694
|
-
});
|
|
695
|
-
!allChecked && !allUnchecked
|
|
696
|
-
? state = 'indeterminate'
|
|
697
|
-
: allChecked
|
|
698
|
-
? state = 'determinate'
|
|
699
|
-
: state = 'uncheck';
|
|
700
|
-
visibleItem.map((item) => {
|
|
701
|
-
if (state !== 'uncheck') {
|
|
702
|
-
item.checked = false;
|
|
703
|
-
this.handleCheckList('remove', String(item.id));
|
|
704
|
-
}
|
|
705
|
-
else {
|
|
706
|
-
item.checked = true;
|
|
707
|
-
this.handleCheckList('add', String(item.id));
|
|
708
|
-
}
|
|
709
|
-
});
|
|
710
|
-
this.setIndeterminateState();
|
|
711
|
-
}
|
|
712
|
-
handleCheckboxClick(e) {
|
|
713
|
-
e.preventDefault();
|
|
714
|
-
}
|
|
715
|
-
/**
|
|
716
|
-
* @desc
|
|
717
|
-
* @param item
|
|
718
|
-
*/
|
|
719
|
-
itemRenderer(item) {
|
|
720
|
-
if (item[this.objectMapping['id']] && String(this.selectedId) == String(item[this.objectMapping['id']])) {
|
|
721
|
-
this.listboxItemSelected.emit(item);
|
|
722
|
-
}
|
|
723
|
-
// if(item[this.objectMapping['selected']] && item[this.objectMapping['selected']] === true){
|
|
724
|
-
// this.listboxItemSelected.emit(item)
|
|
725
|
-
// }
|
|
726
|
-
// var checkedListCache = this.checkedList;
|
|
727
|
-
// if(checkedListCache && checkedListCache.find(e => e == item[this.objectMapping['id']])){
|
|
728
|
-
// this.handleListboxChecked({detail: item[this.objectMapping['id']]})
|
|
729
|
-
// }
|
|
730
|
-
// const index = checkedListCache.indexOf(item[this.objectMapping['id']]);
|
|
731
|
-
// if (index > -1) {
|
|
732
|
-
// checkedListCache.splice(index, 1);
|
|
733
|
-
// }
|
|
734
|
-
// if(this.updateCheckedList.length > 0 ){
|
|
735
|
-
// if( this.updateCheckedList.find(e => e == item[this.objectMapping['id']]) ){
|
|
736
|
-
// const index = this.updateCheckedList.indexOf(item[this.objectMapping['id']]);
|
|
737
|
-
// if (index > -1) {
|
|
738
|
-
// this.updateCheckedList.splice(index, 1);
|
|
739
|
-
// }
|
|
740
|
-
// this.listboxChecked.emit(item[this.objectMapping['id']])
|
|
741
|
-
// }
|
|
742
|
-
// }
|
|
743
|
-
return (index.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 })));
|
|
744
|
-
}
|
|
745
|
-
/**
|
|
746
|
-
* @desc
|
|
747
|
-
* @param group
|
|
748
|
-
*/
|
|
749
|
-
recursiveGroupRenderer(group) {
|
|
750
|
-
return (index.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))))));
|
|
751
|
-
}
|
|
752
|
-
async searchResultMethod(items = []) {
|
|
753
|
-
if (this.treeview == true) {
|
|
754
|
-
const bcmtreeview = this.el.shadowRoot.querySelector("bcm-treeview");
|
|
755
|
-
// await bcmListbox.config(this._config)
|
|
756
|
-
if (bcmtreeview) {
|
|
757
|
-
bcmtreeview.searchResultMethod({ detail: (items.length > 0 ? items : true) });
|
|
758
|
-
}
|
|
759
|
-
}
|
|
760
|
-
else {
|
|
761
|
-
this.listenSearchResult({ detail: (items.length > 0 ? items : true), isEvent: true });
|
|
762
|
-
}
|
|
763
|
-
// return true
|
|
764
|
-
}
|
|
765
|
-
handleListboxSelected(event) {
|
|
766
|
-
this.listboxItemSelected.emit(event.detail);
|
|
767
|
-
}
|
|
768
|
-
/**
|
|
769
|
-
* @desc
|
|
770
|
-
*/
|
|
771
|
-
// @Listen('bcm-treeview-checklist')
|
|
772
|
-
// handleListboxCheckedList(e) {
|
|
773
|
-
// this.listboxChecklist.emit(e.detail)
|
|
774
|
-
// }
|
|
775
|
-
isLoading(val) {
|
|
776
|
-
var listContainer = this.el.shadowRoot.getElementById("bcm-listbox-list");
|
|
777
|
-
var loading = this.el.shadowRoot.getElementById("loading");
|
|
778
|
-
var searchInput = this.el.shadowRoot.querySelector("bcm-old-search");
|
|
779
|
-
// var listcontainer = this.el.shadowRoot.getElementById("list-container")
|
|
780
|
-
if (val) {
|
|
781
|
-
if (searchInput) {
|
|
782
|
-
searchInput.disabled = true;
|
|
783
|
-
}
|
|
784
|
-
listContainer && listContainer.classList.add('loading');
|
|
785
|
-
loading && loading.classList.add('show');
|
|
786
|
-
// listcontainer && listcontainer.classList.add('hidden')
|
|
787
|
-
}
|
|
788
|
-
else {
|
|
789
|
-
if (searchInput) {
|
|
790
|
-
searchInput.disabled = false;
|
|
791
|
-
}
|
|
792
|
-
listContainer && listContainer.classList.remove('loading');
|
|
793
|
-
loading && loading.classList.remove('show');
|
|
794
|
-
// listcontainer && listcontainer.classList.remove('hidden')
|
|
795
|
-
}
|
|
796
|
-
}
|
|
797
|
-
isEmpty(val) {
|
|
798
|
-
var empty = this.el.shadowRoot.getElementById("empty");
|
|
799
|
-
var listcontainer = this.el.shadowRoot.getElementById("list-container");
|
|
800
|
-
var checkall = this.el.shadowRoot.getElementById("checkall");
|
|
801
|
-
if (val) {
|
|
802
|
-
empty && empty.classList.add('show');
|
|
803
|
-
listcontainer && listcontainer.classList.add('hidden');
|
|
804
|
-
checkall && checkall.classList.add('hidden');
|
|
805
|
-
}
|
|
806
|
-
else {
|
|
807
|
-
empty && empty.classList.remove('show');
|
|
808
|
-
listcontainer && listcontainer.classList.remove('hidden');
|
|
809
|
-
checkall && checkall.classList.remove('hidden');
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
|
-
isSearchCount(val = false) {
|
|
813
|
-
if (this.infoFooter) {
|
|
814
|
-
var inSearch = this.el.shadowRoot.getElementById("in-search");
|
|
815
|
-
var inTotal = this.el.shadowRoot.getElementById("in-total");
|
|
816
|
-
if (val !== false && val >= 0 && val != null && inSearch && inTotal) {
|
|
817
|
-
inSearch.innerHTML = val;
|
|
818
|
-
inTotal.style.display = "none";
|
|
819
|
-
}
|
|
820
|
-
else {
|
|
821
|
-
inTotal.style.display = "inline";
|
|
822
|
-
inSearch.innerHTML = "";
|
|
823
|
-
}
|
|
824
|
-
}
|
|
825
|
-
}
|
|
826
|
-
listenSearchResult(event) {
|
|
827
|
-
var path = event.path || (event.composedPath && event.composedPath());
|
|
828
|
-
if (event.isEvent == undefined) {
|
|
829
|
-
if (path && path.filter((input) => input['_internal_id'] == this._internal_id)[0] != undefined) {
|
|
830
|
-
var searchValue = '';
|
|
831
|
-
if (this.treeview == false) {
|
|
832
|
-
// var checkall = null
|
|
833
|
-
// this.checkboxes && (checkall = this.el.shadowRoot.getElementById("checkall"))
|
|
834
|
-
var totalSearch = event.detail.length;
|
|
835
|
-
// this.empty = false
|
|
836
|
-
this.isEmpty(false);
|
|
837
|
-
this.intersection = [];
|
|
838
|
-
if (event.detail.length > 0) {
|
|
839
|
-
if (event.detail[0] == -1) {
|
|
840
|
-
totalSearch = 0;
|
|
841
|
-
this.empty = true;
|
|
842
|
-
this.isEmpty(true);
|
|
843
|
-
}
|
|
844
|
-
if (this.allChilds.length > 0) {
|
|
845
|
-
// this.checkboxes && ( checkall && checkall.classList.add('hidden') )
|
|
846
|
-
this.allChilds.map((item) => {
|
|
847
|
-
if (this.highlight) {
|
|
848
|
-
event.target.addEventListener('bcm-on-search-value', async (e) => {
|
|
849
|
-
var inputText = item.shadowRoot.getElementById("text");
|
|
850
|
-
if (inputText) {
|
|
851
|
-
searchValue = await e.detail;
|
|
852
|
-
inputText = (inputText === null || inputText === void 0 ? void 0 : inputText.textContent) || (inputText === null || inputText === void 0 ? void 0 : inputText.innerText) || "";
|
|
853
|
-
if (searchValue) {
|
|
854
|
-
var cacheInputText = lowercase$2(inputText);
|
|
855
|
-
var cacheSearchValue = lowercase$2(searchValue);
|
|
856
|
-
var index = cacheInputText.indexOf(cacheSearchValue);
|
|
857
|
-
if (index >= 0) {
|
|
858
|
-
inputText = inputText.substring(0, index) + "<span class='highlight'>" + inputText.substring(index, index + searchValue.length) + "</span>" + inputText.substring(index + searchValue.length);
|
|
859
|
-
}
|
|
860
|
-
}
|
|
861
|
-
item.shadowRoot.getElementById("text").innerHTML = inputText;
|
|
862
|
-
}
|
|
863
|
-
});
|
|
864
|
-
}
|
|
865
|
-
item.hidden = true;
|
|
866
|
-
var _ids = String(item.id);
|
|
867
|
-
if (event.detail.indexOf(_ids) >= 0) {
|
|
868
|
-
item.hidden = false;
|
|
869
|
-
}
|
|
870
|
-
else {
|
|
871
|
-
item.hidden = true;
|
|
872
|
-
}
|
|
873
|
-
});
|
|
874
|
-
}
|
|
875
|
-
this.intersection = event.detail[0] == -1 ? [0] : event.detail.filter(x => this.isGroupArray.includes(x));
|
|
876
|
-
}
|
|
877
|
-
else {
|
|
878
|
-
if (this.allChilds.length > 0) {
|
|
879
|
-
this.allChilds.map((item) => {
|
|
880
|
-
item.hidden = false;
|
|
881
|
-
});
|
|
882
|
-
// this.checkboxes && ( checkall && checkall.classList.remove('hidden') )
|
|
883
|
-
}
|
|
884
|
-
// this.isEmpty(true)
|
|
885
|
-
}
|
|
886
|
-
if (this.search || this.checkboxes) {
|
|
887
|
-
setTimeout(() => {
|
|
888
|
-
if (totalSearch >= 0) {
|
|
889
|
-
var totals = totalSearch;
|
|
890
|
-
this.isSearchCount(totals);
|
|
891
|
-
}
|
|
892
|
-
else {
|
|
893
|
-
this.isSearchCount(0);
|
|
894
|
-
}
|
|
895
|
-
if (event.detail[0] === -1) {
|
|
896
|
-
this.isSearchCount(0);
|
|
897
|
-
}
|
|
898
|
-
if (event.detail === true) {
|
|
899
|
-
this.isSearchCount();
|
|
900
|
-
}
|
|
901
|
-
}, 100);
|
|
902
|
-
}
|
|
903
|
-
if (event.detail === true) {
|
|
904
|
-
this.isEmpty(false);
|
|
905
|
-
}
|
|
906
|
-
if (this.runClearAndSelect) {
|
|
907
|
-
this.runClearAndSelect = false;
|
|
908
|
-
this.isSearchCount(true);
|
|
909
|
-
}
|
|
910
|
-
}
|
|
911
|
-
}
|
|
912
|
-
}
|
|
913
|
-
}
|
|
914
|
-
/**
|
|
915
|
-
* @desc
|
|
916
|
-
* @param newValue
|
|
917
|
-
* @returns {void}
|
|
918
|
-
*/
|
|
919
|
-
parseItems(newValue) {
|
|
920
|
-
if (newValue) {
|
|
921
|
-
typeof newValue == 'string'
|
|
922
|
-
? this.items = JSON.parse(newValue)
|
|
923
|
-
: this.items = newValue;
|
|
924
|
-
}
|
|
925
|
-
this.handleChildProcess();
|
|
926
|
-
}
|
|
927
|
-
handleChange(newValue) {
|
|
928
|
-
this.change.emit(newValue);
|
|
929
|
-
this.listboxChange.emit(newValue);
|
|
930
|
-
}
|
|
931
|
-
handleChildProcess() {
|
|
932
|
-
setTimeout(() => {
|
|
933
|
-
this.onlyChilds = this.getAllGroup(this.el, true);
|
|
934
|
-
this.total = this.onlyChilds.length;
|
|
935
|
-
// console.log(this.total)
|
|
936
|
-
// this.allChilds = this.getAllChilds()
|
|
937
|
-
// this.total = this.allChilds.filter((v, i, a) => a.indexOf(v) === i).length
|
|
938
|
-
if (this.total > 0) {
|
|
939
|
-
// setTimeout(() => {
|
|
940
|
-
this.isLoading(false);
|
|
941
|
-
// }, 100);
|
|
942
|
-
this.isEmpty(false);
|
|
943
|
-
}
|
|
944
|
-
else {
|
|
945
|
-
// setTimeout(() => {
|
|
946
|
-
this.isLoading(false);
|
|
947
|
-
this.isEmpty(true);
|
|
948
|
-
// }, 100);
|
|
949
|
-
}
|
|
950
|
-
}, 100);
|
|
951
|
-
}
|
|
952
|
-
/**
|
|
953
|
-
* @desc
|
|
954
|
-
*/
|
|
955
|
-
handleListboxClearSelected(event) {
|
|
956
|
-
var path = event.path || (event.composedPath && event.composedPath());
|
|
957
|
-
if (this.checkboxes == false && path && path.filter((input) => input['_internal_id'] == this._internal_id)[0] != undefined) {
|
|
958
|
-
this.value = event.detail;
|
|
959
|
-
this.selectedId = String(event.detail[this.objectMapping['id']]);
|
|
960
|
-
this.listboxClearSelected.emit(event.detail);
|
|
961
|
-
}
|
|
962
|
-
}
|
|
963
|
-
/**
|
|
964
|
-
* @desc
|
|
965
|
-
*/
|
|
966
|
-
handleListboxChecked(event, _internal_id = this._internal_id) {
|
|
967
|
-
var path = event.path || (event.composedPath && event.composedPath());
|
|
968
|
-
if ((path && path.filter((input) => input['_internal_id'] == this._internal_id)[0] != undefined) || _internal_id == this._internal_id) {
|
|
969
|
-
this.listboxSendCheck.emit(event.detail);
|
|
970
|
-
this.handleCheckList('add', event.detail);
|
|
971
|
-
this.setIndeterminateState();
|
|
972
|
-
}
|
|
973
|
-
}
|
|
974
|
-
/**
|
|
975
|
-
* @desc
|
|
976
|
-
*/
|
|
977
|
-
handleListboxUnchecked(event, _internal_id = this._internal_id) {
|
|
978
|
-
var path = event.path || (event.composedPath && event.composedPath());
|
|
979
|
-
if ((path && path.filter((input) => input['_internal_id'] == this._internal_id)[0] != undefined) || _internal_id == this._internal_id) {
|
|
980
|
-
this.listboxSendUncheck.emit(event.detail);
|
|
981
|
-
this.handleCheckList('remove', event.detail);
|
|
982
|
-
this.setIndeterminateState();
|
|
983
|
-
}
|
|
984
|
-
}
|
|
985
|
-
async listboxUncheckedMethod(item, internal_id = this._internal_id) {
|
|
986
|
-
if (this.treeview) {
|
|
987
|
-
await customElements.whenDefined("bcm-treeview");
|
|
988
|
-
const bcmTreeview = this.el.shadowRoot.querySelector("bcm-treeview");
|
|
989
|
-
if (bcmTreeview) {
|
|
990
|
-
await bcmTreeview.treeviewUncheckedMethod(item);
|
|
991
|
-
}
|
|
992
|
-
}
|
|
993
|
-
else {
|
|
994
|
-
this.handleListboxUnchecked({ "detail": item }, internal_id);
|
|
995
|
-
}
|
|
996
|
-
}
|
|
997
|
-
handleFocus(focusEvent = false) {
|
|
998
|
-
this.onFocus = focusEvent;
|
|
999
|
-
}
|
|
1000
|
-
render() {
|
|
1001
|
-
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;
|
|
1002
|
-
const bcmListbox = index$1.classnames('bcm-listbox', {
|
|
1003
|
-
'error': captionType == 'error' ? true : false,
|
|
1004
|
-
'full-width': fullWidth,
|
|
1005
|
-
'flex': _flex
|
|
1006
|
-
});
|
|
1007
|
-
const classes = index$1.classnames('listbox-item', {
|
|
1008
|
-
'hidden': this.totalSearch > 0
|
|
1009
|
-
});
|
|
1010
|
-
const classesContainer = index$1.classnames('listbox-item-container');
|
|
1011
|
-
const textContent = index$1.classnames('listbox-item-container-text-content', size, {
|
|
1012
|
-
'size-2': size === 'small' || size === 'medium',
|
|
1013
|
-
'size-3': size === 'large',
|
|
1014
|
-
});
|
|
1015
|
-
const listContainer = index$1.classnames('list-container', {
|
|
1016
|
-
'column-1': this.numberOfColumns <= 1,
|
|
1017
|
-
'column-2': this.numberOfColumns == 2,
|
|
1018
|
-
'column-3': this.numberOfColumns >= 3,
|
|
1019
|
-
});
|
|
1020
|
-
const listContainerStyle = {
|
|
1021
|
-
'grid-template-columns': this.numberOfColumns <= 1 ? '1fr' : 'repeat(' + this.numberOfColumns + ', ' + (210 - (this.numberOfColumns * 10)) + 'px)'
|
|
1022
|
-
};
|
|
1023
|
-
const hostClasses = index$1.classnames(this.hidden ? 'hidden' : null,
|
|
1024
|
-
// this.totalSearch > 0 ? 'hidden' : null,
|
|
1025
|
-
{
|
|
1026
|
-
'flex': _flex,
|
|
1027
|
-
'full-width': fullWidth
|
|
1028
|
-
});
|
|
1029
|
-
var customStyles = {
|
|
1030
|
-
'max-height': this.maxHeight
|
|
1031
|
-
};
|
|
1032
|
-
const customStylesList = {
|
|
1033
|
-
'min-height': this.height ? "inherit" : this.maxHeight ? "auto" : "200px"
|
|
1034
|
-
};
|
|
1035
|
-
if (this.height) {
|
|
1036
|
-
customStyles = Object.assign(Object.assign({}, customStyles), { 'height': this.height });
|
|
1037
|
-
}
|
|
1038
|
-
const captionClasses = index$1.classnames('size-1', 'input-caption', 'caption-' + captionType);
|
|
1039
|
-
return (index.h(index.Host, { class: hostClasses, style: customStyles, "bcm-internal-id": this._internal_id }, !innerComponent && label && index.h("div", null, index.h("bcm-label", { tooltip: this.tooltip, type: captionType, value: label, required: required })), treeview === true && (index.h("bcm-treeview", { _internal_id: this._internal_id })), treeview == false && (index.h("div", { class: bcmListbox, style: customStyles }, search && (index.h("div", { class: "search", id: "search", style: { 'display': String(showSearch) == 'false' ? 'none' : 'block' } }, index.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 }), index.h("bcm-divider", null))), index.h("div", { id: "bcm-listbox-list", class: "bcm-listbox-list loading", style: customStylesList }, checkboxes && (index.h("div", { class: classes, id: "checkall" }, index.h("div", { class: classesContainer, onClick: () => this.handleIndeterminateClick() }, index.h("div", { class: "check-content" }, indeterminateState == 'indeterminate' && (index.h("span", { class: "indeterminate" })) || (index.h("bcm-checkbox-lite", { onClick: (e) => this.handleCheckboxClick(e), checked: checked, "no-caption": true }))), index.h("div", { class: textContent }, "Select All")), index.h("div", { class: "divider" }, index.h("bcm-divider", null)))),
|
|
1040
|
-
// this.empty == false && (
|
|
1041
|
-
index.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)))))
|
|
1042
|
-
// )
|
|
1043
|
-
,
|
|
1044
|
-
// this.loading && (
|
|
1045
|
-
index.h("div", { id: "loading", class: "loading show" }, index.h("bcm-icon", { class: "prefix", icon: "far fa-spinner-third fa-spin" }))
|
|
1046
|
-
// )
|
|
1047
|
-
,
|
|
1048
|
-
// ( this.empty || total == 0 ) && (
|
|
1049
|
-
index.h("div", { id: "empty", class: "empty" }, index.h("bcm-empty", null, "No Data"))
|
|
1050
|
-
// )
|
|
1051
|
-
), infoFooter == true && (index.h("div", { class: "bcm-listbox-footer" }, index.h("bcm-text", { scale: "size-1", color: "grey-8" }, checklist.length > 0 && (' ( ' + checklist.length + ' selected ) '), "Total ", index.h("span", { id: "in-search" }), " ", index.h("span", { id: "in-total" }, total), " items found."))))), !noCaption && (index.h("div", { class: "caption-area" }, captionType == "error"
|
|
1052
|
-
? index.h("span", { class: captionClasses }, " ", captionError, " ")
|
|
1053
|
-
: caption && index.h("span", { class: captionClasses }, " ", caption, " ")))));
|
|
1054
|
-
}
|
|
1055
|
-
get el() { return index.getElement(this); }
|
|
1056
|
-
static get watchers() { return {
|
|
1057
|
-
"_items": ["parseItems"],
|
|
1058
|
-
"value": ["handleChange"]
|
|
1059
|
-
}; }
|
|
1060
|
-
};
|
|
1061
|
-
__decorate$2([
|
|
1062
|
-
isLoadDecorator.IsLoad()
|
|
1063
|
-
], BcmListbox.prototype, "el", void 0);
|
|
1064
|
-
BcmListbox.style = listboxCss;
|
|
1065
|
-
|
|
1066
|
-
const listboxGroupCss = "@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}:host(.hidden){display:none}.listbox-group-title{padding:4px 16px;background-color:var(--bcm-color-grey-7);position:sticky;top:0;z-index:1}";
|
|
1067
|
-
|
|
1068
|
-
const uppercase = (str) => str.toUpperCase();
|
|
1069
|
-
const BcmListboxGroup = class {
|
|
1070
|
-
constructor(hostRef) {
|
|
1071
|
-
index.registerInstance(this, hostRef);
|
|
1072
|
-
this._id = (Math.random() * 4).toString(16).replace('.', '');
|
|
1073
|
-
this.hidden = false;
|
|
1074
|
-
}
|
|
1075
|
-
componentWillLoad() {
|
|
1076
|
-
this.text = uppercase(this.text);
|
|
1077
|
-
}
|
|
1078
|
-
render() {
|
|
1079
|
-
const { text } = this;
|
|
1080
|
-
const classes = index$1.classnames('listbox-group');
|
|
1081
|
-
const classesTitle = index$1.classnames('listbox-group-title');
|
|
1082
|
-
const hostClasses = index$1.classnames(this.hidden ? 'hidden' : null);
|
|
1083
|
-
return (index.h(index.Host, { class: hostClasses }, index.h("div", { class: classes }, index.h("div", { class: classesTitle }, index.h("bcm-text", { "font-size": "3", color: "slate-100" }, " ", text, " ")), index.h("slot", null))));
|
|
1084
|
-
}
|
|
1085
|
-
};
|
|
1086
|
-
BcmListboxGroup.style = listboxGroupCss;
|
|
1087
|
-
|
|
1088
|
-
const listboxItemCss = "@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:flex;flex:1}:host(.hidden){display:none}.listbox-item{display:flex;flex:1;align-items:stretch;justify-content:flex-start;color:var(--bcm-color-grey-8);user-select:none;background-color:var(--bcm-color-grey-1);display:none}.listbox-item.display{display:flex}.listbox-item-container{display:flex;align-items:center;justify-content:flex-start;flex-direction:row;padding-left:8px;flex:1}.listbox-item-container .avatar{margin-right:4px}.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:not(.disabled):before{border-color:var(--bcm-color-prime-blue-6);box-shadow:0px 2px 4px rgba(54, 121, 171, 0.5)}.listbox-item-container-html-content{display:flex;align-items:center;justify-content:flex-start;flex-direction:row;cursor:pointer;flex:1}.listbox-item-container-html-content #text .highlight{background-color:var(--bcm-color-yellow-5)}.listbox-item-container-html-content.small{padding:0 8px 0 4px;padding:4px 8px 4px 4px}.listbox-item-container-html-content.medium{padding:8px 8px 8px 4px}.listbox-item-container-html-content.large{padding:8px 8px 8px 4px}.listbox-item-container-text-content{display:flex;align-items:center;justify-content:space-between;flex-direction:row;cursor:pointer;width:100%}.listbox-item-container-text-content #text .highlight{background-color:var(--bcm-color-yellow-5)}.listbox-item-container-text-content.small{padding:0 8px 0 4px;padding:4px 8px 4px 4px}.listbox-item-container-text-content.medium{padding:8px 8px 8px 4px}.listbox-item-container-text-content.large{padding:8px 8px 8px 4px}.listbox-item-container-text-content .icon{text-align:center;margin-right:8px}.listbox-item-container-text-content>div{display:flex;align-items:center;flex-direction:row;word-wrap:break-word}.listbox-item-container.disabled{color:var(--bcm-color-grey-6)}.listbox-item-container.selected{color:var(--bcm-color-prime-blue-6);background-color:var(--bcm-color-prime-blue-1)}.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)}";
|
|
1089
|
-
|
|
1090
|
-
const BcmListboxItem = class {
|
|
1091
|
-
constructor(hostRef) {
|
|
1092
|
-
index.registerInstance(this, hostRef);
|
|
1093
|
-
this.listboxItemSelected = index.createEvent(this, "bcm-listbox-item-selected", 7);
|
|
1094
|
-
this.listboxUnchecked = index.createEvent(this, "bcm-listbox-unchecked", 7);
|
|
1095
|
-
this.listboxChecked = index.createEvent(this, "bcm-listbox-checked", 7);
|
|
1096
|
-
this.objectMapping = {
|
|
1097
|
-
'id': "id",
|
|
1098
|
-
'text': "text",
|
|
1099
|
-
'icon': "icon",
|
|
1100
|
-
'avatar': "avatar",
|
|
1101
|
-
'avatarName': "avatarName",
|
|
1102
|
-
'avatarImage': "avatarImage",
|
|
1103
|
-
'secondaryText': "secondaryText",
|
|
1104
|
-
'tooltipText': "tooltipText",
|
|
1105
|
-
'selected': "selected",
|
|
1106
|
-
'checked': "checked",
|
|
1107
|
-
'disabled': "disabled",
|
|
1108
|
-
};
|
|
1109
|
-
this.display = true;
|
|
1110
|
-
this.avatar = false;
|
|
1111
|
-
this._id = (Math.random() * 4).toString(16).replace('.', '');
|
|
1112
|
-
this.size = 'medium';
|
|
1113
|
-
this.icon = 'bug';
|
|
1114
|
-
this.open = false;
|
|
1115
|
-
this.selected = false;
|
|
1116
|
-
this.checkboxes = false;
|
|
1117
|
-
this.showIcon = false;
|
|
1118
|
-
this.checked = false;
|
|
1119
|
-
this.focused = false;
|
|
1120
|
-
this.hidden = false;
|
|
1121
|
-
this.disabled = false;
|
|
1122
|
-
this._internal_id = "";
|
|
1123
|
-
this.template = null;
|
|
1124
|
-
}
|
|
1125
|
-
componentDidLoad() {
|
|
1126
|
-
if (!this.disabled) {
|
|
1127
|
-
if (this.selected === true) {
|
|
1128
|
-
this.listboxItemSelected.emit(this.itemObject);
|
|
1129
|
-
}
|
|
1130
|
-
this.checkboxes === true && (this.checked === true && (this.listboxChecked.emit(this._id)));
|
|
1131
|
-
}
|
|
1132
|
-
}
|
|
1133
|
-
/**
|
|
1134
|
-
* @desc
|
|
1135
|
-
*/
|
|
1136
|
-
handleClick() {
|
|
1137
|
-
if (!this.disabled) {
|
|
1138
|
-
this.checkboxes === true && (this.checked === true && (this.listboxUnchecked.emit(this._id)) || (this.listboxChecked.emit(this._id)));
|
|
1139
|
-
this.checkboxes === false && (this.selected = true,
|
|
1140
|
-
this.listboxItemSelected.emit(this.itemObject));
|
|
1141
|
-
}
|
|
1142
|
-
}
|
|
1143
|
-
handleCheckboxClick(e) {
|
|
1144
|
-
e.preventDefault();
|
|
1145
|
-
}
|
|
1146
|
-
isInternal(event) {
|
|
1147
|
-
var path = event.path || (event.composedPath && event.composedPath());
|
|
1148
|
-
const detect = path
|
|
1149
|
-
&& path[0]
|
|
1150
|
-
&& path[0].attributes
|
|
1151
|
-
&& path[0].attributes['bcm-internal-id']
|
|
1152
|
-
&& path[0].attributes['bcm-internal-id'].value;
|
|
1153
|
-
return detect == this._internal_id;
|
|
1154
|
-
}
|
|
1155
|
-
/**
|
|
1156
|
-
* @descc
|
|
1157
|
-
* @param event
|
|
1158
|
-
*/
|
|
1159
|
-
ListenListboxCheck(event) {
|
|
1160
|
-
if (this.isInternal(event)) {
|
|
1161
|
-
if (!this.disabled) {
|
|
1162
|
-
if (event.detail && event.detail === this._id) {
|
|
1163
|
-
this.checked = true;
|
|
1164
|
-
}
|
|
1165
|
-
}
|
|
1166
|
-
}
|
|
1167
|
-
}
|
|
1168
|
-
/**
|
|
1169
|
-
* @descc
|
|
1170
|
-
* @param event
|
|
1171
|
-
*/
|
|
1172
|
-
ListenListboxUncheck(event) {
|
|
1173
|
-
if (this.isInternal(event)) {
|
|
1174
|
-
if (!this.disabled) {
|
|
1175
|
-
if (event.detail && event.detail === this._id) {
|
|
1176
|
-
this.checked = false;
|
|
1177
|
-
}
|
|
1178
|
-
}
|
|
1179
|
-
}
|
|
1180
|
-
}
|
|
1181
|
-
/**
|
|
1182
|
-
* @descc
|
|
1183
|
-
* @param event
|
|
1184
|
-
*/
|
|
1185
|
-
handleListboxClearSelecteds(event) {
|
|
1186
|
-
if (this.checkboxes == false && this.isInternal(event)) {
|
|
1187
|
-
if (!this.disabled) {
|
|
1188
|
-
if (event.detail) {
|
|
1189
|
-
if (event.detail !== this.itemObject) {
|
|
1190
|
-
this.selected = false;
|
|
1191
|
-
}
|
|
1192
|
-
else {
|
|
1193
|
-
this.selected = true;
|
|
1194
|
-
}
|
|
1195
|
-
}
|
|
1196
|
-
}
|
|
1197
|
-
}
|
|
1198
|
-
}
|
|
1199
|
-
templateParser(template) {
|
|
1200
|
-
var rxp = /{{([^}]+)}}/g, str = template, curMatch;
|
|
1201
|
-
while (curMatch = rxp.exec(str)) {
|
|
1202
|
-
template = template.replace("{{" + curMatch[1] + "}}", this.itemObject[curMatch[1]]);
|
|
1203
|
-
}
|
|
1204
|
-
return template;
|
|
1205
|
-
}
|
|
1206
|
-
render() {
|
|
1207
|
-
const { display, focused, selected, size, showIcon, icon, checkboxes, _id, checked, text, avatarName, avatarImage, avatar, secondaryText, tooltipText } = this;
|
|
1208
|
-
const classes = index$1.classnames('listbox-item', {
|
|
1209
|
-
'disabled': this.disabled,
|
|
1210
|
-
'display': display
|
|
1211
|
-
});
|
|
1212
|
-
const classesContainer = index$1.classnames('listbox-item-container', {
|
|
1213
|
-
'disabled': this.disabled,
|
|
1214
|
-
'focus': focused,
|
|
1215
|
-
'selected': selected
|
|
1216
|
-
});
|
|
1217
|
-
const textContent = index$1.classnames('listbox-item-container-text-content', size, {
|
|
1218
|
-
'disabled': this.disabled,
|
|
1219
|
-
'size-2': size === 'small' || size === 'medium',
|
|
1220
|
-
'size-3': size === 'large',
|
|
1221
|
-
});
|
|
1222
|
-
const hostClasses = index$1.classnames(this.hidden ? 'hidden' : null);
|
|
1223
|
-
const htmlContent = index$1.classnames('listbox-item-container-html-content', size, {
|
|
1224
|
-
'disabled': this.disabled,
|
|
1225
|
-
'size-2': size === 'small' || size === 'medium',
|
|
1226
|
-
'size-3': size === 'large',
|
|
1227
|
-
});
|
|
1228
|
-
return (index.h(index.Host, { class: hostClasses }, index.h("div", { class: classes }, index.h("div", { class: classesContainer, onClick: () => this.handleClick() }, checkboxes && (index.h("div", { class: "check-content" }, index.h("bcm-checkbox-lite", { id: 'check-' + _id, onClick: (e) => this.handleCheckboxClick(e), checked: checked, disabled: this.disabled }))), this.template && (index.h("div", { class: htmlContent, title: tooltipText, innerHTML: this.templateParser(this.template) })), this.template == null && (index.h("div", { class: textContent, title: tooltipText }, index.h("div", null, (avatar || avatarName || avatarImage) && (index.h("div", { class: "avatar" }, index.h("bcm-avatar", Object.assign({ size: "small", name: text }, avatarName && { name: avatarName }, avatarImage && { image: avatarImage })))), showIcon && icon && (index.h("bcm-icon", { class: "icon", icon: icon })), text && (index.h("span", { id: "text" }, text)) || (index.h("slot", null))), index.h("div", null, (secondaryText) && (index.h("div", { class: "secondaryText size-1" }, secondaryText)))))))));
|
|
1229
|
-
}
|
|
1230
|
-
get el() { return index.getElement(this); }
|
|
1231
|
-
};
|
|
1232
|
-
BcmListboxItem.style = listboxItemCss;
|
|
1233
|
-
|
|
1234
|
-
const oldSearchCss = "@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}:host(.hidden){display:none}";
|
|
1235
|
-
|
|
1236
|
-
var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
1237
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1238
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1239
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
1240
|
-
else
|
|
1241
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
1242
|
-
if (d = decorators[i])
|
|
1243
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1244
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1245
|
-
};
|
|
1246
|
-
const lowercase$1 = (str) => str.toLowerCase();
|
|
1247
|
-
const BcmOldSearch = class {
|
|
1248
|
-
constructor(hostRef) {
|
|
1249
|
-
index.registerInstance(this, hostRef);
|
|
1250
|
-
this.bcmOnSearch = index.createEvent(this, "bcm-on-search", 7);
|
|
1251
|
-
this.bcmOnSearchValue = index.createEvent(this, "bcm-on-search-value", 7);
|
|
1252
|
-
this.data = [];
|
|
1253
|
-
this.searchFields = ['text', 'value' /*, ...*/];
|
|
1254
|
-
this.returnField = 'idx';
|
|
1255
|
-
this.searchSub = null;
|
|
1256
|
-
this.hidden = false;
|
|
1257
|
-
this.onlyChild = false;
|
|
1258
|
-
this.clearable = false;
|
|
1259
|
-
this.searchValue = '';
|
|
1260
|
-
this.searchPlaceholder = 'Search';
|
|
1261
|
-
this.disabled = false;
|
|
1262
|
-
this._internal_id = (Math.random() * 4).toString(16).replace('.', '');
|
|
1263
|
-
this.results = [];
|
|
1264
|
-
}
|
|
1265
|
-
getInput() {
|
|
1266
|
-
return this.el.shadowRoot.querySelector('bcm-old-input');
|
|
1267
|
-
}
|
|
1268
|
-
componentDidLoad() {
|
|
1269
|
-
this.getInput().clearable = this.clearable;
|
|
1270
|
-
}
|
|
1271
|
-
listenBcmChange(e) {
|
|
1272
|
-
e.stopPropagation();
|
|
1273
|
-
}
|
|
1274
|
-
async setValue(value) {
|
|
1275
|
-
await this.getInput().setValue(value);
|
|
1276
|
-
return value;
|
|
1277
|
-
}
|
|
1278
|
-
async select() {
|
|
1279
|
-
await this.getInput().select();
|
|
1280
|
-
this.bcmOnSearch.emit(true);
|
|
1281
|
-
return true;
|
|
1282
|
-
}
|
|
1283
|
-
async setClear() {
|
|
1284
|
-
await this.getInput().setClear();
|
|
1285
|
-
this.bcmOnSearch.emit(true);
|
|
1286
|
-
return true;
|
|
1287
|
-
}
|
|
1288
|
-
async searchArray(value, idFields = null) {
|
|
1289
|
-
// console.log(this.data)
|
|
1290
|
-
let cacheSearchFields = this.searchFields;
|
|
1291
|
-
let arrayResult = [];
|
|
1292
|
-
if (idFields) {
|
|
1293
|
-
this.searchFields = [idFields];
|
|
1294
|
-
}
|
|
1295
|
-
value.forEach(item => {
|
|
1296
|
-
// item = {[idFields]:item}
|
|
1297
|
-
this.results = [];
|
|
1298
|
-
// console.log(this.data)
|
|
1299
|
-
this.nestedSearch(this.data, item, true);
|
|
1300
|
-
arrayResult.push(...this.results);
|
|
1301
|
-
});
|
|
1302
|
-
this.searchFields = cacheSearchFields;
|
|
1303
|
-
return arrayResult;
|
|
1304
|
-
// await this.getInput().setValue( value )
|
|
1305
|
-
// return value
|
|
1306
|
-
}
|
|
1307
|
-
nestedSearch(items, value, equal = false) {
|
|
1308
|
-
var result;
|
|
1309
|
-
items && (items.map((item) => {
|
|
1310
|
-
this.searchFields.map(searchField => {
|
|
1311
|
-
if (searchField in item) {
|
|
1312
|
-
// debugger;
|
|
1313
|
-
item[searchField] = lowercase$1(String(item[searchField]));
|
|
1314
|
-
if (this.onlyChild) {
|
|
1315
|
-
if (item[this.searchSub]) {
|
|
1316
|
-
var temp = this.nestedSearch(item[this.searchSub], value, equal);
|
|
1317
|
-
if (temp) {
|
|
1318
|
-
this.results.push((result = String(item[this.returnField])));
|
|
1319
|
-
this.results.push(temp);
|
|
1320
|
-
}
|
|
1321
|
-
}
|
|
1322
|
-
else {
|
|
1323
|
-
if (equal) {
|
|
1324
|
-
// console.log(value)
|
|
1325
|
-
if (item[searchField] == lowercase$1(String(value))) {
|
|
1326
|
-
// if (item == lowercase(value)) {
|
|
1327
|
-
this.results.push((result = String(item[this.returnField])));
|
|
1328
|
-
// this.results.push (result = String(item))
|
|
1329
|
-
}
|
|
1330
|
-
}
|
|
1331
|
-
else {
|
|
1332
|
-
if (item[searchField].indexOf(lowercase$1(value)) !== -1) {
|
|
1333
|
-
this.results.push((result = String(item[this.returnField])));
|
|
1334
|
-
}
|
|
1335
|
-
}
|
|
1336
|
-
}
|
|
1337
|
-
}
|
|
1338
|
-
else {
|
|
1339
|
-
if (item[this.searchSub]) {
|
|
1340
|
-
var temp = this.nestedSearch(item[this.searchSub], value, equal);
|
|
1341
|
-
if (temp) {
|
|
1342
|
-
this.results.push((result = String(item[this.returnField])));
|
|
1343
|
-
this.results.push(temp);
|
|
1344
|
-
}
|
|
1345
|
-
}
|
|
1346
|
-
if (equal) {
|
|
1347
|
-
// console.log(value)
|
|
1348
|
-
if (item[searchField] == lowercase$1(String(value))) {
|
|
1349
|
-
// if (item == lowercase(value)) {
|
|
1350
|
-
this.results.push((result = String(item[this.returnField])));
|
|
1351
|
-
// this.results.push (result = String(item))
|
|
1352
|
-
}
|
|
1353
|
-
}
|
|
1354
|
-
else {
|
|
1355
|
-
if (item[searchField].indexOf(lowercase$1(value)) !== -1) {
|
|
1356
|
-
this.results.push((result = String(item[this.returnField])));
|
|
1357
|
-
}
|
|
1358
|
-
}
|
|
1359
|
-
}
|
|
1360
|
-
}
|
|
1361
|
-
});
|
|
1362
|
-
}));
|
|
1363
|
-
return result;
|
|
1364
|
-
}
|
|
1365
|
-
/**
|
|
1366
|
-
* @desc
|
|
1367
|
-
* @param value
|
|
1368
|
-
*/
|
|
1369
|
-
inputChange(value) {
|
|
1370
|
-
this.results = [];
|
|
1371
|
-
// data prop'unda arama yapılacak (searchFields prop'u içerisindeki alanlar ile)
|
|
1372
|
-
// arama sonucunda eşleyen itemların 'idx', index
|
|
1373
|
-
// değerleri, array şeklinde root component'e
|
|
1374
|
-
// event ile gönderilecek
|
|
1375
|
-
// Örneğin value == 'to' olduğunda aşağıdaki
|
|
1376
|
-
// sonuçlar filtrelenmeli
|
|
1377
|
-
// -->
|
|
1378
|
-
//{ text: 'Mateusz Eaton', idx: 2 },
|
|
1379
|
-
//{ text: 'Tony Vickers', idx: 3 },
|
|
1380
|
-
// result array'i eşleşen itemların
|
|
1381
|
-
// index numaralarını tutacak
|
|
1382
|
-
// results = [2, 3]
|
|
1383
|
-
// Örnek arama
|
|
1384
|
-
// #
|
|
1385
|
-
this.nestedSearch(this.data, value);
|
|
1386
|
-
this.results = Array.from(new Set(this.results));
|
|
1387
|
-
(value && ((this.results.length > 0 && this.bcmOnSearch.emit(this.results)) || this.bcmOnSearch.emit([-1]))) || this.bcmOnSearch.emit(true);
|
|
1388
|
-
this.bcmOnSearchValue.emit(value);
|
|
1389
|
-
}
|
|
1390
|
-
render() {
|
|
1391
|
-
const hostClasses = index$1.classnames(this.hidden ? 'hidden' : null);
|
|
1392
|
-
return (index.h(index.Host, { class: hostClasses }, index.h("bcm-old-input", { placeholder: this.searchPlaceholder, "no-caption": true, "no-margin": true, "full-width": true, disabled: this.disabled, type: "search", "on-bcm-change": e => this.inputChange(e.detail), value: this.searchValue })));
|
|
1393
|
-
}
|
|
1394
|
-
get el() { return index.getElement(this); }
|
|
1395
|
-
static get watchers() { return {
|
|
1396
|
-
"searchValue": ["inputChange"]
|
|
1397
|
-
}; }
|
|
1398
|
-
};
|
|
1399
|
-
__decorate$1([
|
|
1400
|
-
isLoadDecorator.IsLoad()
|
|
1401
|
-
], BcmOldSearch.prototype, "el", void 0);
|
|
1402
|
-
BcmOldSearch.style = oldSearchCss;
|
|
1403
|
-
|
|
1404
|
-
const treeviewCss = "@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:flex;flex-direction:column;height:100%;max-height:100%;border:1px solid var(--bcm-color-grey-5);box-sizing:border-box;background-color:#ffffff}:host(.empty) .treeview{display:flex;align-items:center;justify-content:center}.search{padding:8px;padding-bottom:0;margin-bottom:4px}.treeview{height:100%;max-height:100%;overflow:auto;background-color:var(--bcm-color-grey-1);padding:0 8px 8px 0}.treeview.loading{min-height:150px;position:relative;margin:0 8px 8px 8px}.treeview .loading{display:none;align-items:center;justify-content:center;height:100%;width:100%;position:absolute;background-color:rgba(255, 255, 255, 0.03)}.treeview .loading.show{display:flex}.treeview .empty{display:none;align-items:center;justify-content:center;height:100%}.treeview .empty bcm-empty{width:fit-content;margin:auto}.treeview .empty.show{display:flex}footer{text-align:right;padding:4px 8px;background-color:var(--bcm-color-grey-3);user-select:none}";
|
|
1405
|
-
|
|
1406
|
-
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
1407
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1408
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1409
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
1410
|
-
else
|
|
1411
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
1412
|
-
if (d = decorators[i])
|
|
1413
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1414
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1415
|
-
};
|
|
1416
|
-
/**
|
|
1417
|
-
* @desc
|
|
1418
|
-
* @param str
|
|
1419
|
-
*/
|
|
1420
|
-
const lowercase = (str) => str.toLowerCase();
|
|
1421
|
-
const Bcmtreeview = class {
|
|
1422
|
-
constructor(hostRef) {
|
|
1423
|
-
index.registerInstance(this, hostRef);
|
|
1424
|
-
this.treeviewChange = index.createEvent(this, "bcm-treeview-change", 7);
|
|
1425
|
-
this.treeviewSendCheck = index.createEvent(this, "bcm-treeview-send-check", 7);
|
|
1426
|
-
this.treeviewSendUncheck = index.createEvent(this, "bcm-treeview-send-uncheck", 7);
|
|
1427
|
-
this.treeviewChecklist = index.createEvent(this, "bcm-treeview-checklist", 7);
|
|
1428
|
-
this.treeviewItemSelected = index.createEvent(this, "bcm-treeview-item-selected", 7);
|
|
1429
|
-
this.treeviewClearSelecteds = index.createEvent(this, "bcm-treeview-clear-selecteds", 7);
|
|
1430
|
-
this.treeviewShowContext = index.createEvent(this, "bcm-treeview-show-context", 7);
|
|
1431
|
-
this.treeviewUnchecked = index.createEvent(this, "bcm-treeview-unchecked", 7);
|
|
1432
|
-
this.treeviewChecked = index.createEvent(this, "bcm-treeview-checked", 7);
|
|
1433
|
-
this.objectMapping = {
|
|
1434
|
-
'text': 'text',
|
|
1435
|
-
'icon': 'icon',
|
|
1436
|
-
'id': 'id',
|
|
1437
|
-
'items': 'items',
|
|
1438
|
-
'open': 'open',
|
|
1439
|
-
'selected': 'selected',
|
|
1440
|
-
'checked': 'checked',
|
|
1441
|
-
'tooltipText': 'tooltipText',
|
|
1442
|
-
'disabled': "disabled",
|
|
1443
|
-
'favorite': "favorite",
|
|
1444
|
-
};
|
|
1445
|
-
this.checkedObjectList = [];
|
|
1446
|
-
this.allChilds = [];
|
|
1447
|
-
this.onFocus = false;
|
|
1448
|
-
this.minHeight = 200;
|
|
1449
|
-
this.minWidth = 200;
|
|
1450
|
-
this.allOpenCache = false;
|
|
1451
|
-
this.allOpenOnSearch = false;
|
|
1452
|
-
this.parentLength = [{}];
|
|
1453
|
-
this.isSetData = false;
|
|
1454
|
-
this.runClearAndSelect = false;
|
|
1455
|
-
this.checkboxes = false;
|
|
1456
|
-
this.showIcon = false;
|
|
1457
|
-
this.size = 'medium';
|
|
1458
|
-
this.checkedList = [];
|
|
1459
|
-
this.updateCheckedList = [];
|
|
1460
|
-
this.hidden = false;
|
|
1461
|
-
this.search = false;
|
|
1462
|
-
this.searchOnlyChild = false;
|
|
1463
|
-
this.keydown = false;
|
|
1464
|
-
this.allOpen = false;
|
|
1465
|
-
this.fullWidth = false;
|
|
1466
|
-
this.infoFooter = false;
|
|
1467
|
-
this.searchFields = ['text', 'secondaryText', 'tooltipText'];
|
|
1468
|
-
this.searchSub = "items";
|
|
1469
|
-
this.returnField = "id";
|
|
1470
|
-
this._items = [];
|
|
1471
|
-
this.searchPlaceholder = "Search";
|
|
1472
|
-
this.maxHeight = null;
|
|
1473
|
-
this.highlight = false;
|
|
1474
|
-
this.loading = true;
|
|
1475
|
-
this.favIcon = false;
|
|
1476
|
-
this.favIconOnlyChilds = false;
|
|
1477
|
-
this._internal_id = (Math.random() * 4).toString(16).replace('.', '');
|
|
1478
|
-
/**
|
|
1479
|
-
* Component States
|
|
1480
|
-
*/
|
|
1481
|
-
this.empty = false;
|
|
1482
|
-
this.showSearch = true;
|
|
1483
|
-
this.items = [];
|
|
1484
|
-
this.total = 0;
|
|
1485
|
-
this.checkCount = 0;
|
|
1486
|
-
this.keyMapForFocus = { 18: false, 87: false };
|
|
1487
|
-
this.checklist = [];
|
|
1488
|
-
this.favoriteList = [];
|
|
1489
|
-
this.checklistSorted = [];
|
|
1490
|
-
this.searchResults = [];
|
|
1491
|
-
}
|
|
1492
|
-
async setData(_data = []) {
|
|
1493
|
-
this.clearAndSelectSearch(false);
|
|
1494
|
-
this.isLoading(true);
|
|
1495
|
-
this.isSetData = true;
|
|
1496
|
-
this.checkedObjectList = [];
|
|
1497
|
-
this.selectedId = null;
|
|
1498
|
-
setTimeout(() => {
|
|
1499
|
-
this._items = _data;
|
|
1500
|
-
this.searchData = JSON.parse(_data);
|
|
1501
|
-
this.calculateMinSizes();
|
|
1502
|
-
this.handleChildProcess();
|
|
1503
|
-
}, 100);
|
|
1504
|
-
return Promise.resolve(true);
|
|
1505
|
-
}
|
|
1506
|
-
async getChecklist() {
|
|
1507
|
-
return this.checkedObjectList;
|
|
1508
|
-
}
|
|
1509
|
-
async getFavorites() {
|
|
1510
|
-
this.getChildItem(this.el).forEach(element => {
|
|
1511
|
-
element[this.objectMapping['favorite']] == true && (this.favIconOnlyChilds && element[this.objectMapping['items']].length == 0 && (this.favoriteList.indexOf(element.itemObject) < 0 && (this.favoriteList.push(element.itemObject))),
|
|
1512
|
-
!this.favIconOnlyChilds && (this.favoriteList.indexOf(element.itemObject) < 0 && (this.favoriteList.push(element.itemObject))));
|
|
1513
|
-
});
|
|
1514
|
-
return this.favoriteList;
|
|
1515
|
-
}
|
|
1516
|
-
async selected(id) {
|
|
1517
|
-
this.selectedId = id;
|
|
1518
|
-
}
|
|
1519
|
-
async clearAndSelectSearch(select = true) {
|
|
1520
|
-
this.runClearAndSelect = true;
|
|
1521
|
-
if (this.search === true) {
|
|
1522
|
-
setTimeout(() => {
|
|
1523
|
-
var searchInput = null;
|
|
1524
|
-
searchInput = this.el.shadowRoot.querySelector("bcm-old-search");
|
|
1525
|
-
if (searchInput) {
|
|
1526
|
-
searchInput.setClear();
|
|
1527
|
-
if (select == true) {
|
|
1528
|
-
searchInput.select();
|
|
1529
|
-
}
|
|
1530
|
-
}
|
|
1531
|
-
}, 100);
|
|
1532
|
-
}
|
|
1533
|
-
}
|
|
1534
|
-
async addChecked(items = []) {
|
|
1535
|
-
this.checkedList = items;
|
|
1536
|
-
}
|
|
1537
|
-
async updateChecked(items = []) {
|
|
1538
|
-
this.updateCheckedList = items;
|
|
1539
|
-
}
|
|
1540
|
-
async config(_config) {
|
|
1541
|
-
if (_config['maxHeight']) {
|
|
1542
|
-
typeof _config['maxHeight'] == 'string'
|
|
1543
|
-
? this.maxHeight = _config['maxHeight']
|
|
1544
|
-
: this.maxHeight = "100%";
|
|
1545
|
-
}
|
|
1546
|
-
if (_config['searchFields']) {
|
|
1547
|
-
if (Array.isArray(_config['searchFields'])) {
|
|
1548
|
-
this.searchFields = _config['searchFields'];
|
|
1549
|
-
}
|
|
1550
|
-
}
|
|
1551
|
-
if (_config['searchable']) {
|
|
1552
|
-
typeof _config['searchable'] == 'boolean'
|
|
1553
|
-
? this.search = _config['searchable']
|
|
1554
|
-
: this.search = false;
|
|
1555
|
-
}
|
|
1556
|
-
if (_config['searchOnlyChild']) {
|
|
1557
|
-
typeof _config['searchOnlyChild'] == 'boolean'
|
|
1558
|
-
? this.searchOnlyChild = _config['searchOnlyChild']
|
|
1559
|
-
: this.searchOnlyChild = false;
|
|
1560
|
-
}
|
|
1561
|
-
if (_config['searchPlaceholder']) {
|
|
1562
|
-
typeof _config['searchPlaceholder'] == 'string'
|
|
1563
|
-
? this.searchPlaceholder = _config['searchPlaceholder']
|
|
1564
|
-
: this.searchPlaceholder = null;
|
|
1565
|
-
}
|
|
1566
|
-
if (_config['fullWidth']) {
|
|
1567
|
-
typeof _config['fullWidth'] == 'boolean'
|
|
1568
|
-
? this.fullWidth = _config['fullWidth']
|
|
1569
|
-
: this.fullWidth = false;
|
|
1570
|
-
}
|
|
1571
|
-
if (_config['infoFooter']) {
|
|
1572
|
-
typeof _config['infoFooter'] == 'boolean'
|
|
1573
|
-
? this.infoFooter = _config['infoFooter']
|
|
1574
|
-
: this.infoFooter = false;
|
|
1575
|
-
}
|
|
1576
|
-
if (_config['highlight']) {
|
|
1577
|
-
typeof _config['highlight'] == 'boolean'
|
|
1578
|
-
? this.highlight = _config['highlight']
|
|
1579
|
-
: this.highlight = false;
|
|
1580
|
-
}
|
|
1581
|
-
if (_config['checkable']) {
|
|
1582
|
-
typeof _config['checkable'] == 'boolean'
|
|
1583
|
-
? this.checkboxes = _config['checkable']
|
|
1584
|
-
: this.checkboxes = false;
|
|
1585
|
-
}
|
|
1586
|
-
if (_config['showIcon']) {
|
|
1587
|
-
typeof _config['showIcon'] == 'boolean'
|
|
1588
|
-
? this.showIcon = _config['showIcon']
|
|
1589
|
-
: this.showIcon = false;
|
|
1590
|
-
}
|
|
1591
|
-
if (_config['favIcon']) {
|
|
1592
|
-
typeof _config['favIcon'] == 'boolean'
|
|
1593
|
-
? this.favIcon = _config['favIcon']
|
|
1594
|
-
: this.favIcon = false;
|
|
1595
|
-
}
|
|
1596
|
-
if (_config['favIconOnlyChilds']) {
|
|
1597
|
-
typeof _config['favIconOnlyChilds'] == 'boolean'
|
|
1598
|
-
? this.favIconOnlyChilds = _config['favIconOnlyChilds']
|
|
1599
|
-
: this.favIconOnlyChilds = false;
|
|
1600
|
-
}
|
|
1601
|
-
if (_config['allOpen']) {
|
|
1602
|
-
typeof _config['allOpen'] == 'boolean'
|
|
1603
|
-
? this.allOpen = _config['allOpen']
|
|
1604
|
-
: this.allOpen = false;
|
|
1605
|
-
}
|
|
1606
|
-
this.allOpenCache = this.allOpen;
|
|
1607
|
-
if (_config['size']) {
|
|
1608
|
-
(["small", "medium", "large"].indexOf(_config['size']) >= 0)
|
|
1609
|
-
? this.size = _config['size']
|
|
1610
|
-
: this.size = 'medium';
|
|
1611
|
-
}
|
|
1612
|
-
if (_config['mapping']) {
|
|
1613
|
-
if (_config['mapping']['text']) {
|
|
1614
|
-
this.objectMapping['text'] = _config['mapping']['text'];
|
|
1615
|
-
}
|
|
1616
|
-
if (_config['mapping']['icon']) {
|
|
1617
|
-
this.objectMapping['icon'] = _config['mapping']['icon'];
|
|
1618
|
-
}
|
|
1619
|
-
if (_config['mapping']['id']) {
|
|
1620
|
-
this.objectMapping['id'] = _config['mapping']['id'];
|
|
1621
|
-
this.returnField = this.objectMapping['id'];
|
|
1622
|
-
}
|
|
1623
|
-
if (_config['mapping']['items']) {
|
|
1624
|
-
this.objectMapping['items'] = _config['mapping']['items'];
|
|
1625
|
-
this.searchSub = this.objectMapping['items'];
|
|
1626
|
-
}
|
|
1627
|
-
if (_config['mapping']['open']) {
|
|
1628
|
-
this.objectMapping['open'] = _config['mapping']['open'];
|
|
1629
|
-
}
|
|
1630
|
-
if (_config['mapping']['selected']) {
|
|
1631
|
-
this.objectMapping['selected'] = _config['mapping']['selected'];
|
|
1632
|
-
}
|
|
1633
|
-
if (_config['mapping']['checked']) {
|
|
1634
|
-
this.objectMapping['checked'] = _config['mapping']['checked'];
|
|
1635
|
-
}
|
|
1636
|
-
if (_config['mapping']['tooltipText']) {
|
|
1637
|
-
this.objectMapping['tooltipText'] = _config['mapping']['tooltipText'];
|
|
1638
|
-
}
|
|
1639
|
-
if (_config['mapping']['disabled']) {
|
|
1640
|
-
this.objectMapping['disabled'] = _config['mapping']['disabled'];
|
|
1641
|
-
}
|
|
1642
|
-
if (_config['mapping']['favorite']) {
|
|
1643
|
-
this.objectMapping['favorite'] = _config['mapping']['favorite'];
|
|
1644
|
-
}
|
|
1645
|
-
}
|
|
1646
|
-
// sessionStorage.setItem(this._internal_id + "-config", JSON.stringify(_config));
|
|
1647
|
-
return Promise.resolve(true);
|
|
1648
|
-
}
|
|
1649
|
-
calculateMinSizes() {
|
|
1650
|
-
if (this.minHeight < this.el.clientHeight) {
|
|
1651
|
-
this.minHeight = this.el.clientHeight;
|
|
1652
|
-
}
|
|
1653
|
-
}
|
|
1654
|
-
connectedCallback() { }
|
|
1655
|
-
componentWillLoad() { }
|
|
1656
|
-
componentWillRender() {
|
|
1657
|
-
if (sessionStorage.getItem(this._internal_id + "-config")) {
|
|
1658
|
-
this.config(JSON.parse(sessionStorage.getItem(this._internal_id + "-config")));
|
|
1659
|
-
}
|
|
1660
|
-
}
|
|
1661
|
-
componentDidRender() {
|
|
1662
|
-
// this.isEmpty(true)
|
|
1663
|
-
// if(this.total > 0) {
|
|
1664
|
-
// this.isEmpty(false)
|
|
1665
|
-
// }
|
|
1666
|
-
}
|
|
1667
|
-
// componentDidLoad(){
|
|
1668
|
-
// this.handleChildProcess()
|
|
1669
|
-
// setTimeout(() => {
|
|
1670
|
-
// if(this.isSetData) {
|
|
1671
|
-
// this.isLoading(true)
|
|
1672
|
-
// this.isEmpty(false)
|
|
1673
|
-
// }else{
|
|
1674
|
-
// this.isLoading(false)
|
|
1675
|
-
// this.isEmpty(true)
|
|
1676
|
-
// }
|
|
1677
|
-
// }, 1000);
|
|
1678
|
-
// // this.isEmpty(true)
|
|
1679
|
-
// }
|
|
1680
|
-
componentWillUpdate() { }
|
|
1681
|
-
// componentWillRender(){}
|
|
1682
|
-
// componentDidRender(){}
|
|
1683
|
-
componentDidUpdate() {
|
|
1684
|
-
if (this.checkboxes === true) {
|
|
1685
|
-
this.checkedObjectList = [];
|
|
1686
|
-
if (this.checklistSorted.length > 0) {
|
|
1687
|
-
this.getChildItem(this.el).forEach(element => {
|
|
1688
|
-
element.checked == true && (this.checkedObjectList.indexOf(element.itemObject) < 0 && (this.checkedObjectList.push(element.itemObject)));
|
|
1689
|
-
});
|
|
1690
|
-
this.treeviewChecklist.emit(this.checkedObjectList);
|
|
1691
|
-
}
|
|
1692
|
-
else {
|
|
1693
|
-
this.treeviewChecklist.emit([]);
|
|
1694
|
-
}
|
|
1695
|
-
}
|
|
1696
|
-
}
|
|
1697
|
-
parseItems(newValue) {
|
|
1698
|
-
if (newValue) {
|
|
1699
|
-
typeof newValue == 'string'
|
|
1700
|
-
? this.items = JSON.parse(newValue)
|
|
1701
|
-
: this.items = newValue;
|
|
1702
|
-
}
|
|
1703
|
-
this.handleChildProcess();
|
|
1704
|
-
}
|
|
1705
|
-
handleChildProcess() {
|
|
1706
|
-
setTimeout(() => {
|
|
1707
|
-
this.allChilds = this.getAllChilds();
|
|
1708
|
-
this.total = this.allChilds.filter((v, i, a) => a.indexOf(v) === i).length;
|
|
1709
|
-
if (this.total > 0) {
|
|
1710
|
-
// setTimeout(() => {
|
|
1711
|
-
this.isLoading(false);
|
|
1712
|
-
// }, 100);
|
|
1713
|
-
this.isEmpty(false);
|
|
1714
|
-
}
|
|
1715
|
-
else {
|
|
1716
|
-
// setTimeout(() => {
|
|
1717
|
-
this.isLoading(false);
|
|
1718
|
-
this.isEmpty(true);
|
|
1719
|
-
// }, 100);
|
|
1720
|
-
}
|
|
1721
|
-
}, 100);
|
|
1722
|
-
}
|
|
1723
|
-
/**
|
|
1724
|
-
* @desc
|
|
1725
|
-
* @param group
|
|
1726
|
-
*/
|
|
1727
|
-
recursiveItemRenderer(group, parentGroup) {
|
|
1728
|
-
const sId = String(this.selectedId);
|
|
1729
|
-
const gId = String(group[this.objectMapping['id']]);
|
|
1730
|
-
const isSelected = String(group[this.objectMapping['selected']]) === 'true' ? true : false;
|
|
1731
|
-
if (sId === gId || isSelected) {
|
|
1732
|
-
this.treeviewItemSelected.emit(group);
|
|
1733
|
-
}
|
|
1734
|
-
return (index.h("bcm-treeview-item", Object.assign({ _internal_id: this._internal_id, text: group[this.objectMapping['text']], icon: group[this.objectMapping['icon']], id: group[this.objectMapping['id']], size: this.size, "has-child": !!group[this.objectMapping['items']] }, (parentGroup && { 'parent-id': parentGroup[this.objectMapping['id']] }), (group[this.objectMapping['tooltipText']] && { tooltipText: group[this.objectMapping['tooltipText']] }), (String(group[this.objectMapping['checked']]) === "true" && { checkTrigger: true }), (String(group[this.objectMapping['open']]) === "true" && { open: true }), (String(group[this.objectMapping['selected']]) === "true" && { selected: true }), (String(group[this.objectMapping['disabled']]) === "true" && { disabled: true }), (group[this.objectMapping['items']] && { items: group[this.objectMapping['items']] }), (this.favIcon && !this.favIconOnlyChilds && { favicon: true }), (this.favIcon && this.favIconOnlyChilds && group[this.objectMapping['items']].length == 0 && { favicon: true }), (this.favIcon && group.rightSlot && { favorite: group.rightSlot[this.objectMapping['favorite']] }), (this.showIcon && { showIcon: true }), (String(this.checkboxes) === "true" && { checkboxes: true }), ((this.allOpen || this.allOpenOnSearch) && { open: true }), { itemObject: group }, ((this.checkedList && this.checkedList.find(e => e == group[this.objectMapping['id']]))) && { checkTrigger: true }, (this.updateCheckedList.length > 0 &&
|
|
1735
|
-
((this.updateCheckedList.find(e => e == group[this.objectMapping['id']])) && { checkTrigger: true }))), group[this.objectMapping['items']] && group[this.objectMapping['items']].map((item) => (this.recursiveItemRenderer(item, group)))));
|
|
1736
|
-
}
|
|
1737
|
-
/**
|
|
1738
|
-
* @desc
|
|
1739
|
-
*/
|
|
1740
|
-
handleCheckList(process = 'add', checkId) {
|
|
1741
|
-
// console.log(checkId)
|
|
1742
|
-
if (this.checkboxes === true) {
|
|
1743
|
-
// const { checklist } = this
|
|
1744
|
-
// checkId = Number(checkId)
|
|
1745
|
-
switch (process) {
|
|
1746
|
-
case 'add':
|
|
1747
|
-
if (this.checklist.length > 0) {
|
|
1748
|
-
this.checklist.indexOf(checkId) < 0 && (this.checklist = [...this.checklist, checkId]);
|
|
1749
|
-
}
|
|
1750
|
-
else {
|
|
1751
|
-
this.checklist = [checkId];
|
|
1752
|
-
}
|
|
1753
|
-
break;
|
|
1754
|
-
case 'remove':
|
|
1755
|
-
this.checklist = this.checklist.filter(item => item !== checkId);
|
|
1756
|
-
break;
|
|
1757
|
-
}
|
|
1758
|
-
let sorted = this.checklist.sort(function (a, b) { return a - b; });
|
|
1759
|
-
this.checklistSorted = sorted;
|
|
1760
|
-
// console.log('sorted: ', sorted)
|
|
1761
|
-
this.checkCount = this.checklistSorted.length;
|
|
1762
|
-
}
|
|
1763
|
-
}
|
|
1764
|
-
async showSearchMethod(val = true) {
|
|
1765
|
-
this.showSearch = val;
|
|
1766
|
-
// return val
|
|
1767
|
-
}
|
|
1768
|
-
async searchResultMethod(items = []) {
|
|
1769
|
-
// this.listenSearchResult({ detail: items })
|
|
1770
|
-
await customElements.whenDefined("bcm-old-search");
|
|
1771
|
-
const search = this.el.shadowRoot.querySelector("bcm-old-search");
|
|
1772
|
-
const detail = await search.searchArray(items, this.objectMapping['id']);
|
|
1773
|
-
await this.listenSearchResult({ detail: detail });
|
|
1774
|
-
// return true
|
|
1775
|
-
}
|
|
1776
|
-
isLoading(val) {
|
|
1777
|
-
var treeview = this.el.shadowRoot.getElementById("treeview");
|
|
1778
|
-
var loading = this.el.shadowRoot.getElementById("loading");
|
|
1779
|
-
var searchInput = this.el.shadowRoot.querySelector("bcm-old-search");
|
|
1780
|
-
// var listcontainer = this.el.shadowRoot.getElementById("list-container")
|
|
1781
|
-
if (val === true) {
|
|
1782
|
-
treeview && treeview.classList.add('loading');
|
|
1783
|
-
loading && loading.classList.add('show');
|
|
1784
|
-
if (searchInput) {
|
|
1785
|
-
searchInput.disabled = true;
|
|
1786
|
-
}
|
|
1787
|
-
// listcontainer && listcontainer.classList.add('hidden')
|
|
1788
|
-
}
|
|
1789
|
-
else {
|
|
1790
|
-
treeview && treeview.classList.remove('loading');
|
|
1791
|
-
loading && loading.classList.remove('show');
|
|
1792
|
-
if (searchInput) {
|
|
1793
|
-
searchInput.disabled = false;
|
|
1794
|
-
}
|
|
1795
|
-
// listcontainer && listcontainer.classList.remove('hidden')
|
|
1796
|
-
}
|
|
1797
|
-
return false;
|
|
1798
|
-
}
|
|
1799
|
-
isEmpty(val) {
|
|
1800
|
-
var empty = this.el.shadowRoot.getElementById("empty");
|
|
1801
|
-
// var listcontainer = this.el.shadowRoot.getElementById("list-container")
|
|
1802
|
-
if (val === true) {
|
|
1803
|
-
empty && empty.classList.add('show');
|
|
1804
|
-
// listcontainer && listcontainer.classList.add('hidden')
|
|
1805
|
-
}
|
|
1806
|
-
else {
|
|
1807
|
-
empty && empty.classList.remove('show');
|
|
1808
|
-
// listcontainer && listcontainer.classList.remove('hidden')
|
|
1809
|
-
}
|
|
1810
|
-
}
|
|
1811
|
-
isSearchCount(val = null) {
|
|
1812
|
-
if (this.infoFooter === true) {
|
|
1813
|
-
var inSearch = this.el.shadowRoot.getElementById("in-search");
|
|
1814
|
-
var inTotal = this.el.shadowRoot.getElementById("in-total");
|
|
1815
|
-
if (val >= 0 && val != null && inSearch && inTotal) {
|
|
1816
|
-
inSearch.innerHTML = val;
|
|
1817
|
-
inTotal.style.display = "none";
|
|
1818
|
-
}
|
|
1819
|
-
else {
|
|
1820
|
-
inTotal.style.display = "inline";
|
|
1821
|
-
inSearch.innerHTML = "";
|
|
1822
|
-
}
|
|
1823
|
-
}
|
|
1824
|
-
// if (val > 0){
|
|
1825
|
-
// this.isEmpty(false)
|
|
1826
|
-
// }
|
|
1827
|
-
}
|
|
1828
|
-
listenSearchResult(e) {
|
|
1829
|
-
this.parentLength = [];
|
|
1830
|
-
var searchValue = '';
|
|
1831
|
-
// this.searchResults = e.detail
|
|
1832
|
-
var totalSearch = e.detail.length;
|
|
1833
|
-
this.empty = false;
|
|
1834
|
-
var getAllChilds = this.getAllChilds();
|
|
1835
|
-
this.isEmpty(false);
|
|
1836
|
-
if (e.detail.length > 0) {
|
|
1837
|
-
// this.allOpenOnSearch = true
|
|
1838
|
-
if (e.detail[0] == -1) {
|
|
1839
|
-
totalSearch = 0;
|
|
1840
|
-
this.empty = true;
|
|
1841
|
-
this.isEmpty(true);
|
|
1842
|
-
}
|
|
1843
|
-
if (getAllChilds.length > 0) {
|
|
1844
|
-
getAllChilds.map((item) => {
|
|
1845
|
-
var isParent = false;
|
|
1846
|
-
if (this.searchOnlyChild && item.items && item.items.length > 0) {
|
|
1847
|
-
isParent = true;
|
|
1848
|
-
}
|
|
1849
|
-
e.target.addEventListener('bcm-on-search-value', async (e) => {
|
|
1850
|
-
searchValue = await e.detail;
|
|
1851
|
-
var inputText = item.shadowRoot.getElementById("text");
|
|
1852
|
-
inputText = inputText.textContent || inputText.innerText || "";
|
|
1853
|
-
if (searchValue) {
|
|
1854
|
-
var cacheInputText = lowercase(inputText);
|
|
1855
|
-
var cacheSearchValue = lowercase(searchValue);
|
|
1856
|
-
var index = cacheInputText.indexOf(cacheSearchValue);
|
|
1857
|
-
if (index >= 0) {
|
|
1858
|
-
if (isParent == false) {
|
|
1859
|
-
if (this.parentLength.indexOf(item.id) === -1) {
|
|
1860
|
-
this.parentLength.push(item.id);
|
|
1861
|
-
}
|
|
1862
|
-
if (this.highlight) {
|
|
1863
|
-
inputText = inputText.substring(0, index)
|
|
1864
|
-
+ "<span class='highlight'>"
|
|
1865
|
-
+ inputText.substring(index, index + searchValue.length)
|
|
1866
|
-
+ "</span>"
|
|
1867
|
-
+ inputText.substring(index + searchValue.length);
|
|
1868
|
-
}
|
|
1869
|
-
}
|
|
1870
|
-
}
|
|
1871
|
-
}
|
|
1872
|
-
item.shadowRoot.getElementById("text").innerHTML = inputText;
|
|
1873
|
-
});
|
|
1874
|
-
item.hidden = true;
|
|
1875
|
-
var _ids = item.id;
|
|
1876
|
-
if (e.detail.indexOf(_ids) >= 0) {
|
|
1877
|
-
item.hidden = false;
|
|
1878
|
-
item.open = true;
|
|
1879
|
-
setTimeout(() => {
|
|
1880
|
-
if (this.parentLength.indexOf(item.id) !== -1 && item.items && item.items.length > 0 && this.searchOnlyChild == false) {
|
|
1881
|
-
const getChilds = (item) => {
|
|
1882
|
-
this.getAllChilds(item).map(element => {
|
|
1883
|
-
element.hidden = false;
|
|
1884
|
-
element.open = true;
|
|
1885
|
-
getChilds(element);
|
|
1886
|
-
});
|
|
1887
|
-
};
|
|
1888
|
-
getChilds(item);
|
|
1889
|
-
}
|
|
1890
|
-
}, 1);
|
|
1891
|
-
}
|
|
1892
|
-
else {
|
|
1893
|
-
item.hidden = true;
|
|
1894
|
-
}
|
|
1895
|
-
});
|
|
1896
|
-
}
|
|
1897
|
-
}
|
|
1898
|
-
else {
|
|
1899
|
-
// this.allOpenOnSearch = this.allOpenCache
|
|
1900
|
-
if (getAllChilds.length > 0) {
|
|
1901
|
-
getAllChilds.map((item) => {
|
|
1902
|
-
item.hidden = false;
|
|
1903
|
-
});
|
|
1904
|
-
}
|
|
1905
|
-
// this.isEmpty(true)
|
|
1906
|
-
}
|
|
1907
|
-
// if ( this.searchOnlyChild ) {
|
|
1908
|
-
// this.isSearchCount(highlightLength)
|
|
1909
|
-
// }else{
|
|
1910
|
-
setTimeout(() => {
|
|
1911
|
-
if (totalSearch >= 0) {
|
|
1912
|
-
var totals = totalSearch - Number(totalSearch - this.parentLength.length);
|
|
1913
|
-
this.isSearchCount(totals > 0 ? totals : 0);
|
|
1914
|
-
}
|
|
1915
|
-
else {
|
|
1916
|
-
this.isSearchCount();
|
|
1917
|
-
}
|
|
1918
|
-
if (e.detail[0] === -1) {
|
|
1919
|
-
this.isSearchCount(0);
|
|
1920
|
-
}
|
|
1921
|
-
if (e.detail === true) {
|
|
1922
|
-
this.isSearchCount();
|
|
1923
|
-
}
|
|
1924
|
-
}, 100);
|
|
1925
|
-
// }
|
|
1926
|
-
if (e.detail === true) {
|
|
1927
|
-
this.isEmpty(false);
|
|
1928
|
-
}
|
|
1929
|
-
}
|
|
1930
|
-
getAllChilds(element = this.el) {
|
|
1931
|
-
let returnAllItems = [];
|
|
1932
|
-
utils.getChilds(element, 'bcm-treeview-item').forEach(items => {
|
|
1933
|
-
this.getAllChilds(items) && (returnAllItems.indexOf(items) < 0 && (returnAllItems.push(items))
|
|
1934
|
-
// returnAllItems = [...returnAllItems, ...this.getAllChilds(items)]
|
|
1935
|
-
);
|
|
1936
|
-
returnAllItems.indexOf(items) < 0 && (returnAllItems.push(items));
|
|
1937
|
-
// returnAllItems = [...returnAllItems,
|
|
1938
|
-
// items
|
|
1939
|
-
// ]
|
|
1940
|
-
});
|
|
1941
|
-
return returnAllItems;
|
|
1942
|
-
}
|
|
1943
|
-
/**
|
|
1944
|
-
* @desc
|
|
1945
|
-
*/
|
|
1946
|
-
handletreeviewItemSelected(event) {
|
|
1947
|
-
this.treeviewClearSelecteds.emit(event.detail);
|
|
1948
|
-
}
|
|
1949
|
-
/**
|
|
1950
|
-
* @desc
|
|
1951
|
-
*/
|
|
1952
|
-
handletreeviewChecked(event) {
|
|
1953
|
-
// this.treeviewSendCheck.emit(event.detail)
|
|
1954
|
-
this.handleCheckList('add', event.detail);
|
|
1955
|
-
// this.treeviewChange.emit(event.detail)
|
|
1956
|
-
}
|
|
1957
|
-
/**
|
|
1958
|
-
* @desc
|
|
1959
|
-
*/
|
|
1960
|
-
// @Listen('bcm-treeview-check-group-check')
|
|
1961
|
-
// bcmTreeviewCheckGroupChecked(event: any) {
|
|
1962
|
-
// console.log(event)
|
|
1963
|
-
// this.treeviewSendCheck.emit(event.detail)
|
|
1964
|
-
// this.handleCheckList('add',event.detail)
|
|
1965
|
-
// this.treeviewChange.emit(event.detail)
|
|
1966
|
-
// }
|
|
1967
|
-
/**
|
|
1968
|
-
* @desc
|
|
1969
|
-
*/
|
|
1970
|
-
handletreeviewUnchecked(event) {
|
|
1971
|
-
// this.treeviewSendUncheck.emit(event.detail)
|
|
1972
|
-
this.handleCheckList('remove', event.detail);
|
|
1973
|
-
// this.treeviewChange.emit(event.detail)
|
|
1974
|
-
}
|
|
1975
|
-
/**
|
|
1976
|
-
* @desc
|
|
1977
|
-
*/
|
|
1978
|
-
handletreeviewIndeterminateChecked(event) {
|
|
1979
|
-
this.handleCheckList('add', event.detail);
|
|
1980
|
-
}
|
|
1981
|
-
/**
|
|
1982
|
-
* @desc
|
|
1983
|
-
*/
|
|
1984
|
-
handletreeviewIndeterminateUnchecked(event) {
|
|
1985
|
-
this.handleCheckList('remove', event.detail);
|
|
1986
|
-
}
|
|
1987
|
-
treeviewUncheckedMethod(item) {
|
|
1988
|
-
this.handletreeviewUnchecked({ "detail": item });
|
|
1989
|
-
this.componentDidUpdate();
|
|
1990
|
-
return Promise.resolve(true);
|
|
1991
|
-
}
|
|
1992
|
-
/**
|
|
1993
|
-
* @desc
|
|
1994
|
-
* Keyboard Navigation
|
|
1995
|
-
*/
|
|
1996
|
-
getIndex(item) {
|
|
1997
|
-
return Array.from(item.parentNode.children).indexOf(item);
|
|
1998
|
-
}
|
|
1999
|
-
/**
|
|
2000
|
-
* @desc
|
|
2001
|
-
* Keyboard Navigation
|
|
2002
|
-
*/
|
|
2003
|
-
getNext(item) {
|
|
2004
|
-
let returnItem = this.getChildItem(item.parentElement)[this.getIndex(item) + 1];
|
|
2005
|
-
if (returnItem)
|
|
2006
|
-
return returnItem;
|
|
2007
|
-
return false;
|
|
2008
|
-
}
|
|
2009
|
-
/**
|
|
2010
|
-
* @desc
|
|
2011
|
-
* Keyboard Navigation
|
|
2012
|
-
*/
|
|
2013
|
-
getPrev(item) {
|
|
2014
|
-
let returnItem = this.getChildItem(item.parentElement)[this.getIndex(item) - 1];
|
|
2015
|
-
if (returnItem)
|
|
2016
|
-
return returnItem;
|
|
2017
|
-
return false;
|
|
2018
|
-
}
|
|
2019
|
-
/**
|
|
2020
|
-
* @desc
|
|
2021
|
-
* Keyboard Navigation
|
|
2022
|
-
*/
|
|
2023
|
-
getParent(item) {
|
|
2024
|
-
if (lowercase(item.parentElement.tagName) == 'bcm-treeview') {
|
|
2025
|
-
return false;
|
|
2026
|
-
}
|
|
2027
|
-
else {
|
|
2028
|
-
return this.getChildItem(item.parentElement.parentElement)[this.getIndex(item.parentElement)];
|
|
2029
|
-
}
|
|
2030
|
-
}
|
|
2031
|
-
/**
|
|
2032
|
-
* @desc
|
|
2033
|
-
* Keyboard Navigation
|
|
2034
|
-
*/
|
|
2035
|
-
getNextParent(item) {
|
|
2036
|
-
let getParent = this.getParent(item);
|
|
2037
|
-
let getNext;
|
|
2038
|
-
if (getParent) {
|
|
2039
|
-
getNext = this.getNext(getParent);
|
|
2040
|
-
if (getNext) {
|
|
2041
|
-
return getNext;
|
|
2042
|
-
}
|
|
2043
|
-
else {
|
|
2044
|
-
return this.getNextParent(getParent);
|
|
2045
|
-
}
|
|
2046
|
-
}
|
|
2047
|
-
}
|
|
2048
|
-
/**
|
|
2049
|
-
* @desc
|
|
2050
|
-
* Keyboard Navigation
|
|
2051
|
-
*/
|
|
2052
|
-
getFirstItem(el = this.el) {
|
|
2053
|
-
return this.getChildItem(el)[0];
|
|
2054
|
-
}
|
|
2055
|
-
/**
|
|
2056
|
-
* @desc
|
|
2057
|
-
* Keyboard Navigation
|
|
2058
|
-
*/
|
|
2059
|
-
getLastItem(el = this.el) {
|
|
2060
|
-
let childLength = this.getChildItem(el).length;
|
|
2061
|
-
let lastChild = this.getChildItem(el)[childLength - 1];
|
|
2062
|
-
if (this.getChildItem(lastChild).length > 0 && lastChild.open == true) {
|
|
2063
|
-
return this.getLastItem(lastChild);
|
|
2064
|
-
}
|
|
2065
|
-
else {
|
|
2066
|
-
return lastChild;
|
|
2067
|
-
}
|
|
2068
|
-
}
|
|
2069
|
-
/**
|
|
2070
|
-
* @desc
|
|
2071
|
-
* Keyboard Navigation
|
|
2072
|
-
*/
|
|
2073
|
-
getChildItem(element = this.el) {
|
|
2074
|
-
let returnItems = utils.getChilds(element, 'bcm-treeview-item');
|
|
2075
|
-
if (returnItems)
|
|
2076
|
-
return returnItems;
|
|
2077
|
-
return 0;
|
|
2078
|
-
}
|
|
2079
|
-
/**
|
|
2080
|
-
* @desc
|
|
2081
|
-
*/
|
|
2082
|
-
handleRightClick(e) {
|
|
2083
|
-
this.treeviewShowContext.emit([e.target.id, e.clientY, e.clientX]);
|
|
2084
|
-
e.preventDefault();
|
|
2085
|
-
}
|
|
2086
|
-
/**
|
|
2087
|
-
* @desc
|
|
2088
|
-
*/
|
|
2089
|
-
keyboardNavigationUp(e) {
|
|
2090
|
-
let { keyMapForFocus } = this;
|
|
2091
|
-
if (e.keyCode in keyMapForFocus) {
|
|
2092
|
-
keyMapForFocus[e.keyCode] = false;
|
|
2093
|
-
}
|
|
2094
|
-
}
|
|
2095
|
-
/**
|
|
2096
|
-
* @desc
|
|
2097
|
-
*/
|
|
2098
|
-
keyboardNavigation(e) {
|
|
2099
|
-
if (this.keydown) {
|
|
2100
|
-
const { keyMapForFocus, focusedElement, el } = this;
|
|
2101
|
-
this.focusedElement = !focusedElement ? el : focusedElement;
|
|
2102
|
-
const which = e.which || 0;
|
|
2103
|
-
if (this.getChildItem(el).length > 0) {
|
|
2104
|
-
if (e.keyCode in keyMapForFocus) {
|
|
2105
|
-
keyMapForFocus[e.keyCode] = true;
|
|
2106
|
-
if (keyMapForFocus[18] && keyMapForFocus[87]) {
|
|
2107
|
-
e.preventDefault();
|
|
2108
|
-
this.focusedElement = this.getFirstItem(this.focusedElement);
|
|
2109
|
-
}
|
|
2110
|
-
}
|
|
2111
|
-
if (which == 9 || //tab
|
|
2112
|
-
which == 13 || //enter
|
|
2113
|
-
which == 18 || //alt
|
|
2114
|
-
which == 32 || //space
|
|
2115
|
-
which == 35 || // end
|
|
2116
|
-
which == 36 || // home
|
|
2117
|
-
(which >= 35 && which <= 40) //end, home, left arrow, up arrow, right arrow, down arrow
|
|
2118
|
-
) {
|
|
2119
|
-
e.preventDefault();
|
|
2120
|
-
if (!focusedElement) {
|
|
2121
|
-
this.focusedElement = this.getFirstItem(this.focusedElement);
|
|
2122
|
-
}
|
|
2123
|
-
else {
|
|
2124
|
-
this.focusedElement.focused = false;
|
|
2125
|
-
switch (which) {
|
|
2126
|
-
case 13: // enter
|
|
2127
|
-
this.focusedElement.selected = true;
|
|
2128
|
-
break;
|
|
2129
|
-
case 32: // space
|
|
2130
|
-
this.focusedElement.checked && (this.treeviewUnchecked.emit(this.focusedElement.id)) || (this.treeviewChecked.emit(this.focusedElement.id));
|
|
2131
|
-
break;
|
|
2132
|
-
case 35: // end
|
|
2133
|
-
this.focusedElement = this.getLastItem(this.focusedElement.parentElement);
|
|
2134
|
-
break;
|
|
2135
|
-
case 36: // home
|
|
2136
|
-
this.focusedElement = this.getFirstItem(this.focusedElement.parentElement);
|
|
2137
|
-
break;
|
|
2138
|
-
case 37: // left arrow
|
|
2139
|
-
if (this.getChildItem(this.focusedElement).length > 0 && this.focusedElement.open == true) {
|
|
2140
|
-
this.focusedElement.open = false;
|
|
2141
|
-
}
|
|
2142
|
-
else {
|
|
2143
|
-
if (this.getParent(this.focusedElement)) {
|
|
2144
|
-
this.focusedElement = this.getParent(this.focusedElement);
|
|
2145
|
-
}
|
|
2146
|
-
}
|
|
2147
|
-
break;
|
|
2148
|
-
case 38: // up arrow
|
|
2149
|
-
if (this.getPrev(this.focusedElement)) {
|
|
2150
|
-
this.focusedElement = this.getPrev(this.focusedElement);
|
|
2151
|
-
if (this.getChildItem(this.focusedElement).length > 0 && this.focusedElement.open == true) {
|
|
2152
|
-
this.focusedElement = this.getLastItem(this.focusedElement);
|
|
2153
|
-
}
|
|
2154
|
-
}
|
|
2155
|
-
else if (this.getParent(this.focusedElement)) {
|
|
2156
|
-
this.focusedElement = this.getParent(this.focusedElement);
|
|
2157
|
-
}
|
|
2158
|
-
break;
|
|
2159
|
-
case 39: // right arrow
|
|
2160
|
-
if (this.getChildItem(this.focusedElement).length > 0) {
|
|
2161
|
-
if (this.focusedElement.open == true) {
|
|
2162
|
-
this.focusedElement = this.getFirstItem(this.focusedElement);
|
|
2163
|
-
}
|
|
2164
|
-
else {
|
|
2165
|
-
this.focusedElement.open = true;
|
|
2166
|
-
}
|
|
2167
|
-
}
|
|
2168
|
-
break;
|
|
2169
|
-
case 40: // down arrow
|
|
2170
|
-
if (this.getChildItem(this.focusedElement).length > 0 && this.focusedElement.open == true) {
|
|
2171
|
-
this.focusedElement = this.getFirstItem(this.focusedElement);
|
|
2172
|
-
}
|
|
2173
|
-
else if (this.getNext(this.focusedElement)) {
|
|
2174
|
-
this.focusedElement = this.getNext(this.focusedElement);
|
|
2175
|
-
}
|
|
2176
|
-
else if (this.getNextParent(this.focusedElement)) {
|
|
2177
|
-
this.focusedElement = this.getNextParent(this.focusedElement);
|
|
2178
|
-
}
|
|
2179
|
-
break;
|
|
2180
|
-
}
|
|
2181
|
-
}
|
|
2182
|
-
}
|
|
2183
|
-
if (this.focusedElement)
|
|
2184
|
-
this.focusedElement.focused = true;
|
|
2185
|
-
}
|
|
2186
|
-
}
|
|
2187
|
-
}
|
|
2188
|
-
handleFocus(focusEvent = false) {
|
|
2189
|
-
this.onFocus = focusEvent;
|
|
2190
|
-
}
|
|
2191
|
-
render() {
|
|
2192
|
-
const { searchOnlyChild, searchPlaceholder, search, checkCount, searchData, searchFields, searchSub, returnField, total, fullWidth, infoFooter, showSearch } = this;
|
|
2193
|
-
const hostClasses = index$1.classnames(this.hidden ? 'hidden' : null, {
|
|
2194
|
-
'empty': this.empty,
|
|
2195
|
-
'full-width': fullWidth
|
|
2196
|
-
});
|
|
2197
|
-
const customStyles = {
|
|
2198
|
-
// 'min-height': this.minHeight + 'px',
|
|
2199
|
-
'min-width': this.minWidth + 'px',
|
|
2200
|
-
'max-height': this.maxHeight
|
|
2201
|
-
};
|
|
2202
|
-
return (index.h(index.Host, { class: hostClasses, style: customStyles }, search && (index.h("div", { class: "search", style: { 'display': String(showSearch) == 'false' ? 'none' : 'block' } }, index.h("bcm-old-search", { onlyChild: searchOnlyChild, searchPlaceholder: searchPlaceholder, "on-bcm-focus": () => this.handleFocus(true), "on-bcm-blur": () => this.handleFocus(false), data: searchData, returnField: returnField, searchFields: searchFields, searchSub: searchSub, clearable: true }), index.h("bcm-divider", null))), index.h("div", { id: "treeview", class: "treeview loading" },
|
|
2203
|
-
// this.loading && (
|
|
2204
|
-
index.h("div", { id: "loading", class: "loading show" }, index.h("bcm-icon", { class: "prefix", icon: "far fa-spinner-third fa-spin" }))
|
|
2205
|
-
// )
|
|
2206
|
-
,
|
|
2207
|
-
// this.empty && (
|
|
2208
|
-
index.h("div", { id: "empty", class: "empty" }, index.h("bcm-empty", null, "No Data"))
|
|
2209
|
-
// )
|
|
2210
|
-
, !this.empty && this.items.length !== 0 && this.items.map((item) => (this.recursiveItemRenderer(item, null)))), infoFooter == true && (index.h("footer", null, index.h("bcm-text", { scale: "size-1", color: "grey-8" }, checkCount > 0 && ('( ' + checkCount + ' items selected ) '), "Total ", index.h("span", { id: "in-search" }), " ", index.h("span", { id: "in-total" }, total), " items found.")))));
|
|
2211
|
-
}
|
|
2212
|
-
get el() { return index.getElement(this); }
|
|
2213
|
-
static get watchers() { return {
|
|
2214
|
-
"_items": ["parseItems"]
|
|
2215
|
-
}; }
|
|
2216
|
-
};
|
|
2217
|
-
__decorate([
|
|
2218
|
-
isLoadDecorator.IsLoad()
|
|
2219
|
-
], Bcmtreeview.prototype, "el", void 0);
|
|
2220
|
-
Bcmtreeview.style = treeviewCss;
|
|
2221
|
-
|
|
2222
|
-
const treeviewItemCss = "@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(.hidden){display:none}.treeview-item{display:flex;align-items:stretch;justify-content:flex-start;color:var(--bcm-color-grey-8);padding-left:8px;user-select:none;background-color:var(--bcm-color-grey-1)}.treeview-item-context-menu{display:none;position:absolute;height:auto;background-color:#ffffff;align-items:center;justify-content:center;flex-direction:column;box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25)}.treeview-item-context-menu.show{display:flex}.treeview-item-context-menu span{text-align:left;min-width:100px;padding:5px 8px;font-size:14px;line-height:22px;color:var(--bcm-color-grey-8)}.treeview-item-context-menu span:hover{cursor:pointer;color:var(--bcm-color-prime-blue-6);background-color:var(--bcm-color-prime-blue-1)}.treeview-item.focus .treeview-item-container{border:2px solid var(--bcm-color-prime-blue-2)}.treeview-item-container{width:100%;display:flex;flex-direction:row;align-items:center;justify-content:flex-start}.treeview-item-container.disabled{color:var(--bcm-color-grey-6)}.treeview-item-container.disabled .text-content{cursor:not-allowed}.treeview-item-container.selected:not(.disabled){color:var(--bcm-color-prime-blue-6)}.treeview-item-container.selected:not(.disabled):hover:not(.disabled){color:var(--bcm-color-prime-blue-6);background-color:var(--bcm-color-prime-blue-1)}.treeview-item-container:hover:not(.disabled),.treeview-item-container:active:not(.disabled){color:var(--bcm-color-prime-blue-6);background-color:var(--bcm-color-prime-blue-1)}.treeview-item-container>section:not(.favicon){display:flex;align-items:stretch;justify-content:flex-start;border:2px solid transparent;flex:1}.treeview-item-container>section.favicon{display:flex;align-items:center;justify-content:center;padding:0 5px;height:100%;cursor:pointer}.treeview-item-container>section.favicon:not(.favorite){display:none}.treeview-item-container:hover:not(.disabled) .favicon{display:flex}.treeview-inner{display:none}.treeview-inner.open{display:block}.collapse-content{display:flex;align-items:center;justify-content:center;width:16px;min-width:16px}.collapse-content.child{cursor:pointer}.check-content{display:flex;align-items:center;justify-content:flex-start;width:24px;min-width:24px;padding-left:8px}.check-content .indeterminate{width:16px;height:16px;position:relative;display:block;padding-right:8px;cursor:pointer}.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}.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}.check-content .indeterminate:hover:not(.disabled):before{border-color:var(--bcm-color-prime-blue-6);box-shadow:0px 2px 4px rgba(54, 121, 171, 0.5)}.check-content .indeterminate.disabled{cursor:not-allowed;background:linear-gradient(90deg, var(--bcm-color-grey-3) 18px, transparent 0px);border-color:var(--bcm-color-grey-3)}.check-content .indeterminate.disabled:after{background-color:var(--bcm-color-grey-6)}.check-content .indeterminate.disabled bcm-icon{filter:brightness(0);opacity:0.3}.text-content{display:flex;align-items:center;justify-content:space-between;cursor:pointer;width:100%;flex:1}.text-content .favicon{display:flex;flex-direction:row;align-items:center;grid-gap:4px}.text-content #text .highlight{background-color:var(--bcm-color-yellow-5)}.text-content.small{padding:0 8px 0 4px}.text-content.medium{padding:4px 8px 4px 4px}.text-content.large{padding:8px 8px 8px 4px}.text-content .icon{text-align:center;margin-right:8px}";
|
|
2223
|
-
|
|
2224
|
-
const BcmtreeviewItem = class {
|
|
2225
|
-
constructor(hostRef) {
|
|
2226
|
-
index.registerInstance(this, hostRef);
|
|
2227
|
-
this.treeviewItemSelected = index.createEvent(this, "bcm-treeview-item-selected", 7);
|
|
2228
|
-
this.treeviewUnchecked = index.createEvent(this, "bcm-treeview-unchecked", 7);
|
|
2229
|
-
this.treeviewChecked = index.createEvent(this, "bcm-treeview-checked", 7);
|
|
2230
|
-
this.treeviewChange = index.createEvent(this, "bcm-treeview-change", 7);
|
|
2231
|
-
this.treeviewIndeterminateUnchecked = index.createEvent(this, "bcm-treeview-indeterminate-unchecked", 7);
|
|
2232
|
-
this.treeviewIndeterminateChecked = index.createEvent(this, "bcm-treeview-indeterminate-checked", 7);
|
|
2233
|
-
this.itemChecked = index.createEvent(this, "bcm-treeview-check-item-checked", 7);
|
|
2234
|
-
this.itemUnchecked = index.createEvent(this, "bcm-treeview-check-item-unchecked", 7);
|
|
2235
|
-
this.groupCheck = index.createEvent(this, "bcm-treeview-check-group-check", 7);
|
|
2236
|
-
this.favoriteStatus = index.createEvent(this, "bcm-favorite-status", 7);
|
|
2237
|
-
this.firstRun = true;
|
|
2238
|
-
this._id = (Math.random() * 4).toString(16).replace('.', '');
|
|
2239
|
-
this.hasChild = false;
|
|
2240
|
-
this.size = 'medium';
|
|
2241
|
-
this.icon = 'bug';
|
|
2242
|
-
this.open = false;
|
|
2243
|
-
this.selected = false;
|
|
2244
|
-
this.checkboxes = false;
|
|
2245
|
-
this.showIcon = false;
|
|
2246
|
-
this.favicon = false;
|
|
2247
|
-
this.favorite = false;
|
|
2248
|
-
this.checked = false;
|
|
2249
|
-
this.checkTrigger = false;
|
|
2250
|
-
this.focused = false;
|
|
2251
|
-
this.disabled = false;
|
|
2252
|
-
this.contextMenuShow = false;
|
|
2253
|
-
this._contextMenu = [];
|
|
2254
|
-
this.indeterminateState = 'uncheck';
|
|
2255
|
-
this._internal_id = "";
|
|
2256
|
-
this.menuPadding = 0;
|
|
2257
|
-
this.childLength = 0;
|
|
2258
|
-
this.indeterminate = false;
|
|
2259
|
-
// @State() checkTrigger: boolean = false
|
|
2260
|
-
this.hidden = false;
|
|
2261
|
-
this.contextMenu = [];
|
|
2262
|
-
this.contextOffsetLeft = 0;
|
|
2263
|
-
this.contextOffsetTop = 0;
|
|
2264
|
-
}
|
|
2265
|
-
/**
|
|
2266
|
-
* @ComponentMethod
|
|
2267
|
-
*/
|
|
2268
|
-
componentWillLoad() {
|
|
2269
|
-
this.menuPadding = 24;
|
|
2270
|
-
this.childLength = this.el.children.length;
|
|
2271
|
-
this.parseItems(this._contextMenu);
|
|
2272
|
-
}
|
|
2273
|
-
/**
|
|
2274
|
-
* @ComponentMethod
|
|
2275
|
-
*/
|
|
2276
|
-
componentDidLoad() {
|
|
2277
|
-
// if (!this.disabled){
|
|
2278
|
-
// // if (this.selected) this.treeviewItemSelected.emit(this.itemObject)
|
|
2279
|
-
// if (this.checked){
|
|
2280
|
-
// // this.treeviewChecked.emit(this._id)
|
|
2281
|
-
// this.handleCheckMouseUp()
|
|
2282
|
-
// }
|
|
2283
|
-
// }
|
|
2284
|
-
if (!this.disabled && this.firstRun && this.checkTrigger) {
|
|
2285
|
-
this.firstRun = false;
|
|
2286
|
-
this.handleCheckMouseUp();
|
|
2287
|
-
}
|
|
2288
|
-
}
|
|
2289
|
-
/**
|
|
2290
|
-
* @desc
|
|
2291
|
-
* @returns {void}
|
|
2292
|
-
*/
|
|
2293
|
-
/* setIndeterminateState() {
|
|
2294
|
-
if(this.getAllChilds().length > 0) {
|
|
2295
|
-
|
|
2296
|
-
let state: string = 'uncheck'
|
|
2297
|
-
let allChecked: boolean = true
|
|
2298
|
-
let allUnchecked: boolean = true
|
|
2299
|
-
|
|
2300
|
-
this.getAllChilds().map((item) => {
|
|
2301
|
-
item.checked && (allUnchecked = false)
|
|
2302
|
-
!item.checked && (allChecked = false)
|
|
2303
|
-
});
|
|
2304
|
-
|
|
2305
|
-
!allChecked && !allUnchecked
|
|
2306
|
-
? state = 'indeterminate'
|
|
2307
|
-
: allChecked
|
|
2308
|
-
? state = 'determinate'
|
|
2309
|
-
: state = 'uncheck'
|
|
2310
|
-
|
|
2311
|
-
this.indeterminateState = state as any;
|
|
2312
|
-
|
|
2313
|
-
}
|
|
2314
|
-
} */
|
|
2315
|
-
/* @Watch('indeterminateState')
|
|
2316
|
-
onCheckedChange() {
|
|
2317
|
-
if (this.indeterminateState == 'determinate') {
|
|
2318
|
-
this.treeviewChecked.emit(this._id)
|
|
2319
|
-
}else if (this.indeterminateState == 'uncheck') {
|
|
2320
|
-
this.treeviewIndeterminateUnchecked.emit(this._id)
|
|
2321
|
-
this.checked = false
|
|
2322
|
-
}else{
|
|
2323
|
-
this.treeviewIndeterminateUnchecked.emit(this._id)
|
|
2324
|
-
this.checked = false
|
|
2325
|
-
}
|
|
2326
|
-
} */
|
|
2327
|
-
/**
|
|
2328
|
-
* @descc
|
|
2329
|
-
* @param event
|
|
2330
|
-
*/
|
|
2331
|
-
handletreeviewClearSelecteds(event) {
|
|
2332
|
-
if (!this.disabled) {
|
|
2333
|
-
if (event.detail && event.detail !== this.itemObject)
|
|
2334
|
-
this.selected = false;
|
|
2335
|
-
}
|
|
2336
|
-
}
|
|
2337
|
-
/**
|
|
2338
|
-
* @descc
|
|
2339
|
-
* @param event
|
|
2340
|
-
*/
|
|
2341
|
-
ListentreeviewChange() {
|
|
2342
|
-
//this.setIndeterminateState();
|
|
2343
|
-
}
|
|
2344
|
-
/**
|
|
2345
|
-
* @descc
|
|
2346
|
-
* @param event
|
|
2347
|
-
*/
|
|
2348
|
-
ListentreeviewShowContext(event) {
|
|
2349
|
-
this.contextOffsetTop = event.detail[1];
|
|
2350
|
-
this.contextOffsetLeft = event.detail[2];
|
|
2351
|
-
if (event.detail[0] && event.detail[0] === this._id) {
|
|
2352
|
-
this.contextMenuShow = true;
|
|
2353
|
-
}
|
|
2354
|
-
else {
|
|
2355
|
-
this.contextMenuShow = false;
|
|
2356
|
-
}
|
|
2357
|
-
}
|
|
2358
|
-
/**
|
|
2359
|
-
* @desc
|
|
2360
|
-
* @param event
|
|
2361
|
-
*/
|
|
2362
|
-
handleWindowClick(event) {
|
|
2363
|
-
const target = event.target;
|
|
2364
|
-
if (target === this.el)
|
|
2365
|
-
return;
|
|
2366
|
-
this.contextMenuShow = false;
|
|
2367
|
-
}
|
|
2368
|
-
/**
|
|
2369
|
-
* @desc
|
|
2370
|
-
*/
|
|
2371
|
-
handleClick() {
|
|
2372
|
-
if (!this.disabled) {
|
|
2373
|
-
this.selected = true;
|
|
2374
|
-
this.treeviewItemSelected.emit(this.itemObject);
|
|
2375
|
-
}
|
|
2376
|
-
}
|
|
2377
|
-
/**
|
|
2378
|
-
* @desc
|
|
2379
|
-
*/
|
|
2380
|
-
handleFavClick(e) {
|
|
2381
|
-
if (!this.disabled) {
|
|
2382
|
-
this.favorite = !this.favorite;
|
|
2383
|
-
if (!this.itemObject["rightSlot"]) {
|
|
2384
|
-
this.itemObject["rightSlot"] = {};
|
|
2385
|
-
}
|
|
2386
|
-
this.itemObject["rightSlot"]["favorite"] = this.favorite;
|
|
2387
|
-
this.favoriteStatus.emit(this.itemObject);
|
|
2388
|
-
e.stopPropagation();
|
|
2389
|
-
e.preventDefault();
|
|
2390
|
-
}
|
|
2391
|
-
}
|
|
2392
|
-
/**
|
|
2393
|
-
* @desc
|
|
2394
|
-
*/
|
|
2395
|
-
handleOpen() {
|
|
2396
|
-
this.open = !this.open;
|
|
2397
|
-
}
|
|
2398
|
-
getRootChilds(element = this.el) {
|
|
2399
|
-
return utils.getChilds(element, 'bcm-treeview-item');
|
|
2400
|
-
}
|
|
2401
|
-
getAllChilds(element = this.el) {
|
|
2402
|
-
let returnAllItems = [];
|
|
2403
|
-
utils.getChilds(element, 'bcm-treeview-item').forEach(items => {
|
|
2404
|
-
this.getAllChilds(items) && (returnAllItems = [...returnAllItems, ...this.getAllChilds(items)]);
|
|
2405
|
-
returnAllItems = [...returnAllItems,
|
|
2406
|
-
items
|
|
2407
|
-
];
|
|
2408
|
-
});
|
|
2409
|
-
return returnAllItems;
|
|
2410
|
-
}
|
|
2411
|
-
/**
|
|
2412
|
-
* @desc
|
|
2413
|
-
* -
|
|
2414
|
-
*/
|
|
2415
|
-
checkGroupState() {
|
|
2416
|
-
// debugger;
|
|
2417
|
-
const childsRoot = this.getRootChilds();
|
|
2418
|
-
let [state, allChecked, allUnchecked] = ['uncheck', true, true];
|
|
2419
|
-
if (childsRoot.length > 0) {
|
|
2420
|
-
childsRoot.forEach(checkbox => {
|
|
2421
|
-
(checkbox.checked || checkbox.indeterminateState === 'indeterminate') && (allUnchecked = false);
|
|
2422
|
-
!checkbox.checked && (allChecked = false);
|
|
2423
|
-
});
|
|
2424
|
-
!allChecked && !allUnchecked
|
|
2425
|
-
? state = 'indeterminate'
|
|
2426
|
-
: allChecked
|
|
2427
|
-
? state = 'determinate'
|
|
2428
|
-
: state = 'uncheck';
|
|
2429
|
-
this.indeterminateState = state;
|
|
2430
|
-
if (state === 'determinate') {
|
|
2431
|
-
this.checked = true;
|
|
2432
|
-
// if(this.checked) {
|
|
2433
|
-
this.treeviewChecked.emit(this._id);
|
|
2434
|
-
// }
|
|
2435
|
-
}
|
|
2436
|
-
else {
|
|
2437
|
-
this.checked = false;
|
|
2438
|
-
this.treeviewUnchecked.emit(this._id);
|
|
2439
|
-
}
|
|
2440
|
-
}
|
|
2441
|
-
else {
|
|
2442
|
-
if (this.checked) {
|
|
2443
|
-
this.checked = false;
|
|
2444
|
-
this.treeviewUnchecked.emit(this._id);
|
|
2445
|
-
}
|
|
2446
|
-
else {
|
|
2447
|
-
this.checked = true;
|
|
2448
|
-
this.treeviewChecked.emit(this._id);
|
|
2449
|
-
}
|
|
2450
|
-
}
|
|
2451
|
-
}
|
|
2452
|
-
/**
|
|
2453
|
-
* @Event
|
|
2454
|
-
* @desc
|
|
2455
|
-
* -
|
|
2456
|
-
*/
|
|
2457
|
-
handleCheckMouseUp() {
|
|
2458
|
-
const checked = this.checked;
|
|
2459
|
-
const state = this.indeterminateState;
|
|
2460
|
-
if (!this.hasChild) {
|
|
2461
|
-
!checked
|
|
2462
|
-
? this.checked = true
|
|
2463
|
-
: this.checked = false;
|
|
2464
|
-
if (this.checked) {
|
|
2465
|
-
this.treeviewChecked.emit(this._id);
|
|
2466
|
-
}
|
|
2467
|
-
else {
|
|
2468
|
-
this.treeviewUnchecked.emit(this._id);
|
|
2469
|
-
}
|
|
2470
|
-
this.groupCheck.emit(this.parentId);
|
|
2471
|
-
return;
|
|
2472
|
-
}
|
|
2473
|
-
const childs = this.getAllChilds();
|
|
2474
|
-
if (state === 'indeterminate' || state === 'uncheck') {
|
|
2475
|
-
childs.forEach(child => {
|
|
2476
|
-
child.checked = true;
|
|
2477
|
-
// if(this.checked) {
|
|
2478
|
-
this.treeviewChecked.emit(child._id);
|
|
2479
|
-
// }
|
|
2480
|
-
child.indeterminateState = 'determined';
|
|
2481
|
-
});
|
|
2482
|
-
}
|
|
2483
|
-
else {
|
|
2484
|
-
childs.forEach(child => {
|
|
2485
|
-
child.checked = false;
|
|
2486
|
-
this.treeviewUnchecked.emit(child._id);
|
|
2487
|
-
child.indeterminateState = 'uncheck';
|
|
2488
|
-
});
|
|
2489
|
-
}
|
|
2490
|
-
this.checkGroupState();
|
|
2491
|
-
this.groupCheck.emit(this.parentId);
|
|
2492
|
-
}
|
|
2493
|
-
checkGroup(e) {
|
|
2494
|
-
const { detail: groupId } = e;
|
|
2495
|
-
if (!groupId || this._id !== groupId)
|
|
2496
|
-
return;
|
|
2497
|
-
this.checkGroupState();
|
|
2498
|
-
this.groupCheck.emit(this.parentId);
|
|
2499
|
-
}
|
|
2500
|
-
/**
|
|
2501
|
-
* @desc
|
|
2502
|
-
* @param item
|
|
2503
|
-
*/
|
|
2504
|
-
contextItemRenderer(item) {
|
|
2505
|
-
return (index.h("span", null, item.title));
|
|
2506
|
-
}
|
|
2507
|
-
/**
|
|
2508
|
-
* @desc
|
|
2509
|
-
* @param newValue
|
|
2510
|
-
* @returns {void}
|
|
2511
|
-
*/
|
|
2512
|
-
parseItems(newValue) {
|
|
2513
|
-
if (newValue) {
|
|
2514
|
-
typeof newValue == 'string'
|
|
2515
|
-
? this.contextMenu = JSON.parse(newValue)
|
|
2516
|
-
: this.contextMenu = newValue;
|
|
2517
|
-
}
|
|
2518
|
-
}
|
|
2519
|
-
render() {
|
|
2520
|
-
const { _id, text, tooltipText, size, icon, open, childLength, checkboxes, showIcon, checked, indeterminateState, focused, contextMenuShow } = this;
|
|
2521
|
-
const menuPadding = this.menuPadding + 'px';
|
|
2522
|
-
const textContent = index$1.classnames('text-content', size, 'size-2'
|
|
2523
|
-
// {
|
|
2524
|
-
// 'size-2': size === 'small' || size === 'medium',
|
|
2525
|
-
// 'size-3': size === 'large',
|
|
2526
|
-
// }
|
|
2527
|
-
);
|
|
2528
|
-
const classes = index$1.classnames('treeview-item', {
|
|
2529
|
-
'focus': focused,
|
|
2530
|
-
'open': open,
|
|
2531
|
-
'selected': this.selected
|
|
2532
|
-
});
|
|
2533
|
-
const treeviewContextMenu = index$1.classnames('treeview-item-context-menu', {
|
|
2534
|
-
'show': contextMenuShow
|
|
2535
|
-
});
|
|
2536
|
-
const treeviewInner = index$1.classnames('treeview-inner', {
|
|
2537
|
-
'open': open,
|
|
2538
|
-
});
|
|
2539
|
-
const indeterminate = index$1.classnames('indeterminate', {
|
|
2540
|
-
'disabled': this.disabled,
|
|
2541
|
-
});
|
|
2542
|
-
const treeviewItemContainer = index$1.classnames('treeview-item-container', {
|
|
2543
|
-
'selected': this.selected,
|
|
2544
|
-
'disabled': this.disabled
|
|
2545
|
-
});
|
|
2546
|
-
const collapseContent = index$1.classnames('collapse-content', {
|
|
2547
|
-
'child': childLength > 0,
|
|
2548
|
-
});
|
|
2549
|
-
const hostClasses = index$1.classnames(this.hidden ? 'hidden' : null);
|
|
2550
|
-
const faviconClass = index$1.classnames("favicon", {
|
|
2551
|
-
"favorite": this.favorite
|
|
2552
|
-
});
|
|
2553
|
-
return (index.h(index.Host, { class: hostClasses }, index.h("div", { class: classes }, index.h("div", { class: collapseContent, id: "collapse-button", onClick: () => childLength > 0 && this.handleOpen() }, childLength > 0 && (index.h("bcm-icon", { class: "collapse-icon", icon: `far fa-${open ? 'caret-down' : 'caret-right'}` }))), index.h("div", { class: treeviewItemContainer }, index.h("section", { onMouseUp: () => this.handleCheckMouseUp() }, checkboxes && (index.h("div", { class: "check-content" }, indeterminateState == 'indeterminate' && (index.h("span", { class: indeterminate })) || (index.h("bcm-checkbox", { id: 'check-' + _id, name: 'check-' + _id, checked: checked, disabled: this.disabled, noCaption: true })))), index.h("div", { class: textContent, onClick: () => this.handleClick(), title: tooltipText }, showIcon && icon && (index.h("bcm-icon", { class: "icon", icon: icon })), index.h("span", { id: "text" }, text))), this.favicon && (index.h("section", { class: faviconClass, onClick: (e) => this.handleFavClick(e) }, index.h("bcm-icon", { title: this.favorite ? "Click to remove from favorite list" : "Click to add to your favourites list", icon: "far fa-star" })))), !checkboxes && (index.h("div", { class: treeviewContextMenu, style: { top: this.contextOffsetTop + 'px', left: this.contextOffsetLeft + 'px' } }, this.contextMenu.length !== 0 && this.contextMenu.map((item) => (this.contextItemRenderer(item)))))), index.h("div", { class: treeviewInner, style: { paddingLeft: menuPadding } }, index.h("slot", null))));
|
|
2554
|
-
}
|
|
2555
|
-
get el() { return index.getElement(this); }
|
|
2556
|
-
static get watchers() { return {
|
|
2557
|
-
"_contextMenu": ["parseItems"]
|
|
2558
|
-
}; }
|
|
2559
|
-
};
|
|
2560
|
-
BcmtreeviewItem.style = treeviewItemCss;
|
|
2561
|
-
|
|
2562
|
-
exports.bcm_checkbox_lite = BcmCheckboxLite;
|
|
2563
|
-
exports.bcm_divider = BcmDivider;
|
|
2564
|
-
exports.bcm_empty = BcmEmpty;
|
|
2565
|
-
exports.bcm_listbox = BcmListbox;
|
|
2566
|
-
exports.bcm_listbox_group = BcmListboxGroup;
|
|
2567
|
-
exports.bcm_listbox_item = BcmListboxItem;
|
|
2568
|
-
exports.bcm_old_search = BcmOldSearch;
|
|
2569
|
-
exports.bcm_treeview = Bcmtreeview;
|
|
2570
|
-
exports.bcm_treeview_item = BcmtreeviewItem;
|