bromcom-ui 2.9.0-rc.8 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bromcom-ui/bromcom-ui.css +1 -1
- package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
- package/dist/bromcom-ui/global/global.js +6 -0
- package/dist/bromcom-ui/global/helper/toast.ts +2 -0
- package/dist/bromcom-ui/p-08c75801.js +5 -0
- package/dist/bromcom-ui/p-0dacfdbc.entry.js +5 -0
- package/dist/bromcom-ui/{p-24f0e23a.entry.js → p-13f6e1a7.entry.js} +1 -1
- package/dist/bromcom-ui/{p-5c3e9ac9.entry.js → p-14cafd64.entry.js} +1 -1
- package/dist/bromcom-ui/p-170cf07d.js +6 -0
- package/dist/bromcom-ui/p-19634d99.js +5 -0
- package/dist/bromcom-ui/{p-e4477593.entry.js → p-1c801d0c.entry.js} +1 -1
- package/dist/bromcom-ui/{p-48f85544.entry.js → p-1c9314bd.entry.js} +1 -1
- package/dist/bromcom-ui/{p-6bcaf906.entry.js → p-1cfe5a5d.entry.js} +1 -1
- package/dist/bromcom-ui/p-20ba9769.entry.js +5 -0
- package/dist/bromcom-ui/{p-8ded5483.entry.js → p-228c74e9.entry.js} +1 -1
- package/dist/bromcom-ui/{p-65f01d32.entry.js → p-22eb4e12.entry.js} +1 -1
- package/dist/bromcom-ui/{p-f331e009.entry.js → p-26290ed5.entry.js} +1 -1
- package/dist/bromcom-ui/{p-240151d4.entry.js → p-2aaeb247.entry.js} +1 -1
- package/dist/bromcom-ui/{p-73ca7c0a.entry.js → p-2b822458.entry.js} +1 -1
- package/dist/bromcom-ui/{p-dbc4c30c.js → p-2c5a0863.js} +1 -1
- package/dist/bromcom-ui/p-304bfa08.entry.js +5 -0
- package/dist/bromcom-ui/p-3432a82d.js +19 -0
- package/dist/bromcom-ui/p-399bce44.entry.js +5 -0
- package/dist/bromcom-ui/p-41cea609.entry.js +7 -0
- package/dist/bromcom-ui/{p-6c3e9e10.entry.js → p-430c0a24.entry.js} +1 -1
- package/dist/bromcom-ui/p-434c170e.js +5 -0
- package/dist/bromcom-ui/{p-d0bb9a84.entry.js → p-440bbaaa.entry.js} +1 -1
- package/dist/bromcom-ui/p-47400be4.entry.js +5 -0
- package/dist/bromcom-ui/{p-f5bed571.entry.js → p-4a2de9ce.entry.js} +1 -1
- package/dist/bromcom-ui/p-4f42085a.entry.js +5 -0
- package/dist/bromcom-ui/{p-ff48f5b2.entry.js → p-5232e011.entry.js} +1 -1
- package/dist/bromcom-ui/p-53e91ae6.js +5 -0
- package/dist/bromcom-ui/{p-c75519d5.js → p-54211561.js} +1 -1
- package/dist/bromcom-ui/{p-dc2c4b14.entry.js → p-5699f67d.entry.js} +1 -1
- package/dist/bromcom-ui/p-5871767a.entry.js +5 -0
- package/dist/bromcom-ui/{p-45767d1d.entry.js → p-588165ef.entry.js} +1 -1
- package/dist/bromcom-ui/p-5916e844.entry.js +5 -0
- package/dist/bromcom-ui/{p-499bb928.entry.js → p-5fb0f815.entry.js} +1 -1
- package/dist/bromcom-ui/{p-2fc584c4.js → p-61db1f1f.js} +1 -1
- package/dist/bromcom-ui/{p-89e1d8c5.entry.js → p-626b805d.entry.js} +1 -1
- package/dist/bromcom-ui/{p-d389b202.entry.js → p-647de93f.entry.js} +1 -1
- package/dist/bromcom-ui/p-64fad38b.js +11 -0
- package/dist/bromcom-ui/{p-03134b6f.entry.js → p-67343ad8.entry.js} +1 -1
- package/dist/bromcom-ui/{p-bd51d347.entry.js → p-69260d36.entry.js} +1 -1
- package/dist/bromcom-ui/p-6cf1e8a2.entry.js +5 -0
- package/dist/bromcom-ui/{p-4aa0e6b1.js → p-6edf985f.js} +1 -1
- package/dist/bromcom-ui/p-73ec379d.entry.js +5 -0
- package/dist/bromcom-ui/{p-3cde7f38.js → p-74e6d2b6.js} +1 -1
- package/dist/bromcom-ui/p-75ec5cc6.entry.js +5 -0
- package/dist/bromcom-ui/p-784a7bb0.entry.js +5 -0
- package/dist/bromcom-ui/p-78f0fe00.js +5 -0
- package/dist/bromcom-ui/p-7b05abe8.entry.js +5 -0
- package/dist/bromcom-ui/{p-d995750a.entry.js → p-7c5763cc.entry.js} +1 -1
- package/dist/bromcom-ui/p-7cb30513.js +5 -0
- package/dist/bromcom-ui/{p-81eeccfa.entry.js → p-7d18ce0e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-5ae0a59b.js → p-7e44e6b5.js} +1 -1
- package/dist/bromcom-ui/p-80ee3d97.entry.js +5 -0
- package/dist/bromcom-ui/p-822d590f.entry.js +5 -0
- package/dist/bromcom-ui/p-85eedabc.js +5 -0
- package/dist/bromcom-ui/p-89a28750.entry.js +5 -0
- package/dist/bromcom-ui/{p-3c7a0345.js → p-8c018ae0.js} +1 -1
- package/dist/bromcom-ui/p-8f45ba5f.entry.js +5 -0
- package/dist/bromcom-ui/p-9075a184.entry.js +5 -0
- package/dist/bromcom-ui/{p-f58c1fbe.entry.js → p-913c55ee.entry.js} +1 -1
- package/dist/bromcom-ui/p-9164639f.entry.js +5 -0
- package/dist/bromcom-ui/p-9850cbce.js +5 -0
- package/dist/bromcom-ui/{p-8bcfe3b3.entry.js → p-99824717.entry.js} +1 -1
- package/dist/bromcom-ui/p-9bd5f3b4.entry.js +5 -0
- package/dist/bromcom-ui/{p-6aeaef2a.entry.js → p-a006e404.entry.js} +1 -1
- package/dist/bromcom-ui/{p-e9842c26.js → p-a0ba474b.js} +1 -1
- package/dist/bromcom-ui/{p-b60bcecf.js → p-a1b1750c.js} +1 -1
- package/dist/bromcom-ui/{p-8fcb5846.js → p-a2c364af.js} +1 -1
- package/dist/bromcom-ui/p-a40a5474.entry.js +5 -0
- package/dist/bromcom-ui/{p-7c6e3ae5.entry.js → p-a664cc20.entry.js} +1 -1
- package/dist/bromcom-ui/p-a9eb0321.js +315 -0
- package/dist/bromcom-ui/{p-2acd6bee.entry.js → p-ab0b4d1e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ea4d8a18.entry.js → p-ae57f046.entry.js} +1 -1
- package/dist/bromcom-ui/{p-2caa75a4.entry.js → p-b4f033b4.entry.js} +1 -1
- package/dist/bromcom-ui/p-b81e8f91.js +5 -0
- package/dist/bromcom-ui/{p-503feae9.entry.js → p-b8a8bd1d.entry.js} +1 -1
- package/dist/bromcom-ui/{p-b4ac5904.js → p-b901e1ce.js} +1 -1
- package/dist/bromcom-ui/p-ba74a838.entry.js +5 -0
- package/dist/bromcom-ui/{p-c42dffea.entry.js → p-ba949d4a.entry.js} +1 -1
- package/dist/bromcom-ui/{p-f4538abb.entry.js → p-ba9eff2a.entry.js} +1 -1
- package/dist/bromcom-ui/{p-fb4b5224.entry.js → p-bd2b6de5.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ebee9f45.entry.js → p-c1a992e7.entry.js} +1 -1
- package/dist/bromcom-ui/{p-908b1b5d.js → p-c8751181.js} +1 -1
- package/dist/bromcom-ui/p-ccf0872d.js +5 -0
- package/dist/bromcom-ui/p-cf659967.entry.js +5 -0
- package/dist/bromcom-ui/{p-8d0ca8c2.js → p-d153c7fc.js} +1 -1
- package/dist/bromcom-ui/p-d3db9e02.entry.js +5 -0
- package/dist/bromcom-ui/{p-7ddaedb7.entry.js → p-d551a51d.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ec36d0c0.entry.js → p-d68c2c0a.entry.js} +1 -1
- package/dist/bromcom-ui/{p-e5a0d8f6.entry.js → p-d724cfa9.entry.js} +1 -1
- package/dist/bromcom-ui/{p-af0a447d.entry.js → p-d7ca94e1.entry.js} +1 -1
- package/dist/bromcom-ui/p-dd49ae28.entry.js +5 -0
- package/dist/bromcom-ui/p-e2294927.entry.js +5 -0
- package/dist/bromcom-ui/{p-1b1f4b44.entry.js → p-e688b044.entry.js} +1 -1
- package/dist/bromcom-ui/p-ec0224fb.entry.js +5 -0
- package/dist/bromcom-ui/{p-6ca980dd.entry.js → p-ece578ef.entry.js} +1 -1
- package/dist/bromcom-ui/{p-1be22601.entry.js → p-ef8c5b55.entry.js} +1 -1
- package/dist/bromcom-ui/p-f711588b.js +5 -0
- package/dist/bromcom-ui/p-fe1f2413.entry.js +5 -0
- package/dist/bromcom-ui/{p-a82f2b2a.entry.js → p-fe83cdd3.entry.js} +1 -1
- package/dist/bromcom-ui/{p-f619f9f9.entry.js → p-fff1a0f9.entry.js} +1 -1
- package/dist/bromcom-ui/static/message-bot.svg +2 -2
- package/dist/cjs/{_commonjsHelpers-bd20f4c0.js → _commonjsHelpers-ed84c3ca.js} +16 -0
- package/dist/cjs/{bcm-ab921827.js → bcm-7f703055.js} +33 -31
- package/dist/cjs/bcm-accordion.cjs.entry.js +5 -5
- package/dist/cjs/bcm-alert.cjs.entry.js +9 -9
- package/dist/cjs/bcm-attendance.cjs.entry.js +5 -5
- package/dist/cjs/bcm-autocomplete.cjs.entry.js +3 -3
- package/dist/cjs/bcm-avatar_2.cjs.entry.js +209 -0
- package/dist/cjs/bcm-box.cjs.entry.js +1 -1
- package/dist/cjs/bcm-breadcrumb.cjs.entry.js +6 -6
- package/dist/cjs/bcm-button-group.cjs.entry.js +11 -11
- package/dist/cjs/bcm-button_15.cjs.entry.js +35172 -0
- package/dist/cjs/bcm-card.cjs.entry.js +10 -10
- package/dist/cjs/bcm-checkbox-group.cjs.entry.js +29 -29
- package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +10 -10
- package/dist/cjs/{bcm-checkbox.cjs.entry.js → bcm-checkbox_2.cjs.entry.js} +28 -17
- package/dist/cjs/bcm-chip-group.cjs.entry.js +15 -16
- package/dist/cjs/bcm-chip.cjs.entry.js +7 -7
- package/dist/cjs/bcm-collapse-group.cjs.entry.js +1 -1
- package/dist/cjs/bcm-collapse.cjs.entry.js +6 -6
- package/dist/cjs/bcm-color-input.cjs.entry.js +10 -11
- package/dist/cjs/bcm-colorpicker.cjs.entry.js +3 -3
- package/dist/cjs/bcm-content.cjs.entry.js +1 -1
- package/dist/cjs/bcm-default.cjs.entry.js +5 -5
- package/dist/cjs/bcm-drawer.cjs.entry.js +13 -14
- package/dist/cjs/bcm-dropdown.cjs.entry.js +119 -0
- package/dist/cjs/bcm-error-layout.cjs.entry.js +3 -3
- package/dist/cjs/bcm-expansion-panel.cjs.entry.js +9 -9
- package/dist/cjs/bcm-form-group.cjs.entry.js +1 -1
- package/dist/cjs/bcm-input-custom.cjs.entry.js +6 -6
- package/dist/cjs/bcm-input-dropdown.cjs.entry.js +309 -0
- package/dist/cjs/bcm-item.cjs.entry.js +72 -0
- package/dist/cjs/bcm-items.cjs.entry.js +49 -0
- package/dist/cjs/bcm-link.cjs.entry.js +6 -6
- package/dist/cjs/bcm-list_3.cjs.entry.js +169 -1691
- package/dist/cjs/bcm-menu.cjs.entry.js +150 -0
- package/dist/cjs/bcm-message.cjs.entry.js +3 -3
- package/dist/cjs/bcm-modal-2-footer.cjs.entry.js +11 -12
- package/dist/cjs/bcm-modal-2-header.cjs.entry.js +10 -11
- package/dist/cjs/bcm-modal-2.cjs.entry.js +12 -13
- package/dist/cjs/bcm-modal.cjs.entry.js +11 -11
- package/dist/cjs/bcm-notification.cjs.entry.js +3 -3
- package/dist/cjs/bcm-old-tag_2.cjs.entry.js +3 -3
- package/dist/cjs/bcm-overlay_2.cjs.entry.js +4 -4
- package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +10 -10
- package/dist/cjs/bcm-popconfirm.cjs.entry.js +9 -9
- package/dist/cjs/bcm-popover.cjs.entry.js +229 -0
- package/dist/cjs/bcm-progress.cjs.entry.js +9 -9
- package/dist/cjs/bcm-radio-group.cjs.entry.js +17 -18
- package/dist/cjs/bcm-radio.cjs.entry.js +18 -19
- package/dist/cjs/bcm-range.cjs.entry.js +10 -10
- package/dist/cjs/bcm-result.cjs.entry.js +3 -3
- package/dist/cjs/bcm-select-group.cjs.entry.js +3 -3
- package/dist/cjs/bcm-select-option.cjs.entry.js +3 -3
- package/dist/cjs/bcm-select.cjs.entry.js +5 -5
- package/dist/cjs/bcm-skeleton.cjs.entry.js +5 -5
- package/dist/cjs/bcm-step.cjs.entry.js +8 -8
- package/dist/cjs/bcm-stepper.cjs.entry.js +15 -16
- package/dist/cjs/bcm-switch.cjs.entry.js +15 -15
- package/dist/cjs/bcm-tab-group.cjs.entry.js +209 -0
- package/dist/cjs/bcm-tab-item-header.cjs.entry.js +58 -0
- package/dist/cjs/bcm-tab-item.cjs.entry.js +90 -0
- package/dist/cjs/bcm-tab-pane.cjs.entry.js +3 -3
- package/dist/cjs/bcm-tab.cjs.entry.js +3 -3
- package/dist/cjs/bcm-table.cjs.entry.js +7648 -38
- package/dist/cjs/bcm-tabs-content.cjs.entry.js +3 -3
- package/dist/cjs/bcm-tabs.cjs.entry.js +3 -3
- package/dist/cjs/bcm-tag.cjs.entry.js +19 -19
- package/dist/cjs/bcm-text.cjs.entry.js +49 -0
- package/dist/cjs/bcm-textarea.cjs.entry.js +13 -13
- package/dist/cjs/bcm-timeline-item.cjs.entry.js +3 -3
- package/dist/cjs/bcm-timeline.cjs.entry.js +3 -3
- package/dist/cjs/bcm-toast.cjs.entry.js +38 -19
- package/dist/cjs/bcm-treeview-group.cjs.entry.js +1 -1
- package/dist/cjs/bromcom-ui.cjs.js +5 -4
- package/dist/cjs/{caption-template-8d099fd6.js → caption-template-81dbc490.js} +2 -2
- package/dist/cjs/{color-helper-7ab15732.js → color-helper-c3a819ea.js} +1 -1
- package/dist/cjs/{colors-e1d142ad.js → colors-078851ec.js} +1 -1
- package/dist/cjs/{floating-ui-c9fc2202.js → floating-ui-b441ea7c.js} +2 -2
- package/dist/cjs/{generate-cae9c0fb.js → generate-1dfe001a.js} +2 -2
- package/dist/cjs/{global-3ce50f9f.js → global-4a6abd46.js} +6 -1
- package/dist/cjs/index-5279dea2.js +2571 -0
- package/dist/cjs/{index-906fb4e5.js → index-7eed931f.js} +1631 -25
- package/dist/cjs/{index-fdbf5226.js → index-95ae50d0.js} +1 -1
- package/dist/cjs/{index-ddfd6d8f.js → index-c591ecec.js} +4 -0
- package/dist/cjs/{index-4506fcd7.js → index-d321de96.js} +1 -1
- package/dist/cjs/{input-template-a7f8f2e9.js → input-template-41868c68.js} +8 -8
- package/dist/cjs/{is-load-decorator-137dded1.js → is-load-decorator-15036f37.js} +3 -2
- package/dist/cjs/{json-parse-decarator-34a3d26e.js → json-parse-decarator-f29c368a.js} +2 -2
- package/dist/cjs/{label-template-4d5f99a5.js → label-template-80235581.js} +5 -5
- package/dist/cjs/loader.cjs.js +5 -4
- package/dist/cjs/{number-helper-101d8aa8.js → number-helper-2b9c1f9d.js} +1 -1
- package/dist/cjs/old-bcm-popover-box.cjs.entry.js +11 -11
- package/dist/cjs/old-bcm-popover.cjs.entry.js +9 -9
- package/dist/cjs/{package-ed8b3296.js → package-66b81414.js} +1 -1
- package/dist/cjs/{popover-placement-ccb40073.js → popover-placement-f20020a6.js} +1 -1
- package/dist/cjs/{slot-template-d70ea082.js → slot-template-873b0cd5.js} +2 -2
- package/dist/cjs/{stepper-states-308c8d3e.js → stepper-states-6ccb8ab3.js} +3 -3
- package/dist/cjs/{string-helper-d681e5c7.js → string-helper-fda7cbba.js} +5 -5
- package/dist/cjs/tooltip-helper-0eb3ef13.js +157 -0
- package/dist/cjs/{validators-26badb68.js → validators-97a46a9e.js} +6 -1
- package/dist/cjs/watermark-2c23c8f1.js +47499 -0
- package/dist/collection/assets/csv.svg +9 -0
- package/dist/collection/assets/excel.svg +9 -0
- package/dist/collection/assets/pdf.svg +9 -0
- package/dist/collection/collection-manifest.json +5 -2
- package/dist/collection/components/atoms/avatar/avatar.js +21 -23
- package/dist/collection/components/atoms/avatar/avatar.style.js +24 -21
- package/dist/collection/components/atoms/badge/badge.js +2 -1
- package/dist/collection/components/atoms/badge/badge.style.js +36 -24
- package/dist/collection/components/atoms/button/button.css +55 -0
- package/dist/collection/components/atoms/button/button.js +1 -1
- package/dist/collection/components/atoms/icon/static/message-bot.svg +2 -2
- package/dist/collection/components/molecules/dropdown/dropdown.js +1 -1
- package/dist/collection/components/molecules/input/input.js +0 -2
- package/dist/collection/components/molecules/input-dropdown/input-dropdown.css +291 -0
- package/dist/collection/components/molecules/input-dropdown/input-dropdown.js +751 -0
- package/dist/collection/components/molecules/input-dropdown/input-dropdown.style.js +73 -0
- package/dist/collection/components/molecules/linked/linked.js +5 -29
- package/dist/collection/components/molecules/popconfirm/popconfirm.js +1 -1
- package/dist/collection/components/molecules/popover/popover.js +1 -1
- package/dist/collection/components/molecules/tooltip/tooltip.js +1 -1
- package/dist/collection/components/organism/date-picker/date-picker.css +1 -1
- package/dist/collection/components/organism/date-picker/date-picker.js +20 -1
- package/dist/collection/components/organism/datetime-picker/datetime-picker.css +13 -1
- package/dist/collection/components/organism/datetime-picker/datetime-picker.js +21 -1
- package/dist/collection/components/organism/form/form.js +1 -0
- package/dist/collection/components/organism/form-2/bcm-form-components.js +4 -1
- package/dist/collection/components/organism/list/list.css +1 -1
- package/dist/collection/components/organism/list/list.js +63 -22
- package/dist/collection/components/organism/time-picker/time-picker.css +1 -1
- package/dist/collection/components/organism/time-picker/time-picker.js +20 -1
- package/dist/collection/components/other/toast/toast.js +48 -11
- package/dist/collection/components/other_deprecated/old-popover/old-popover.js +1 -1
- package/dist/collection/components/third-parts/rc-picker/date.js +862 -0
- package/dist/collection/components/third-parts/rc-picker/rc-picker.css +1009 -0
- package/dist/collection/components/third-parts/rc-picker/rc-picker.js +550 -0
- package/dist/collection/components/third-parts/table/table-definations.js +42 -0
- package/dist/collection/components/third-parts/table/table.css +136 -0
- package/dist/collection/components/third-parts/table/table.js +288 -0
- package/dist/collection/decorators/bcm-decorator.js +28 -0
- package/dist/collection/decorators/event-decorator.js +31 -0
- package/dist/collection/decorators/index.js +1 -0
- package/dist/collection/decorators/is-load-decorator.js +2 -1
- package/dist/collection/global/global.js +6 -0
- package/dist/collection/global/helper/toast.js +1 -0
- package/dist/collection/global/helper/toast.ts +2 -0
- package/dist/collection/helper/string-helper.js +2 -2
- package/dist/collection/models/bcm.js +29 -27
- package/dist/collection/templates/index.js +2 -0
- package/dist/collection/templates/toolbar-hamburger-template.js +14 -0
- package/dist/collection/templates/toolbar-template.js +15 -0
- package/dist/components/_commonjsHelpers.js +16 -1
- package/dist/components/avatar.js +46 -44
- package/dist/components/badge.js +39 -70
- package/dist/components/bcm-chip-group.js +14 -8
- package/dist/components/bcm-date-picker.js +4 -2
- package/dist/components/bcm-date.d.ts +11 -0
- package/dist/components/bcm-date.js +232 -0
- package/dist/components/bcm-form-2.js +4 -1
- package/dist/components/bcm-form.js +1 -0
- package/dist/components/bcm-input-dropdown.d.ts +11 -0
- package/dist/components/bcm-input-dropdown.js +395 -0
- package/dist/components/bcm-rc-picker.d.ts +11 -0
- package/dist/components/bcm-rc-picker.js +10 -0
- package/dist/components/bcm-table.js +55128 -41
- package/dist/components/bcm-textarea.js +1 -214
- package/dist/components/bcm-time-picker.js +4 -2
- package/dist/components/bcm-toast.js +30 -10
- package/dist/components/bcm.js +29 -27
- package/dist/components/button.js +1 -1
- package/dist/components/chip.js +12 -6
- package/dist/components/colors2.js +1 -1
- package/dist/components/datetime-picker.js +5 -2
- package/dist/components/generate.js +1 -1
- package/dist/components/index.d.ts +4 -1
- package/dist/components/index.js +9 -1
- package/dist/components/index3.js +5 -1
- package/dist/components/index5.js +2569 -0
- package/dist/components/input.js +0 -2
- package/dist/components/is-load-decorator.js +2 -1
- package/dist/components/linked.js +5 -11
- package/dist/components/list.js +22 -8
- package/dist/components/raf.js +1594 -0
- package/dist/components/rc-overflow.js +32 -1557
- package/dist/components/rc-picker.js +14030 -0
- package/dist/components/string-helper.js +2 -2
- package/dist/components/textarea.js +220 -0
- package/dist/esm/{_commonjsHelpers-3016b722.js → _commonjsHelpers-7002e5de.js} +16 -1
- package/dist/esm/bcm-accordion.entry.js +5 -5
- package/dist/esm/bcm-alert.entry.js +9 -9
- package/dist/esm/bcm-attendance.entry.js +5 -5
- package/dist/esm/bcm-autocomplete.entry.js +3 -3
- package/dist/esm/bcm-avatar_2.entry.js +204 -0
- package/dist/esm/bcm-box.entry.js +1 -1
- package/dist/esm/bcm-breadcrumb.entry.js +6 -6
- package/dist/esm/bcm-button-group.entry.js +8 -8
- package/dist/esm/bcm-button_15.entry.js +35154 -0
- package/dist/esm/bcm-card.entry.js +11 -11
- package/dist/esm/bcm-checkbox-group.entry.js +19 -19
- package/dist/esm/bcm-checkbox-lite_9.entry.js +8 -8
- package/dist/esm/{bcm-checkbox.entry.js → bcm-checkbox_2.entry.js} +24 -14
- package/dist/esm/bcm-chip-group.entry.js +16 -17
- package/dist/esm/bcm-chip.entry.js +8 -8
- package/dist/esm/bcm-collapse-group.entry.js +2 -2
- package/dist/esm/bcm-collapse.entry.js +6 -6
- package/dist/esm/bcm-color-input.entry.js +12 -13
- package/dist/esm/bcm-colorpicker.entry.js +5 -5
- package/dist/esm/bcm-content.entry.js +1 -1
- package/dist/esm/{bcm-9f50af9c.js → bcm-d45dc47d.js} +30 -28
- package/dist/esm/bcm-default.entry.js +5 -5
- package/dist/esm/bcm-drawer.entry.js +13 -14
- package/dist/esm/bcm-dropdown.entry.js +115 -0
- package/dist/esm/bcm-error-layout.entry.js +3 -3
- package/dist/esm/bcm-expansion-panel.entry.js +10 -10
- package/dist/esm/bcm-form-group.entry.js +1 -1
- package/dist/esm/bcm-input-custom.entry.js +6 -6
- package/dist/esm/bcm-input-dropdown.entry.js +305 -0
- package/dist/esm/bcm-item.entry.js +68 -0
- package/dist/esm/bcm-items.entry.js +45 -0
- package/dist/esm/bcm-link.entry.js +4 -4
- package/dist/esm/bcm-list_3.entry.js +93 -1615
- package/dist/esm/bcm-menu.entry.js +146 -0
- package/dist/esm/bcm-message.entry.js +3 -3
- package/dist/esm/bcm-modal-2-footer.entry.js +13 -14
- package/dist/esm/bcm-modal-2-header.entry.js +12 -13
- package/dist/esm/bcm-modal-2.entry.js +13 -14
- package/dist/esm/bcm-modal.entry.js +9 -9
- package/dist/esm/bcm-notification.entry.js +3 -3
- package/dist/esm/bcm-old-tag_2.entry.js +4 -4
- package/dist/esm/bcm-overlay_2.entry.js +4 -4
- package/dist/esm/bcm-popconfirm-box.entry.js +11 -11
- package/dist/esm/bcm-popconfirm.entry.js +7 -7
- package/dist/esm/bcm-popover.entry.js +225 -0
- package/dist/esm/bcm-progress.entry.js +9 -9
- package/dist/esm/bcm-radio-group.entry.js +15 -16
- package/dist/esm/bcm-radio.entry.js +13 -14
- package/dist/esm/bcm-range.entry.js +8 -8
- package/dist/esm/bcm-result.entry.js +3 -3
- package/dist/esm/bcm-select-group.entry.js +3 -3
- package/dist/esm/bcm-select-option.entry.js +3 -3
- package/dist/esm/bcm-select.entry.js +6 -6
- package/dist/esm/bcm-skeleton.entry.js +5 -5
- package/dist/esm/bcm-step.entry.js +8 -8
- package/dist/esm/bcm-stepper.entry.js +15 -16
- package/dist/esm/bcm-switch.entry.js +10 -10
- package/dist/esm/bcm-tab-group.entry.js +205 -0
- package/dist/esm/bcm-tab-item-header.entry.js +54 -0
- package/dist/esm/bcm-tab-item.entry.js +86 -0
- package/dist/esm/bcm-tab-pane.entry.js +3 -3
- package/dist/esm/bcm-tab.entry.js +3 -3
- package/dist/esm/bcm-table.entry.js +7649 -39
- package/dist/esm/bcm-tabs-content.entry.js +4 -4
- package/dist/esm/bcm-tabs.entry.js +4 -4
- package/dist/esm/bcm-tag.entry.js +9 -9
- package/dist/esm/bcm-text.entry.js +45 -0
- package/dist/esm/bcm-textarea.entry.js +11 -11
- package/dist/esm/bcm-timeline-item.entry.js +3 -3
- package/dist/esm/bcm-timeline.entry.js +3 -3
- package/dist/esm/bcm-toast.entry.js +38 -19
- package/dist/esm/bcm-treeview-group.entry.js +1 -1
- package/dist/esm/bromcom-ui.js +6 -5
- package/dist/esm/{caption-template-34a1cb44.js → caption-template-d47f338f.js} +2 -2
- package/dist/esm/{color-helper-116755ed.js → color-helper-845ba523.js} +2 -2
- package/dist/esm/{colors-44c95e7e.js → colors-ebea297f.js} +1 -1
- package/dist/esm/{element-dragger-7ea06c76.js → element-dragger-89bb52fd.js} +1 -1
- package/dist/esm/{floating-ui-e7341329.js → floating-ui-8a0c54d6.js} +1 -1
- package/dist/esm/{generate-e008f24f.js → generate-7a1258c4.js} +2 -2
- package/dist/esm/{global-9c04f017.js → global-032592ad.js} +6 -1
- package/dist/esm/{index-ed9652af.js → index-00c8a8f7.js} +1 -1
- package/dist/esm/{index-348b16ad.js → index-0615c2b8.js} +3 -1
- package/dist/esm/index-3bc8c6e3.js +2569 -0
- package/dist/esm/{index-0052017c.js → index-7e71bbc8.js} +1 -1
- package/dist/esm/{index-6310a048.js → index-e4b6a4ce.js} +1616 -26
- package/dist/esm/{input-template-0bdd4dda.js → input-template-68c29fde.js} +4 -4
- package/dist/esm/{is-load-decorator-07d3502a.js → is-load-decorator-8277e3b8.js} +3 -2
- package/dist/esm/{json-parse-decarator-40fc5701.js → json-parse-decarator-2945634b.js} +2 -2
- package/dist/esm/{label-template-98dafeb3.js → label-template-946d4062.js} +4 -4
- package/dist/esm/loader.js +6 -5
- package/dist/esm/{number-helper-ddce4326.js → number-helper-fe7d1aca.js} +1 -1
- package/dist/esm/old-bcm-popover-box.entry.js +13 -13
- package/dist/esm/old-bcm-popover.entry.js +7 -7
- package/dist/esm/{package-00ece356.js → package-acbf2052.js} +1 -1
- package/dist/esm/{popover-placement-78f86f15.js → popover-placement-be68c848.js} +1 -1
- package/dist/esm/{slot-template-672e941d.js → slot-template-fcc7846e.js} +2 -2
- package/dist/esm/{stepper-states-56644bc7.js → stepper-states-9ab8511e.js} +3 -3
- package/dist/esm/{string-helper-6bd24967.js → string-helper-b0e05041.js} +4 -4
- package/dist/esm/tooltip-helper-e5246812.js +155 -0
- package/dist/esm/{utils-b3338faf.js → utils-57652744.js} +1 -1
- package/dist/esm/{validators-77fbe47e.js → validators-22975416.js} +6 -2
- package/dist/esm/watermark-f2c6a1f9.js +47477 -0
- package/dist/types/components/atoms/avatar/avatar.d.ts +0 -2
- package/dist/types/components/atoms/avatar/avatar.style.d.ts +181 -5
- package/dist/types/components/atoms/badge/badge.style.d.ts +174 -4
- package/dist/types/components/molecules/input-dropdown/input-dropdown.d.ts +51 -0
- package/dist/types/components/molecules/input-dropdown/input-dropdown.style.d.ts +307 -0
- package/dist/types/components/molecules/linked/linked.d.ts +1 -3
- package/dist/types/components/organism/date-picker/date-picker.d.ts +1 -0
- package/dist/types/components/organism/datetime-picker/datetime-picker.d.ts +1 -0
- package/dist/types/components/organism/list/list.d.ts +4 -0
- package/dist/types/components/organism/time-picker/time-picker.d.ts +1 -0
- package/dist/types/components/other/toast/toast.d.ts +2 -0
- package/dist/types/components/third-parts/rc-picker/date.d.ts +175 -0
- package/dist/types/components/third-parts/rc-picker/rc-picker.d.ts +47 -0
- package/dist/types/components/third-parts/table/table-definations.d.ts +28 -0
- package/dist/types/components/third-parts/table/table.d.ts +37 -0
- package/dist/types/components.d.ts +244 -3
- package/dist/types/decorators/bcm-decorator.d.ts +2 -0
- package/dist/types/decorators/event-decorator.d.ts +2 -0
- package/dist/types/decorators/index.d.ts +1 -0
- package/dist/types/global/helper/toast.d.ts +2 -0
- package/dist/types/models/bcm.d.ts +256 -236
- package/dist/types/templates/index.d.ts +2 -0
- package/dist/types/templates/toolbar-hamburger-template.d.ts +12 -0
- package/dist/types/templates/toolbar-template.d.ts +13 -0
- package/helper/toast.d.ts +2 -0
- package/helper/toast.d.ts.map +1 -1
- package/helper/toast.js +1 -0
- package/package.json +9 -3
- package/dist/bromcom-ui/p-019b44bb.entry.js +0 -5
- package/dist/bromcom-ui/p-01a50abe.entry.js +0 -5
- package/dist/bromcom-ui/p-065e0f32.entry.js +0 -5
- package/dist/bromcom-ui/p-0cb5a92d.entry.js +0 -5
- package/dist/bromcom-ui/p-0f52bab9.entry.js +0 -5
- package/dist/bromcom-ui/p-15758356.entry.js +0 -5
- package/dist/bromcom-ui/p-1eabd5dc.js +0 -10
- package/dist/bromcom-ui/p-235023cc.entry.js +0 -5
- package/dist/bromcom-ui/p-2a7bdc8b.entry.js +0 -5
- package/dist/bromcom-ui/p-32028f4f.entry.js +0 -5
- package/dist/bromcom-ui/p-3a68eca1.js +0 -5
- package/dist/bromcom-ui/p-4484ed7d.entry.js +0 -5
- package/dist/bromcom-ui/p-4f8b00bc.entry.js +0 -5
- package/dist/bromcom-ui/p-4fd78dbb.entry.js +0 -5
- package/dist/bromcom-ui/p-54c0916c.js +0 -5
- package/dist/bromcom-ui/p-5d89f348.entry.js +0 -5
- package/dist/bromcom-ui/p-61c4745d.entry.js +0 -5
- package/dist/bromcom-ui/p-626a65e9.js +0 -5
- package/dist/bromcom-ui/p-663766cf.entry.js +0 -5
- package/dist/bromcom-ui/p-6d7fe687.js +0 -6
- package/dist/bromcom-ui/p-6f56f8ca.js +0 -5
- package/dist/bromcom-ui/p-74b2d896.js +0 -5
- package/dist/bromcom-ui/p-7f529bbe.entry.js +0 -5
- package/dist/bromcom-ui/p-9fe802bc.entry.js +0 -5
- package/dist/bromcom-ui/p-a19320bb.entry.js +0 -13
- package/dist/bromcom-ui/p-a429e85b.js +0 -5
- package/dist/bromcom-ui/p-a56e8c98.js +0 -5
- package/dist/bromcom-ui/p-a8033cda.entry.js +0 -5
- package/dist/bromcom-ui/p-a9692ed3.entry.js +0 -5
- package/dist/bromcom-ui/p-b1c83bb8.entry.js +0 -5
- package/dist/bromcom-ui/p-bddbd954.entry.js +0 -5
- package/dist/bromcom-ui/p-c49d038e.js +0 -5
- package/dist/bromcom-ui/p-c799b397.entry.js +0 -5
- package/dist/bromcom-ui/p-cf0ab7f0.entry.js +0 -5
- package/dist/bromcom-ui/p-d65a1e21.js +0 -11
- package/dist/bromcom-ui/p-d7f10f7f.js +0 -5
- package/dist/bromcom-ui/p-dd422dd1.js +0 -5
- package/dist/bromcom-ui/p-e09fa0dc.entry.js +0 -5
- package/dist/bromcom-ui/p-e32d9cfc.js +0 -5
- package/dist/bromcom-ui/p-ec6b45ba.entry.js +0 -5
- package/dist/bromcom-ui/p-f645d9ae.entry.js +0 -5
- package/dist/bromcom-ui/p-fdc3e5b8.entry.js +0 -5
- package/dist/cjs/bcm-avatar.cjs.entry.js +0 -127
- package/dist/cjs/bcm-badge_15.cjs.entry.js +0 -1739
- package/dist/cjs/bcm-colorful.cjs.entry.js +0 -17227
- package/dist/cjs/bcm-date-picker.cjs.entry.js +0 -181
- package/dist/cjs/bcm-datetime-picker.cjs.entry.js +0 -1449
- package/dist/cjs/bcm-form-2.cjs.entry.js +0 -209
- package/dist/cjs/bcm-form.cjs.entry.js +0 -488
- package/dist/cjs/bcm-input.cjs.entry.js +0 -371
- package/dist/cjs/bcm-label.cjs.entry.js +0 -45
- package/dist/cjs/bcm-old-input.cjs.entry.js +0 -397
- package/dist/cjs/bcm-time-picker.cjs.entry.js +0 -149
- package/dist/cjs/datetime-helper-eaf4fadb.js +0 -11
- package/dist/cjs/index-b08b037a.js +0 -52
- package/dist/collection/components/other/data-table/table.css +0 -130
- package/dist/collection/components/other/data-table/table.js +0 -88
- package/dist/esm/bcm-avatar.entry.js +0 -123
- package/dist/esm/bcm-badge_15.entry.js +0 -1721
- package/dist/esm/bcm-colorful.entry.js +0 -17223
- package/dist/esm/bcm-date-picker.entry.js +0 -177
- package/dist/esm/bcm-datetime-picker.entry.js +0 -1445
- package/dist/esm/bcm-form-2.entry.js +0 -205
- package/dist/esm/bcm-form.entry.js +0 -484
- package/dist/esm/bcm-input.entry.js +0 -367
- package/dist/esm/bcm-label.entry.js +0 -41
- package/dist/esm/bcm-old-input.entry.js +0 -393
- package/dist/esm/bcm-time-picker.entry.js +0 -145
- package/dist/esm/datetime-helper-df25808a.js +0 -9
- package/dist/esm/index-962dec74.js +0 -50
- package/dist/types/components/other/data-table/table.d.ts +0 -8
|
@@ -6,63 +6,60 @@
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
8
8
|
|
|
9
|
-
const index$
|
|
10
|
-
const isLoadDecorator = require('./is-load-decorator-
|
|
11
|
-
const jsonParseDecarator = require('./json-parse-decarator-
|
|
12
|
-
require('./color-helper-
|
|
13
|
-
require('./
|
|
14
|
-
const generate = require('./generate-
|
|
15
|
-
const numberHelper = require('./number-helper-
|
|
16
|
-
const stringHelper = require('./string-helper-
|
|
17
|
-
const validators = require('./validators-26badb68.js');
|
|
9
|
+
const index$1 = require('./index-c591ecec.js');
|
|
10
|
+
const isLoadDecorator = require('./is-load-decorator-15036f37.js');
|
|
11
|
+
const jsonParseDecarator = require('./json-parse-decarator-f29c368a.js');
|
|
12
|
+
require('./color-helper-c3a819ea.js');
|
|
13
|
+
const validators = require('./validators-97a46a9e.js');
|
|
14
|
+
const generate = require('./generate-1dfe001a.js');
|
|
15
|
+
const numberHelper = require('./number-helper-2b9c1f9d.js');
|
|
16
|
+
const stringHelper = require('./string-helper-fda7cbba.js');
|
|
18
17
|
require('./element-dragger-a8562f82.js');
|
|
19
|
-
const popoverPlacement = require('./popover-placement-
|
|
18
|
+
const popoverPlacement = require('./popover-placement-f20020a6.js');
|
|
20
19
|
const utils = require('./utils-fc077139.js');
|
|
21
|
-
const bcm = require('./bcm-
|
|
22
|
-
const captionTemplate = require('./caption-template-
|
|
23
|
-
const index
|
|
20
|
+
const bcm = require('./bcm-7f703055.js');
|
|
21
|
+
const captionTemplate = require('./caption-template-81dbc490.js');
|
|
22
|
+
const index = require('./index-95ae50d0.js');
|
|
24
23
|
require('./types-cc4adee7.js');
|
|
25
|
-
const labelTemplate = require('./label-template-4d5f99a5.js');
|
|
26
24
|
require('./types-7523fd99.js');
|
|
27
|
-
const index$
|
|
28
|
-
const index$
|
|
29
|
-
const
|
|
30
|
-
const inputTemplate = require('./input-template-a7f8f2e9.js');
|
|
25
|
+
const index$2 = require('./index-d321de96.js');
|
|
26
|
+
const index$3 = require('./index-7eed931f.js');
|
|
27
|
+
const inputTemplate = require('./input-template-41868c68.js');
|
|
31
28
|
require('./colors-56282b00.js');
|
|
32
|
-
require('./colors-
|
|
33
|
-
require('./
|
|
34
|
-
require('./
|
|
29
|
+
require('./colors-078851ec.js');
|
|
30
|
+
require('./_commonjsHelpers-ed84c3ca.js');
|
|
31
|
+
require('./package-66b81414.js');
|
|
35
32
|
|
|
36
33
|
const CheckboxTemplate = ({ disabled, checked, readonly, required, indeterminate, hidden, captionType, _id }) => {
|
|
37
34
|
// if ( indeterminate ) {
|
|
38
35
|
// checked = indeterminate == 'determinate' ? true : false
|
|
39
36
|
// }
|
|
40
|
-
const hostClasses = index
|
|
37
|
+
const hostClasses = index.classnames('bcm-checkbox', 'bcm-checkbox__type-default', `bcm-checkbox-size-medium`, {
|
|
41
38
|
// 'size-2': size === Bcm.Size.small || size === Bcm.Size.medium,
|
|
42
39
|
// 'size-3': optionType === 'button' && size === Bcm.Size.large,
|
|
43
|
-
'error': captionType == bcm.Bcm
|
|
40
|
+
'error': captionType == bcm.Bcm.Status.error,
|
|
44
41
|
hidden,
|
|
45
42
|
checked,
|
|
46
43
|
disabled,
|
|
47
44
|
required,
|
|
48
45
|
readonly,
|
|
49
46
|
});
|
|
50
|
-
const bcmCheckboxIconClass = index
|
|
47
|
+
const bcmCheckboxIconClass = index.classnames('bcm-checkbox__label-icon', 'bcm-checkbox__label-icon-lite', 'bcm-checkbox__label-icon-' + indeterminate, {
|
|
51
48
|
'bcm-checkbox__label-icon-checked': checked,
|
|
52
49
|
});
|
|
53
|
-
const bcmCheckboxLabelClass = index
|
|
54
|
-
return (index$
|
|
55
|
-
index$
|
|
56
|
-
index$
|
|
57
|
-
index$
|
|
58
|
-
index$
|
|
50
|
+
const bcmCheckboxLabelClass = index.classnames('bcm-checkbox__label');
|
|
51
|
+
return (index$1.h("div", { class: hostClasses },
|
|
52
|
+
index$1.h("input", { tabindex: "-1", id: _id, type: "checkbox", checked: checked, disabled: disabled, required: required, readonly: readonly }),
|
|
53
|
+
index$1.h("label", { class: bcmCheckboxLabelClass, htmlFor: _id },
|
|
54
|
+
index$1.h("span", { class: bcmCheckboxIconClass },
|
|
55
|
+
index$1.h("bcm-icon", { icon: "far fa-check" })))));
|
|
59
56
|
};
|
|
60
57
|
|
|
61
58
|
const InfoFooterTemplate = ({ selected, total, found, multiple, variableText }) => {
|
|
62
59
|
total = total || 0;
|
|
63
60
|
variableText = variableText ? utils.pluralize(variableText, total) : 'items';
|
|
64
|
-
return (index$
|
|
65
|
-
index$
|
|
61
|
+
return (index$1.h("footer", { class: "bcm-info-footer" },
|
|
62
|
+
index$1.h("bcm-text", { scale: "size-1", color: "grey-8" },
|
|
66
63
|
(multiple && selected > 0) && ` ( ${selected} selected ) `,
|
|
67
64
|
` Total ${total} `,
|
|
68
65
|
found != null && ` / ${found} `,
|
|
@@ -104,20 +101,20 @@ const ListItemTemplate = ({ item, treeview, highlight, checkboxes, size, selecte
|
|
|
104
101
|
item.open = item.isSearching;
|
|
105
102
|
openGroup(item.id);
|
|
106
103
|
};
|
|
107
|
-
return (index$
|
|
104
|
+
return (index$1.h("div", { id: item.id, hidden: item.hidden, "on-focus": e => !unClickable && !disabled && focusItem(e), class: index.classnames('bcm-list__item',
|
|
108
105
|
// size === 'large' ? 'size-3' : 'size-2',
|
|
109
106
|
'bcm-list__item-' + size, {
|
|
110
107
|
'bcm-list__item--group': !treeview && item.type == 'group',
|
|
111
108
|
'bcm-list__item--readonly': readonly,
|
|
112
109
|
}) },
|
|
113
|
-
index$
|
|
114
|
-
treeview && (index$
|
|
115
|
-
index$
|
|
116
|
-
checkboxes && (treeview || (!treeview && item.type != 'group')) && (index$
|
|
117
|
-
index$
|
|
118
|
-
index$
|
|
119
|
-
(treeview || !treeview && item.type == "group") && isHaveChildren && (index$
|
|
120
|
-
item.items.map((item) => (index$
|
|
110
|
+
index$1.h("div", { class: index.classnames('bcm-list__item-content', !checkboxes && item.selected && 'selected', { disabled: disabled }) },
|
|
111
|
+
treeview && (index$1.h("div", { class: "bcm-list__item-content-collapse-icon", onClick: () => collapseClick() }, isHaveChildren && index$1.h("bcm-icon", { icon: index.classnames('fas fa-caret-' + (item.isSearching || item.open ? 'down' : 'right')) }))),
|
|
112
|
+
index$1.h("div", { class: index.classnames('bcm-list__item-content-text', { treeview }), onClick: (e) => itemClick(e) },
|
|
113
|
+
checkboxes && (treeview || (!treeview && item.type != 'group')) && (index$1.h("div", { class: "bcm-list__item-content-text-checkbox" },
|
|
114
|
+
index$1.h(CheckboxTemplate, { indeterminate: item.indeterminate, checked: item.checked, disabled: item.disabled }))),
|
|
115
|
+
index$1.h("span", Object.assign({ class: "bcm-list__item-content-text-inner" }, (item.title && { "title": item.title }), { innerHTML: text })))),
|
|
116
|
+
(treeview || !treeview && item.type == "group") && isHaveChildren && (index$1.h("div", { class: "bcm-list__item-childs" }, (item.isSearching || item.open || (!treeview && item.type == "group")) &&
|
|
117
|
+
item.items.map((item) => (index$1.h(ListItemTemplate, { highlight: highlight, item: item, searchIsOnlyChilds: searchIsOnlyChilds, treeview: treeview, checkboxes: checkboxes, size: size, selectedItem: selectedItem, checkedItem: checkedItem, openGroup: parentId => openGroup(parentId), focusItem: itemId => focusItem(itemId) })))))));
|
|
121
118
|
};
|
|
122
119
|
|
|
123
120
|
const ListTemplate = ({ highlight, selectAllItem, bcmListContainer, treeview, checkboxes, checkAll, infoFooter, value, totalData, searchFound, variableText, _id, data, width, height, size, searchPlaceholder, minSearchLength, selectedItem, openGroup, checkedItem, onScrollEvent, focusItem, items, searchable, searchIsOnlyChilds, emptyText, emptyIcon, }) => {
|
|
@@ -134,24 +131,24 @@ const ListTemplate = ({ highlight, selectAllItem, bcmListContainer, treeview, ch
|
|
|
134
131
|
'flex-direction': 'column',
|
|
135
132
|
};
|
|
136
133
|
};
|
|
137
|
-
return (index$
|
|
138
|
-
data && searchable && (index$
|
|
139
|
-
index$
|
|
140
|
-
index$
|
|
141
|
-
index$
|
|
142
|
-
checkAll && searchFound != 0 && items && items.length > 0 && checkboxes && showSelectAll && (index$
|
|
143
|
-
index$
|
|
144
|
-
items.map((item) => (index$
|
|
145
|
-
(!items || items.length === 0) && searchFound != 0 && (index$
|
|
146
|
-
index$
|
|
147
|
-
index$
|
|
148
|
-
searchFound == 0 && (index$
|
|
149
|
-
index$
|
|
150
|
-
index$
|
|
151
|
-
infoFooter && data && data.length > 0 && (index$
|
|
134
|
+
return (index$1.h("div", { id: `bcm-list-${_id}`, class: bcmListContainer, style: { '--height': height, '--width': width } },
|
|
135
|
+
data && searchable && (index$1.h("section", { class: "bcm-list__container-search" },
|
|
136
|
+
index$1.h("bcm-search", { size: size, id: `bcm-list-${_id}-search`, data: data, clearable: true, placeholder: searchPlaceholder, "min-search-length": minSearchLength, searchIsOnlyChilds: searchIsOnlyChilds }))),
|
|
137
|
+
index$1.h("main", { onScroll: e => onScrollEvent(e), class: "scrolling", style: { 'overscroll-behavior': 'none' } },
|
|
138
|
+
index$1.h("div", { style: setScrollHeight() },
|
|
139
|
+
checkAll && searchFound != 0 && items && items.length > 0 && checkboxes && showSelectAll && (index$1.h("section", { class: "bcm-list__container-select-all" },
|
|
140
|
+
index$1.h(ListItemTemplate, { size: size, item: selectAllItem, treeview: false, checkboxes: true, selectedItem: itemId => selectedItem(itemId), checkedItem: itemId => checkedItem(itemId), openGroup: parentId => openGroup(parentId), focusItem: itemId => focusItem(itemId) }))),
|
|
141
|
+
items.map((item) => (index$1.h(ListItemTemplate, { highlight: highlight, size: size, item: item, searchIsOnlyChilds: searchIsOnlyChilds, treeview: treeview, checkboxes: checkboxes, selectedItem: itemId => selectedItem(itemId), checkedItem: itemId => checkedItem(itemId), openGroup: parentId => openGroup(parentId), focusItem: itemId => focusItem(itemId) }))),
|
|
142
|
+
(!items || items.length === 0) && searchFound != 0 && (index$1.h("section", { class: "bcm-list__container-no-data" },
|
|
143
|
+
index$1.h("bcm-empty", { style: { height: 'auto' }, icon: emptyIcon },
|
|
144
|
+
index$1.h("span", { innerHTML: emptyText || 'No data' })))),
|
|
145
|
+
searchFound == 0 && (index$1.h("section", { class: "bcm-list__container-no-data" },
|
|
146
|
+
index$1.h("bcm-empty", { style: { height: 'auto' }, icon: emptyIcon },
|
|
147
|
+
index$1.h("span", { innerHTML: emptyText || 'No Data Found' })))))),
|
|
148
|
+
infoFooter && data && data.length > 0 && (index$1.h(InfoFooterTemplate, { selected: value === null || value === void 0 ? void 0 : value.length, total: totalData, found: searchFound, multiple: checkboxes, variableText: variableText }))));
|
|
152
149
|
};
|
|
153
150
|
|
|
154
|
-
const { state: state$1 } = index$
|
|
151
|
+
const { state: state$1 } = index$2.createStore({
|
|
155
152
|
value: new Map(),
|
|
156
153
|
});
|
|
157
154
|
const setValue$1 = val => {
|
|
@@ -824,22 +821,22 @@ class ListKeyControl extends KeyControl {
|
|
|
824
821
|
}
|
|
825
822
|
keyDown() {
|
|
826
823
|
switch (this.getKeyCode()) {
|
|
827
|
-
case bcm.Bcm
|
|
824
|
+
case bcm.Bcm.KeyCode.up:
|
|
828
825
|
this.keyUpControl();
|
|
829
826
|
break;
|
|
830
|
-
case bcm.Bcm
|
|
827
|
+
case bcm.Bcm.KeyCode.down:
|
|
831
828
|
this.keyDownControl();
|
|
832
829
|
break;
|
|
833
|
-
case bcm.Bcm
|
|
830
|
+
case bcm.Bcm.KeyCode.left:
|
|
834
831
|
this.keyLeftControl();
|
|
835
832
|
break;
|
|
836
|
-
case bcm.Bcm
|
|
833
|
+
case bcm.Bcm.KeyCode.right:
|
|
837
834
|
this.keyRightControl();
|
|
838
835
|
break;
|
|
839
|
-
case bcm.Bcm
|
|
836
|
+
case bcm.Bcm.KeyCode.enter:
|
|
840
837
|
this.keyEnterControl();
|
|
841
838
|
break;
|
|
842
|
-
case bcm.Bcm
|
|
839
|
+
case bcm.Bcm.KeyCode.space:
|
|
843
840
|
this.keySpaceControl();
|
|
844
841
|
break;
|
|
845
842
|
}
|
|
@@ -847,7 +844,7 @@ class ListKeyControl extends KeyControl {
|
|
|
847
844
|
keyUp() { }
|
|
848
845
|
}
|
|
849
846
|
|
|
850
|
-
const listCss = "@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\"); @import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap\"); @import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap\"); @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}*{box-sizing:border-box}.bcm-caption-area{font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;font-size:12px;line-height:calc(12px + 8px);color:var(--bcm-new-ds-color-slate-400);display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;flex-wrap:nowrap;margin-top:2px}.bcm-caption-area__text{color:var(--bcm-new-ds-color-slate-400)}.bcm-caption-area__text.default{color:var(--bcm-new-ds-color-slate-400)}.bcm-caption-area__text.info{color:var(--bcm-new-ds-color-blue-500)}.bcm-caption-area__text.success{color:var(--bcm-new-ds-color-emerald-500)}.bcm-caption-area__text.warning{color:var(--bcm-new-ds-color-amber-500)}.bcm-caption-area__text.error{color:var(--bcm-new-ds-color-red-500)}.bcm-caption-area__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-caption-area__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-caption-area__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 8px)}*{box-sizing:border-box}.bcm-label{display:inline-flex;align-items:flex-start;grid-gap:2px}.bcm-label__text{margin-bottom:2px;font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:inline-block;color:var(--bcm-new-ds-color-slate-600)}.bcm-label__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-label__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-label__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 8px)}.bcm-input[no-margin]{margin:0}.bcm-textarea[no-margin]{margin:0}.bcm-switch[no-margin]{margin:0}.bcm-checkbox[no-margin]{margin:0}.bcm-radio-group[no-margin]{margin:0}.bcm-checkbox-group[no-margin]{margin:0}.bcm-range[no-margin]{margin:0}.bcm-form[no-margin]{margin:0}.bcm-form-group[no-margin]{margin:0}.bcm-list[no-margin]{margin:0}.bcm-colorpicker[no-margin]{margin:0}.bcm-date-picker[no-margin]{margin:0}.bcm-time-picker[no-margin]{margin:0}.bcm-datetime-picker[no-margin]{margin:0}.bcm-select[no-margin]{margin:0}.bcm-listbox[no-margin]{margin:0}*{box-sizing:border-box}*{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;display:none}.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}.bcm-list{font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;--width:256px;--height:256px;--max-height:inherit;--min-height:inherit;min-width:90px;display:flex;flex-direction:column;margin:0 0 8px 0}.bcm-list__listbox .bcm-list__container{height:var(--height);max-height:var(--max-height);min-height:var(--min-height)}.bcm-list.full-width{width:100%}.bcm-list__size-small .bcm-list__input{height:24px;font-size:12px;line-height:calc(12px + 8px)}.bcm-list__size-small .bcm-list__input .bcm-tag__content.dismissable{font-size:10px;line-height:calc(10px + 8px)}.bcm-list__size-medium .bcm-list__input{height:32px;font-size:14px;line-height:calc(14px + 8px)}.bcm-list__size-medium .bcm-list__input .bcm-tag__content.dismissable{font-size:12px;line-height:calc(12px + 8px)}.bcm-list__size-large .bcm-list__input{height:40px;font-size:16px;line-height:calc(16px + 8px)}.bcm-list__size-large .bcm-list__input .bcm-tag__content.dismissable{font-size:14px;line-height:calc(14px + 8px)}.bcm-list:hover{outline:none}.bcm-list:hover .bcm-list__input{border-color:var(--bcm-new-ds-color-blue-500);background-color:var(--bcm-new-ds-color-slate-50)}.bcm-list:focus-visible{outline:none}.bcm-list:focus-visible .bcm-list__input{border-color:var(--bcm-new-ds-color-blue-600);background-color:var(--bcm-new-ds-color-white)}.bcm-list:active{outline:none}.bcm-list:active .bcm-list__input{border-color:var(--bcm-new-ds-color-blue-600);box-shadow:0 1px 3px 0 rgba(17, 24, 38, 0.1)}.bcm-list__container{--width:256px;--height:256px;width:var(--width);height:var(--height);background-color:var(--bcm-new-ds-color-white);border:1px solid var(--bcm-new-ds-color-slate-300);border-radius:4px;box-sizing:border-box;padding-top:8px;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;flex-wrap:nowrap;gap:4px}.bcm-list__container main{scroll-behavior:smooth;padding:0 8px;flex:1;overflow:auto;display:flex;flex-direction:column}.bcm-list__container-search{margin:0 8px}.bcm-list__container-search:after{margin:4px 0}.bcm-list__container-no-data{flex:1;display:flex;justify-content:stretch;align-items:stretch;padding-bottom:4px}.bcm-list__container.error{border-color:var(--bcm-color-red-6)}.bcm-list__container.full-width{width:100%}.bcm-list__container.bcm-list__type-linked-component,.bcm-list__container.bcm-list__type-select,.bcm-list__container.bcm-list__type-autocomplete{opacity:0;visibility:hidden;position:absolute;top:0;left:0;height:0;width:0;transform:translateY(10%);z-index:10800;transition:visibility 0s linear 400ms, opacity 100ms, transform 200ms}.bcm-list__container.bcm-list__type-linked-component.bcm-list--top,.bcm-list__container.bcm-list__type-select.bcm-list--top,.bcm-list__container.bcm-list__type-autocomplete.bcm-list--top{transform:translateY(-10%)}.bcm-list__container.bcm-list__type-linked-component.is-open,.bcm-list__container.bcm-list__type-select.is-open,.bcm-list__container.bcm-list__type-autocomplete.is-open{opacity:1;transform:translateY(0);visibility:visible;transition:visibility 0s linear 0s, opacity 100ms, transform 100ms}.bcm-list__container.bcm-list__type-linked-component{margin-top:2px}.bcm-list__label{line-height:1}.bcm-list__input{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;border:1px solid var(--bcm-new-ds-color-slate-300);border-radius:4px;color:var(--bcm-new-ds-color-slate-600);background-color:var(--bcm-new-ds-color-white);user-select:none;cursor:pointer;padding:0 8px;height:32px;overflow:hidden;position:relative;transition:background-color 100ms, border-color 100ms}.bcm-list__input-spinner{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;background-color:var(--bcm-color-grey-1);opacity:0;visibility:hidden;transition:opacity 0.2s ease-in-out;z-index:-1}.bcm-list__input-spinner.is-open{opacity:1;visibility:visible;z-index:1}.bcm-list__input-container{flex:1;display:block;overflow:hidden}.bcm-list__input-container.value-empty{color:var(--bcm-color-grey-6)}.bcm-list__input-container.type-single,.bcm-list__input-container.value-empty{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bcm-list__input-placeholder{color:var(--bcm-color-grey-6)}.bcm-list__input-tag-container{height:100%;width:100%;display:flex;align-items:center;justify-content:flex-start;flex-wrap:nowrap;grid-gap:2px;line-height:1}.bcm-list__input-buttons{display:flex;align-items:center;justify-content:flex-end;grid-gap:4px}.bcm-list__input-buttons-button{display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding:4px 4px 0 4px;font-size:16px;color:var(--bcm-new-ds-color-slate-500)}.bcm-list__input-buttons-button.caret-is{transform:rotate(360deg);transition:transform 0.2s ease-in-out}.bcm-list__input-buttons-button.caret-is-open{transform:rotate(180deg)}.bcm-list__input-buttons:not(.disabled) .bcm-list__input-buttons-button:hover{cursor:pointer;color:var(--bcm-new-ds-color-slate-600)}.bcm-list__input-autocomplete{position:relative;padding-right:0}.bcm-list__input-autocomplete .bcm-list-input-selected-text{background-color:#ffffff;display:flex;align-items:center;justify-content:flex-start;width:calc(100% - 24px);height:100%;padding:0 calc(8px + 4px);position:absolute;top:0;left:0}.bcm-list__input-autocomplete .bcm-list__input-container{height:100%;display:flex;flex-direction:row}.bcm-list__input-autocomplete .bcm-list__input-container .bcm-list__input-tag-container{width:auto}.bcm-list__input-autocomplete .bcm-input,.bcm-list__input-autocomplete .bcm-list__autocomplete{height:100%;min-width:70px;width:100%}.bcm-list__input-autocomplete .bcm-input__container,.bcm-list__input-autocomplete .bcm-list__autocomplete__container{height:100%;border:none;padding:0;width:100%}.bcm-list__input-autocomplete .bcm-input__container:not(.disabled).focused,.bcm-list__input-autocomplete .bcm-input__container:not(.disabled):hover,.bcm-list__input-autocomplete .bcm-list__autocomplete__container:not(.disabled).focused,.bcm-list__input-autocomplete .bcm-list__autocomplete__container:not(.disabled):hover{border:none;box-shadow:none}.bcm-list__autocomplete{width:100%;position:relative}.bcm-list.full-width .bcm-list__container,.bcm-list.full-width .bcm-list__input{width:100%}.bcm-list.error .bcm-list__input{border-color:var(--bcm-color-red-6)}.bcm-list.disabled .bcm-list__container,.bcm-list.disabled .bcm-list__input{color:var(--bcm-new-ds-color-slate-300);background-color:var(--bcm-new-ds-color-slate-50);cursor:not-allowed}.bcm-list.disabled .bcm-tag__content.dismissable .close-button{cursor:default}.bcm-list:not(.disabled) .bcm-list__input .bcm-tag__content.checked .close-button bcm-icon{color:var(--bcm-new-ds-color-slate-100)}.bcm-list:not(.disabled) .bcm-list__input .bcm-tag__content.checked .close-button:hover bcm-icon{color:var(--bcm-new-ds-color-slate-200)}.bcm-list:not(.disabled) .bcm-list__input:hover{border-color:var(--bcm-new-ds-color-blue-500)}.bcm-list:not(.disabled) .bcm-list__input:hover .bcm-tag__content.dismissable:not(.checked){background-color:var(--bcm-new-ds-color-slate-200);border-color:var(--bcm-new-ds-color-slate-200)}.bcm-list:not(.disabled) .bcm-list__input:focus-visible{border-color:var(--bcm-new-ds-color-blue-500);box-shadow:0 1px 3px 0 rgba(17, 24, 38, 0.1)}.bcm-list:not(.disabled) .bcm-list__input:active{border-color:var(--bcm-new-ds-color-blue-500)}.bcm-list__item{padding:2px 0}.bcm-list__item.disabled{user-select:none}.bcm-list__item:focus{outline:none}.bcm-list__item:focus-visible>.bcm-list__item-content{background-color:var(--bcm-new-ds-color-slate-300)}.bcm-list__item:focus-visible>.bcm-list__item-content:not(.disabled){color:var(--bcm-new-ds-color-slate-600)}.bcm-list__item-content{display:flex;flex-direction:row;align-items:stretch;justify-content:flex-start;flex-wrap:nowrap;cursor:pointer;border-radius:4px;padding:0;padding-left:4px;color:var(--bcm-new-ds-color-slate-600);background-color:var(--bcm-new-ds-color-slate-50);transition:background-color 0.2s ease}.bcm-list__item-content.disabled{color:var(--bcm-new-ds-color-slate-300);background-color:var(--bcm-new-ds-color-slate-50);user-select:none;cursor:not-allowed}.bcm-list__item-content.selected{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-new-ds-color-blue-500)}.bcm-list__item-content.selected:hover:not(.disabled){color:var(--bcm-new-ds-color-white);background-color:var(--bcm-new-ds-color-blue-600)}.bcm-list__item-content:hover:not(.disabled){color:var(--bcm-new-ds-color-slate-600);background-color:var(--bcm-new-ds-color-slate-100)}.bcm-list__item-content:active:not(.disabled){color:var(--bcm-new-ds-color-slate-600);background-color:var(--bcm-new-ds-color-slate-200)}.bcm-list__item-content-collapse-icon{width:16px;padding:0 8px;display:flex;align-items:center;justify-content:center;font-size:16px}.bcm-list__item-content-collapse-icon.child{cursor:pointer}.bcm-list__item-content-text{user-select:none;padding:8px;width:100%;display:flex;flex-direction:row;align-items:center;justify-content:flex-start}.bcm-list__item-content-text.treeview{padding:8px 0}.bcm-list__item-content-text-checkbox{display:flex;flex-direction:row;align-items:center;justify-content:center;flex-wrap:nowrap;margin-right:8px}.bcm-list__item-content-text-checkbox .bcm-checkbox{margin:0}.bcm-list__item-content-text-inner{width:100%}.bcm-list__item-content-text mark{padding:0;margin:0;font-size:inherit;color:var(--bcm-color-grey-8);background-color:var(--bcm-color-yellow-4)}.bcm-list__item-childs{padding-left:16px}.bcm-list__item-small{padding:2px 0 2px 8px;font-size:10px;line-height:calc(10px + 8px)}.bcm-list__item-small .bcm-list__item-content-text{padding:3px 4px}.bcm-list__item-medium{font-size:12px;line-height:calc(12px + 8px)}.bcm-list__item-medium .bcm-list__item-content-text{padding:6px 4px}.bcm-list__item-large{font-size:14px;line-height:calc(14px + 8px)}.bcm-list__item-large .bcm-list__item-content-text{padding:9px 4px}.bcm-list__item--readonly:focus>.bcm-list__item-content:not(.disabled),.bcm-list__item--readonly.focused>.bcm-list__item-content:not(.disabled){color:var(--bcm-color-grey-7)}.bcm-list__item--readonly>.bcm-list__item-content{color:var(--bcm-color-grey-7)}.bcm-list__item--readonly>.bcm-list__item-content:hover,.bcm-list__item--readonly>.bcm-list__item-content:focus{color:var(--bcm-color-grey-7)}.bcm-list__item--group{border-radius:4px}.bcm-list__item--group:focus>.bcm-list__item-content:not(.disabled){background-color:var(--bcm-new-ds-color-slate-50);color:var(--bcm-new-ds-color-slate-600)}.bcm-list__item--group>.bcm-list__item-content{background-color:var(--bcm-new-ds-color-slate-50);color:var(--bcm-new-ds-color-slate-600);border-radius:4px 4px 0 0;cursor:default;font-size:14px;line-height:calc(14px + 8px);font-weight:500;position:sticky;top:0}.bcm-list__item--group>.bcm-list__item-content>.bcm-list__item-content-text{padding:4px 8px 4px 16px}.bcm-list__item--group>.bcm-list__item-content:hover,.bcm-list__item--group>.bcm-list__item-content:focus{color:var(--bcm-new-ds-color-slate-800);background-color:var(--bcm-new-ds-color-slate-50)}.bcm-list__item--group>.bcm-list__item-content-unclickable:hover{color:var(--bcm-new-ds-color-slate-700);background-color:var(--bcm-new-ds-color-slate-50)}.bcm-list__item--group>.bcm-list__item-childs{background-color:var(--bcm-new-ds-color-slate-50);color:var(--bcm-new-ds-color-slate-600);padding-bottom:8px;border-radius:0 0 4px 4px;padding-left:8px}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content{background-color:var(--bcm-new-ds-color-white);color:var(--bcm-new-ds-color-slate-600)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content:hover{background-color:var(--bcm-new-ds-color-slate-100)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content:active{background-color:var(--bcm-new-ds-color-slate-200)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content:focus-visible{background-color:var(--bcm-new-ds-color-slate-300)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content.selected{background-color:var(--bcm-new-ds-color-blue-500);color:var(--bcm-new-ds-color-white)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content.selected:hover{background-color:var(--bcm-new-ds-color-blue-600)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content.selected:active{background-color:var(--bcm-new-ds-color-blue-700)}.bcm-list__linked{display:none}.bcm-list .bcm-tag--other .value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bcm-info-footer{text-align:right;padding:4px 8px;background-color:var(--bcm-new-ds-color-slate-100);color:var(--bcm-new-ds-color-slate-600);border-radius:0 0 4px 4px}";
|
|
847
|
+
const listCss = "@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\"); @import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap\"); @import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap\"); @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}*{box-sizing:border-box}.bcm-caption-area{font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;font-size:12px;line-height:calc(12px + 8px);color:var(--bcm-new-ds-color-slate-400);display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;flex-wrap:nowrap;margin-top:2px}.bcm-caption-area__text{color:var(--bcm-new-ds-color-slate-400)}.bcm-caption-area__text.default{color:var(--bcm-new-ds-color-slate-400)}.bcm-caption-area__text.info{color:var(--bcm-new-ds-color-blue-500)}.bcm-caption-area__text.success{color:var(--bcm-new-ds-color-emerald-500)}.bcm-caption-area__text.warning{color:var(--bcm-new-ds-color-amber-500)}.bcm-caption-area__text.error{color:var(--bcm-new-ds-color-red-500)}.bcm-caption-area__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-caption-area__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-caption-area__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 8px)}*{box-sizing:border-box}.bcm-label{display:inline-flex;align-items:flex-start;grid-gap:2px}.bcm-label__text{margin-bottom:2px;font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:inline-block;color:var(--bcm-new-ds-color-slate-600)}.bcm-label__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-label__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-label__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 8px)}.bcm-input[no-margin]{margin:0}.bcm-textarea[no-margin]{margin:0}.bcm-switch[no-margin]{margin:0}.bcm-checkbox[no-margin]{margin:0}.bcm-radio-group[no-margin]{margin:0}.bcm-checkbox-group[no-margin]{margin:0}.bcm-range[no-margin]{margin:0}.bcm-form[no-margin]{margin:0}.bcm-form-group[no-margin]{margin:0}.bcm-list[no-margin]{margin:0}.bcm-colorpicker[no-margin]{margin:0}.bcm-date-picker[no-margin]{margin:0}.bcm-time-picker[no-margin]{margin:0}.bcm-datetime-picker[no-margin]{margin:0}.bcm-select[no-margin]{margin:0}.bcm-listbox[no-margin]{margin:0}*{box-sizing:border-box}*{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;display:none}.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}.bcm-list{font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;--width:256px;--height:256px;--max-height:inherit;--min-height:inherit;min-width:90px;display:flex;flex-direction:column;margin:0 0 8px 0}.bcm-list__listbox .bcm-list__container{height:var(--height);max-height:var(--max-height);min-height:var(--min-height)}.bcm-list.full-width{width:100%}.bcm-list__size-small .bcm-list__input{height:24px;font-size:12px;line-height:calc(12px + 8px)}.bcm-list__size-small .bcm-list__input .bcm-tag__content.dismissable{font-size:10px;line-height:calc(10px + 8px)}.bcm-list__size-medium .bcm-list__input{height:32px;font-size:14px;line-height:calc(14px + 8px)}.bcm-list__size-medium .bcm-list__input .bcm-tag__content.dismissable{font-size:12px;line-height:calc(12px + 8px)}.bcm-list__size-large .bcm-list__input{height:40px;font-size:16px;line-height:calc(16px + 8px)}.bcm-list__size-large .bcm-list__input .bcm-tag__content.dismissable{font-size:14px;line-height:calc(14px + 8px)}.bcm-list:hover{outline:none}.bcm-list:hover .bcm-list__input{border-color:var(--bcm-new-ds-color-blue-500);background-color:var(--bcm-new-ds-color-slate-50)}.bcm-list:focus-visible{outline:none}.bcm-list:focus-visible .bcm-list__input{border-color:var(--bcm-new-ds-color-blue-600);background-color:var(--bcm-new-ds-color-white)}.bcm-list:active{outline:none}.bcm-list:active .bcm-list__input{border-color:var(--bcm-new-ds-color-blue-600);box-shadow:0 1px 3px 0 rgba(17, 24, 38, 0.1)}.bcm-list__container{--width:256px;--height:256px;width:var(--width);height:var(--height);background-color:var(--bcm-new-ds-color-white);border:1px solid var(--bcm-new-ds-color-slate-300);border-radius:4px;box-sizing:border-box;padding-top:8px;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;flex-wrap:nowrap;gap:4px}.bcm-list__container main{scroll-behavior:smooth;padding:0 8px;flex:1;overflow:auto;display:flex;flex-direction:column}.bcm-list__container-search{margin:0 8px}.bcm-list__container-search:after{margin:4px 0}.bcm-list__container-no-data{flex:1;display:flex;justify-content:stretch;align-items:stretch;padding-bottom:4px}.bcm-list__container.error{border-color:var(--bcm-color-red-6)}.bcm-list__container.full-width{width:100%}.bcm-list__container.bcm-list__type-linked-component,.bcm-list__container.bcm-list__type-select,.bcm-list__container.bcm-list__type-autocomplete{opacity:0;visibility:hidden;position:absolute;top:0;left:0;height:0;width:0;transform:translateY(10%);z-index:10800;transition:visibility 0s linear 400ms, opacity 100ms, transform 200ms}.bcm-list__container.bcm-list__type-linked-component.bcm-list--top,.bcm-list__container.bcm-list__type-select.bcm-list--top,.bcm-list__container.bcm-list__type-autocomplete.bcm-list--top{transform:translateY(-10%)}.bcm-list__container.bcm-list__type-linked-component.is-open,.bcm-list__container.bcm-list__type-select.is-open,.bcm-list__container.bcm-list__type-autocomplete.is-open{opacity:1;transform:translateY(0);visibility:visible;transition:visibility 0s linear 0s, opacity 100ms, transform 100ms}.bcm-list__container.bcm-list__type-linked-component{margin-top:2px}.bcm-list__label{line-height:1}.bcm-list__input{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;border:1px solid var(--bcm-new-ds-color-slate-300);border-radius:4px;color:var(--bcm-new-ds-color-slate-600);background-color:var(--bcm-new-ds-color-white);user-select:none;cursor:pointer;padding:0 8px;height:32px;overflow:hidden;position:relative;transition:background-color 100ms, border-color 100ms}.bcm-list__input-spinner{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;background-color:var(--bcm-color-grey-1);opacity:0;visibility:hidden;transition:opacity 0.2s ease-in-out;z-index:-1}.bcm-list__input-spinner.is-open{opacity:1;visibility:visible;z-index:1}.bcm-list__input-container{flex:1;display:block;overflow:hidden}.bcm-list__input-container.value-empty{color:var(--bcm-color-grey-6)}.bcm-list__input-container.type-single,.bcm-list__input-container.value-empty{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bcm-list__input-placeholder{color:var(--bcm-color-grey-6)}.bcm-list__input-tag-container{height:100%;width:100%;display:flex;align-items:center;justify-content:flex-start;flex-wrap:nowrap;grid-gap:2px;line-height:1}.bcm-list__input-buttons{display:flex;align-items:center;justify-content:flex-end;grid-gap:4px}.bcm-list__input-buttons-button{display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding:0 4px 0 4px;font-size:16px;color:var(--bcm-new-ds-color-slate-500)}.bcm-list__input-buttons-button.caret-is{transform:rotate(360deg);transition:transform 0.2s ease-in-out}.bcm-list__input-buttons-button.caret-is-open{transform:rotate(180deg)}.bcm-list__input-buttons:not(.disabled) .bcm-list__input-buttons-button:hover{cursor:pointer;color:var(--bcm-new-ds-color-slate-600)}.bcm-list__input-autocomplete{position:relative;padding-right:0}.bcm-list__input-autocomplete .bcm-list-input-selected-text{background-color:#ffffff;display:flex;align-items:center;justify-content:flex-start;width:calc(100% - 24px);height:100%;padding:0 calc(8px + 4px);position:absolute;top:0;left:0}.bcm-list__input-autocomplete .bcm-list__input-container{height:100%;display:flex;flex-direction:row}.bcm-list__input-autocomplete .bcm-list__input-container .bcm-list__input-tag-container{width:auto}.bcm-list__input-autocomplete .bcm-input,.bcm-list__input-autocomplete .bcm-list__autocomplete{height:100%;min-width:70px;width:100%}.bcm-list__input-autocomplete .bcm-input__container,.bcm-list__input-autocomplete .bcm-list__autocomplete__container{height:100%;border:none;padding:0;width:100%}.bcm-list__input-autocomplete .bcm-input__container:not(.disabled).focused,.bcm-list__input-autocomplete .bcm-input__container:not(.disabled):hover,.bcm-list__input-autocomplete .bcm-list__autocomplete__container:not(.disabled).focused,.bcm-list__input-autocomplete .bcm-list__autocomplete__container:not(.disabled):hover{border:none;box-shadow:none}.bcm-list__autocomplete{width:100%;position:relative}.bcm-list.full-width .bcm-list__container,.bcm-list.full-width .bcm-list__input{width:100%}.bcm-list.error .bcm-list__input{border-color:var(--bcm-color-red-6)}.bcm-list.disabled .bcm-list__container,.bcm-list.disabled .bcm-list__input{color:var(--bcm-new-ds-color-slate-300);background-color:var(--bcm-new-ds-color-slate-50);cursor:not-allowed}.bcm-list.disabled .bcm-tag__content.dismissable .close-button{cursor:default}.bcm-list:not(.disabled) .bcm-list__input .bcm-tag__content.checked .close-button bcm-icon{color:var(--bcm-new-ds-color-slate-100)}.bcm-list:not(.disabled) .bcm-list__input .bcm-tag__content.checked .close-button:hover bcm-icon{color:var(--bcm-new-ds-color-slate-200)}.bcm-list:not(.disabled) .bcm-list__input:hover{border-color:var(--bcm-new-ds-color-blue-500)}.bcm-list:not(.disabled) .bcm-list__input:hover .bcm-tag__content.dismissable:not(.checked){background-color:var(--bcm-new-ds-color-slate-200);border-color:var(--bcm-new-ds-color-slate-200)}.bcm-list:not(.disabled) .bcm-list__input:focus-visible{border-color:var(--bcm-new-ds-color-blue-500);box-shadow:0 1px 3px 0 rgba(17, 24, 38, 0.1)}.bcm-list:not(.disabled) .bcm-list__input:active{border-color:var(--bcm-new-ds-color-blue-500)}.bcm-list__item{padding:2px 0}.bcm-list__item.disabled{user-select:none}.bcm-list__item:focus{outline:none}.bcm-list__item:focus-visible>.bcm-list__item-content{background-color:var(--bcm-new-ds-color-slate-300)}.bcm-list__item:focus-visible>.bcm-list__item-content:not(.disabled){color:var(--bcm-new-ds-color-slate-600)}.bcm-list__item-content{display:flex;flex-direction:row;align-items:stretch;justify-content:flex-start;flex-wrap:nowrap;cursor:pointer;border-radius:4px;padding:0;padding-left:4px;color:var(--bcm-new-ds-color-slate-600);background-color:var(--bcm-new-ds-color-slate-50);transition:background-color 0.2s ease}.bcm-list__item-content.disabled{color:var(--bcm-new-ds-color-slate-300);background-color:var(--bcm-new-ds-color-slate-50);user-select:none;cursor:not-allowed}.bcm-list__item-content.selected{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-new-ds-color-blue-500)}.bcm-list__item-content.selected:hover:not(.disabled){color:var(--bcm-new-ds-color-white);background-color:var(--bcm-new-ds-color-blue-600)}.bcm-list__item-content:hover:not(.disabled){color:var(--bcm-new-ds-color-slate-600);background-color:var(--bcm-new-ds-color-slate-100)}.bcm-list__item-content:active:not(.disabled){color:var(--bcm-new-ds-color-slate-600);background-color:var(--bcm-new-ds-color-slate-200)}.bcm-list__item-content-collapse-icon{width:16px;padding:0 8px;display:flex;align-items:center;justify-content:center;font-size:16px}.bcm-list__item-content-collapse-icon.child{cursor:pointer}.bcm-list__item-content-text{user-select:none;padding:8px;width:100%;display:flex;flex-direction:row;align-items:center;justify-content:flex-start}.bcm-list__item-content-text.treeview{padding:8px 0}.bcm-list__item-content-text-checkbox{display:flex;flex-direction:row;align-items:center;justify-content:center;flex-wrap:nowrap;margin-right:8px}.bcm-list__item-content-text-checkbox .bcm-checkbox{margin:0}.bcm-list__item-content-text-inner{width:100%}.bcm-list__item-content-text mark{padding:0;margin:0;font-size:inherit;color:var(--bcm-color-grey-8);background-color:var(--bcm-color-yellow-4)}.bcm-list__item-childs{padding-left:16px}.bcm-list__item-small{padding:2px 0 2px 8px;font-size:10px;line-height:calc(10px + 8px)}.bcm-list__item-small .bcm-list__item-content-text{padding:3px 4px}.bcm-list__item-medium{font-size:12px;line-height:calc(12px + 8px)}.bcm-list__item-medium .bcm-list__item-content-text{padding:6px 4px}.bcm-list__item-large{font-size:14px;line-height:calc(14px + 8px)}.bcm-list__item-large .bcm-list__item-content-text{padding:9px 4px}.bcm-list__item--readonly:focus>.bcm-list__item-content:not(.disabled),.bcm-list__item--readonly.focused>.bcm-list__item-content:not(.disabled){color:var(--bcm-color-grey-7)}.bcm-list__item--readonly>.bcm-list__item-content{color:var(--bcm-color-grey-7)}.bcm-list__item--readonly>.bcm-list__item-content:hover,.bcm-list__item--readonly>.bcm-list__item-content:focus{color:var(--bcm-color-grey-7)}.bcm-list__item--group{border-radius:4px}.bcm-list__item--group:focus>.bcm-list__item-content:not(.disabled){background-color:var(--bcm-new-ds-color-slate-50);color:var(--bcm-new-ds-color-slate-600)}.bcm-list__item--group>.bcm-list__item-content{background-color:var(--bcm-new-ds-color-slate-50);color:var(--bcm-new-ds-color-slate-600);border-radius:4px 4px 0 0;cursor:default;font-size:14px;line-height:calc(14px + 8px);font-weight:500;position:sticky;top:0}.bcm-list__item--group>.bcm-list__item-content>.bcm-list__item-content-text{padding:4px 8px 4px 16px}.bcm-list__item--group>.bcm-list__item-content:hover,.bcm-list__item--group>.bcm-list__item-content:focus{color:var(--bcm-new-ds-color-slate-800);background-color:var(--bcm-new-ds-color-slate-50)}.bcm-list__item--group>.bcm-list__item-content-unclickable:hover{color:var(--bcm-new-ds-color-slate-700);background-color:var(--bcm-new-ds-color-slate-50)}.bcm-list__item--group>.bcm-list__item-childs{background-color:var(--bcm-new-ds-color-slate-50);color:var(--bcm-new-ds-color-slate-600);padding-bottom:8px;border-radius:0 0 4px 4px;padding-left:8px}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content{background-color:var(--bcm-new-ds-color-white);color:var(--bcm-new-ds-color-slate-600)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content:hover{background-color:var(--bcm-new-ds-color-slate-100)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content:active{background-color:var(--bcm-new-ds-color-slate-200)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content:focus-visible{background-color:var(--bcm-new-ds-color-slate-300)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content.selected{background-color:var(--bcm-new-ds-color-blue-500);color:var(--bcm-new-ds-color-white)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content.selected:hover{background-color:var(--bcm-new-ds-color-blue-600)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content.selected:active{background-color:var(--bcm-new-ds-color-blue-700)}.bcm-list__linked{display:none}.bcm-list .bcm-tag--other .value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bcm-info-footer{text-align:right;padding:4px 8px;background-color:var(--bcm-new-ds-color-slate-100);color:var(--bcm-new-ds-color-slate-600);border-radius:0 0 4px 4px}";
|
|
851
848
|
|
|
852
849
|
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
853
850
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -861,16 +858,16 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
|
861
858
|
};
|
|
862
859
|
const BcmList = class {
|
|
863
860
|
constructor(hostRef) {
|
|
864
|
-
index$
|
|
865
|
-
this.bcmChecklist = index$
|
|
866
|
-
this.bcmSelected = index$
|
|
867
|
-
this.change = index$
|
|
868
|
-
this.open = index$
|
|
869
|
-
this.close = index$
|
|
861
|
+
index$1.registerInstance(this, hostRef);
|
|
862
|
+
this.bcmChecklist = index$1.createEvent(this, "bcm-checklist", 7);
|
|
863
|
+
this.bcmSelected = index$1.createEvent(this, "bcm-selected", 7);
|
|
864
|
+
this.change = index$1.createEvent(this, "bcm-change", 7);
|
|
865
|
+
this.open = index$1.createEvent(this, "bcm-open", 7);
|
|
866
|
+
this.close = index$1.createEvent(this, "bcm-close", 7);
|
|
870
867
|
this.debounce = null;
|
|
871
868
|
this.debounceHandler = generate.Generate.debounceInput(() => this.listenResize(), 300, false);
|
|
872
869
|
this._id = generate.Generate.UID();
|
|
873
|
-
this.type = bcm.Bcm.ListType.listbox;
|
|
870
|
+
this.type = bcm.Bcm$1.ListType.listbox;
|
|
874
871
|
this.treeview = false;
|
|
875
872
|
this.checkboxes = false;
|
|
876
873
|
this.searchable = false;
|
|
@@ -878,7 +875,7 @@ const BcmList = class {
|
|
|
878
875
|
this.inputText = undefined;
|
|
879
876
|
this.name = undefined;
|
|
880
877
|
this.label = undefined;
|
|
881
|
-
this.size = bcm.Bcm.Size.medium;
|
|
878
|
+
this.size = bcm.Bcm$1.Size.medium;
|
|
882
879
|
this.disabled = false;
|
|
883
880
|
this.readonly = false;
|
|
884
881
|
this.highlight = false;
|
|
@@ -890,6 +887,7 @@ const BcmList = class {
|
|
|
890
887
|
this.maxHeight = "500px";
|
|
891
888
|
this.minHeight = "150px";
|
|
892
889
|
this.width = "256px";
|
|
890
|
+
this.tooltip = undefined;
|
|
893
891
|
this.infoFooter = false;
|
|
894
892
|
this.variableText = "item";
|
|
895
893
|
this.template = undefined;
|
|
@@ -897,6 +895,7 @@ const BcmList = class {
|
|
|
897
895
|
this.keyControl = false;
|
|
898
896
|
this.checkAll = true;
|
|
899
897
|
this.stopDeepClean = false;
|
|
898
|
+
this.openIntersecting = false;
|
|
900
899
|
this.linkedComponent = undefined;
|
|
901
900
|
this.isOpen = false;
|
|
902
901
|
this.calculatedViewport = false;
|
|
@@ -909,7 +908,7 @@ const BcmList = class {
|
|
|
909
908
|
this.clearable = false;
|
|
910
909
|
this.caption = undefined;
|
|
911
910
|
this.noCaption = false;
|
|
912
|
-
this.captionType = bcm.Bcm.Status.default;
|
|
911
|
+
this.captionType = bcm.Bcm$1.Status.default;
|
|
913
912
|
this.captionError = undefined;
|
|
914
913
|
this.emptyText = undefined;
|
|
915
914
|
this.emptyIcon = "fad fa-folder-open";
|
|
@@ -935,11 +934,15 @@ const BcmList = class {
|
|
|
935
934
|
checked: false,
|
|
936
935
|
disabled: false,
|
|
937
936
|
icon: "",
|
|
938
|
-
status: bcm.Bcm.Status.default,
|
|
937
|
+
status: bcm.Bcm$1.Status.default,
|
|
939
938
|
indeterminate: "uncheck",
|
|
940
939
|
};
|
|
941
|
-
this.placement = bcm.Bcm.Placement["bottom-start"];
|
|
940
|
+
this.placement = bcm.Bcm$1.Placement["bottom-start"];
|
|
941
|
+
this.disableChangeEvent = false;
|
|
942
942
|
this.data = [];
|
|
943
|
+
window.addEventListener("scroll", this.handleWheel.bind(this), true);
|
|
944
|
+
window.addEventListener("wheel", this.handleWheel.bind(this), true);
|
|
945
|
+
window.addEventListener("resize", this.handleResize.bind(this), true);
|
|
943
946
|
}
|
|
944
947
|
connectedCallback() {
|
|
945
948
|
if (this.height != "256px") {
|
|
@@ -1016,12 +1019,12 @@ const BcmList = class {
|
|
|
1016
1019
|
if (this.checkboxes) {
|
|
1017
1020
|
if (!validators.Validators.compareTwoArrayIsSame(newVal, oldVal)) {
|
|
1018
1021
|
this.bcmChecklist.emit(this.value);
|
|
1019
|
-
this.change.emit(this.value);
|
|
1022
|
+
!this.disableChangeEvent && this.change.emit(this.value);
|
|
1020
1023
|
}
|
|
1021
1024
|
}
|
|
1022
1025
|
else {
|
|
1023
1026
|
if ((newVal === null || newVal === void 0 ? void 0 : newVal.id) != (oldVal === null || oldVal === void 0 ? void 0 : oldVal.id)) {
|
|
1024
|
-
this.change.emit(this.value);
|
|
1027
|
+
!this.disableChangeEvent && this.change.emit(this.value);
|
|
1025
1028
|
}
|
|
1026
1029
|
}
|
|
1027
1030
|
}
|
|
@@ -1216,7 +1219,7 @@ const BcmList = class {
|
|
|
1216
1219
|
//keyboard navigation
|
|
1217
1220
|
handleKeyDown(ev) {
|
|
1218
1221
|
const keycode = ev.keyCode || ev.which;
|
|
1219
|
-
if (keycode === bcm.Bcm.KeyCode.escape) {
|
|
1222
|
+
if (keycode === bcm.Bcm$1.KeyCode.escape) {
|
|
1220
1223
|
if (this.isOpen) {
|
|
1221
1224
|
this.isOpen = false;
|
|
1222
1225
|
ev.preventDefault();
|
|
@@ -1563,34 +1566,34 @@ const BcmList = class {
|
|
|
1563
1566
|
}
|
|
1564
1567
|
render() {
|
|
1565
1568
|
const { checkboxes, treeview, label, size, disabled, readonly, required, hidden, fullWidth, searchable } = this.getOptions();
|
|
1566
|
-
const hostClasses = index
|
|
1567
|
-
"error": this.captionType == bcm.Bcm.Status.error,
|
|
1569
|
+
const hostClasses = index.classnames("bcm-list", `bcm-list__size-${size}`, `bcm-list__${this.type}`, size === "large" ? "size-3" : "size-2", {
|
|
1570
|
+
"error": this.captionType == bcm.Bcm$1.Status.error,
|
|
1568
1571
|
"full-width": fullWidth,
|
|
1569
1572
|
"bcm-list__linked": this.linkedComponent,
|
|
1570
1573
|
hidden,
|
|
1571
1574
|
readonly,
|
|
1572
1575
|
disabled,
|
|
1573
1576
|
});
|
|
1574
|
-
const bcmListContainer = index
|
|
1577
|
+
const bcmListContainer = index.classnames("bcm-list__container", this.linkedComponent ? "bcm-list__type-linked-component" : `bcm-list__type-${this.type}`, {
|
|
1575
1578
|
"is-open": this.isOpen && this.calculatedViewport,
|
|
1576
|
-
"error": this.captionType == bcm.Bcm.Status.error,
|
|
1579
|
+
"error": this.captionType == bcm.Bcm$1.Status.error,
|
|
1577
1580
|
"full-width": fullWidth,
|
|
1578
1581
|
hidden,
|
|
1579
1582
|
readonly,
|
|
1580
1583
|
disabled,
|
|
1581
1584
|
});
|
|
1582
|
-
const bcmListInput = index
|
|
1585
|
+
const bcmListInput = index.classnames("bcm-list__input");
|
|
1583
1586
|
const openedType = this.type == "select" || this.type == "autocomplete" || this.linkedComponent;
|
|
1584
|
-
return (index$
|
|
1587
|
+
return (index$1.h(index$1.Host, { class: hostClasses, tabindex: "0", style: {
|
|
1585
1588
|
"--width": fullWidth ? "100%" : this.width,
|
|
1586
1589
|
"--height": openedType ? "100%" : this.height,
|
|
1587
1590
|
"--max-height": openedType ? "inherit" : this.maxHeight,
|
|
1588
1591
|
"--min-height": openedType ? "inherit" : this.minHeight,
|
|
1589
|
-
} }, index$
|
|
1592
|
+
} }, index$1.h("div", { id: `bcm-list-label-${this._id}`, class: "bcm-list__label" }, label && (index$1.h("div", null, index$1.h("bcm-label", { tooltip: this.tooltip, size: this.size, type: this.captionType, value: label, required: required, htmlFor: this._id })))), this.type == "select" && (index$1.h("div", { id: `bcm-list-input-${this._id}`, class: bcmListInput }, index$1.h("span", { class: index.classnames("bcm-list__input-container", { "type-single": !checkboxes, "value-empty": !this.value }) }, this.checkboxes ? (this.value && this.value.length > 0 ? (index$1.h("bcm-rc-overflow", { data: this.tagData, maxCount: this.tagCount })) : (index$1.h("span", { class: "bcm-list__input-placeholder" }, this.placeholder))) : this.value ? (this.inputText) : (index$1.h("span", { class: "bcm-list__input-placeholder" }, this.placeholder))), index$1.h("span", { class: index.classnames("bcm-list__input-buttons", {
|
|
1590
1593
|
disabled: disabled,
|
|
1591
|
-
}) }, this.clearable && this.value && (index$
|
|
1594
|
+
}) }, this.clearable && this.value && (index$1.h("div", { class: "bcm-list__input-buttons-button" }, index$1.h("bcm-icon", { icon: "fal fa-times", onClick: e => !disabled && this.setClear(e) }))), index$1.h("div", { class: `bcm-list__input-buttons-button caret-is ${this.isOpen && this.calculatedViewport && "caret-is-open"}` }, index$1.h("bcm-icon", { icon: `far fa-angle-down` }))))), this.type === "autocomplete" && (index$1.h("div", { id: `bcm-list-input-${this._id}`, class: index.classnames(bcmListInput, { "bcm-list__input-autocomplete": this.type == "autocomplete" }) }, index$1.h("span", { class: "bcm-list__input-container", id: `bcm-list-input-tag-container-${this._id}` }, this.checkboxes && index$1.h("span", { class: "bcm-list__input-tag-container", id: `bcm-list-input-tag-container-${this._id}-autocomplete` }), index$1.h("bcm-search", { id: `bcm-list-input-tag-container-${this._id}-autocomplete-input`, class: "bcm-list__autocomplete", data: this.data, clearable: true, "full-width": true, "no-caption": true, placeholder: this.placeholder })))), index$1.h(ListTemplate, { highlight: this.highlightText, searchable: this.type == "autocomplete" ? false : searchable, bcmListContainer: bcmListContainer, checkboxes: checkboxes, treeview: treeview, infoFooter: this.infoFooter, value: this.value, totalData: this.totalData, searchFound: this.searchFound, variableText: this.variableText, searchPlaceholder: this.searchPlaceholder, minSearchLength: this.minSearchLength, searchIsOnlyChilds: this.searchIsOnlyChilds, _id: this._id, checkAll: this.checkAll, data: this.getItems(), width: this.width, height: this.height, size: this.size, selectAllItem: this.selectAllItem, onScrollEvent: e => this.dataScrollEvent(e), items: this.getLimitedItems(this.searchGetParents), selectedItem: itemId => this.selectedItem(itemId), checkedItem: itemId => this.checkedItem(itemId), openGroup: parentId => this.openGroup(parentId), focusItem: itemId => this.focusItem(itemId), emptyText: this.emptyText, emptyIcon: this.emptyIcon }), index$1.h(captionTemplate.CaptionTemplate, { noCaption: this.noCaption, captionType: this.captionType, captionError: this.captionError, caption: this.caption })));
|
|
1592
1595
|
}
|
|
1593
|
-
get el() { return index$
|
|
1596
|
+
get el() { return index$1.getElement(this); }
|
|
1594
1597
|
static get watchers() { return {
|
|
1595
1598
|
"_id": ["watchId"],
|
|
1596
1599
|
"value": ["handleValueChange"],
|
|
@@ -1607,8 +1610,8 @@ __decorate([
|
|
|
1607
1610
|
], BcmList.prototype, "dataChanged", null);
|
|
1608
1611
|
BcmList.style = listCss;
|
|
1609
1612
|
|
|
1610
|
-
function _extends
|
|
1611
|
-
_extends
|
|
1613
|
+
function _extends() {
|
|
1614
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
1612
1615
|
for (var i = 1; i < arguments.length; i++) {
|
|
1613
1616
|
var source = arguments[i];
|
|
1614
1617
|
for (var key in source) {
|
|
@@ -1619,37 +1622,37 @@ function _extends$1() {
|
|
|
1619
1622
|
}
|
|
1620
1623
|
return target;
|
|
1621
1624
|
};
|
|
1622
|
-
return _extends
|
|
1625
|
+
return _extends.apply(this, arguments);
|
|
1623
1626
|
}
|
|
1624
1627
|
|
|
1625
|
-
function _typeof
|
|
1628
|
+
function _typeof(obj) {
|
|
1626
1629
|
"@babel/helpers - typeof";
|
|
1627
1630
|
|
|
1628
|
-
return _typeof
|
|
1631
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
1629
1632
|
return typeof obj;
|
|
1630
1633
|
} : function (obj) {
|
|
1631
1634
|
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
1632
|
-
}, _typeof
|
|
1635
|
+
}, _typeof(obj);
|
|
1633
1636
|
}
|
|
1634
1637
|
|
|
1635
|
-
function _toPrimitive
|
|
1636
|
-
if (_typeof
|
|
1638
|
+
function _toPrimitive(input, hint) {
|
|
1639
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
1637
1640
|
var prim = input[Symbol.toPrimitive];
|
|
1638
1641
|
if (prim !== undefined) {
|
|
1639
1642
|
var res = prim.call(input, hint || "default");
|
|
1640
|
-
if (_typeof
|
|
1643
|
+
if (_typeof(res) !== "object") return res;
|
|
1641
1644
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1642
1645
|
}
|
|
1643
1646
|
return (hint === "string" ? String : Number)(input);
|
|
1644
1647
|
}
|
|
1645
1648
|
|
|
1646
|
-
function _toPropertyKey
|
|
1647
|
-
var key = _toPrimitive
|
|
1648
|
-
return _typeof
|
|
1649
|
+
function _toPropertyKey(arg) {
|
|
1650
|
+
var key = _toPrimitive(arg, "string");
|
|
1651
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
1649
1652
|
}
|
|
1650
1653
|
|
|
1651
|
-
function _defineProperty
|
|
1652
|
-
key = _toPropertyKey
|
|
1654
|
+
function _defineProperty(obj, key, value) {
|
|
1655
|
+
key = _toPropertyKey(key);
|
|
1653
1656
|
if (key in obj) {
|
|
1654
1657
|
Object.defineProperty(obj, key, {
|
|
1655
1658
|
value: value,
|
|
@@ -1663,7 +1666,7 @@ function _defineProperty$1(obj, key, value) {
|
|
|
1663
1666
|
return obj;
|
|
1664
1667
|
}
|
|
1665
1668
|
|
|
1666
|
-
function ownKeys
|
|
1669
|
+
function ownKeys(object, enumerableOnly) {
|
|
1667
1670
|
var keys = Object.keys(object);
|
|
1668
1671
|
if (Object.getOwnPropertySymbols) {
|
|
1669
1672
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -1673,12 +1676,12 @@ function ownKeys$1(object, enumerableOnly) {
|
|
|
1673
1676
|
}
|
|
1674
1677
|
return keys;
|
|
1675
1678
|
}
|
|
1676
|
-
function _objectSpread2
|
|
1679
|
+
function _objectSpread2(target) {
|
|
1677
1680
|
for (var i = 1; i < arguments.length; i++) {
|
|
1678
1681
|
var source = null != arguments[i] ? arguments[i] : {};
|
|
1679
|
-
i % 2 ? ownKeys
|
|
1680
|
-
_defineProperty
|
|
1681
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys
|
|
1682
|
+
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
1683
|
+
_defineProperty(target, key, source[key]);
|
|
1684
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
1682
1685
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
1683
1686
|
});
|
|
1684
1687
|
}
|
|
@@ -1769,1469 +1772,6 @@ function _objectWithoutProperties(source, excluded) {
|
|
|
1769
1772
|
return target;
|
|
1770
1773
|
}
|
|
1771
1774
|
|
|
1772
|
-
function _extends() {
|
|
1773
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
1774
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
1775
|
-
var source = arguments[i];
|
|
1776
|
-
for (var key in source) {
|
|
1777
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
1778
|
-
target[key] = source[key];
|
|
1779
|
-
}
|
|
1780
|
-
}
|
|
1781
|
-
}
|
|
1782
|
-
return target;
|
|
1783
|
-
};
|
|
1784
|
-
return _extends.apply(this, arguments);
|
|
1785
|
-
}
|
|
1786
|
-
|
|
1787
|
-
/** @license React v16.13.1
|
|
1788
|
-
* react-is.production.min.js
|
|
1789
|
-
*
|
|
1790
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
1791
|
-
*
|
|
1792
|
-
* This source code is licensed under the MIT license found in the
|
|
1793
|
-
* LICENSE file in the root directory of this source tree.
|
|
1794
|
-
*/
|
|
1795
|
-
var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?
|
|
1796
|
-
Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
|
|
1797
|
-
function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}var AsyncMode=l;var ConcurrentMode=m;var ContextConsumer=k;var ContextProvider=h;var Element$1=c;var ForwardRef=n;var Fragment=e;var Lazy=t;var Memo=r;var Portal=d;
|
|
1798
|
-
var Profiler=g;var StrictMode=f;var Suspense=p;var isAsyncMode=function(a){return A(a)||z(a)===l};var isConcurrentMode=A;var isContextConsumer=function(a){return z(a)===k};var isContextProvider=function(a){return z(a)===h};var isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};var isForwardRef=function(a){return z(a)===n};var isFragment=function(a){return z(a)===e};var isLazy=function(a){return z(a)===t};
|
|
1799
|
-
var isMemo=function(a){return z(a)===r};var isPortal=function(a){return z(a)===d};var isProfiler=function(a){return z(a)===g};var isStrictMode=function(a){return z(a)===f};var isSuspense=function(a){return z(a)===p};
|
|
1800
|
-
var isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};var typeOf=z;
|
|
1801
|
-
|
|
1802
|
-
var reactIs_production_min = {
|
|
1803
|
-
AsyncMode: AsyncMode,
|
|
1804
|
-
ConcurrentMode: ConcurrentMode,
|
|
1805
|
-
ContextConsumer: ContextConsumer,
|
|
1806
|
-
ContextProvider: ContextProvider,
|
|
1807
|
-
Element: Element$1,
|
|
1808
|
-
ForwardRef: ForwardRef,
|
|
1809
|
-
Fragment: Fragment,
|
|
1810
|
-
Lazy: Lazy,
|
|
1811
|
-
Memo: Memo,
|
|
1812
|
-
Portal: Portal,
|
|
1813
|
-
Profiler: Profiler,
|
|
1814
|
-
StrictMode: StrictMode,
|
|
1815
|
-
Suspense: Suspense,
|
|
1816
|
-
isAsyncMode: isAsyncMode,
|
|
1817
|
-
isConcurrentMode: isConcurrentMode,
|
|
1818
|
-
isContextConsumer: isContextConsumer,
|
|
1819
|
-
isContextProvider: isContextProvider,
|
|
1820
|
-
isElement: isElement,
|
|
1821
|
-
isForwardRef: isForwardRef,
|
|
1822
|
-
isFragment: isFragment,
|
|
1823
|
-
isLazy: isLazy,
|
|
1824
|
-
isMemo: isMemo,
|
|
1825
|
-
isPortal: isPortal,
|
|
1826
|
-
isProfiler: isProfiler,
|
|
1827
|
-
isStrictMode: isStrictMode,
|
|
1828
|
-
isSuspense: isSuspense,
|
|
1829
|
-
isValidElementType: isValidElementType,
|
|
1830
|
-
typeOf: typeOf
|
|
1831
|
-
};
|
|
1832
|
-
|
|
1833
|
-
_commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
1834
|
-
});
|
|
1835
|
-
|
|
1836
|
-
var reactIs = _commonjsHelpers.createCommonjsModule(function (module) {
|
|
1837
|
-
|
|
1838
|
-
{
|
|
1839
|
-
module.exports = reactIs_production_min;
|
|
1840
|
-
}
|
|
1841
|
-
});
|
|
1842
|
-
|
|
1843
|
-
function toArray(children) {
|
|
1844
|
-
var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1845
|
-
var ret = [];
|
|
1846
|
-
index$4.react.Children.forEach(children, function (child) {
|
|
1847
|
-
if ((child === undefined || child === null) && !option.keepEmpty) {
|
|
1848
|
-
return;
|
|
1849
|
-
}
|
|
1850
|
-
if (Array.isArray(child)) {
|
|
1851
|
-
ret = ret.concat(toArray(child));
|
|
1852
|
-
} else if (reactIs.isFragment(child) && child.props) {
|
|
1853
|
-
ret = ret.concat(toArray(child.props.children, option));
|
|
1854
|
-
} else {
|
|
1855
|
-
ret.push(child);
|
|
1856
|
-
}
|
|
1857
|
-
});
|
|
1858
|
-
return ret;
|
|
1859
|
-
}
|
|
1860
|
-
|
|
1861
|
-
function _typeof$1(obj) {
|
|
1862
|
-
"@babel/helpers - typeof";
|
|
1863
|
-
|
|
1864
|
-
return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
1865
|
-
return typeof obj;
|
|
1866
|
-
} : function (obj) {
|
|
1867
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
1868
|
-
}, _typeof$1(obj);
|
|
1869
|
-
}
|
|
1870
|
-
|
|
1871
|
-
function _toPrimitive(input, hint) {
|
|
1872
|
-
if (_typeof$1(input) !== "object" || input === null) return input;
|
|
1873
|
-
var prim = input[Symbol.toPrimitive];
|
|
1874
|
-
if (prim !== undefined) {
|
|
1875
|
-
var res = prim.call(input, hint || "default");
|
|
1876
|
-
if (_typeof$1(res) !== "object") return res;
|
|
1877
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1878
|
-
}
|
|
1879
|
-
return (hint === "string" ? String : Number)(input);
|
|
1880
|
-
}
|
|
1881
|
-
|
|
1882
|
-
function _toPropertyKey(arg) {
|
|
1883
|
-
var key = _toPrimitive(arg, "string");
|
|
1884
|
-
return _typeof$1(key) === "symbol" ? key : String(key);
|
|
1885
|
-
}
|
|
1886
|
-
|
|
1887
|
-
function _defineProperty(obj, key, value) {
|
|
1888
|
-
key = _toPropertyKey(key);
|
|
1889
|
-
if (key in obj) {
|
|
1890
|
-
Object.defineProperty(obj, key, {
|
|
1891
|
-
value: value,
|
|
1892
|
-
enumerable: true,
|
|
1893
|
-
configurable: true,
|
|
1894
|
-
writable: true
|
|
1895
|
-
});
|
|
1896
|
-
} else {
|
|
1897
|
-
obj[key] = value;
|
|
1898
|
-
}
|
|
1899
|
-
return obj;
|
|
1900
|
-
}
|
|
1901
|
-
|
|
1902
|
-
function ownKeys(object, enumerableOnly) {
|
|
1903
|
-
var keys = Object.keys(object);
|
|
1904
|
-
if (Object.getOwnPropertySymbols) {
|
|
1905
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
1906
|
-
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
1907
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
1908
|
-
})), keys.push.apply(keys, symbols);
|
|
1909
|
-
}
|
|
1910
|
-
return keys;
|
|
1911
|
-
}
|
|
1912
|
-
function _objectSpread2(target) {
|
|
1913
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
1914
|
-
var source = null != arguments[i] ? arguments[i] : {};
|
|
1915
|
-
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
1916
|
-
_defineProperty(target, key, source[key]);
|
|
1917
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
1918
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
1919
|
-
});
|
|
1920
|
-
}
|
|
1921
|
-
return target;
|
|
1922
|
-
}
|
|
1923
|
-
|
|
1924
|
-
function _typeof(obj) {
|
|
1925
|
-
"@babel/helpers - typeof";
|
|
1926
|
-
|
|
1927
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
1928
|
-
return typeof obj;
|
|
1929
|
-
} : function (obj) {
|
|
1930
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
1931
|
-
}, _typeof(obj);
|
|
1932
|
-
}
|
|
1933
|
-
|
|
1934
|
-
function fillRef(ref, node) {
|
|
1935
|
-
if (typeof ref === 'function') {
|
|
1936
|
-
ref(node);
|
|
1937
|
-
} else if (_typeof(ref) === 'object' && ref && 'current' in ref) {
|
|
1938
|
-
ref.current = node;
|
|
1939
|
-
}
|
|
1940
|
-
}
|
|
1941
|
-
|
|
1942
|
-
/**
|
|
1943
|
-
* Merge refs into one ref function to support ref passing.
|
|
1944
|
-
*/
|
|
1945
|
-
function composeRef() {
|
|
1946
|
-
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1947
|
-
refs[_key] = arguments[_key];
|
|
1948
|
-
}
|
|
1949
|
-
var refList = refs.filter(function (ref) {
|
|
1950
|
-
return ref;
|
|
1951
|
-
});
|
|
1952
|
-
if (refList.length <= 1) {
|
|
1953
|
-
return refList[0];
|
|
1954
|
-
}
|
|
1955
|
-
return function (node) {
|
|
1956
|
-
refs.forEach(function (ref) {
|
|
1957
|
-
fillRef(ref, node);
|
|
1958
|
-
});
|
|
1959
|
-
};
|
|
1960
|
-
}
|
|
1961
|
-
function supportRef(nodeOrComponent) {
|
|
1962
|
-
var _type$prototype, _nodeOrComponent$prot;
|
|
1963
|
-
var type = reactIs.isMemo(nodeOrComponent) ? nodeOrComponent.type.type : nodeOrComponent.type;
|
|
1964
|
-
|
|
1965
|
-
// Function component node
|
|
1966
|
-
if (typeof type === 'function' && !((_type$prototype = type.prototype) !== null && _type$prototype !== void 0 && _type$prototype.render)) {
|
|
1967
|
-
return false;
|
|
1968
|
-
}
|
|
1969
|
-
|
|
1970
|
-
// Class component
|
|
1971
|
-
if (typeof nodeOrComponent === 'function' && !((_nodeOrComponent$prot = nodeOrComponent.prototype) !== null && _nodeOrComponent$prot !== void 0 && _nodeOrComponent$prot.render)) {
|
|
1972
|
-
return false;
|
|
1973
|
-
}
|
|
1974
|
-
return true;
|
|
1975
|
-
}
|
|
1976
|
-
/* eslint-enable */
|
|
1977
|
-
|
|
1978
|
-
function isDOM(node) {
|
|
1979
|
-
// https://developer.mozilla.org/en-US/docs/Web/API/Element
|
|
1980
|
-
// Since XULElement is also subclass of Element, we only need HTMLElement and SVGElement
|
|
1981
|
-
return node instanceof HTMLElement || node instanceof SVGElement;
|
|
1982
|
-
}
|
|
1983
|
-
|
|
1984
|
-
/**
|
|
1985
|
-
* Return if a node is a DOM node. Else will return by `findDOMNode`
|
|
1986
|
-
*/
|
|
1987
|
-
function findDOMNode(node) {
|
|
1988
|
-
if (isDOM(node)) {
|
|
1989
|
-
return node;
|
|
1990
|
-
}
|
|
1991
|
-
if (node instanceof index$4.react.Component) {
|
|
1992
|
-
return index$4.reactDom.findDOMNode(node);
|
|
1993
|
-
}
|
|
1994
|
-
return null;
|
|
1995
|
-
}
|
|
1996
|
-
|
|
1997
|
-
/**
|
|
1998
|
-
* A collection of shims that provide minimal functionality of the ES6 collections.
|
|
1999
|
-
*
|
|
2000
|
-
* These implementations are not meant to be used outside of the ResizeObserver
|
|
2001
|
-
* modules as they cover only a limited range of use cases.
|
|
2002
|
-
*/
|
|
2003
|
-
/* eslint-disable require-jsdoc, valid-jsdoc */
|
|
2004
|
-
var MapShim = (function () {
|
|
2005
|
-
if (typeof Map !== 'undefined') {
|
|
2006
|
-
return Map;
|
|
2007
|
-
}
|
|
2008
|
-
/**
|
|
2009
|
-
* Returns index in provided array that matches the specified key.
|
|
2010
|
-
*
|
|
2011
|
-
* @param {Array<Array>} arr
|
|
2012
|
-
* @param {*} key
|
|
2013
|
-
* @returns {number}
|
|
2014
|
-
*/
|
|
2015
|
-
function getIndex(arr, key) {
|
|
2016
|
-
var result = -1;
|
|
2017
|
-
arr.some(function (entry, index) {
|
|
2018
|
-
if (entry[0] === key) {
|
|
2019
|
-
result = index;
|
|
2020
|
-
return true;
|
|
2021
|
-
}
|
|
2022
|
-
return false;
|
|
2023
|
-
});
|
|
2024
|
-
return result;
|
|
2025
|
-
}
|
|
2026
|
-
return /** @class */ (function () {
|
|
2027
|
-
function class_1() {
|
|
2028
|
-
this.__entries__ = [];
|
|
2029
|
-
}
|
|
2030
|
-
Object.defineProperty(class_1.prototype, "size", {
|
|
2031
|
-
/**
|
|
2032
|
-
* @returns {boolean}
|
|
2033
|
-
*/
|
|
2034
|
-
get: function () {
|
|
2035
|
-
return this.__entries__.length;
|
|
2036
|
-
},
|
|
2037
|
-
enumerable: true,
|
|
2038
|
-
configurable: true
|
|
2039
|
-
});
|
|
2040
|
-
/**
|
|
2041
|
-
* @param {*} key
|
|
2042
|
-
* @returns {*}
|
|
2043
|
-
*/
|
|
2044
|
-
class_1.prototype.get = function (key) {
|
|
2045
|
-
var index = getIndex(this.__entries__, key);
|
|
2046
|
-
var entry = this.__entries__[index];
|
|
2047
|
-
return entry && entry[1];
|
|
2048
|
-
};
|
|
2049
|
-
/**
|
|
2050
|
-
* @param {*} key
|
|
2051
|
-
* @param {*} value
|
|
2052
|
-
* @returns {void}
|
|
2053
|
-
*/
|
|
2054
|
-
class_1.prototype.set = function (key, value) {
|
|
2055
|
-
var index = getIndex(this.__entries__, key);
|
|
2056
|
-
if (~index) {
|
|
2057
|
-
this.__entries__[index][1] = value;
|
|
2058
|
-
}
|
|
2059
|
-
else {
|
|
2060
|
-
this.__entries__.push([key, value]);
|
|
2061
|
-
}
|
|
2062
|
-
};
|
|
2063
|
-
/**
|
|
2064
|
-
* @param {*} key
|
|
2065
|
-
* @returns {void}
|
|
2066
|
-
*/
|
|
2067
|
-
class_1.prototype.delete = function (key) {
|
|
2068
|
-
var entries = this.__entries__;
|
|
2069
|
-
var index = getIndex(entries, key);
|
|
2070
|
-
if (~index) {
|
|
2071
|
-
entries.splice(index, 1);
|
|
2072
|
-
}
|
|
2073
|
-
};
|
|
2074
|
-
/**
|
|
2075
|
-
* @param {*} key
|
|
2076
|
-
* @returns {void}
|
|
2077
|
-
*/
|
|
2078
|
-
class_1.prototype.has = function (key) {
|
|
2079
|
-
return !!~getIndex(this.__entries__, key);
|
|
2080
|
-
};
|
|
2081
|
-
/**
|
|
2082
|
-
* @returns {void}
|
|
2083
|
-
*/
|
|
2084
|
-
class_1.prototype.clear = function () {
|
|
2085
|
-
this.__entries__.splice(0);
|
|
2086
|
-
};
|
|
2087
|
-
/**
|
|
2088
|
-
* @param {Function} callback
|
|
2089
|
-
* @param {*} [ctx=null]
|
|
2090
|
-
* @returns {void}
|
|
2091
|
-
*/
|
|
2092
|
-
class_1.prototype.forEach = function (callback, ctx) {
|
|
2093
|
-
if (ctx === void 0) { ctx = null; }
|
|
2094
|
-
for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {
|
|
2095
|
-
var entry = _a[_i];
|
|
2096
|
-
callback.call(ctx, entry[1], entry[0]);
|
|
2097
|
-
}
|
|
2098
|
-
};
|
|
2099
|
-
return class_1;
|
|
2100
|
-
}());
|
|
2101
|
-
})();
|
|
2102
|
-
|
|
2103
|
-
/**
|
|
2104
|
-
* Detects whether window and document objects are available in current environment.
|
|
2105
|
-
*/
|
|
2106
|
-
var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;
|
|
2107
|
-
|
|
2108
|
-
// Returns global object of a current environment.
|
|
2109
|
-
var global$1 = (function () {
|
|
2110
|
-
if (typeof global !== 'undefined' && global.Math === Math) {
|
|
2111
|
-
return global;
|
|
2112
|
-
}
|
|
2113
|
-
if (typeof self !== 'undefined' && self.Math === Math) {
|
|
2114
|
-
return self;
|
|
2115
|
-
}
|
|
2116
|
-
if (typeof window !== 'undefined' && window.Math === Math) {
|
|
2117
|
-
return window;
|
|
2118
|
-
}
|
|
2119
|
-
// eslint-disable-next-line no-new-func
|
|
2120
|
-
return Function('return this')();
|
|
2121
|
-
})();
|
|
2122
|
-
|
|
2123
|
-
/**
|
|
2124
|
-
* A shim for the requestAnimationFrame which falls back to the setTimeout if
|
|
2125
|
-
* first one is not supported.
|
|
2126
|
-
*
|
|
2127
|
-
* @returns {number} Requests' identifier.
|
|
2128
|
-
*/
|
|
2129
|
-
var requestAnimationFrame$1 = (function () {
|
|
2130
|
-
if (typeof requestAnimationFrame === 'function') {
|
|
2131
|
-
// It's required to use a bounded function because IE sometimes throws
|
|
2132
|
-
// an "Invalid calling object" error if rAF is invoked without the global
|
|
2133
|
-
// object on the left hand side.
|
|
2134
|
-
return requestAnimationFrame.bind(global$1);
|
|
2135
|
-
}
|
|
2136
|
-
return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };
|
|
2137
|
-
})();
|
|
2138
|
-
|
|
2139
|
-
// Defines minimum timeout before adding a trailing call.
|
|
2140
|
-
var trailingTimeout = 2;
|
|
2141
|
-
/**
|
|
2142
|
-
* Creates a wrapper function which ensures that provided callback will be
|
|
2143
|
-
* invoked only once during the specified delay period.
|
|
2144
|
-
*
|
|
2145
|
-
* @param {Function} callback - Function to be invoked after the delay period.
|
|
2146
|
-
* @param {number} delay - Delay after which to invoke callback.
|
|
2147
|
-
* @returns {Function}
|
|
2148
|
-
*/
|
|
2149
|
-
function throttle (callback, delay) {
|
|
2150
|
-
var leadingCall = false, trailingCall = false, lastCallTime = 0;
|
|
2151
|
-
/**
|
|
2152
|
-
* Invokes the original callback function and schedules new invocation if
|
|
2153
|
-
* the "proxy" was called during current request.
|
|
2154
|
-
*
|
|
2155
|
-
* @returns {void}
|
|
2156
|
-
*/
|
|
2157
|
-
function resolvePending() {
|
|
2158
|
-
if (leadingCall) {
|
|
2159
|
-
leadingCall = false;
|
|
2160
|
-
callback();
|
|
2161
|
-
}
|
|
2162
|
-
if (trailingCall) {
|
|
2163
|
-
proxy();
|
|
2164
|
-
}
|
|
2165
|
-
}
|
|
2166
|
-
/**
|
|
2167
|
-
* Callback invoked after the specified delay. It will further postpone
|
|
2168
|
-
* invocation of the original function delegating it to the
|
|
2169
|
-
* requestAnimationFrame.
|
|
2170
|
-
*
|
|
2171
|
-
* @returns {void}
|
|
2172
|
-
*/
|
|
2173
|
-
function timeoutCallback() {
|
|
2174
|
-
requestAnimationFrame$1(resolvePending);
|
|
2175
|
-
}
|
|
2176
|
-
/**
|
|
2177
|
-
* Schedules invocation of the original function.
|
|
2178
|
-
*
|
|
2179
|
-
* @returns {void}
|
|
2180
|
-
*/
|
|
2181
|
-
function proxy() {
|
|
2182
|
-
var timeStamp = Date.now();
|
|
2183
|
-
if (leadingCall) {
|
|
2184
|
-
// Reject immediately following calls.
|
|
2185
|
-
if (timeStamp - lastCallTime < trailingTimeout) {
|
|
2186
|
-
return;
|
|
2187
|
-
}
|
|
2188
|
-
// Schedule new call to be in invoked when the pending one is resolved.
|
|
2189
|
-
// This is important for "transitions" which never actually start
|
|
2190
|
-
// immediately so there is a chance that we might miss one if change
|
|
2191
|
-
// happens amids the pending invocation.
|
|
2192
|
-
trailingCall = true;
|
|
2193
|
-
}
|
|
2194
|
-
else {
|
|
2195
|
-
leadingCall = true;
|
|
2196
|
-
trailingCall = false;
|
|
2197
|
-
setTimeout(timeoutCallback, delay);
|
|
2198
|
-
}
|
|
2199
|
-
lastCallTime = timeStamp;
|
|
2200
|
-
}
|
|
2201
|
-
return proxy;
|
|
2202
|
-
}
|
|
2203
|
-
|
|
2204
|
-
// Minimum delay before invoking the update of observers.
|
|
2205
|
-
var REFRESH_DELAY = 20;
|
|
2206
|
-
// A list of substrings of CSS properties used to find transition events that
|
|
2207
|
-
// might affect dimensions of observed elements.
|
|
2208
|
-
var transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];
|
|
2209
|
-
// Check if MutationObserver is available.
|
|
2210
|
-
var mutationObserverSupported = typeof MutationObserver !== 'undefined';
|
|
2211
|
-
/**
|
|
2212
|
-
* Singleton controller class which handles updates of ResizeObserver instances.
|
|
2213
|
-
*/
|
|
2214
|
-
var ResizeObserverController = /** @class */ (function () {
|
|
2215
|
-
/**
|
|
2216
|
-
* Creates a new instance of ResizeObserverController.
|
|
2217
|
-
*
|
|
2218
|
-
* @private
|
|
2219
|
-
*/
|
|
2220
|
-
function ResizeObserverController() {
|
|
2221
|
-
/**
|
|
2222
|
-
* Indicates whether DOM listeners have been added.
|
|
2223
|
-
*
|
|
2224
|
-
* @private {boolean}
|
|
2225
|
-
*/
|
|
2226
|
-
this.connected_ = false;
|
|
2227
|
-
/**
|
|
2228
|
-
* Tells that controller has subscribed for Mutation Events.
|
|
2229
|
-
*
|
|
2230
|
-
* @private {boolean}
|
|
2231
|
-
*/
|
|
2232
|
-
this.mutationEventsAdded_ = false;
|
|
2233
|
-
/**
|
|
2234
|
-
* Keeps reference to the instance of MutationObserver.
|
|
2235
|
-
*
|
|
2236
|
-
* @private {MutationObserver}
|
|
2237
|
-
*/
|
|
2238
|
-
this.mutationsObserver_ = null;
|
|
2239
|
-
/**
|
|
2240
|
-
* A list of connected observers.
|
|
2241
|
-
*
|
|
2242
|
-
* @private {Array<ResizeObserverSPI>}
|
|
2243
|
-
*/
|
|
2244
|
-
this.observers_ = [];
|
|
2245
|
-
this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);
|
|
2246
|
-
this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);
|
|
2247
|
-
}
|
|
2248
|
-
/**
|
|
2249
|
-
* Adds observer to observers list.
|
|
2250
|
-
*
|
|
2251
|
-
* @param {ResizeObserverSPI} observer - Observer to be added.
|
|
2252
|
-
* @returns {void}
|
|
2253
|
-
*/
|
|
2254
|
-
ResizeObserverController.prototype.addObserver = function (observer) {
|
|
2255
|
-
if (!~this.observers_.indexOf(observer)) {
|
|
2256
|
-
this.observers_.push(observer);
|
|
2257
|
-
}
|
|
2258
|
-
// Add listeners if they haven't been added yet.
|
|
2259
|
-
if (!this.connected_) {
|
|
2260
|
-
this.connect_();
|
|
2261
|
-
}
|
|
2262
|
-
};
|
|
2263
|
-
/**
|
|
2264
|
-
* Removes observer from observers list.
|
|
2265
|
-
*
|
|
2266
|
-
* @param {ResizeObserverSPI} observer - Observer to be removed.
|
|
2267
|
-
* @returns {void}
|
|
2268
|
-
*/
|
|
2269
|
-
ResizeObserverController.prototype.removeObserver = function (observer) {
|
|
2270
|
-
var observers = this.observers_;
|
|
2271
|
-
var index = observers.indexOf(observer);
|
|
2272
|
-
// Remove observer if it's present in registry.
|
|
2273
|
-
if (~index) {
|
|
2274
|
-
observers.splice(index, 1);
|
|
2275
|
-
}
|
|
2276
|
-
// Remove listeners if controller has no connected observers.
|
|
2277
|
-
if (!observers.length && this.connected_) {
|
|
2278
|
-
this.disconnect_();
|
|
2279
|
-
}
|
|
2280
|
-
};
|
|
2281
|
-
/**
|
|
2282
|
-
* Invokes the update of observers. It will continue running updates insofar
|
|
2283
|
-
* it detects changes.
|
|
2284
|
-
*
|
|
2285
|
-
* @returns {void}
|
|
2286
|
-
*/
|
|
2287
|
-
ResizeObserverController.prototype.refresh = function () {
|
|
2288
|
-
var changesDetected = this.updateObservers_();
|
|
2289
|
-
// Continue running updates if changes have been detected as there might
|
|
2290
|
-
// be future ones caused by CSS transitions.
|
|
2291
|
-
if (changesDetected) {
|
|
2292
|
-
this.refresh();
|
|
2293
|
-
}
|
|
2294
|
-
};
|
|
2295
|
-
/**
|
|
2296
|
-
* Updates every observer from observers list and notifies them of queued
|
|
2297
|
-
* entries.
|
|
2298
|
-
*
|
|
2299
|
-
* @private
|
|
2300
|
-
* @returns {boolean} Returns "true" if any observer has detected changes in
|
|
2301
|
-
* dimensions of it's elements.
|
|
2302
|
-
*/
|
|
2303
|
-
ResizeObserverController.prototype.updateObservers_ = function () {
|
|
2304
|
-
// Collect observers that have active observations.
|
|
2305
|
-
var activeObservers = this.observers_.filter(function (observer) {
|
|
2306
|
-
return observer.gatherActive(), observer.hasActive();
|
|
2307
|
-
});
|
|
2308
|
-
// Deliver notifications in a separate cycle in order to avoid any
|
|
2309
|
-
// collisions between observers, e.g. when multiple instances of
|
|
2310
|
-
// ResizeObserver are tracking the same element and the callback of one
|
|
2311
|
-
// of them changes content dimensions of the observed target. Sometimes
|
|
2312
|
-
// this may result in notifications being blocked for the rest of observers.
|
|
2313
|
-
activeObservers.forEach(function (observer) { return observer.broadcastActive(); });
|
|
2314
|
-
return activeObservers.length > 0;
|
|
2315
|
-
};
|
|
2316
|
-
/**
|
|
2317
|
-
* Initializes DOM listeners.
|
|
2318
|
-
*
|
|
2319
|
-
* @private
|
|
2320
|
-
* @returns {void}
|
|
2321
|
-
*/
|
|
2322
|
-
ResizeObserverController.prototype.connect_ = function () {
|
|
2323
|
-
// Do nothing if running in a non-browser environment or if listeners
|
|
2324
|
-
// have been already added.
|
|
2325
|
-
if (!isBrowser || this.connected_) {
|
|
2326
|
-
return;
|
|
2327
|
-
}
|
|
2328
|
-
// Subscription to the "Transitionend" event is used as a workaround for
|
|
2329
|
-
// delayed transitions. This way it's possible to capture at least the
|
|
2330
|
-
// final state of an element.
|
|
2331
|
-
document.addEventListener('transitionend', this.onTransitionEnd_);
|
|
2332
|
-
window.addEventListener('resize', this.refresh);
|
|
2333
|
-
if (mutationObserverSupported) {
|
|
2334
|
-
this.mutationsObserver_ = new MutationObserver(this.refresh);
|
|
2335
|
-
this.mutationsObserver_.observe(document, {
|
|
2336
|
-
attributes: true,
|
|
2337
|
-
childList: true,
|
|
2338
|
-
characterData: true,
|
|
2339
|
-
subtree: true
|
|
2340
|
-
});
|
|
2341
|
-
}
|
|
2342
|
-
else {
|
|
2343
|
-
document.addEventListener('DOMSubtreeModified', this.refresh);
|
|
2344
|
-
this.mutationEventsAdded_ = true;
|
|
2345
|
-
}
|
|
2346
|
-
this.connected_ = true;
|
|
2347
|
-
};
|
|
2348
|
-
/**
|
|
2349
|
-
* Removes DOM listeners.
|
|
2350
|
-
*
|
|
2351
|
-
* @private
|
|
2352
|
-
* @returns {void}
|
|
2353
|
-
*/
|
|
2354
|
-
ResizeObserverController.prototype.disconnect_ = function () {
|
|
2355
|
-
// Do nothing if running in a non-browser environment or if listeners
|
|
2356
|
-
// have been already removed.
|
|
2357
|
-
if (!isBrowser || !this.connected_) {
|
|
2358
|
-
return;
|
|
2359
|
-
}
|
|
2360
|
-
document.removeEventListener('transitionend', this.onTransitionEnd_);
|
|
2361
|
-
window.removeEventListener('resize', this.refresh);
|
|
2362
|
-
if (this.mutationsObserver_) {
|
|
2363
|
-
this.mutationsObserver_.disconnect();
|
|
2364
|
-
}
|
|
2365
|
-
if (this.mutationEventsAdded_) {
|
|
2366
|
-
document.removeEventListener('DOMSubtreeModified', this.refresh);
|
|
2367
|
-
}
|
|
2368
|
-
this.mutationsObserver_ = null;
|
|
2369
|
-
this.mutationEventsAdded_ = false;
|
|
2370
|
-
this.connected_ = false;
|
|
2371
|
-
};
|
|
2372
|
-
/**
|
|
2373
|
-
* "Transitionend" event handler.
|
|
2374
|
-
*
|
|
2375
|
-
* @private
|
|
2376
|
-
* @param {TransitionEvent} event
|
|
2377
|
-
* @returns {void}
|
|
2378
|
-
*/
|
|
2379
|
-
ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {
|
|
2380
|
-
var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b;
|
|
2381
|
-
// Detect whether transition may affect dimensions of an element.
|
|
2382
|
-
var isReflowProperty = transitionKeys.some(function (key) {
|
|
2383
|
-
return !!~propertyName.indexOf(key);
|
|
2384
|
-
});
|
|
2385
|
-
if (isReflowProperty) {
|
|
2386
|
-
this.refresh();
|
|
2387
|
-
}
|
|
2388
|
-
};
|
|
2389
|
-
/**
|
|
2390
|
-
* Returns instance of the ResizeObserverController.
|
|
2391
|
-
*
|
|
2392
|
-
* @returns {ResizeObserverController}
|
|
2393
|
-
*/
|
|
2394
|
-
ResizeObserverController.getInstance = function () {
|
|
2395
|
-
if (!this.instance_) {
|
|
2396
|
-
this.instance_ = new ResizeObserverController();
|
|
2397
|
-
}
|
|
2398
|
-
return this.instance_;
|
|
2399
|
-
};
|
|
2400
|
-
/**
|
|
2401
|
-
* Holds reference to the controller's instance.
|
|
2402
|
-
*
|
|
2403
|
-
* @private {ResizeObserverController}
|
|
2404
|
-
*/
|
|
2405
|
-
ResizeObserverController.instance_ = null;
|
|
2406
|
-
return ResizeObserverController;
|
|
2407
|
-
}());
|
|
2408
|
-
|
|
2409
|
-
/**
|
|
2410
|
-
* Defines non-writable/enumerable properties of the provided target object.
|
|
2411
|
-
*
|
|
2412
|
-
* @param {Object} target - Object for which to define properties.
|
|
2413
|
-
* @param {Object} props - Properties to be defined.
|
|
2414
|
-
* @returns {Object} Target object.
|
|
2415
|
-
*/
|
|
2416
|
-
var defineConfigurable = (function (target, props) {
|
|
2417
|
-
for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {
|
|
2418
|
-
var key = _a[_i];
|
|
2419
|
-
Object.defineProperty(target, key, {
|
|
2420
|
-
value: props[key],
|
|
2421
|
-
enumerable: false,
|
|
2422
|
-
writable: false,
|
|
2423
|
-
configurable: true
|
|
2424
|
-
});
|
|
2425
|
-
}
|
|
2426
|
-
return target;
|
|
2427
|
-
});
|
|
2428
|
-
|
|
2429
|
-
/**
|
|
2430
|
-
* Returns the global object associated with provided element.
|
|
2431
|
-
*
|
|
2432
|
-
* @param {Object} target
|
|
2433
|
-
* @returns {Object}
|
|
2434
|
-
*/
|
|
2435
|
-
var getWindowOf = (function (target) {
|
|
2436
|
-
// Assume that the element is an instance of Node, which means that it
|
|
2437
|
-
// has the "ownerDocument" property from which we can retrieve a
|
|
2438
|
-
// corresponding global object.
|
|
2439
|
-
var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;
|
|
2440
|
-
// Return the local global object if it's not possible extract one from
|
|
2441
|
-
// provided element.
|
|
2442
|
-
return ownerGlobal || global$1;
|
|
2443
|
-
});
|
|
2444
|
-
|
|
2445
|
-
// Placeholder of an empty content rectangle.
|
|
2446
|
-
var emptyRect = createRectInit(0, 0, 0, 0);
|
|
2447
|
-
/**
|
|
2448
|
-
* Converts provided string to a number.
|
|
2449
|
-
*
|
|
2450
|
-
* @param {number|string} value
|
|
2451
|
-
* @returns {number}
|
|
2452
|
-
*/
|
|
2453
|
-
function toFloat(value) {
|
|
2454
|
-
return parseFloat(value) || 0;
|
|
2455
|
-
}
|
|
2456
|
-
/**
|
|
2457
|
-
* Extracts borders size from provided styles.
|
|
2458
|
-
*
|
|
2459
|
-
* @param {CSSStyleDeclaration} styles
|
|
2460
|
-
* @param {...string} positions - Borders positions (top, right, ...)
|
|
2461
|
-
* @returns {number}
|
|
2462
|
-
*/
|
|
2463
|
-
function getBordersSize(styles) {
|
|
2464
|
-
var positions = [];
|
|
2465
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
2466
|
-
positions[_i - 1] = arguments[_i];
|
|
2467
|
-
}
|
|
2468
|
-
return positions.reduce(function (size, position) {
|
|
2469
|
-
var value = styles['border-' + position + '-width'];
|
|
2470
|
-
return size + toFloat(value);
|
|
2471
|
-
}, 0);
|
|
2472
|
-
}
|
|
2473
|
-
/**
|
|
2474
|
-
* Extracts paddings sizes from provided styles.
|
|
2475
|
-
*
|
|
2476
|
-
* @param {CSSStyleDeclaration} styles
|
|
2477
|
-
* @returns {Object} Paddings box.
|
|
2478
|
-
*/
|
|
2479
|
-
function getPaddings(styles) {
|
|
2480
|
-
var positions = ['top', 'right', 'bottom', 'left'];
|
|
2481
|
-
var paddings = {};
|
|
2482
|
-
for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {
|
|
2483
|
-
var position = positions_1[_i];
|
|
2484
|
-
var value = styles['padding-' + position];
|
|
2485
|
-
paddings[position] = toFloat(value);
|
|
2486
|
-
}
|
|
2487
|
-
return paddings;
|
|
2488
|
-
}
|
|
2489
|
-
/**
|
|
2490
|
-
* Calculates content rectangle of provided SVG element.
|
|
2491
|
-
*
|
|
2492
|
-
* @param {SVGGraphicsElement} target - Element content rectangle of which needs
|
|
2493
|
-
* to be calculated.
|
|
2494
|
-
* @returns {DOMRectInit}
|
|
2495
|
-
*/
|
|
2496
|
-
function getSVGContentRect(target) {
|
|
2497
|
-
var bbox = target.getBBox();
|
|
2498
|
-
return createRectInit(0, 0, bbox.width, bbox.height);
|
|
2499
|
-
}
|
|
2500
|
-
/**
|
|
2501
|
-
* Calculates content rectangle of provided HTMLElement.
|
|
2502
|
-
*
|
|
2503
|
-
* @param {HTMLElement} target - Element for which to calculate the content rectangle.
|
|
2504
|
-
* @returns {DOMRectInit}
|
|
2505
|
-
*/
|
|
2506
|
-
function getHTMLElementContentRect(target) {
|
|
2507
|
-
// Client width & height properties can't be
|
|
2508
|
-
// used exclusively as they provide rounded values.
|
|
2509
|
-
var clientWidth = target.clientWidth, clientHeight = target.clientHeight;
|
|
2510
|
-
// By this condition we can catch all non-replaced inline, hidden and
|
|
2511
|
-
// detached elements. Though elements with width & height properties less
|
|
2512
|
-
// than 0.5 will be discarded as well.
|
|
2513
|
-
//
|
|
2514
|
-
// Without it we would need to implement separate methods for each of
|
|
2515
|
-
// those cases and it's not possible to perform a precise and performance
|
|
2516
|
-
// effective test for hidden elements. E.g. even jQuery's ':visible' filter
|
|
2517
|
-
// gives wrong results for elements with width & height less than 0.5.
|
|
2518
|
-
if (!clientWidth && !clientHeight) {
|
|
2519
|
-
return emptyRect;
|
|
2520
|
-
}
|
|
2521
|
-
var styles = getWindowOf(target).getComputedStyle(target);
|
|
2522
|
-
var paddings = getPaddings(styles);
|
|
2523
|
-
var horizPad = paddings.left + paddings.right;
|
|
2524
|
-
var vertPad = paddings.top + paddings.bottom;
|
|
2525
|
-
// Computed styles of width & height are being used because they are the
|
|
2526
|
-
// only dimensions available to JS that contain non-rounded values. It could
|
|
2527
|
-
// be possible to utilize the getBoundingClientRect if only it's data wasn't
|
|
2528
|
-
// affected by CSS transformations let alone paddings, borders and scroll bars.
|
|
2529
|
-
var width = toFloat(styles.width), height = toFloat(styles.height);
|
|
2530
|
-
// Width & height include paddings and borders when the 'border-box' box
|
|
2531
|
-
// model is applied (except for IE).
|
|
2532
|
-
if (styles.boxSizing === 'border-box') {
|
|
2533
|
-
// Following conditions are required to handle Internet Explorer which
|
|
2534
|
-
// doesn't include paddings and borders to computed CSS dimensions.
|
|
2535
|
-
//
|
|
2536
|
-
// We can say that if CSS dimensions + paddings are equal to the "client"
|
|
2537
|
-
// properties then it's either IE, and thus we don't need to subtract
|
|
2538
|
-
// anything, or an element merely doesn't have paddings/borders styles.
|
|
2539
|
-
if (Math.round(width + horizPad) !== clientWidth) {
|
|
2540
|
-
width -= getBordersSize(styles, 'left', 'right') + horizPad;
|
|
2541
|
-
}
|
|
2542
|
-
if (Math.round(height + vertPad) !== clientHeight) {
|
|
2543
|
-
height -= getBordersSize(styles, 'top', 'bottom') + vertPad;
|
|
2544
|
-
}
|
|
2545
|
-
}
|
|
2546
|
-
// Following steps can't be applied to the document's root element as its
|
|
2547
|
-
// client[Width/Height] properties represent viewport area of the window.
|
|
2548
|
-
// Besides, it's as well not necessary as the <html> itself neither has
|
|
2549
|
-
// rendered scroll bars nor it can be clipped.
|
|
2550
|
-
if (!isDocumentElement(target)) {
|
|
2551
|
-
// In some browsers (only in Firefox, actually) CSS width & height
|
|
2552
|
-
// include scroll bars size which can be removed at this step as scroll
|
|
2553
|
-
// bars are the only difference between rounded dimensions + paddings
|
|
2554
|
-
// and "client" properties, though that is not always true in Chrome.
|
|
2555
|
-
var vertScrollbar = Math.round(width + horizPad) - clientWidth;
|
|
2556
|
-
var horizScrollbar = Math.round(height + vertPad) - clientHeight;
|
|
2557
|
-
// Chrome has a rather weird rounding of "client" properties.
|
|
2558
|
-
// E.g. for an element with content width of 314.2px it sometimes gives
|
|
2559
|
-
// the client width of 315px and for the width of 314.7px it may give
|
|
2560
|
-
// 314px. And it doesn't happen all the time. So just ignore this delta
|
|
2561
|
-
// as a non-relevant.
|
|
2562
|
-
if (Math.abs(vertScrollbar) !== 1) {
|
|
2563
|
-
width -= vertScrollbar;
|
|
2564
|
-
}
|
|
2565
|
-
if (Math.abs(horizScrollbar) !== 1) {
|
|
2566
|
-
height -= horizScrollbar;
|
|
2567
|
-
}
|
|
2568
|
-
}
|
|
2569
|
-
return createRectInit(paddings.left, paddings.top, width, height);
|
|
2570
|
-
}
|
|
2571
|
-
/**
|
|
2572
|
-
* Checks whether provided element is an instance of the SVGGraphicsElement.
|
|
2573
|
-
*
|
|
2574
|
-
* @param {Element} target - Element to be checked.
|
|
2575
|
-
* @returns {boolean}
|
|
2576
|
-
*/
|
|
2577
|
-
var isSVGGraphicsElement = (function () {
|
|
2578
|
-
// Some browsers, namely IE and Edge, don't have the SVGGraphicsElement
|
|
2579
|
-
// interface.
|
|
2580
|
-
if (typeof SVGGraphicsElement !== 'undefined') {
|
|
2581
|
-
return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };
|
|
2582
|
-
}
|
|
2583
|
-
// If it's so, then check that element is at least an instance of the
|
|
2584
|
-
// SVGElement and that it has the "getBBox" method.
|
|
2585
|
-
// eslint-disable-next-line no-extra-parens
|
|
2586
|
-
return function (target) { return (target instanceof getWindowOf(target).SVGElement &&
|
|
2587
|
-
typeof target.getBBox === 'function'); };
|
|
2588
|
-
})();
|
|
2589
|
-
/**
|
|
2590
|
-
* Checks whether provided element is a document element (<html>).
|
|
2591
|
-
*
|
|
2592
|
-
* @param {Element} target - Element to be checked.
|
|
2593
|
-
* @returns {boolean}
|
|
2594
|
-
*/
|
|
2595
|
-
function isDocumentElement(target) {
|
|
2596
|
-
return target === getWindowOf(target).document.documentElement;
|
|
2597
|
-
}
|
|
2598
|
-
/**
|
|
2599
|
-
* Calculates an appropriate content rectangle for provided html or svg element.
|
|
2600
|
-
*
|
|
2601
|
-
* @param {Element} target - Element content rectangle of which needs to be calculated.
|
|
2602
|
-
* @returns {DOMRectInit}
|
|
2603
|
-
*/
|
|
2604
|
-
function getContentRect(target) {
|
|
2605
|
-
if (!isBrowser) {
|
|
2606
|
-
return emptyRect;
|
|
2607
|
-
}
|
|
2608
|
-
if (isSVGGraphicsElement(target)) {
|
|
2609
|
-
return getSVGContentRect(target);
|
|
2610
|
-
}
|
|
2611
|
-
return getHTMLElementContentRect(target);
|
|
2612
|
-
}
|
|
2613
|
-
/**
|
|
2614
|
-
* Creates rectangle with an interface of the DOMRectReadOnly.
|
|
2615
|
-
* Spec: https://drafts.fxtf.org/geometry/#domrectreadonly
|
|
2616
|
-
*
|
|
2617
|
-
* @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.
|
|
2618
|
-
* @returns {DOMRectReadOnly}
|
|
2619
|
-
*/
|
|
2620
|
-
function createReadOnlyRect(_a) {
|
|
2621
|
-
var x = _a.x, y = _a.y, width = _a.width, height = _a.height;
|
|
2622
|
-
// If DOMRectReadOnly is available use it as a prototype for the rectangle.
|
|
2623
|
-
var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;
|
|
2624
|
-
var rect = Object.create(Constr.prototype);
|
|
2625
|
-
// Rectangle's properties are not writable and non-enumerable.
|
|
2626
|
-
defineConfigurable(rect, {
|
|
2627
|
-
x: x, y: y, width: width, height: height,
|
|
2628
|
-
top: y,
|
|
2629
|
-
right: x + width,
|
|
2630
|
-
bottom: height + y,
|
|
2631
|
-
left: x
|
|
2632
|
-
});
|
|
2633
|
-
return rect;
|
|
2634
|
-
}
|
|
2635
|
-
/**
|
|
2636
|
-
* Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.
|
|
2637
|
-
* Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit
|
|
2638
|
-
*
|
|
2639
|
-
* @param {number} x - X coordinate.
|
|
2640
|
-
* @param {number} y - Y coordinate.
|
|
2641
|
-
* @param {number} width - Rectangle's width.
|
|
2642
|
-
* @param {number} height - Rectangle's height.
|
|
2643
|
-
* @returns {DOMRectInit}
|
|
2644
|
-
*/
|
|
2645
|
-
function createRectInit(x, y, width, height) {
|
|
2646
|
-
return { x: x, y: y, width: width, height: height };
|
|
2647
|
-
}
|
|
2648
|
-
|
|
2649
|
-
/**
|
|
2650
|
-
* Class that is responsible for computations of the content rectangle of
|
|
2651
|
-
* provided DOM element and for keeping track of it's changes.
|
|
2652
|
-
*/
|
|
2653
|
-
var ResizeObservation = /** @class */ (function () {
|
|
2654
|
-
/**
|
|
2655
|
-
* Creates an instance of ResizeObservation.
|
|
2656
|
-
*
|
|
2657
|
-
* @param {Element} target - Element to be observed.
|
|
2658
|
-
*/
|
|
2659
|
-
function ResizeObservation(target) {
|
|
2660
|
-
/**
|
|
2661
|
-
* Broadcasted width of content rectangle.
|
|
2662
|
-
*
|
|
2663
|
-
* @type {number}
|
|
2664
|
-
*/
|
|
2665
|
-
this.broadcastWidth = 0;
|
|
2666
|
-
/**
|
|
2667
|
-
* Broadcasted height of content rectangle.
|
|
2668
|
-
*
|
|
2669
|
-
* @type {number}
|
|
2670
|
-
*/
|
|
2671
|
-
this.broadcastHeight = 0;
|
|
2672
|
-
/**
|
|
2673
|
-
* Reference to the last observed content rectangle.
|
|
2674
|
-
*
|
|
2675
|
-
* @private {DOMRectInit}
|
|
2676
|
-
*/
|
|
2677
|
-
this.contentRect_ = createRectInit(0, 0, 0, 0);
|
|
2678
|
-
this.target = target;
|
|
2679
|
-
}
|
|
2680
|
-
/**
|
|
2681
|
-
* Updates content rectangle and tells whether it's width or height properties
|
|
2682
|
-
* have changed since the last broadcast.
|
|
2683
|
-
*
|
|
2684
|
-
* @returns {boolean}
|
|
2685
|
-
*/
|
|
2686
|
-
ResizeObservation.prototype.isActive = function () {
|
|
2687
|
-
var rect = getContentRect(this.target);
|
|
2688
|
-
this.contentRect_ = rect;
|
|
2689
|
-
return (rect.width !== this.broadcastWidth ||
|
|
2690
|
-
rect.height !== this.broadcastHeight);
|
|
2691
|
-
};
|
|
2692
|
-
/**
|
|
2693
|
-
* Updates 'broadcastWidth' and 'broadcastHeight' properties with a data
|
|
2694
|
-
* from the corresponding properties of the last observed content rectangle.
|
|
2695
|
-
*
|
|
2696
|
-
* @returns {DOMRectInit} Last observed content rectangle.
|
|
2697
|
-
*/
|
|
2698
|
-
ResizeObservation.prototype.broadcastRect = function () {
|
|
2699
|
-
var rect = this.contentRect_;
|
|
2700
|
-
this.broadcastWidth = rect.width;
|
|
2701
|
-
this.broadcastHeight = rect.height;
|
|
2702
|
-
return rect;
|
|
2703
|
-
};
|
|
2704
|
-
return ResizeObservation;
|
|
2705
|
-
}());
|
|
2706
|
-
|
|
2707
|
-
var ResizeObserverEntry = /** @class */ (function () {
|
|
2708
|
-
/**
|
|
2709
|
-
* Creates an instance of ResizeObserverEntry.
|
|
2710
|
-
*
|
|
2711
|
-
* @param {Element} target - Element that is being observed.
|
|
2712
|
-
* @param {DOMRectInit} rectInit - Data of the element's content rectangle.
|
|
2713
|
-
*/
|
|
2714
|
-
function ResizeObserverEntry(target, rectInit) {
|
|
2715
|
-
var contentRect = createReadOnlyRect(rectInit);
|
|
2716
|
-
// According to the specification following properties are not writable
|
|
2717
|
-
// and are also not enumerable in the native implementation.
|
|
2718
|
-
//
|
|
2719
|
-
// Property accessors are not being used as they'd require to define a
|
|
2720
|
-
// private WeakMap storage which may cause memory leaks in browsers that
|
|
2721
|
-
// don't support this type of collections.
|
|
2722
|
-
defineConfigurable(this, { target: target, contentRect: contentRect });
|
|
2723
|
-
}
|
|
2724
|
-
return ResizeObserverEntry;
|
|
2725
|
-
}());
|
|
2726
|
-
|
|
2727
|
-
var ResizeObserverSPI = /** @class */ (function () {
|
|
2728
|
-
/**
|
|
2729
|
-
* Creates a new instance of ResizeObserver.
|
|
2730
|
-
*
|
|
2731
|
-
* @param {ResizeObserverCallback} callback - Callback function that is invoked
|
|
2732
|
-
* when one of the observed elements changes it's content dimensions.
|
|
2733
|
-
* @param {ResizeObserverController} controller - Controller instance which
|
|
2734
|
-
* is responsible for the updates of observer.
|
|
2735
|
-
* @param {ResizeObserver} callbackCtx - Reference to the public
|
|
2736
|
-
* ResizeObserver instance which will be passed to callback function.
|
|
2737
|
-
*/
|
|
2738
|
-
function ResizeObserverSPI(callback, controller, callbackCtx) {
|
|
2739
|
-
/**
|
|
2740
|
-
* Collection of resize observations that have detected changes in dimensions
|
|
2741
|
-
* of elements.
|
|
2742
|
-
*
|
|
2743
|
-
* @private {Array<ResizeObservation>}
|
|
2744
|
-
*/
|
|
2745
|
-
this.activeObservations_ = [];
|
|
2746
|
-
/**
|
|
2747
|
-
* Registry of the ResizeObservation instances.
|
|
2748
|
-
*
|
|
2749
|
-
* @private {Map<Element, ResizeObservation>}
|
|
2750
|
-
*/
|
|
2751
|
-
this.observations_ = new MapShim();
|
|
2752
|
-
if (typeof callback !== 'function') {
|
|
2753
|
-
throw new TypeError('The callback provided as parameter 1 is not a function.');
|
|
2754
|
-
}
|
|
2755
|
-
this.callback_ = callback;
|
|
2756
|
-
this.controller_ = controller;
|
|
2757
|
-
this.callbackCtx_ = callbackCtx;
|
|
2758
|
-
}
|
|
2759
|
-
/**
|
|
2760
|
-
* Starts observing provided element.
|
|
2761
|
-
*
|
|
2762
|
-
* @param {Element} target - Element to be observed.
|
|
2763
|
-
* @returns {void}
|
|
2764
|
-
*/
|
|
2765
|
-
ResizeObserverSPI.prototype.observe = function (target) {
|
|
2766
|
-
if (!arguments.length) {
|
|
2767
|
-
throw new TypeError('1 argument required, but only 0 present.');
|
|
2768
|
-
}
|
|
2769
|
-
// Do nothing if current environment doesn't have the Element interface.
|
|
2770
|
-
if (typeof Element === 'undefined' || !(Element instanceof Object)) {
|
|
2771
|
-
return;
|
|
2772
|
-
}
|
|
2773
|
-
if (!(target instanceof getWindowOf(target).Element)) {
|
|
2774
|
-
throw new TypeError('parameter 1 is not of type "Element".');
|
|
2775
|
-
}
|
|
2776
|
-
var observations = this.observations_;
|
|
2777
|
-
// Do nothing if element is already being observed.
|
|
2778
|
-
if (observations.has(target)) {
|
|
2779
|
-
return;
|
|
2780
|
-
}
|
|
2781
|
-
observations.set(target, new ResizeObservation(target));
|
|
2782
|
-
this.controller_.addObserver(this);
|
|
2783
|
-
// Force the update of observations.
|
|
2784
|
-
this.controller_.refresh();
|
|
2785
|
-
};
|
|
2786
|
-
/**
|
|
2787
|
-
* Stops observing provided element.
|
|
2788
|
-
*
|
|
2789
|
-
* @param {Element} target - Element to stop observing.
|
|
2790
|
-
* @returns {void}
|
|
2791
|
-
*/
|
|
2792
|
-
ResizeObserverSPI.prototype.unobserve = function (target) {
|
|
2793
|
-
if (!arguments.length) {
|
|
2794
|
-
throw new TypeError('1 argument required, but only 0 present.');
|
|
2795
|
-
}
|
|
2796
|
-
// Do nothing if current environment doesn't have the Element interface.
|
|
2797
|
-
if (typeof Element === 'undefined' || !(Element instanceof Object)) {
|
|
2798
|
-
return;
|
|
2799
|
-
}
|
|
2800
|
-
if (!(target instanceof getWindowOf(target).Element)) {
|
|
2801
|
-
throw new TypeError('parameter 1 is not of type "Element".');
|
|
2802
|
-
}
|
|
2803
|
-
var observations = this.observations_;
|
|
2804
|
-
// Do nothing if element is not being observed.
|
|
2805
|
-
if (!observations.has(target)) {
|
|
2806
|
-
return;
|
|
2807
|
-
}
|
|
2808
|
-
observations.delete(target);
|
|
2809
|
-
if (!observations.size) {
|
|
2810
|
-
this.controller_.removeObserver(this);
|
|
2811
|
-
}
|
|
2812
|
-
};
|
|
2813
|
-
/**
|
|
2814
|
-
* Stops observing all elements.
|
|
2815
|
-
*
|
|
2816
|
-
* @returns {void}
|
|
2817
|
-
*/
|
|
2818
|
-
ResizeObserverSPI.prototype.disconnect = function () {
|
|
2819
|
-
this.clearActive();
|
|
2820
|
-
this.observations_.clear();
|
|
2821
|
-
this.controller_.removeObserver(this);
|
|
2822
|
-
};
|
|
2823
|
-
/**
|
|
2824
|
-
* Collects observation instances the associated element of which has changed
|
|
2825
|
-
* it's content rectangle.
|
|
2826
|
-
*
|
|
2827
|
-
* @returns {void}
|
|
2828
|
-
*/
|
|
2829
|
-
ResizeObserverSPI.prototype.gatherActive = function () {
|
|
2830
|
-
var _this = this;
|
|
2831
|
-
this.clearActive();
|
|
2832
|
-
this.observations_.forEach(function (observation) {
|
|
2833
|
-
if (observation.isActive()) {
|
|
2834
|
-
_this.activeObservations_.push(observation);
|
|
2835
|
-
}
|
|
2836
|
-
});
|
|
2837
|
-
};
|
|
2838
|
-
/**
|
|
2839
|
-
* Invokes initial callback function with a list of ResizeObserverEntry
|
|
2840
|
-
* instances collected from active resize observations.
|
|
2841
|
-
*
|
|
2842
|
-
* @returns {void}
|
|
2843
|
-
*/
|
|
2844
|
-
ResizeObserverSPI.prototype.broadcastActive = function () {
|
|
2845
|
-
// Do nothing if observer doesn't have active observations.
|
|
2846
|
-
if (!this.hasActive()) {
|
|
2847
|
-
return;
|
|
2848
|
-
}
|
|
2849
|
-
var ctx = this.callbackCtx_;
|
|
2850
|
-
// Create ResizeObserverEntry instance for every active observation.
|
|
2851
|
-
var entries = this.activeObservations_.map(function (observation) {
|
|
2852
|
-
return new ResizeObserverEntry(observation.target, observation.broadcastRect());
|
|
2853
|
-
});
|
|
2854
|
-
this.callback_.call(ctx, entries, ctx);
|
|
2855
|
-
this.clearActive();
|
|
2856
|
-
};
|
|
2857
|
-
/**
|
|
2858
|
-
* Clears the collection of active observations.
|
|
2859
|
-
*
|
|
2860
|
-
* @returns {void}
|
|
2861
|
-
*/
|
|
2862
|
-
ResizeObserverSPI.prototype.clearActive = function () {
|
|
2863
|
-
this.activeObservations_.splice(0);
|
|
2864
|
-
};
|
|
2865
|
-
/**
|
|
2866
|
-
* Tells whether observer has active observations.
|
|
2867
|
-
*
|
|
2868
|
-
* @returns {boolean}
|
|
2869
|
-
*/
|
|
2870
|
-
ResizeObserverSPI.prototype.hasActive = function () {
|
|
2871
|
-
return this.activeObservations_.length > 0;
|
|
2872
|
-
};
|
|
2873
|
-
return ResizeObserverSPI;
|
|
2874
|
-
}());
|
|
2875
|
-
|
|
2876
|
-
// Registry of internal observers. If WeakMap is not available use current shim
|
|
2877
|
-
// for the Map collection as it has all required methods and because WeakMap
|
|
2878
|
-
// can't be fully polyfilled anyway.
|
|
2879
|
-
var observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();
|
|
2880
|
-
/**
|
|
2881
|
-
* ResizeObserver API. Encapsulates the ResizeObserver SPI implementation
|
|
2882
|
-
* exposing only those methods and properties that are defined in the spec.
|
|
2883
|
-
*/
|
|
2884
|
-
var ResizeObserver$1 = /** @class */ (function () {
|
|
2885
|
-
/**
|
|
2886
|
-
* Creates a new instance of ResizeObserver.
|
|
2887
|
-
*
|
|
2888
|
-
* @param {ResizeObserverCallback} callback - Callback that is invoked when
|
|
2889
|
-
* dimensions of the observed elements change.
|
|
2890
|
-
*/
|
|
2891
|
-
function ResizeObserver(callback) {
|
|
2892
|
-
if (!(this instanceof ResizeObserver)) {
|
|
2893
|
-
throw new TypeError('Cannot call a class as a function.');
|
|
2894
|
-
}
|
|
2895
|
-
if (!arguments.length) {
|
|
2896
|
-
throw new TypeError('1 argument required, but only 0 present.');
|
|
2897
|
-
}
|
|
2898
|
-
var controller = ResizeObserverController.getInstance();
|
|
2899
|
-
var observer = new ResizeObserverSPI(callback, controller, this);
|
|
2900
|
-
observers.set(this, observer);
|
|
2901
|
-
}
|
|
2902
|
-
return ResizeObserver;
|
|
2903
|
-
}());
|
|
2904
|
-
// Expose public methods of ResizeObserver.
|
|
2905
|
-
[
|
|
2906
|
-
'observe',
|
|
2907
|
-
'unobserve',
|
|
2908
|
-
'disconnect'
|
|
2909
|
-
].forEach(function (method) {
|
|
2910
|
-
ResizeObserver$1.prototype[method] = function () {
|
|
2911
|
-
var _a;
|
|
2912
|
-
return (_a = observers.get(this))[method].apply(_a, arguments);
|
|
2913
|
-
};
|
|
2914
|
-
});
|
|
2915
|
-
|
|
2916
|
-
var index = (function () {
|
|
2917
|
-
// Export existing implementation if available.
|
|
2918
|
-
if (typeof global$1.ResizeObserver !== 'undefined') {
|
|
2919
|
-
return global$1.ResizeObserver;
|
|
2920
|
-
}
|
|
2921
|
-
return ResizeObserver$1;
|
|
2922
|
-
})();
|
|
2923
|
-
|
|
2924
|
-
// =============================== Const ===============================
|
|
2925
|
-
var elementListeners = new Map();
|
|
2926
|
-
function onResize(entities) {
|
|
2927
|
-
entities.forEach(function (entity) {
|
|
2928
|
-
var _elementListeners$get;
|
|
2929
|
-
var target = entity.target;
|
|
2930
|
-
(_elementListeners$get = elementListeners.get(target)) === null || _elementListeners$get === void 0 ? void 0 : _elementListeners$get.forEach(function (listener) {
|
|
2931
|
-
return listener(target);
|
|
2932
|
-
});
|
|
2933
|
-
});
|
|
2934
|
-
}
|
|
2935
|
-
// Note: ResizeObserver polyfill not support option to measure border-box resize
|
|
2936
|
-
var resizeObserver = new index(onResize);
|
|
2937
|
-
// ============================== Observe ==============================
|
|
2938
|
-
function observe(element, callback) {
|
|
2939
|
-
if (!elementListeners.has(element)) {
|
|
2940
|
-
elementListeners.set(element, new Set());
|
|
2941
|
-
resizeObserver.observe(element);
|
|
2942
|
-
}
|
|
2943
|
-
elementListeners.get(element).add(callback);
|
|
2944
|
-
}
|
|
2945
|
-
function unobserve(element, callback) {
|
|
2946
|
-
if (elementListeners.has(element)) {
|
|
2947
|
-
elementListeners.get(element).delete(callback);
|
|
2948
|
-
if (!elementListeners.get(element).size) {
|
|
2949
|
-
resizeObserver.unobserve(element);
|
|
2950
|
-
elementListeners.delete(element);
|
|
2951
|
-
}
|
|
2952
|
-
}
|
|
2953
|
-
}
|
|
2954
|
-
|
|
2955
|
-
function _classCallCheck(instance, Constructor) {
|
|
2956
|
-
if (!(instance instanceof Constructor)) {
|
|
2957
|
-
throw new TypeError("Cannot call a class as a function");
|
|
2958
|
-
}
|
|
2959
|
-
}
|
|
2960
|
-
|
|
2961
|
-
function _defineProperties(target, props) {
|
|
2962
|
-
for (var i = 0; i < props.length; i++) {
|
|
2963
|
-
var descriptor = props[i];
|
|
2964
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
2965
|
-
descriptor.configurable = true;
|
|
2966
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
2967
|
-
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
2968
|
-
}
|
|
2969
|
-
}
|
|
2970
|
-
function _createClass(Constructor, protoProps, staticProps) {
|
|
2971
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
2972
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
2973
|
-
Object.defineProperty(Constructor, "prototype", {
|
|
2974
|
-
writable: false
|
|
2975
|
-
});
|
|
2976
|
-
return Constructor;
|
|
2977
|
-
}
|
|
2978
|
-
|
|
2979
|
-
function _setPrototypeOf(o, p) {
|
|
2980
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
2981
|
-
o.__proto__ = p;
|
|
2982
|
-
return o;
|
|
2983
|
-
};
|
|
2984
|
-
return _setPrototypeOf(o, p);
|
|
2985
|
-
}
|
|
2986
|
-
|
|
2987
|
-
function _inherits(subClass, superClass) {
|
|
2988
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
2989
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
2990
|
-
}
|
|
2991
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
2992
|
-
constructor: {
|
|
2993
|
-
value: subClass,
|
|
2994
|
-
writable: true,
|
|
2995
|
-
configurable: true
|
|
2996
|
-
}
|
|
2997
|
-
});
|
|
2998
|
-
Object.defineProperty(subClass, "prototype", {
|
|
2999
|
-
writable: false
|
|
3000
|
-
});
|
|
3001
|
-
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
3002
|
-
}
|
|
3003
|
-
|
|
3004
|
-
function _getPrototypeOf(o) {
|
|
3005
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
|
|
3006
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
3007
|
-
};
|
|
3008
|
-
return _getPrototypeOf(o);
|
|
3009
|
-
}
|
|
3010
|
-
|
|
3011
|
-
function _isNativeReflectConstruct() {
|
|
3012
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
3013
|
-
if (Reflect.construct.sham) return false;
|
|
3014
|
-
if (typeof Proxy === "function") return true;
|
|
3015
|
-
try {
|
|
3016
|
-
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
3017
|
-
return true;
|
|
3018
|
-
} catch (e) {
|
|
3019
|
-
return false;
|
|
3020
|
-
}
|
|
3021
|
-
}
|
|
3022
|
-
|
|
3023
|
-
function _assertThisInitialized(self) {
|
|
3024
|
-
if (self === void 0) {
|
|
3025
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
3026
|
-
}
|
|
3027
|
-
return self;
|
|
3028
|
-
}
|
|
3029
|
-
|
|
3030
|
-
function _possibleConstructorReturn(self, call) {
|
|
3031
|
-
if (call && (_typeof$1(call) === "object" || typeof call === "function")) {
|
|
3032
|
-
return call;
|
|
3033
|
-
} else if (call !== void 0) {
|
|
3034
|
-
throw new TypeError("Derived constructors may only return object or undefined");
|
|
3035
|
-
}
|
|
3036
|
-
return _assertThisInitialized(self);
|
|
3037
|
-
}
|
|
3038
|
-
|
|
3039
|
-
function _createSuper(Derived) {
|
|
3040
|
-
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
3041
|
-
return function _createSuperInternal() {
|
|
3042
|
-
var Super = _getPrototypeOf(Derived),
|
|
3043
|
-
result;
|
|
3044
|
-
if (hasNativeReflectConstruct) {
|
|
3045
|
-
var NewTarget = _getPrototypeOf(this).constructor;
|
|
3046
|
-
result = Reflect.construct(Super, arguments, NewTarget);
|
|
3047
|
-
} else {
|
|
3048
|
-
result = Super.apply(this, arguments);
|
|
3049
|
-
}
|
|
3050
|
-
return _possibleConstructorReturn(this, result);
|
|
3051
|
-
};
|
|
3052
|
-
}
|
|
3053
|
-
|
|
3054
|
-
/**
|
|
3055
|
-
* Fallback to findDOMNode if origin ref do not provide any dom element
|
|
3056
|
-
*/
|
|
3057
|
-
var DomWrapper = /*#__PURE__*/function (_React$Component) {
|
|
3058
|
-
_inherits(DomWrapper, _React$Component);
|
|
3059
|
-
var _super = _createSuper(DomWrapper);
|
|
3060
|
-
function DomWrapper() {
|
|
3061
|
-
_classCallCheck(this, DomWrapper);
|
|
3062
|
-
return _super.apply(this, arguments);
|
|
3063
|
-
}
|
|
3064
|
-
_createClass(DomWrapper, [{
|
|
3065
|
-
key: "render",
|
|
3066
|
-
value: function render() {
|
|
3067
|
-
return this.props.children;
|
|
3068
|
-
}
|
|
3069
|
-
}]);
|
|
3070
|
-
return DomWrapper;
|
|
3071
|
-
}(index$4.react.Component);
|
|
3072
|
-
|
|
3073
|
-
var CollectionContext = /*#__PURE__*/index$4.react.createContext(null);
|
|
3074
|
-
/**
|
|
3075
|
-
* Collect all the resize event from children ResizeObserver
|
|
3076
|
-
*/
|
|
3077
|
-
function Collection(_ref) {
|
|
3078
|
-
var children = _ref.children,
|
|
3079
|
-
onBatchResize = _ref.onBatchResize;
|
|
3080
|
-
var resizeIdRef = index$4.react.useRef(0);
|
|
3081
|
-
var resizeInfosRef = index$4.react.useRef([]);
|
|
3082
|
-
var onCollectionResize = index$4.react.useContext(CollectionContext);
|
|
3083
|
-
var onResize = index$4.react.useCallback(function (size, element, data) {
|
|
3084
|
-
resizeIdRef.current += 1;
|
|
3085
|
-
var currentId = resizeIdRef.current;
|
|
3086
|
-
resizeInfosRef.current.push({
|
|
3087
|
-
size: size,
|
|
3088
|
-
element: element,
|
|
3089
|
-
data: data
|
|
3090
|
-
});
|
|
3091
|
-
Promise.resolve().then(function () {
|
|
3092
|
-
if (currentId === resizeIdRef.current) {
|
|
3093
|
-
onBatchResize === null || onBatchResize === void 0 ? void 0 : onBatchResize(resizeInfosRef.current);
|
|
3094
|
-
resizeInfosRef.current = [];
|
|
3095
|
-
}
|
|
3096
|
-
});
|
|
3097
|
-
// Continue bubbling if parent exist
|
|
3098
|
-
onCollectionResize === null || onCollectionResize === void 0 ? void 0 : onCollectionResize(size, element, data);
|
|
3099
|
-
}, [onBatchResize, onCollectionResize]);
|
|
3100
|
-
return /*#__PURE__*/index$4.react.createElement(CollectionContext.Provider, {
|
|
3101
|
-
value: onResize
|
|
3102
|
-
}, children);
|
|
3103
|
-
}
|
|
3104
|
-
|
|
3105
|
-
function SingleObserver(props, ref) {
|
|
3106
|
-
var children = props.children,
|
|
3107
|
-
disabled = props.disabled;
|
|
3108
|
-
var elementRef = index$4.react.useRef(null);
|
|
3109
|
-
var wrapperRef = index$4.react.useRef(null);
|
|
3110
|
-
var onCollectionResize = index$4.react.useContext(CollectionContext);
|
|
3111
|
-
// =========================== Children ===========================
|
|
3112
|
-
var isRenderProps = typeof children === 'function';
|
|
3113
|
-
var mergedChildren = isRenderProps ? children(elementRef) : children;
|
|
3114
|
-
// ============================= Size =============================
|
|
3115
|
-
var sizeRef = index$4.react.useRef({
|
|
3116
|
-
width: -1,
|
|
3117
|
-
height: -1,
|
|
3118
|
-
offsetWidth: -1,
|
|
3119
|
-
offsetHeight: -1
|
|
3120
|
-
});
|
|
3121
|
-
// ============================= Ref ==============================
|
|
3122
|
-
var canRef = !isRenderProps && /*#__PURE__*/index$4.react.isValidElement(mergedChildren) && supportRef(mergedChildren);
|
|
3123
|
-
var originRef = canRef ? mergedChildren.ref : null;
|
|
3124
|
-
var mergedRef = index$4.react.useMemo(function () {
|
|
3125
|
-
return composeRef(originRef, elementRef);
|
|
3126
|
-
}, [originRef, elementRef]);
|
|
3127
|
-
var getDom = function getDom() {
|
|
3128
|
-
return findDOMNode(elementRef.current) || findDOMNode(wrapperRef.current);
|
|
3129
|
-
};
|
|
3130
|
-
index$4.react.useImperativeHandle(ref, function () {
|
|
3131
|
-
return getDom();
|
|
3132
|
-
});
|
|
3133
|
-
// =========================== Observe ============================
|
|
3134
|
-
var propsRef = index$4.react.useRef(props);
|
|
3135
|
-
propsRef.current = props;
|
|
3136
|
-
// Handler
|
|
3137
|
-
var onInternalResize = index$4.react.useCallback(function (target) {
|
|
3138
|
-
var _propsRef$current = propsRef.current,
|
|
3139
|
-
onResize = _propsRef$current.onResize,
|
|
3140
|
-
data = _propsRef$current.data;
|
|
3141
|
-
var _target$getBoundingCl = target.getBoundingClientRect(),
|
|
3142
|
-
width = _target$getBoundingCl.width,
|
|
3143
|
-
height = _target$getBoundingCl.height;
|
|
3144
|
-
var offsetWidth = target.offsetWidth,
|
|
3145
|
-
offsetHeight = target.offsetHeight;
|
|
3146
|
-
/**
|
|
3147
|
-
* Resize observer trigger when content size changed.
|
|
3148
|
-
* In most case we just care about element size,
|
|
3149
|
-
* let's use `boundary` instead of `contentRect` here to avoid shaking.
|
|
3150
|
-
*/
|
|
3151
|
-
var fixedWidth = Math.floor(width);
|
|
3152
|
-
var fixedHeight = Math.floor(height);
|
|
3153
|
-
if (sizeRef.current.width !== fixedWidth || sizeRef.current.height !== fixedHeight || sizeRef.current.offsetWidth !== offsetWidth || sizeRef.current.offsetHeight !== offsetHeight) {
|
|
3154
|
-
var size = {
|
|
3155
|
-
width: fixedWidth,
|
|
3156
|
-
height: fixedHeight,
|
|
3157
|
-
offsetWidth: offsetWidth,
|
|
3158
|
-
offsetHeight: offsetHeight
|
|
3159
|
-
};
|
|
3160
|
-
sizeRef.current = size;
|
|
3161
|
-
// IE is strange, right?
|
|
3162
|
-
var mergedOffsetWidth = offsetWidth === Math.round(width) ? width : offsetWidth;
|
|
3163
|
-
var mergedOffsetHeight = offsetHeight === Math.round(height) ? height : offsetHeight;
|
|
3164
|
-
var sizeInfo = _objectSpread2(_objectSpread2({}, size), {}, {
|
|
3165
|
-
offsetWidth: mergedOffsetWidth,
|
|
3166
|
-
offsetHeight: mergedOffsetHeight
|
|
3167
|
-
});
|
|
3168
|
-
// Let collection know what happened
|
|
3169
|
-
onCollectionResize === null || onCollectionResize === void 0 ? void 0 : onCollectionResize(sizeInfo, target, data);
|
|
3170
|
-
if (onResize) {
|
|
3171
|
-
// defer the callback but not defer to next frame
|
|
3172
|
-
Promise.resolve().then(function () {
|
|
3173
|
-
onResize(sizeInfo, target);
|
|
3174
|
-
});
|
|
3175
|
-
}
|
|
3176
|
-
}
|
|
3177
|
-
}, []);
|
|
3178
|
-
// Dynamic observe
|
|
3179
|
-
index$4.react.useEffect(function () {
|
|
3180
|
-
var currentElement = getDom();
|
|
3181
|
-
if (currentElement && !disabled) {
|
|
3182
|
-
observe(currentElement, onInternalResize);
|
|
3183
|
-
}
|
|
3184
|
-
return function () {
|
|
3185
|
-
return unobserve(currentElement, onInternalResize);
|
|
3186
|
-
};
|
|
3187
|
-
}, [elementRef.current, disabled]);
|
|
3188
|
-
// ============================ Render ============================
|
|
3189
|
-
return /*#__PURE__*/index$4.react.createElement(DomWrapper, {
|
|
3190
|
-
ref: wrapperRef
|
|
3191
|
-
}, canRef ? /*#__PURE__*/index$4.react.cloneElement(mergedChildren, {
|
|
3192
|
-
ref: mergedRef
|
|
3193
|
-
}) : mergedChildren);
|
|
3194
|
-
}
|
|
3195
|
-
var RefSingleObserver = /*#__PURE__*/index$4.react.forwardRef(SingleObserver);
|
|
3196
|
-
|
|
3197
|
-
var INTERNAL_PREFIX_KEY = 'rc-observer-key';
|
|
3198
|
-
function ResizeObserver(props, ref) {
|
|
3199
|
-
var children = props.children;
|
|
3200
|
-
var childNodes = typeof children === 'function' ? [children] : toArray(children);
|
|
3201
|
-
return childNodes.map(function (child, index) {
|
|
3202
|
-
var key = (child === null || child === void 0 ? void 0 : child.key) || "".concat(INTERNAL_PREFIX_KEY, "-").concat(index);
|
|
3203
|
-
return /*#__PURE__*/index$4.react.createElement(RefSingleObserver, _extends({}, props, {
|
|
3204
|
-
key: key,
|
|
3205
|
-
ref: index === 0 ? ref : undefined
|
|
3206
|
-
}), child);
|
|
3207
|
-
});
|
|
3208
|
-
}
|
|
3209
|
-
var RefResizeObserver = /*#__PURE__*/index$4.react.forwardRef(ResizeObserver);
|
|
3210
|
-
RefResizeObserver.Collection = Collection;
|
|
3211
|
-
|
|
3212
|
-
function canUseDom() {
|
|
3213
|
-
return !!(typeof window !== 'undefined' && window.document && window.document.createElement);
|
|
3214
|
-
}
|
|
3215
|
-
|
|
3216
|
-
/**
|
|
3217
|
-
* Wrap `React.useLayoutEffect` which will not throw warning message in test env
|
|
3218
|
-
*/
|
|
3219
|
-
var useInternalLayoutEffect = canUseDom() ? index$4.react.useLayoutEffect : index$4.react.useEffect;
|
|
3220
|
-
var useLayoutEffect = function useLayoutEffect(callback, deps) {
|
|
3221
|
-
var firstMountRef = index$4.react.useRef(true);
|
|
3222
|
-
useInternalLayoutEffect(function () {
|
|
3223
|
-
return callback(firstMountRef.current);
|
|
3224
|
-
}, deps);
|
|
3225
|
-
|
|
3226
|
-
// We tell react that first mount has passed
|
|
3227
|
-
useInternalLayoutEffect(function () {
|
|
3228
|
-
firstMountRef.current = false;
|
|
3229
|
-
return function () {
|
|
3230
|
-
firstMountRef.current = true;
|
|
3231
|
-
};
|
|
3232
|
-
}, []);
|
|
3233
|
-
};
|
|
3234
|
-
|
|
3235
1775
|
var _excluded$2 = ["prefixCls", "invalidate", "item", "renderItem", "responsive", "responsiveDisabled", "registerSize", "itemKey", "className", "style", "children", "display", "order", "component"];
|
|
3236
1776
|
// Use shared variable to save bundle size
|
|
3237
1777
|
var UNDEFINED = undefined;
|
|
@@ -3257,7 +1797,7 @@ function InternalItem(props, ref) {
|
|
|
3257
1797
|
function internalRegisterSize(width) {
|
|
3258
1798
|
registerSize(itemKey, width);
|
|
3259
1799
|
}
|
|
3260
|
-
index$
|
|
1800
|
+
index$3.react.useEffect(function () {
|
|
3261
1801
|
return function () {
|
|
3262
1802
|
internalRegisterSize(null);
|
|
3263
1803
|
};
|
|
@@ -3279,14 +1819,14 @@ function InternalItem(props, ref) {
|
|
|
3279
1819
|
if (mergedHidden) {
|
|
3280
1820
|
overflowProps['aria-hidden'] = true;
|
|
3281
1821
|
}
|
|
3282
|
-
var itemNode = /*#__PURE__*/index$
|
|
3283
|
-
className: index
|
|
3284
|
-
style: _objectSpread2
|
|
1822
|
+
var itemNode = /*#__PURE__*/index$3.react.createElement(Component, _extends({
|
|
1823
|
+
className: index.classnames(!invalidate && prefixCls, className),
|
|
1824
|
+
style: _objectSpread2(_objectSpread2({}, overflowStyle), style)
|
|
3285
1825
|
}, overflowProps, restProps, {
|
|
3286
1826
|
ref: ref
|
|
3287
1827
|
}), childNode);
|
|
3288
1828
|
if (responsive) {
|
|
3289
|
-
itemNode = /*#__PURE__*/index$
|
|
1829
|
+
itemNode = /*#__PURE__*/index$3.react.createElement(index$3.RefResizeObserver, {
|
|
3290
1830
|
onResize: function onResize(_ref) {
|
|
3291
1831
|
var offsetWidth = _ref.offsetWidth;
|
|
3292
1832
|
internalRegisterSize(offsetWidth);
|
|
@@ -3296,74 +1836,12 @@ function InternalItem(props, ref) {
|
|
|
3296
1836
|
}
|
|
3297
1837
|
return itemNode;
|
|
3298
1838
|
}
|
|
3299
|
-
var Item = /*#__PURE__*/index$
|
|
1839
|
+
var Item = /*#__PURE__*/index$3.react.forwardRef(InternalItem);
|
|
3300
1840
|
Item.displayName = 'Item';
|
|
3301
1841
|
|
|
3302
|
-
function useEvent(callback) {
|
|
3303
|
-
var fnRef = index$4.react.useRef();
|
|
3304
|
-
fnRef.current = callback;
|
|
3305
|
-
var memoFn = index$4.react.useCallback(function () {
|
|
3306
|
-
var _fnRef$current;
|
|
3307
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
3308
|
-
args[_key] = arguments[_key];
|
|
3309
|
-
}
|
|
3310
|
-
return (_fnRef$current = fnRef.current) === null || _fnRef$current === void 0 ? void 0 : _fnRef$current.call.apply(_fnRef$current, [fnRef].concat(args));
|
|
3311
|
-
}, []);
|
|
3312
|
-
return memoFn;
|
|
3313
|
-
}
|
|
3314
|
-
|
|
3315
|
-
var raf = function raf(callback) {
|
|
3316
|
-
return +setTimeout(callback, 16);
|
|
3317
|
-
};
|
|
3318
|
-
var caf = function caf(num) {
|
|
3319
|
-
return clearTimeout(num);
|
|
3320
|
-
};
|
|
3321
|
-
if (typeof window !== 'undefined' && 'requestAnimationFrame' in window) {
|
|
3322
|
-
raf = function raf(callback) {
|
|
3323
|
-
return window.requestAnimationFrame(callback);
|
|
3324
|
-
};
|
|
3325
|
-
caf = function caf(handle) {
|
|
3326
|
-
return window.cancelAnimationFrame(handle);
|
|
3327
|
-
};
|
|
3328
|
-
}
|
|
3329
|
-
var rafUUID = 0;
|
|
3330
|
-
var rafIds = new Map();
|
|
3331
|
-
function cleanup(id) {
|
|
3332
|
-
rafIds.delete(id);
|
|
3333
|
-
}
|
|
3334
|
-
var wrapperRaf = function wrapperRaf(callback) {
|
|
3335
|
-
var times = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
3336
|
-
rafUUID += 1;
|
|
3337
|
-
var id = rafUUID;
|
|
3338
|
-
function callRef(leftTimes) {
|
|
3339
|
-
if (leftTimes === 0) {
|
|
3340
|
-
// Clean up
|
|
3341
|
-
cleanup(id);
|
|
3342
|
-
|
|
3343
|
-
// Trigger
|
|
3344
|
-
callback();
|
|
3345
|
-
} else {
|
|
3346
|
-
// Next raf
|
|
3347
|
-
var realId = raf(function () {
|
|
3348
|
-
callRef(leftTimes - 1);
|
|
3349
|
-
});
|
|
3350
|
-
|
|
3351
|
-
// Bind real raf id
|
|
3352
|
-
rafIds.set(id, realId);
|
|
3353
|
-
}
|
|
3354
|
-
}
|
|
3355
|
-
callRef(times);
|
|
3356
|
-
return id;
|
|
3357
|
-
};
|
|
3358
|
-
wrapperRaf.cancel = function (id) {
|
|
3359
|
-
var realId = rafIds.get(id);
|
|
3360
|
-
cleanup(realId);
|
|
3361
|
-
return caf(realId);
|
|
3362
|
-
};
|
|
3363
|
-
|
|
3364
1842
|
function channelUpdate(callback) {
|
|
3365
1843
|
if (typeof MessageChannel === 'undefined') {
|
|
3366
|
-
wrapperRaf(callback);
|
|
1844
|
+
index$3.wrapperRaf(callback);
|
|
3367
1845
|
} else {
|
|
3368
1846
|
var channel = new MessageChannel();
|
|
3369
1847
|
channel.port1.onmessage = function () {
|
|
@@ -3378,13 +1856,13 @@ function channelUpdate(callback) {
|
|
|
3378
1856
|
*/
|
|
3379
1857
|
function useBatcher() {
|
|
3380
1858
|
// Updater Trigger
|
|
3381
|
-
var updateFuncRef = index$
|
|
1859
|
+
var updateFuncRef = index$3.react.useRef(null);
|
|
3382
1860
|
// Notify update
|
|
3383
1861
|
var notifyEffectUpdate = function notifyEffectUpdate(callback) {
|
|
3384
1862
|
if (!updateFuncRef.current) {
|
|
3385
1863
|
updateFuncRef.current = [];
|
|
3386
1864
|
channelUpdate(function () {
|
|
3387
|
-
index$
|
|
1865
|
+
index$3.reactDom.unstable_batchedUpdates(function () {
|
|
3388
1866
|
updateFuncRef.current.forEach(function (fn) {
|
|
3389
1867
|
fn();
|
|
3390
1868
|
});
|
|
@@ -3401,12 +1879,12 @@ function useBatcher() {
|
|
|
3401
1879
|
*/
|
|
3402
1880
|
function useEffectState(notifyEffectUpdate, defaultValue) {
|
|
3403
1881
|
// Value
|
|
3404
|
-
var _React$useState = index$
|
|
1882
|
+
var _React$useState = index$3.react.useState(defaultValue),
|
|
3405
1883
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
3406
1884
|
stateValue = _React$useState2[0],
|
|
3407
1885
|
setStateValue = _React$useState2[1];
|
|
3408
1886
|
// Set State
|
|
3409
|
-
var setEffectVal = useEvent(function (nextValue) {
|
|
1887
|
+
var setEffectVal = index$3.useEvent(function (nextValue) {
|
|
3410
1888
|
notifyEffectUpdate(function () {
|
|
3411
1889
|
setStateValue(nextValue);
|
|
3412
1890
|
});
|
|
@@ -3414,19 +1892,19 @@ function useEffectState(notifyEffectUpdate, defaultValue) {
|
|
|
3414
1892
|
return [stateValue, setEffectVal];
|
|
3415
1893
|
}
|
|
3416
1894
|
|
|
3417
|
-
var OverflowContext = /*#__PURE__*/index$
|
|
1895
|
+
var OverflowContext = /*#__PURE__*/index$3.react.createContext(null);
|
|
3418
1896
|
|
|
3419
1897
|
var _excluded$1 = ["component"],
|
|
3420
1898
|
_excluded2 = ["className"],
|
|
3421
1899
|
_excluded3 = ["className"];
|
|
3422
1900
|
var InternalRawItem = function InternalRawItem(props, ref) {
|
|
3423
|
-
var context = index$
|
|
1901
|
+
var context = index$3.react.useContext(OverflowContext);
|
|
3424
1902
|
// Render directly when context not provided
|
|
3425
1903
|
if (!context) {
|
|
3426
1904
|
var _props$component = props.component,
|
|
3427
1905
|
Component = _props$component === void 0 ? 'div' : _props$component,
|
|
3428
1906
|
_restProps = _objectWithoutProperties(props, _excluded$1);
|
|
3429
|
-
return /*#__PURE__*/index$
|
|
1907
|
+
return /*#__PURE__*/index$3.react.createElement(Component, _extends({}, _restProps, {
|
|
3430
1908
|
ref: ref
|
|
3431
1909
|
}));
|
|
3432
1910
|
}
|
|
@@ -3435,14 +1913,14 @@ var InternalRawItem = function InternalRawItem(props, ref) {
|
|
|
3435
1913
|
var className = props.className,
|
|
3436
1914
|
restProps = _objectWithoutProperties(props, _excluded3);
|
|
3437
1915
|
// Do not pass context to sub item to avoid multiple measure
|
|
3438
|
-
return /*#__PURE__*/index$
|
|
1916
|
+
return /*#__PURE__*/index$3.react.createElement(OverflowContext.Provider, {
|
|
3439
1917
|
value: null
|
|
3440
|
-
}, /*#__PURE__*/index$
|
|
1918
|
+
}, /*#__PURE__*/index$3.react.createElement(Item, _extends({
|
|
3441
1919
|
ref: ref,
|
|
3442
|
-
className: index
|
|
1920
|
+
className: index.classnames(contextClassName, className)
|
|
3443
1921
|
}, restContext, restProps)));
|
|
3444
1922
|
};
|
|
3445
|
-
var RawItem = /*#__PURE__*/index$
|
|
1923
|
+
var RawItem = /*#__PURE__*/index$3.react.forwardRef(InternalRawItem);
|
|
3446
1924
|
RawItem.displayName = 'RawItem';
|
|
3447
1925
|
|
|
3448
1926
|
var _excluded = ["prefixCls", "data", "renderItem", "renderRawItem", "itemKey", "itemWidth", "ssr", "style", "className", "maxCount", "renderRest", "renderRawRest", "suffix", "component", "itemComponent", "onVisibleChange"];
|
|
@@ -3496,21 +1974,21 @@ function Overflow(props, ref) {
|
|
|
3496
1974
|
_useEffectState10 = _slicedToArray(_useEffectState9, 2),
|
|
3497
1975
|
suffixWidth = _useEffectState10[0],
|
|
3498
1976
|
setSuffixWidth = _useEffectState10[1];
|
|
3499
|
-
var _useState = index$
|
|
1977
|
+
var _useState = index$3.react.useState(null),
|
|
3500
1978
|
_useState2 = _slicedToArray(_useState, 2),
|
|
3501
1979
|
suffixFixedStart = _useState2[0],
|
|
3502
1980
|
setSuffixFixedStart = _useState2[1];
|
|
3503
|
-
var _useState3 = index$
|
|
1981
|
+
var _useState3 = index$3.react.useState(null),
|
|
3504
1982
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
3505
1983
|
displayCount = _useState4[0],
|
|
3506
1984
|
setDisplayCount = _useState4[1];
|
|
3507
|
-
var mergedDisplayCount = index$
|
|
1985
|
+
var mergedDisplayCount = index$3.react.useMemo(function () {
|
|
3508
1986
|
if (displayCount === null && fullySSR) {
|
|
3509
1987
|
return Number.MAX_SAFE_INTEGER;
|
|
3510
1988
|
}
|
|
3511
1989
|
return displayCount || 0;
|
|
3512
1990
|
}, [displayCount, containerWidth]);
|
|
3513
|
-
var _useState5 = index$
|
|
1991
|
+
var _useState5 = index$3.react.useState(false),
|
|
3514
1992
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
3515
1993
|
restReady = _useState6[0],
|
|
3516
1994
|
setRestReady = _useState6[1];
|
|
@@ -3525,7 +2003,7 @@ function Overflow(props, ref) {
|
|
|
3525
2003
|
* When is `responsive`, we will always render rest node to get the real width of it for calculation
|
|
3526
2004
|
*/
|
|
3527
2005
|
var showRest = shouldResponsive || typeof maxCount === 'number' && data.length > maxCount;
|
|
3528
|
-
var mergedData = index$
|
|
2006
|
+
var mergedData = index$3.react.useMemo(function () {
|
|
3529
2007
|
var items = data;
|
|
3530
2008
|
if (shouldResponsive) {
|
|
3531
2009
|
if (containerWidth === null && fullySSR) {
|
|
@@ -3538,21 +2016,21 @@ function Overflow(props, ref) {
|
|
|
3538
2016
|
}
|
|
3539
2017
|
return items;
|
|
3540
2018
|
}, [data, itemWidth, containerWidth, maxCount, shouldResponsive]);
|
|
3541
|
-
var omittedItems = index$
|
|
2019
|
+
var omittedItems = index$3.react.useMemo(function () {
|
|
3542
2020
|
if (shouldResponsive) {
|
|
3543
2021
|
return data.slice(mergedDisplayCount + 1);
|
|
3544
2022
|
}
|
|
3545
2023
|
return data.slice(mergedData.length);
|
|
3546
2024
|
}, [data, mergedData, shouldResponsive, mergedDisplayCount]);
|
|
3547
2025
|
// ================================= Item =================================
|
|
3548
|
-
var getKey = index$
|
|
2026
|
+
var getKey = index$3.react.useCallback(function (item, index) {
|
|
3549
2027
|
var _ref;
|
|
3550
2028
|
if (typeof itemKey === 'function') {
|
|
3551
2029
|
return itemKey(item);
|
|
3552
2030
|
}
|
|
3553
2031
|
return (_ref = itemKey && (item === null || item === void 0 ? void 0 : item[itemKey])) !== null && _ref !== void 0 ? _ref : index;
|
|
3554
2032
|
}, [itemKey]);
|
|
3555
|
-
var mergedRenderItem = index$
|
|
2033
|
+
var mergedRenderItem = index$3.react.useCallback(renderItem || function (item) {
|
|
3556
2034
|
return item;
|
|
3557
2035
|
}, [renderItem]);
|
|
3558
2036
|
function updateDisplayCount(count, suffixFixedStartVal, notReady) {
|
|
@@ -3597,7 +2075,7 @@ function Overflow(props, ref) {
|
|
|
3597
2075
|
function getItemWidth(index) {
|
|
3598
2076
|
return itemWidths.get(getKey(mergedData[index], index));
|
|
3599
2077
|
}
|
|
3600
|
-
useLayoutEffect(function () {
|
|
2078
|
+
index$3.useLayoutEffect(function () {
|
|
3601
2079
|
if (mergedContainerWidth && typeof mergedRestWidth === 'number' && mergedData) {
|
|
3602
2080
|
var totalWidth = suffixWidth;
|
|
3603
2081
|
var len = mergedData.length;
|
|
@@ -3658,9 +2136,9 @@ function Overflow(props, ref) {
|
|
|
3658
2136
|
// >>>>> Choice render fun by `renderRawItem`
|
|
3659
2137
|
var internalRenderItemNode = renderRawItem ? function (item, index) {
|
|
3660
2138
|
var key = getKey(item, index);
|
|
3661
|
-
return /*#__PURE__*/index$
|
|
2139
|
+
return /*#__PURE__*/index$3.react.createElement(OverflowContext.Provider, {
|
|
3662
2140
|
key: key,
|
|
3663
|
-
value: _objectSpread2
|
|
2141
|
+
value: _objectSpread2(_objectSpread2({}, itemSharedProps), {}, {
|
|
3664
2142
|
order: index,
|
|
3665
2143
|
item: item,
|
|
3666
2144
|
itemKey: key,
|
|
@@ -3670,7 +2148,7 @@ function Overflow(props, ref) {
|
|
|
3670
2148
|
}, renderRawItem(item, index));
|
|
3671
2149
|
} : function (item, index) {
|
|
3672
2150
|
var key = getKey(item, index);
|
|
3673
|
-
return /*#__PURE__*/index$
|
|
2151
|
+
return /*#__PURE__*/index$3.react.createElement(Item, _extends({}, itemSharedProps, {
|
|
3674
2152
|
order: index,
|
|
3675
2153
|
key: key,
|
|
3676
2154
|
item: item,
|
|
@@ -3690,17 +2168,17 @@ function Overflow(props, ref) {
|
|
|
3690
2168
|
};
|
|
3691
2169
|
if (!renderRawRest) {
|
|
3692
2170
|
var mergedRenderRest = renderRest || defaultRenderRest;
|
|
3693
|
-
restNode = /*#__PURE__*/index$
|
|
2171
|
+
restNode = /*#__PURE__*/index$3.react.createElement(Item, _extends({}, itemSharedProps, restContextProps), typeof mergedRenderRest === 'function' ? mergedRenderRest(omittedItems) : mergedRenderRest);
|
|
3694
2172
|
} else if (renderRawRest) {
|
|
3695
|
-
restNode = /*#__PURE__*/index$
|
|
3696
|
-
value: _objectSpread2
|
|
2173
|
+
restNode = /*#__PURE__*/index$3.react.createElement(OverflowContext.Provider, {
|
|
2174
|
+
value: _objectSpread2(_objectSpread2({}, itemSharedProps), restContextProps)
|
|
3697
2175
|
}, renderRawRest(omittedItems));
|
|
3698
2176
|
}
|
|
3699
|
-
var overflowNode = /*#__PURE__*/index$
|
|
3700
|
-
className: index
|
|
2177
|
+
var overflowNode = /*#__PURE__*/index$3.react.createElement(Component, _extends({
|
|
2178
|
+
className: index.classnames(!invalidate && prefixCls, className),
|
|
3701
2179
|
style: style,
|
|
3702
2180
|
ref: ref
|
|
3703
|
-
}, restProps), mergedData.map(internalRenderItemNode), showRest ? restNode : null, suffix && /*#__PURE__*/index$
|
|
2181
|
+
}, restProps), mergedData.map(internalRenderItemNode), showRest ? restNode : null, suffix && /*#__PURE__*/index$3.react.createElement(Item, _extends({}, itemSharedProps, {
|
|
3704
2182
|
responsive: isResponsive,
|
|
3705
2183
|
responsiveDisabled: !shouldResponsive,
|
|
3706
2184
|
order: mergedDisplayCount,
|
|
@@ -3710,14 +2188,14 @@ function Overflow(props, ref) {
|
|
|
3710
2188
|
style: suffixStyle
|
|
3711
2189
|
}), suffix));
|
|
3712
2190
|
if (isResponsive) {
|
|
3713
|
-
overflowNode = /*#__PURE__*/index$
|
|
2191
|
+
overflowNode = /*#__PURE__*/index$3.react.createElement(index$3.RefResizeObserver, {
|
|
3714
2192
|
onResize: onOverflowResize,
|
|
3715
2193
|
disabled: !shouldResponsive
|
|
3716
2194
|
}, overflowNode);
|
|
3717
2195
|
}
|
|
3718
2196
|
return overflowNode;
|
|
3719
2197
|
}
|
|
3720
|
-
var ForwardOverflow = /*#__PURE__*/index$
|
|
2198
|
+
var ForwardOverflow = /*#__PURE__*/index$3.react.forwardRef(Overflow);
|
|
3721
2199
|
ForwardOverflow.displayName = 'Overflow';
|
|
3722
2200
|
ForwardOverflow.Item = RawItem;
|
|
3723
2201
|
ForwardOverflow.RESPONSIVE = RESPONSIVE;
|
|
@@ -3727,42 +2205,42 @@ const rcOverflowCss = "@import url(\"https://fonts.googleapis.com/css?family=Rob
|
|
|
3727
2205
|
|
|
3728
2206
|
const BcmRcOverflow = class {
|
|
3729
2207
|
constructor(hostRef) {
|
|
3730
|
-
index$
|
|
3731
|
-
this.selectOtherTag = index$
|
|
3732
|
-
this.selectTag = index$
|
|
3733
|
-
this.deleteTag = index$
|
|
2208
|
+
index$1.registerInstance(this, hostRef);
|
|
2209
|
+
this.selectOtherTag = index$1.createEvent(this, "bcm-select-other-tag", 7);
|
|
2210
|
+
this.selectTag = index$1.createEvent(this, "bcm-select-tag", 7);
|
|
2211
|
+
this.deleteTag = index$1.createEvent(this, "bcm-delete-tag", 7);
|
|
3734
2212
|
this.renderItem = item => {
|
|
3735
|
-
return index$
|
|
2213
|
+
return index$3.react.createElement("bcm-tooltip", {
|
|
3736
2214
|
placement: "bottom",
|
|
3737
2215
|
message: item.text,
|
|
3738
2216
|
trigger: "hover",
|
|
3739
|
-
}, index$
|
|
2217
|
+
}, index$3.react.createElement("div", {
|
|
3740
2218
|
id: item.value + "-tag",
|
|
3741
2219
|
className: "bcm-tag",
|
|
3742
2220
|
onClick: ({ target }) => this.onClickControl(target, item, false),
|
|
3743
|
-
}, index$
|
|
2221
|
+
}, index$3.react.createElement("span", { className: "bcm-tag__content dismissable" },
|
|
3744
2222
|
// .bcm-tag__content span {
|
|
3745
2223
|
// display: block;
|
|
3746
2224
|
// max-width: 38px;
|
|
3747
2225
|
// white-space: nowrap;
|
|
3748
2226
|
// overflow: hidden;
|
|
3749
2227
|
// text-overflow: ellipsis;
|
|
3750
|
-
index$
|
|
2228
|
+
index$3.react.createElement("div", { className: "value tw-block tw-max-w-[38px] tw-overflow-hidden tw-overflow-ellipsis tw-whitespace-nowrap" }, item.text), index$3.react.createElement("span", {
|
|
3751
2229
|
className: "right close-button",
|
|
3752
|
-
}, index$
|
|
2230
|
+
}, index$3.react.createElement("bcm-icon", {
|
|
3753
2231
|
icon: "fa fa-times",
|
|
3754
2232
|
})))));
|
|
3755
2233
|
};
|
|
3756
2234
|
this.renderRest = items => {
|
|
3757
2235
|
const titles = (items === null || items === void 0 ? void 0 : items.sort((a, b) => +a.ct - +b.ct).slice(0, 15).map(item => stringHelper.StringHelper.textLimitter(item.text, 40, true)).toString().split(",").join("\r\n")) + (items.length > 15 ? "\r\n..." : "");
|
|
3758
|
-
return index$
|
|
2236
|
+
return index$3.react.createElement("bcm-tooltip", {
|
|
3759
2237
|
placement: "bottom",
|
|
3760
2238
|
message: titles,
|
|
3761
2239
|
trigger: "hover",
|
|
3762
|
-
}, index$
|
|
2240
|
+
}, index$3.react.createElement("div", {
|
|
3763
2241
|
className: "bcm-tag bcm-tag--other",
|
|
3764
2242
|
onClick: ({ target }) => this.onClickControl(target, items, true),
|
|
3765
|
-
}, index$
|
|
2243
|
+
}, index$3.react.createElement("span", { className: `bcm-tag__content dismissable ${this.checked ? "checkable checked" : ""}` }, index$3.react.createElement("span", { className: "value" }, `+${items === null || items === void 0 ? void 0 : items.length}`), index$3.react.createElement("span", { className: "right close-button" }, index$3.react.createElement("bcm-icon", {
|
|
3766
2244
|
icon: "fa fa-times",
|
|
3767
2245
|
})))));
|
|
3768
2246
|
};
|
|
@@ -3785,19 +2263,19 @@ const BcmRcOverflow = class {
|
|
|
3785
2263
|
}
|
|
3786
2264
|
componentWillRender() {
|
|
3787
2265
|
const { data, renderItem, renderRest, maxCount } = this;
|
|
3788
|
-
this.overflowInstance = index$
|
|
2266
|
+
this.overflowInstance = index$3.react.createElement(ForwardOverflow, {
|
|
3789
2267
|
data,
|
|
3790
2268
|
renderItem,
|
|
3791
2269
|
renderRest,
|
|
3792
2270
|
maxCount,
|
|
3793
2271
|
});
|
|
3794
|
-
index$
|
|
2272
|
+
index$3.reactDom.render(this.overflowInstance, this.el);
|
|
3795
2273
|
}
|
|
3796
|
-
get el() { return index$
|
|
2274
|
+
get el() { return index$1.getElement(this); }
|
|
3797
2275
|
};
|
|
3798
2276
|
BcmRcOverflow.style = rcOverflowCss;
|
|
3799
2277
|
|
|
3800
|
-
const { state } = index$
|
|
2278
|
+
const { state } = index$2.createStore({
|
|
3801
2279
|
value: new Map(),
|
|
3802
2280
|
});
|
|
3803
2281
|
const setValue = val => {
|
|
@@ -3936,9 +2414,9 @@ const searchCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:
|
|
|
3936
2414
|
|
|
3937
2415
|
const BcmSearch = class {
|
|
3938
2416
|
constructor(hostRef) {
|
|
3939
|
-
index$
|
|
3940
|
-
this.bcmOnSearch = index$
|
|
3941
|
-
this.bcmOnSearchClear = index$
|
|
2417
|
+
index$1.registerInstance(this, hostRef);
|
|
2418
|
+
this.bcmOnSearch = index$1.createEvent(this, "bcm-on-search", 7);
|
|
2419
|
+
this.bcmOnSearchClear = index$1.createEvent(this, "bcm-on-search-clear", 7);
|
|
3942
2420
|
this.debounceHandler = generate.Generate.debounceInput((event) => this.onSearchValue(event, this), 300, false, () => {
|
|
3943
2421
|
var _a, _b;
|
|
3944
2422
|
this.isActiveClearable = ((_b = (_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.length) > 0 && this.clearable;
|
|
@@ -3948,7 +2426,7 @@ const BcmSearch = class {
|
|
|
3948
2426
|
this.disabled = false;
|
|
3949
2427
|
this.readonly = false;
|
|
3950
2428
|
this.clearable = true;
|
|
3951
|
-
this.size = bcm.Bcm
|
|
2429
|
+
this.size = bcm.Bcm.Size.medium;
|
|
3952
2430
|
this.limit = 10;
|
|
3953
2431
|
this.searchIsOnlyChilds = false;
|
|
3954
2432
|
this.minSearchLength = 2;
|
|
@@ -4012,9 +2490,9 @@ const BcmSearch = class {
|
|
|
4012
2490
|
}
|
|
4013
2491
|
render() {
|
|
4014
2492
|
const { _id, placeholder, disabled, readonly } = this;
|
|
4015
|
-
return index$
|
|
2493
|
+
return index$1.h(index$1.Host, { onClick: () => { this.onBcmFocus(); this.onBcmSelect(); } }, index$1.h(inputTemplate.InputTemplate, { size: this.size, id: _id, type: "search", placeholder: placeholder, disabled: disabled, "full-width": true, readonly: readonly, clearable: this.isActiveClearable, handleFocus: () => this.handleFocus(), handleBlur: () => this.handleBlur(), handleChange: () => this.handleChange(), handleClear: () => this.handleClear(), handleInput: this.debounceHandler, ref: (el) => this.inputElement = el }));
|
|
4016
2494
|
}
|
|
4017
|
-
get el() { return index$
|
|
2495
|
+
get el() { return index$1.getElement(this); }
|
|
4018
2496
|
static get watchers() { return {
|
|
4019
2497
|
"data": ["dataChanged"]
|
|
4020
2498
|
}; }
|